From 066f9e4b87d875f02a10fd43d8a251b3c17a64a3 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 16 Jan 2015 16:04:43 +0000 Subject: Quick: Clean up optimization pass order. Move the TypeInference pass to post-opt passes and make it a PassMEMirSsaRep as we need to rerun the pass if the SSA representation has changed. (Though we currently don't have any pass that would require it.) The results of MethodUseCount and ConstantPropagation passes are used only in the BBOptimization and codegen and stay valid across BBOptimization and SuspendCheckElimination, so move them out of post-opt passes to just before the BBOpt (and reverse the dependency between ConstantPropagation and init reg locations passes). Change-Id: If02c087107cef48d5f9f7c18b0a0ace370fe2647 --- compiler/dex/mir_optimization.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/dex/mir_optimization.cc') diff --git a/compiler/dex/mir_optimization.cc b/compiler/dex/mir_optimization.cc index 15b83413b7..ebbd28f6c4 100644 --- a/compiler/dex/mir_optimization.cc +++ b/compiler/dex/mir_optimization.cc @@ -35,6 +35,7 @@ static unsigned int Predecessors(BasicBlock* bb) { void MIRGraph::SetConstant(int32_t ssa_reg, int32_t value) { is_constant_v_->SetBit(ssa_reg); constant_values_[ssa_reg] = value; + reg_location_[ssa_reg].is_const = true; } void MIRGraph::SetConstantWide(int32_t ssa_reg, int64_t value) { @@ -42,6 +43,8 @@ void MIRGraph::SetConstantWide(int32_t ssa_reg, int64_t value) { is_constant_v_->SetBit(ssa_reg + 1); constant_values_[ssa_reg] = Low32Bits(value); constant_values_[ssa_reg + 1] = High32Bits(value); + reg_location_[ssa_reg].is_const = true; + reg_location_[ssa_reg + 1].is_const = true; } void MIRGraph::DoConstantPropagation(BasicBlock* bb) { -- cgit v1.2.3-59-g8ed1b