[turbofan] Parameter nodes are not idempotent.
authorbmeurer <bmeurer@chromium.org>
Tue, 3 Feb 2015 14:45:28 +0000 (06:45 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 3 Feb 2015 14:45:39 +0000 (14:45 +0000)
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/896463004

Cr-Commit-Position: refs/heads/master@{#26403}

src/compiler/common-operator.cc

index b9aadef..e67759e 100644 (file)
@@ -204,11 +204,12 @@ struct CommonOperatorGlobalCache FINAL {
   template <int kIndex>
   struct ParameterOperator FINAL : public Operator1<int> {
     ParameterOperator()
-        : Operator1<int>(                             // --
-              IrOpcode::kParameter, Operator::kPure,  // opcode
-              "Parameter",                            // name
-              1, 0, 0, 1, 0, 0,                       // counts,
-              kIndex) {}                              // parameter
+        : Operator1<int>(                                // --
+              IrOpcode::kParameter,                      // opcode
+              Operator::kFoldable | Operator::kNoThrow,  // flags
+              "Parameter",                               // name
+              1, 0, 0, 1, 0, 0,                          // counts,
+              kIndex) {}                                 // parameter
   };
 #define CACHED_PARAMETER(index) \
   ParameterOperator<index> kParameter##index##Operator;
@@ -306,11 +307,12 @@ const Operator* CommonOperatorBuilder::Parameter(int index) {
       break;
   }
   // Uncached.
-  return new (zone()) Operator1<int>(         // --
-      IrOpcode::kParameter, Operator::kPure,  // opcode
-      "Parameter",                            // name
-      1, 0, 0, 1, 0, 0,                       // counts
-      index);                                 // parameter
+  return new (zone()) Operator1<int>(            // --
+      IrOpcode::kParameter,                      // opcode
+      Operator::kFoldable | Operator::kNoThrow,  // flags
+      "Parameter",                               // name
+      1, 0, 0, 1, 0, 0,                          // counts
+      index);                                    // parameter
 }