From f0cde549bed96e16401a347a4511b59130c61e84 Mon Sep 17 00:00:00 2001 From: buzbee Date: Tue, 13 Sep 2011 14:55:02 -0700 Subject: 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 --- src/compiler/codegen/RallocUtil.cc | 39 -------------------------------------- 1 file changed, 39 deletions(-) (limited to 'src/compiler/codegen/RallocUtil.cc') 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; } -- cgit v1.2.3-59-g8ed1b