diff options
author | Vladimir Marko <vmarko@google.com> | 2014-12-19 18:11:35 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2014-12-19 18:11:35 +0000 |
commit | 1c6ea4483982803b3bc3635b7dd71744c1fe1cef (patch) | |
tree | 3fe7873cde1f13b68851e95c8d2a80d62164ea32 /compiler/dex/mir_dataflow.cc | |
parent | a64d0142edd7c325c0a59d170d8c82c8176faa03 (diff) | |
download | android_art-1c6ea4483982803b3bc3635b7dd71744c1fe1cef.tar.gz android_art-1c6ea4483982803b3bc3635b7dd71744c1fe1cef.tar.bz2 android_art-1c6ea4483982803b3bc3635b7dd71744c1fe1cef.zip |
Move two members out of MIRGraph::temp_::ssa.
It turns out they are used outside the SSA transformation
by the x86 back-end.
This is a partial revert of
https://android-review.googlesource.com/120571
Change-Id: Ia5cb2988ab0625d8519901124bd4fc184d5f0886
Diffstat (limited to 'compiler/dex/mir_dataflow.cc')
-rw-r--r-- | compiler/dex/mir_dataflow.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/compiler/dex/mir_dataflow.cc b/compiler/dex/mir_dataflow.cc index ae29ae7fc2..6704112281 100644 --- a/compiler/dex/mir_dataflow.cc +++ b/compiler/dex/mir_dataflow.cc @@ -1052,7 +1052,7 @@ bool MIRGraph::FindLocalLiveIn(BasicBlock* bb) { } int MIRGraph::AddNewSReg(int v_reg) { - int subscript = ++temp_.ssa.ssa_last_defs_[v_reg]; + int subscript = ++ssa_last_defs_[v_reg]; uint32_t ssa_reg = GetNumSSARegs(); SetNumSSARegs(ssa_reg + 1); ssa_base_vregs_.push_back(v_reg); @@ -1070,14 +1070,14 @@ int MIRGraph::AddNewSReg(int v_reg) { /* Find out the latest SSA register for a given Dalvik register */ void MIRGraph::HandleSSAUse(int* uses, int dalvik_reg, int reg_index) { DCHECK((dalvik_reg >= 0) && (dalvik_reg < static_cast<int>(GetNumOfCodeAndTempVRs()))); - uses[reg_index] = temp_.ssa.vreg_to_ssa_map_[dalvik_reg]; + uses[reg_index] = vreg_to_ssa_map_[dalvik_reg]; } /* Setup a new SSA register for a given Dalvik register */ void MIRGraph::HandleSSADef(int* defs, int dalvik_reg, int reg_index) { DCHECK((dalvik_reg >= 0) && (dalvik_reg < static_cast<int>(GetNumOfCodeAndTempVRs()))); int ssa_reg = AddNewSReg(dalvik_reg); - temp_.ssa.vreg_to_ssa_map_[dalvik_reg] = ssa_reg; + vreg_to_ssa_map_[dalvik_reg] = ssa_reg; defs[reg_index] = ssa_reg; } @@ -1319,7 +1319,7 @@ bool MIRGraph::DoSSAConversion(BasicBlock* bb) { static_cast<int*>(arena_->Alloc(sizeof(int) * GetNumOfCodeAndTempVRs(), kArenaAllocDFInfo)); - memcpy(bb->data_flow_info->vreg_to_ssa_map_exit, temp_.ssa.vreg_to_ssa_map_, + memcpy(bb->data_flow_info->vreg_to_ssa_map_exit, vreg_to_ssa_map_, sizeof(int) * GetNumOfCodeAndTempVRs()); return true; } @@ -1369,15 +1369,17 @@ void MIRGraph::CompilerInitializeSSAConversion() { * Initialize the DalvikToSSAMap map. There is one entry for each * Dalvik register, and the SSA names for those are the same. */ - temp_.ssa.vreg_to_ssa_map_ = - reinterpret_cast<int*>(temp_scoped_alloc_->Alloc(sizeof(int) * num_reg, kArenaAllocDFInfo)); + vreg_to_ssa_map_ = + static_cast<int*>(arena_->Alloc(sizeof(int) * num_reg, + kArenaAllocDFInfo)); /* Keep track of the higest def for each dalvik reg */ - temp_.ssa.ssa_last_defs_ = - reinterpret_cast<int*>(temp_scoped_alloc_->Alloc(sizeof(int) * num_reg, kArenaAllocDFInfo)); + ssa_last_defs_ = + static_cast<int*>(arena_->Alloc(sizeof(int) * num_reg, + kArenaAllocDFInfo)); for (unsigned int i = 0; i < num_reg; i++) { - temp_.ssa.vreg_to_ssa_map_[i] = i; - temp_.ssa.ssa_last_defs_[i] = 0; + vreg_to_ssa_map_[i] = i; + ssa_last_defs_[i] = 0; } // Create a compiler temporary for Method*. This is done after SSA initialization. |