summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/arm/ArmRallocUtil.cc
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2011-09-04 17:59:07 -0700
committer buzbee <buzbee@google.com> 2011-09-05 13:38:41 -0700
commite9a72f6a1a84f4d9af0b07dd289b89e45ffb32d5 (patch)
tree0a709a3694d0a3fd11878d39b6422e5e997c8c94 /src/compiler/codegen/arm/ArmRallocUtil.cc
parent7715c68b5f137ff5ffa4f2e1fee0a96fa6cfffb4 (diff)
Try/Catch analysis; various workarounds
Fixed a couple of codegen bugs. Added a temporary workaround until SSA renaming problem is fixed. By enabling the "CompileDexLibCore" test in compiler_test.cc and disabling the jni_compiler, we appear to be successfully compiling 17,641 methods of libcore (note: of those, 4 exhibit the SSA problem). Also turned off most of the compiler logging, and disabled the fast path for invoke virtual (which seems to be broken). Change-Id: I0ecf460cba209f885209efbee62e9f80bffbf666
Diffstat (limited to 'src/compiler/codegen/arm/ArmRallocUtil.cc')
-rw-r--r--src/compiler/codegen/arm/ArmRallocUtil.cc32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/compiler/codegen/arm/ArmRallocUtil.cc b/src/compiler/codegen/arm/ArmRallocUtil.cc
index 78d5267c61..bea85ea8e8 100644
--- a/src/compiler/codegen/arm/ArmRallocUtil.cc
+++ b/src/compiler/codegen/arm/ArmRallocUtil.cc
@@ -35,10 +35,7 @@ typedef struct RefCounts {
bool doubleStart; // Starting vReg for a double
} RefCounts;
-/*
- * USE SSA names to count references of base Dalvik vRegs. Also,
- * mark "wide" in the first of wide SSA locationRec pairs.
- */
+/* USE SSA names to count references of base Dalvik vRegs. */
static void countRefs(CompilationUnit *cUnit, BasicBlock* bb,
RefCounts* counts, bool fp)
{
@@ -61,16 +58,12 @@ static void countRefs(CompilationUnit *cUnit, BasicBlock* bb,
oatConvertSSARegToDalvik(cUnit, ssaRep->defs[0]));
counts[sReg].doubleStart = true;
}
- if (attrs & DF_DA_WIDE) {
- cUnit->regLocation[ssaRep->defs[0]].wide = true;
- }
if ((attrs & (DF_UA_WIDE|DF_FP_A)) == (DF_UA_WIDE|DF_FP_A)) {
sReg = DECODE_REG(
oatConvertSSARegToDalvik(cUnit, ssaRep->uses[first]));
counts[sReg].doubleStart = true;
}
if (attrs & DF_UA_WIDE) {
- cUnit->regLocation[ssaRep->uses[first]].wide = true;
first += 2;
}
if ((attrs & (DF_UB_WIDE|DF_FP_B)) == (DF_UB_WIDE|DF_FP_B)) {
@@ -79,7 +72,6 @@ static void countRefs(CompilationUnit *cUnit, BasicBlock* bb,
counts[sReg].doubleStart = true;
}
if (attrs & DF_UB_WIDE) {
- cUnit->regLocation[ssaRep->uses[first]].wide = true;
first += 2;
}
if ((attrs & (DF_UC_WIDE|DF_FP_C)) == (DF_UC_WIDE|DF_FP_C)) {
@@ -87,9 +79,6 @@ static void countRefs(CompilationUnit *cUnit, BasicBlock* bb,
oatConvertSSARegToDalvik(cUnit, ssaRep->uses[first]));
counts[sReg].doubleStart = true;
}
- if (attrs & DF_UC_WIDE) {
- cUnit->regLocation[ssaRep->uses[first]].wide = true;
- }
}
for (i=0; i< ssaRep->numUses; i++) {
int origSreg = DECODE_REG(
@@ -140,27 +129,8 @@ static void dumpCounts(const RefCounts* arr, int size, const char* msg)
extern void oatDoPromotion(CompilationUnit* cUnit)
{
int numRegs = cUnit->method->NumRegisters();
- int numIns = cUnit->method->NumIns();
/*
- * Because ins don't have explicit definitions, we need to type
- * them based on the signature.
- */
- if (numIns > 0) {
- int sReg = numRegs - numIns;
- const art::StringPiece& shorty = cUnit->method->GetShorty();
- for (int i = 1; i < shorty.size(); i++) {
- char arg = shorty[i];
- // Is it wide?
- if ((arg == 'D') || (arg == 'J')) {
- cUnit->regLocation[sReg].wide = true;
- cUnit->regLocation[sReg+1].fp = cUnit->regLocation[sReg].fp;
- sReg++; // Skip to next
- }
- sReg++;
- }
- }
- /*
* TUNING: is leaf? Can't just use "hasInvoke" to determine as some
* instructions might call out to C/assembly helper functions. Until
* machinery is in place, always spill lr.