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

Side by Side Diff: src/compiler/graph-reducer.h

Issue 1419373012: [turbofan] Run inlining within the regular reducer fixpoint. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Limit inlining depth. Created 5 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/graph-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_GRAPH_REDUCER_H_ 5 #ifndef V8_COMPILER_GRAPH_REDUCER_H_
6 #define V8_COMPILER_GRAPH_REDUCER_H_ 6 #define V8_COMPILER_GRAPH_REDUCER_H_
7 7
8 #include "src/compiler/node-marker.h" 8 #include "src/compiler/node-marker.h"
9 #include "src/zone-containers.h" 9 #include "src/zone-containers.h"
10 10
(...skipping 29 matching lines...) Expand all
40 // language-specific reductions (e.g. reduction based on types or constant 40 // language-specific reductions (e.g. reduction based on types or constant
41 // folding of low-level operators) can be integrated into the graph reduction 41 // folding of low-level operators) can be integrated into the graph reduction
42 // phase. 42 // phase.
43 class Reducer { 43 class Reducer {
44 public: 44 public:
45 virtual ~Reducer() {} 45 virtual ~Reducer() {}
46 46
47 // Try to reduce a node if possible. 47 // Try to reduce a node if possible.
48 virtual Reduction Reduce(Node* node) = 0; 48 virtual Reduction Reduce(Node* node) = 0;
49 49
50 // Invoked by the {GraphReducer} when all nodes are done. Can be used to
51 // do additional reductions at the end, which in turn can cause a new round
52 // of reductions.
53 virtual void Finalize();
54
50 // Helper functions for subclasses to produce reductions for a node. 55 // Helper functions for subclasses to produce reductions for a node.
51 static Reduction NoChange() { return Reduction(); } 56 static Reduction NoChange() { return Reduction(); }
52 static Reduction Replace(Node* node) { return Reduction(node); } 57 static Reduction Replace(Node* node) { return Reduction(node); }
53 static Reduction Changed(Node* node) { return Reduction(node); } 58 static Reduction Changed(Node* node) { return Reduction(node); }
54 }; 59 };
55 60
56 61
57 // An advanced reducer can also edit the graphs by changing and replacing nodes 62 // An advanced reducer can also edit the graphs by changing and replacing nodes
58 // other than the one currently being reduced. 63 // other than the one currently being reduced.
59 class AdvancedReducer : public Reducer { 64 class AdvancedReducer : public Reducer {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 ZoneStack<NodeState> stack_; 175 ZoneStack<NodeState> stack_;
171 176
172 DISALLOW_COPY_AND_ASSIGN(GraphReducer); 177 DISALLOW_COPY_AND_ASSIGN(GraphReducer);
173 }; 178 };
174 179
175 } // namespace compiler 180 } // namespace compiler
176 } // namespace internal 181 } // namespace internal
177 } // namespace v8 182 } // namespace v8
178 183
179 #endif // V8_COMPILER_GRAPH_REDUCER_H_ 184 #endif // V8_COMPILER_GRAPH_REDUCER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/graph-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698