summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/CodegenFactory.cc
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2011-09-14 14:00:13 -0700
committer buzbee <buzbee@google.com> 2011-09-14 15:40:34 -0700
commit43a364291dcdfe08e530e9568748359735dd7442 (patch)
tree1141a3f0f91c527dfe28796e88f166d2bc0ed7fd /src/compiler/codegen/CodegenFactory.cc
parent303b01ed0d36017371e29b1f1e209dd19896ac9e (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/CodegenFactory.cc')
-rw-r--r--src/compiler/codegen/CodegenFactory.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/compiler/codegen/CodegenFactory.cc b/src/compiler/codegen/CodegenFactory.cc
index 5a75cee80b..14c7e5722f 100644
--- a/src/compiler/codegen/CodegenFactory.cc
+++ b/src/compiler/codegen/CodegenFactory.cc
@@ -127,7 +127,6 @@ static void storeValue(CompilationUnit* cUnit, RegLocation rlDest,
LIR* defEnd;
assert(!rlDest.wide);
assert(!rlSrc.wide);
- oatKillNullCheckedLoc(cUnit, rlDest);
rlSrc = oatUpdateLoc(cUnit, rlSrc);
rlDest = oatUpdateLoc(cUnit, rlDest);
if (rlSrc.location == kLocPhysReg) {
@@ -190,7 +189,6 @@ static void storeValueWide(CompilationUnit* cUnit, RegLocation rlDest,
assert(FPREG(rlSrc.lowReg)==FPREG(rlSrc.highReg));
assert(rlDest.wide);
assert(rlSrc.wide);
- oatKillNullCheckedLoc(cUnit, rlDest);
if (rlSrc.location == kLocPhysReg) {
if (oatIsLive(cUnit, rlSrc.lowReg) ||
oatIsLive(cUnit, rlSrc.highReg) ||