diff options
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/nodes.cc | 7 | ||||
-rw-r--r-- | compiler/optimizing/nodes.h | 1 | ||||
-rw-r--r-- | compiler/optimizing/reference_type_propagation.cc | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 8044a86338..6be474a8c9 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1739,6 +1739,13 @@ void HGraphVisitor::VisitNonPhiInstructions(HBasicBlock* block) { } } +void HGraphVisitor::VisitNonPhiInstructionsHandleChanges(HBasicBlock* block) { + for (HInstructionIteratorHandleChanges it(block->GetInstructions()); !it.Done(); it.Advance()) { + DCHECK(!it.Current()->IsPhi()); + it.Current()->Accept(this); + } +} + HConstant* HTypeConversion::TryStaticEvaluation() const { return TryStaticEvaluation(GetInput()); } HConstant* HTypeConversion::TryStaticEvaluation(HInstruction* input) const { diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 86a62c1994..99fbbc6357 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -8399,6 +8399,7 @@ class HGraphVisitor : public ValueObject { protected: void VisitPhis(HBasicBlock* block); void VisitNonPhiInstructions(HBasicBlock* block); + void VisitNonPhiInstructionsHandleChanges(HBasicBlock* block); OptimizingCompilerStats* stats_; diff --git a/compiler/optimizing/reference_type_propagation.cc b/compiler/optimizing/reference_type_propagation.cc index 32b4557de0..9867e11f35 100644 --- a/compiler/optimizing/reference_type_propagation.cc +++ b/compiler/optimizing/reference_type_propagation.cc @@ -316,7 +316,7 @@ void ReferenceTypePropagation::RTPVisitor::VisitBasicBlock(HBasicBlock* block) { // Handle instructions. Since RTP may add HBoundType instructions just after the // last visited instruction, use `HInstructionIteratorHandleChanges` iterator. - VisitNonPhiInstructions(block); + VisitNonPhiInstructionsHandleChanges(block); // Add extra nodes to bound types. BoundTypeForIfNotNull(block); |