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

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

Issue 809333002: [turbofan] Implement OSR for outer loops. (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/common-operator.h ('k') | src/compiler/control-builders.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator.cc
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc
index a6cca456d2bf219bf0c1639c47ef960b11416a48..54059ac29a6f09bf11f098d528315ec1f7815776 100644
--- a/src/compiler/common-operator.cc
+++ b/src/compiler/common-operator.cc
@@ -103,13 +103,15 @@ std::ostream& operator<<(std::ostream& os, FrameStateCallInfo const& info) {
}
-#define CACHED_OP_LIST(V) \
- V(Dead, Operator::kFoldable, 0, 0, 0, 1) \
- V(End, Operator::kFoldable, 0, 0, 1, 0) \
- V(IfTrue, Operator::kFoldable, 0, 0, 1, 1) \
- V(IfFalse, Operator::kFoldable, 0, 0, 1, 1) \
- V(Throw, Operator::kFoldable, 1, 1, 1, 1) \
- V(Return, Operator::kNoProperties, 1, 1, 1, 1)
+#define CACHED_OP_LIST(V) \
+ V(Dead, Operator::kFoldable, 0, 0, 0, 0, 0, 1) \
+ V(End, Operator::kFoldable, 0, 0, 1, 0, 0, 0) \
+ V(IfTrue, Operator::kFoldable, 0, 0, 1, 0, 0, 1) \
+ V(IfFalse, Operator::kFoldable, 0, 0, 1, 0, 0, 1) \
+ V(Throw, Operator::kFoldable, 1, 1, 1, 0, 0, 1) \
+ V(Return, Operator::kNoProperties, 1, 1, 1, 0, 0, 1) \
+ V(OsrNormalEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \
+ V(OsrLoopEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1)
#define CACHED_LOOP_LIST(V) \
@@ -139,14 +141,16 @@ std::ostream& operator<<(std::ostream& os, FrameStateCallInfo const& info) {
struct CommonOperatorGlobalCache FINAL {
-#define CACHED(Name, properties, value_input_count, effect_input_count, \
- control_input_count, control_output_count) \
- struct Name##Operator FINAL : public Operator { \
- Name##Operator() \
- : Operator(IrOpcode::k##Name, properties, #Name, value_input_count, \
- effect_input_count, control_input_count, 0, 0, \
- control_output_count) {} \
- }; \
+#define CACHED(Name, properties, value_input_count, effect_input_count, \
+ control_input_count, value_output_count, effect_output_count, \
+ control_output_count) \
+ struct Name##Operator FINAL : public Operator { \
+ Name##Operator() \
+ : Operator(IrOpcode::k##Name, properties, #Name, value_input_count, \
+ effect_input_count, control_input_count, \
+ value_output_count, effect_output_count, \
+ control_output_count) {} \
+ }; \
Name##Operator k##Name##Operator;
CACHED_OP_LIST(CACHED)
#undef CACHED
@@ -214,10 +218,11 @@ CommonOperatorBuilder::CommonOperatorBuilder(Zone* zone)
: cache_(kCache.Get()), zone_(zone) {}
-#define CACHED(Name, properties, value_input_count, effect_input_count, \
- control_input_count, control_output_count) \
- const Operator* CommonOperatorBuilder::Name() { \
- return &cache_.k##Name##Operator; \
+#define CACHED(Name, properties, value_input_count, effect_input_count, \
+ control_input_count, value_output_count, effect_output_count, \
+ control_output_count) \
+ const Operator* CommonOperatorBuilder::Name() { \
+ return &cache_.k##Name##Operator; \
}
CACHED_OP_LIST(CACHED)
#undef CACHED
@@ -310,6 +315,15 @@ const Operator* CommonOperatorBuilder::Parameter(int index) {
}
+const Operator* CommonOperatorBuilder::OsrValue(int index) {
+ return new (zone()) Operator1<int>( // --
+ IrOpcode::kOsrValue, Operator::kPure, // opcode
+ "OsrValue", // name
+ 0, 0, 1, 1, 0, 0, // counts
+ index); // parameter
+}
+
+
const Operator* CommonOperatorBuilder::Int32Constant(int32_t value) {
return new (zone()) Operator1<int32_t>( // --
IrOpcode::kInt32Constant, Operator::kPure, // opcode
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/control-builders.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698