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

Unified Diff: src/compiler/loop-peeling.cc

Issue 859053002: [turbofan] Pull ResizeMergeOrPhi into CommonOperatorBuilder and use in ControlReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « src/compiler/control-reducer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/loop-peeling.cc
diff --git a/src/compiler/loop-peeling.cc b/src/compiler/loop-peeling.cc
index 6a59efc1dce0b00a71f3319b6d06d10e0372e653..f1a5667c534282b9a69a9b0b37ee0c3eac8278c7 100644
--- a/src/compiler/loop-peeling.cc
+++ b/src/compiler/loop-peeling.cc
@@ -161,23 +161,6 @@ Node* PeeledIteration::map(Node* node) {
}
-static const Operator* ResizeMergeOrPhi(CommonOperatorBuilder* common,
- const Operator* op, int size) {
- if (op->opcode() == IrOpcode::kPhi) {
- return common->Phi(OpParameter<MachineType>(op), size);
- } else if (op->opcode() == IrOpcode::kEffectPhi) {
- return common->EffectPhi(size);
- } else if (op->opcode() == IrOpcode::kMerge) {
- return common->Merge(size);
- } else if (op->opcode() == IrOpcode::kLoop) {
- return common->Loop(size);
- } else {
- UNREACHABLE();
- return nullptr;
- }
-}
-
-
PeeledIteration* LoopPeeler::Peel(Graph* graph, CommonOperatorBuilder* common,
LoopTree* loop_tree, LoopTree::Loop* loop,
Zone* tmp_zone) {
@@ -225,7 +208,7 @@ PeeledIteration* LoopPeeler::Peel(Graph* graph, CommonOperatorBuilder* common,
for (Node* input : inputs) {
if (input != inputs[0]) { // Non-redundant phi.
inputs.push_back(merge);
- const Operator* op = ResizeMergeOrPhi(common, node->op(), backedges);
+ const Operator* op = common->ResizeMergeOrPhi(node->op(), backedges);
Node* phi = graph->NewNode(op, backedges + 1, &inputs[0]);
node->ReplaceInput(0, phi);
break;
« no previous file with comments | « src/compiler/control-reducer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698