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

Unified Diff: src/compiler/common-operator.cc

Issue 816053002: [turbofan] First version of loop peeling. (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
Index: src/compiler/common-operator.cc
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc
index 54059ac29a6f09bf11f098d528315ec1f7815776..09f9a5a90d0babd92e26c5b91f9d77ed3eb5b455 100644
--- a/src/compiler/common-operator.cc
+++ b/src/compiler/common-operator.cc
@@ -486,6 +486,23 @@ const Operator* CommonOperatorBuilder::Projection(size_t index) {
index); // parameter
}
+
+const Operator* CommonOperatorBuilder::ResizeMergeOrPhi(const Operator* op,
+ int size) {
+ if (op->opcode() == IrOpcode::kPhi) {
+ return Phi(OpParameter<MachineType>(op), size);
+ } else if (op->opcode() == IrOpcode::kEffectPhi) {
+ return EffectPhi(size);
+ } else if (op->opcode() == IrOpcode::kMerge) {
+ return Merge(size);
+ } else if (op->opcode() == IrOpcode::kLoop) {
+ return Loop(size);
+ } else {
+ UNREACHABLE();
+ return nullptr;
+ }
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698