summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/x86/utility_x86.cc
diff options
context:
space:
mode:
authorRazvan A Lupusoru <razvan.a.lupusoru@intel.com>2014-06-06 17:04:52 -0700
committerRazvan A Lupusoru <razvan.a.lupusoru@intel.com>2014-08-26 18:36:46 -0700
commit8d0d03e24325463f0060abfd05dba5598044e9b1 (patch)
tree06e8ed7e47a4cfe108d4ed750de6a60e588b2f7a /compiler/dex/quick/x86/utility_x86.cc
parent709368e616791209b02d39adb6da5e55782cb45f (diff)
downloadart-8d0d03e24325463f0060abfd05dba5598044e9b1.zip
art-8d0d03e24325463f0060abfd05dba5598044e9b1.tar.gz
art-8d0d03e24325463f0060abfd05dba5598044e9b1.tar.bz2
ART: Change temporaries to positive names
Changes compiler temporaries to have positive names. The numbering now puts them above the code VRs (locals + ins, in that order). The patch also introduces APIs to query the number of temporaries, locals and ins. The compiler temp infrastructure suffered from several issues which are also addressed by this patch: -There is no longer a queue of compiler temps. This would be polluted with Method* when post opts were called multiple times. -Sanity checks have been added to allow requesting of temps from BE and to prevent temps after frame is committed. -None of the structures holding temps can overflow because they are allocated to allow holding maximum temps. Thus temps can be requested by BE with no problem. -Since the queue of compiler temps is no longer maintained, it is no longer possible to refer to a temp that has invalid ssa (because it was requested before ssa was run). -The BE can now request temps after all ME allocations and it is guaranteed to actually receive them. -ME temps are now treated like normal VRs in all cases with no special handling. Only the BE temps are handled specially because there are no references to them from MIRs. -Deprecated and removed several fields in CompilationUnit that saved register information and updated callsites to call the new interface from MIRGraph. Change-Id: Ia8b1fec9384a1a83017800a59e5b0498dfb2698c Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com> Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
Diffstat (limited to 'compiler/dex/quick/x86/utility_x86.cc')
-rw-r--r--compiler/dex/quick/x86/utility_x86.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/dex/quick/x86/utility_x86.cc b/compiler/dex/quick/x86/utility_x86.cc
index 037dfed..022fd80 100644
--- a/compiler/dex/quick/x86/utility_x86.cc
+++ b/compiler/dex/quick/x86/utility_x86.cc
@@ -957,7 +957,8 @@ void X86Mir2Lir::AnalyzeMIR() {
// Did we need a pointer to the method code?
if (store_method_addr_) {
- base_of_code_ = mir_graph_->GetNewCompilerTemp(kCompilerTempVR, cu_->target64 == true);
+ base_of_code_ = mir_graph_->GetNewCompilerTemp(kCompilerTempBackend, cu_->target64 == true);
+ DCHECK(base_of_code_ != nullptr);
} else {
base_of_code_ = nullptr;
}