diff options
| author | 2014-05-06 21:56:18 +0000 | |
|---|---|---|
| committer | 2014-05-06 21:56:18 +0000 | |
| commit | 80475df914f9dbdbb1f4b42e87e75d375d50a629 (patch) | |
| tree | db40a29f8c2a8d60fdc405ac4aa28d8c4990dc96 /compiler/dex/mir_dataflow.cc | |
| parent | fc733a14e2b0eaf4ac0f386ac784706bf66de16c (diff) | |
| parent | 0add77a86599260aba3ea4b56e9db3da6bb881a8 (diff) | |
Merge "ART: Ensure use counts updated when adding SSA reg"
Diffstat (limited to 'compiler/dex/mir_dataflow.cc')
| -rw-r--r-- | compiler/dex/mir_dataflow.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/dex/mir_dataflow.cc b/compiler/dex/mir_dataflow.cc index 2f17e08974..ed7e1f5edd 100644 --- a/compiler/dex/mir_dataflow.cc +++ b/compiler/dex/mir_dataflow.cc @@ -925,11 +925,17 @@ bool MIRGraph::FindLocalLiveIn(BasicBlock* bb) { int MIRGraph::AddNewSReg(int v_reg) { // Compiler temps always have a subscript of 0 int subscript = (v_reg < 0) ? 0 : ++ssa_last_defs_[v_reg]; - int ssa_reg = GetNumSSARegs(); + uint32_t ssa_reg = GetNumSSARegs(); SetNumSSARegs(ssa_reg + 1); ssa_base_vregs_->Insert(v_reg); ssa_subscripts_->Insert(subscript); DCHECK_EQ(ssa_base_vregs_->Size(), ssa_subscripts_->Size()); + // If we are expanding very late, update use counts too. + if (ssa_reg > 0 && use_counts_.Size() == ssa_reg) { + // Need to expand the counts. + use_counts_.Insert(0); + raw_use_counts_.Insert(0); + } return ssa_reg; } |