v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
value-numbering-reducer.h
Go to the documentation of this file.
1// Copyright 2014 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_COMPILER_VALUE_NUMBERING_REDUCER_H_
6#define V8_COMPILER_VALUE_NUMBERING_REDUCER_H_
7
11
12namespace v8 {
13namespace internal {
14namespace compiler {
15
17 : public NON_EXPORTED_BASE(Reducer) {
18 public:
19 explicit ValueNumberingReducer(Zone* temp_zone, Zone* graph_zone);
21
22 const char* reducer_name() const override { return "ValueNumberingReducer"; }
23
24 Reduction Reduce(Node* node) override;
25
26 private:
27 enum { kInitialCapacity = 256u };
28
29 Reduction ReplaceIfTypesMatch(Node* node, Node* replacement);
30 void Grow();
31 Zone* temp_zone() const { return temp_zone_; }
32 Zone* graph_zone() const { return graph_zone_; }
33
35 size_t capacity_;
36 size_t size_;
39};
40
41} // namespace compiler
42} // namespace internal
43} // namespace v8
44
45#endif // V8_COMPILER_VALUE_NUMBERING_REDUCER_H_
Zone * graph_zone
#define NON_EXPORTED_BASE(code)
#define V8_EXPORT_PRIVATE
Definition macros.h:460