summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/RallocUtil.cc
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2011-09-13 14:55:02 -0700
committer buzbee <buzbee@google.com> 2011-09-13 15:13:44 -0700
commitf0cde549bed96e16401a347a4511b59130c61e84 (patch)
treea5c91481513ea75897d0f64ae9bb660923f42a94 /src/compiler/codegen/RallocUtil.cc
parent5ea047b386c5dac78eda62305d14dedf7b5611a8 (diff)
SSA renaming fix & invalid opcode fix
The old SSA renaming mechanism was able to take some shortcuts because of the limited CFG shapes it encountered. Shortcut replaced and previous workaround code removed. Also fixes a regression introduced by the stack bounds checking change which sometimes resulted in an (opcode < 0x200) assert failure, and removes an optimization flag and associated code that no longer applicable. Change-Id: I617e9e5347dfd3a7e8f44a9772647bf4530631d6
Diffstat (limited to 'src/compiler/codegen/RallocUtil.cc')
-rw-r--r--src/compiler/codegen/RallocUtil.cc39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/compiler/codegen/RallocUtil.cc b/src/compiler/codegen/RallocUtil.cc
index 76cff17648..8295b33f4a 100644
--- a/src/compiler/codegen/RallocUtil.cc
+++ b/src/compiler/codegen/RallocUtil.cc
@@ -1004,38 +1004,15 @@ extern RegLocation oatEvalLoc(CompilationUnit* cUnit, RegLocation loc,
return loc;
}
-/*
- * There's currently a problem in SSA renaming. So long as register promotion
- * is disabled, a bad renaming will have no effect. Work around the problem
- * here to make progress while the fix is being identified.
- */
-#define SSA_WORKAROUND
-
extern RegLocation oatGetDest(CompilationUnit* cUnit, MIR* mir, int num)
{
RegLocation res = cUnit->regLocation[mir->ssaRep->defs[num]];
-#ifdef SSA_WORKAROUND
- if (res.wide) {
- LOG(WARNING) << "Invalid SSA renaming: " << PrettyMethod(cUnit->method);
- cUnit->printMe = true;
- cUnit->dumpCFG = true;
- res.wide = false;
- }
-#endif
assert(!res.wide);
return res;
}
extern RegLocation oatGetSrc(CompilationUnit* cUnit, MIR* mir, int num)
{
RegLocation res = cUnit->regLocation[mir->ssaRep->uses[num]];
-#ifdef SSA_WORKAROUND
- if (res.wide) {
- LOG(WARNING) << "Invalid SSA renaming: " << PrettyMethod(cUnit->method);
- cUnit->printMe = true;
- cUnit->dumpCFG = true;
- res.wide = false;
- }
-#endif
assert(!res.wide);
return res;
}
@@ -1048,14 +1025,6 @@ extern RegLocation oatGetDestWide(CompilationUnit* cUnit, MIR* mir,
int low, int high)
{
RegLocation res = cUnit->regLocation[mir->ssaRep->defs[low]];
-#ifdef SSA_WORKAROUND
- if (!res.wide) {
- LOG(WARNING) << "Invalid SSA renaming: " << PrettyMethod(cUnit->method);
- cUnit->printMe = true;
- cUnit->dumpCFG = true;
- res.wide = true;
- }
-#endif
assert(res.wide);
return res;
}
@@ -1064,14 +1033,6 @@ extern RegLocation oatGetSrcWide(CompilationUnit* cUnit, MIR* mir,
int low, int high)
{
RegLocation res = cUnit->regLocation[mir->ssaRep->uses[low]];
-#ifdef SSA_WORKAROUND
- if (!res.wide) {
- LOG(WARNING) << "Invalid SSA renaming: " << PrettyMethod(cUnit->method);
- cUnit->printMe = true;
- cUnit->dumpCFG = true;
- res.wide = true;
- }
-#endif
assert(res.wide);
return res;
}