Support for promoting Method* and compiler temps
This CL completes the support for allowing compiler-generated
data to be treated as a Dalvik register and become subject to
the normal register promotion and live temp tracking machinery.
Also:
o Removes some vestigal and useless Method* loads from
range argument setup.
o Changes the Method* pseudo vReg number from -1 to -2 to
avoid a conflict with the 0xffff marker in the register map.
o Removes some experimental code for CSE at the basic block
level.
Change-Id: I112a8bbe20f95a8d789f63908c84e5fa167c74ac
diff --git a/src/compiler/codegen/arm/ArchFactory.cc b/src/compiler/codegen/arm/ArchFactory.cc
index da5de52..c24b856 100644
--- a/src/compiler/codegen/arm/ArchFactory.cc
+++ b/src/compiler/codegen/arm/ArchFactory.cc
@@ -107,20 +107,6 @@
cUnit->frameSize - (spillCount * 4));
}
- /*
- * Dummy up a RegLocation for the incoming Method*
- * It will attempt to keep r0 live (or copy it to home location
- * if promoted).
- */
- RegLocation rlSrc = cUnit->regLocation[cUnit->methodSReg];
- RegLocation rlMethod = cUnit->regLocation[cUnit->methodSReg];
- rlSrc.location = kLocPhysReg;
- rlSrc.lowReg = r0;
- rlSrc.home = false;
- oatMarkLive(cUnit, rlSrc.lowReg, rlSrc.sRegLow);
- storeValue(cUnit, rlMethod, rlSrc);
-
- /* Flush the rest of the ins */
flushIns(cUnit);
if (cUnit->genDebugger) {
diff --git a/src/compiler/codegen/arm/ArmRallocUtil.cc b/src/compiler/codegen/arm/ArmRallocUtil.cc
index e7627f2..89bff5e 100644
--- a/src/compiler/codegen/arm/ArmRallocUtil.cc
+++ b/src/compiler/codegen/arm/ArmRallocUtil.cc
@@ -45,7 +45,7 @@
* include any holes in the mask. Associate holes with
* Dalvik register INVALID_VREG (0xFFFFU).
*/
-void oatMarkPreservedSingle(CompilationUnit* cUnit, int sReg, int reg)
+void oatMarkPreservedSingle(CompilationUnit* cUnit, int vReg, int reg)
{
DCHECK_GE(reg, FP_REG_MASK + FP_CALLEE_SAVE_BASE);
reg = (reg & FP_REG_MASK) - FP_CALLEE_SAVE_BASE;
@@ -55,7 +55,7 @@
cUnit->fpVmapTable.push_back(INVALID_VREG);
}
// Add the current mapping
- cUnit->fpVmapTable[reg] = sReg;
+ cUnit->fpVmapTable[reg] = vReg;
// Size of fpVmapTable is high-water mark, use to set mask
cUnit->numFPSpills = cUnit->fpVmapTable.size();
cUnit->fpSpillMask = ((1 << cUnit->numFPSpills) - 1) << FP_CALLEE_SAVE_BASE;