diff options
| author | 2011-09-04 17:59:07 -0700 | |
|---|---|---|
| committer | 2011-09-05 13:38:41 -0700 | |
| commit | e9a72f6a1a84f4d9af0b07dd289b89e45ffb32d5 (patch) | |
| tree | 0a709a3694d0a3fd11878d39b6422e5e997c8c94 /src/compiler/codegen/RallocUtil.cc | |
| parent | 7715c68b5f137ff5ffa4f2e1fee0a96fa6cfffb4 (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/RallocUtil.cc')
| -rw-r--r-- | src/compiler/codegen/RallocUtil.cc | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/src/compiler/codegen/RallocUtil.cc b/src/compiler/codegen/RallocUtil.cc index 6a9777ebe2..d6e0bbc7bc 100644 --- a/src/compiler/codegen/RallocUtil.cc +++ b/src/compiler/codegen/RallocUtil.cc @@ -1000,24 +1000,56 @@ 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) { - return cUnit->regLocation[mir->ssaRep->defs[num]]; + RegLocation res = cUnit->regLocation[mir->ssaRep->defs[num]]; +#ifdef SSA_WORKAROUND + res.wide = false; +#endif + assert(!res.wide); + return res; } extern RegLocation oatGetSrc(CompilationUnit* cUnit, MIR* mir, int num) { - return cUnit->regLocation[mir->ssaRep->uses[num]]; + RegLocation res = cUnit->regLocation[mir->ssaRep->uses[num]]; +#ifdef SSA_WORKAROUND + res.wide = false; +#endif + assert(!res.wide); + return res; +} +extern RegLocation oatGetRawSrc(CompilationUnit* cUnit, MIR* mir, int num) +{ + RegLocation res = cUnit->regLocation[mir->ssaRep->uses[num]]; + return res; } extern RegLocation oatGetDestWide(CompilationUnit* cUnit, MIR* mir, int low, int high) { - return oatGetDest(cUnit, mir, low); + RegLocation res = cUnit->regLocation[mir->ssaRep->defs[low]]; +#ifdef SSA_WORKAROUND + res.wide = true; +#endif + assert(res.wide); + return res; } extern RegLocation oatGetSrcWide(CompilationUnit* cUnit, MIR* mir, int low, int high) { - return oatGetSrc(cUnit, mir, low); + RegLocation res = cUnit->regLocation[mir->ssaRep->uses[low]]; +#ifdef SSA_WORKAROUND + res.wide = true; +#endif + assert(res.wide); + return res; } /* Kill the corresponding bit in the null-checked register list */ |