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

Unified Diff: src/compiler/graph-reducer.h

Issue 1134303003: [turbofan] Turn JSTypedLowering into an AdvancedReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-reducer.h
diff --git a/src/compiler/graph-reducer.h b/src/compiler/graph-reducer.h
index aee2bca878f1b12b08ced8d2a4daf19898fe9f2b..bd732d5808938b4cc0c3bcd0589615b867ea6a89 100644
--- a/src/compiler/graph-reducer.h
+++ b/src/compiler/graph-reducer.h
@@ -103,6 +103,21 @@ class AdvancedReducer : public Reducer {
editor_->ReplaceWithValue(node, value, effect, control);
}
+ // Relax the effects of {node} by immediately replacing effect and control
+ // uses of {node} with the effect and control input to {node}.
+ // TODO(turbofan): replace the effect input to {node} with {graph->start()}.
+ void RelaxEffectsAndControls(Node* node) {
+ DCHECK_NOT_NULL(editor_);
+ editor_->ReplaceWithValue(node, node, nullptr, nullptr);
+ }
+
+ // Relax the control uses of {node} by immediately replacing them with the
+ // control input to {node}.
+ void RelaxControls(Node* node) {
+ DCHECK_NOT_NULL(editor_);
+ editor_->ReplaceWithValue(node, node, node, nullptr);
+ }
+
private:
Editor* const editor_;
};
« no previous file with comments | « no previous file | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698