Index: src/compiler/graph-reducer.h |
diff --git a/src/compiler/graph-reducer.h b/src/compiler/graph-reducer.h |
index 39c302f8925dffb456e9b341c212aad87214684d..273b5dd0cf86bc75ebc62346a066da942e5216e3 100644 |
--- a/src/compiler/graph-reducer.h |
+++ b/src/compiler/graph-reducer.h |
@@ -47,6 +47,11 @@ class Reducer { |
// Try to reduce a node if possible. |
virtual Reduction Reduce(Node* node) = 0; |
+ // Invoked by the {GraphReducer} when all nodes are done. Can be used to |
+ // do additional reductions at the end, which in turn can cause a new round |
+ // of reductions. |
+ virtual void Finalize(); |
+ |
// Helper functions for subclasses to produce reductions for a node. |
static Reduction NoChange() { return Reduction(); } |
static Reduction Replace(Node* node) { return Reduction(node); } |