| 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_;
|
| };
|
|
|