diff options
| author | 2011-09-14 14:00:13 -0700 | |
|---|---|---|
| committer | 2011-09-14 15:40:34 -0700 | |
| commit | 43a364291dcdfe08e530e9568748359735dd7442 (patch) | |
| tree | 1141a3f0f91c527dfe28796e88f166d2bc0ed7fd /src/compiler/codegen/Ralloc.h | |
| parent | 303b01ed0d36017371e29b1f1e209dd19896ac9e (diff) | |
Fix null check elimination
The existing null check elimination mechanism suffered from the same
limitation as the SSA renaming: it took shortcuts that were valid in
a trace compilation world, but not in a method compilation world.
This CL replaces the old mechanism, and additionally takes advantage
of some the fact that "this" is always non-null, as are objects returned
from OP_NEW_* (thanks Ian!).
Two test cases added. The one for ensuring that unnecessary null checks
are elminated requires manual inspection. The other - that we don't
eliminate a necessary null check - is disabled until exceptions are working.
Change-Id: I2a9b72741f56617bf609e4d7c20244796c988f28
Diffstat (limited to 'src/compiler/codegen/Ralloc.h')
| -rw-r--r-- | src/compiler/codegen/Ralloc.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/compiler/codegen/Ralloc.h b/src/compiler/codegen/Ralloc.h index 82ce23eb82..ad19475b9b 100644 --- a/src/compiler/codegen/Ralloc.h +++ b/src/compiler/codegen/Ralloc.h @@ -45,12 +45,6 @@ static inline int oatS2VReg(CompilationUnit* cUnit, int sReg) return DECODE_REG(oatConvertSSARegToDalvik(cUnit, sReg)); } -/* Reset the tracker to unknown state */ -static inline void oatResetNullCheck(CompilationUnit* cUnit) -{ - oatClearAllBits(cUnit->regPool->nullCheckedRegs); -} - /* * Get the "real" sreg number associated with an sReg slot. In general, * sReg values passed through codegen are the SSA names created by @@ -161,10 +155,6 @@ extern void oatResetDefLocWide(CompilationUnit* cUnit, RegLocation rl); extern void oatResetDefTracking(CompilationUnit* cUnit); -/* Kill the corresponding bit in the null-checked register list */ -extern void oatKillNullCheckedLoc(CompilationUnit* cUnit, - RegLocation loc); - extern RegisterInfo *oatIsLive(CompilationUnit* cUnit, int reg); /* To be used when explicitly managing register use */ |