| Index: src/compiler/common-operator.cc
|
| diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc
|
| index a1dc7d27f471c405a53d503b1dff1be4a1b3cdfb..bc36c5208bd2b5ad2ab98a0b41896f8aa5d09911 100644
|
| --- a/src/compiler/common-operator.cc
|
| +++ b/src/compiler/common-operator.cc
|
| @@ -276,6 +276,11 @@ std::ostream& operator<<(std::ostream& os,
|
| V(5) \
|
| V(6)
|
|
|
| +#define CACHED_INDUCTION_VARIABLE_PHI_LIST(V) \
|
| + V(4) \
|
| + V(5) \
|
| + V(6) \
|
| + V(7)
|
|
|
| #define CACHED_LOOP_LIST(V) \
|
| V(1) \
|
| @@ -473,6 +478,20 @@ struct CommonOperatorGlobalCache final {
|
| CACHED_PHI_LIST(CACHED_PHI)
|
| #undef CACHED_PHI
|
|
|
| + template <int kInputCount>
|
| + struct InductionVariablePhiOperator final : public Operator {
|
| + InductionVariablePhiOperator()
|
| + : Operator( //--
|
| + IrOpcode::kInductionVariablePhi, Operator::kPure, // opcode
|
| + "InductionVariablePhi", // name
|
| + kInputCount, 0, 1, 1, 0, 0) {} // counts
|
| + };
|
| +#define CACHED_INDUCTION_VARIABLE_PHI(input_count) \
|
| + InductionVariablePhiOperator<input_count> \
|
| + kInductionVariablePhi##input_count##Operator;
|
| + CACHED_INDUCTION_VARIABLE_PHI_LIST(CACHED_INDUCTION_VARIABLE_PHI)
|
| +#undef CACHED_INDUCTION_VARIABLE_PHI
|
| +
|
| template <int kIndex>
|
| struct ParameterOperator final : public Operator1<ParameterInfo> {
|
| ParameterOperator()
|
| @@ -853,6 +872,25 @@ const Operator* CommonOperatorBuilder::EffectPhi(int effect_input_count) {
|
| 0, effect_input_count, 1, 0, 1, 0); // counts
|
| }
|
|
|
| +const Operator* CommonOperatorBuilder::InductionVariablePhi(int input_count) {
|
| + DCHECK(input_count >= 4); // There must be always the entry, backedge,
|
| + // increment and at least one bound.
|
| + switch (input_count) {
|
| +#define CACHED_INDUCTION_VARIABLE_PHI(input_count) \
|
| + case input_count: \
|
| + return &cache_.kInductionVariablePhi##input_count##Operator;
|
| + CACHED_INDUCTION_VARIABLE_PHI_LIST(CACHED_INDUCTION_VARIABLE_PHI)
|
| +#undef CACHED_INDUCTION_VARIABLE_PHI
|
| + default:
|
| + break;
|
| + }
|
| + // Uncached.
|
| + return new (zone()) Operator( // --
|
| + IrOpcode::kInductionVariablePhi, Operator::kPure, // opcode
|
| + "InductionVariablePhi", // name
|
| + input_count, 0, 1, 1, 0, 0); // counts
|
| +}
|
| +
|
| const Operator* CommonOperatorBuilder::BeginRegion(
|
| RegionObservability region_observability) {
|
| switch (region_observability) {
|
|
|