Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: src/compiler/value-numbering-reducer.h

Issue 2474873003: [turbofan] Tune the ValueNumberingReducer's growth rate (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/value-numbering-reducer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_VALUE_NUMBERING_REDUCER_H_ 5 #ifndef V8_COMPILER_VALUE_NUMBERING_REDUCER_H_
6 #define V8_COMPILER_VALUE_NUMBERING_REDUCER_H_ 6 #define V8_COMPILER_VALUE_NUMBERING_REDUCER_H_
7 7
8 #include "src/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/compiler/graph-reducer.h" 9 #include "src/compiler/graph-reducer.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 namespace compiler { 14 namespace compiler {
15 15
16 class V8_EXPORT_PRIVATE ValueNumberingReducer final 16 class V8_EXPORT_PRIVATE ValueNumberingReducer final
17 : public NON_EXPORTED_BASE(Reducer) { 17 : public NON_EXPORTED_BASE(Reducer) {
18 public: 18 public:
19 explicit ValueNumberingReducer(Zone* temp_zone, Zone* graph_zone); 19 explicit ValueNumberingReducer(Zone* temp_zone, Zone* graph_zone);
20 ~ValueNumberingReducer(); 20 ~ValueNumberingReducer();
21 21
22 Reduction Reduce(Node* node) override; 22 Reduction Reduce(Node* node) override;
23 23
24 private: 24 private:
25 enum { kInitialCapacity = 256u, kCapacityToSizeRatio = 2u }; 25 enum { kInitialCapacity = 256u };
26 26
27 void Grow(); 27 void Grow();
28 Zone* temp_zone() const { return temp_zone_; } 28 Zone* temp_zone() const { return temp_zone_; }
29 Zone* graph_zone() const { return graph_zone_; } 29 Zone* graph_zone() const { return graph_zone_; }
30 30
31 Node** entries_; 31 Node** entries_;
32 size_t capacity_; 32 size_t capacity_;
33 size_t size_; 33 size_t size_;
34 Zone* temp_zone_; 34 Zone* temp_zone_;
35 Zone* graph_zone_; 35 Zone* graph_zone_;
36 }; 36 };
37 37
38 } // namespace compiler 38 } // namespace compiler
39 } // namespace internal 39 } // namespace internal
40 } // namespace v8 40 } // namespace v8
41 41
42 #endif // V8_COMPILER_VALUE_NUMBERING_REDUCER_H_ 42 #endif // V8_COMPILER_VALUE_NUMBERING_REDUCER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/value-numbering-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698