| Index: runtime/vm/flow_graph_range_analysis.cc
|
| diff --git a/runtime/vm/flow_graph_range_analysis.cc b/runtime/vm/flow_graph_range_analysis.cc
|
| index 28ec3251384e953c86ed956720693af7ac164a11..b19b4e63a1778120cd22b7790cfef65e8d6ba73d 100644
|
| --- a/runtime/vm/flow_graph_range_analysis.cc
|
| +++ b/runtime/vm/flow_graph_range_analysis.cc
|
| @@ -271,50 +271,6 @@ void RangeAnalysis::CollectValues() {
|
| }
|
|
|
|
|
| -// Returns true if use is dominated by the given instruction.
|
| -// Note: uses that occur at instruction itself are not dominated by it.
|
| -static bool IsDominatedUse(Instruction* dom, Value* use) {
|
| - BlockEntryInstr* dom_block = dom->GetBlock();
|
| -
|
| - Instruction* instr = use->instruction();
|
| -
|
| - PhiInstr* phi = instr->AsPhi();
|
| - if (phi != NULL) {
|
| - return dom_block->Dominates(phi->block()->PredecessorAt(use->use_index()));
|
| - }
|
| -
|
| - BlockEntryInstr* use_block = instr->GetBlock();
|
| - if (use_block == dom_block) {
|
| - // Fast path for the case of block entry.
|
| - if (dom_block == dom) return true;
|
| -
|
| - for (Instruction* curr = dom->next(); curr != NULL; curr = curr->next()) {
|
| - if (curr == instr) return true;
|
| - }
|
| -
|
| - return false;
|
| - }
|
| -
|
| - return dom_block->Dominates(use_block);
|
| -}
|
| -
|
| -
|
| -void RangeAnalysis::RenameDominatedUses(Definition* def,
|
| - Instruction* dom,
|
| - Definition* other) {
|
| - for (Value::Iterator it(def->input_use_list()); !it.Done(); it.Advance()) {
|
| - Value* use = it.Current();
|
| -
|
| - // Skip dead phis.
|
| - PhiInstr* phi = use->instruction()->AsPhi();
|
| - ASSERT((phi == NULL) || phi->is_alive());
|
| - if (IsDominatedUse(dom, use)) {
|
| - use->BindTo(other);
|
| - }
|
| - }
|
| -}
|
| -
|
| -
|
| // For a comparison operation return an operation for the equivalent flipped
|
| // comparison: a (op) b === b (op') a.
|
| static Token::Kind FlipComparison(Token::Kind op) {
|
| @@ -390,7 +346,7 @@ ConstraintInstr* RangeAnalysis::InsertConstraintFor(Value* use,
|
| constraint = new (Z) ConstraintInstr(use->CopyWithType(), constraint_range);
|
|
|
| flow_graph_->InsertAfter(after, constraint, NULL, FlowGraph::kValue);
|
| - RenameDominatedUses(defn, constraint, constraint);
|
| + FlowGraph::RenameDominatedUses(defn, constraint, constraint);
|
| constraints_.Add(constraint);
|
| return constraint;
|
| }
|
|
|