summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/arm/ArchUtility.cc
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2011-09-21 16:03:19 -0700
committer buzbee <buzbee@google.com> 2011-09-21 20:03:23 -0700
commitc1f45048b90a85018c6b063c31bc088dc3dd993d (patch)
treefe2a976af407f8a77828306e9000837009150480 /src/compiler/codegen/arm/ArchUtility.cc
parentae7cbf45460b472dbd159ab565d55b2880703abb (diff)
Suspend check reworking (ready for rewiew)
I hate burning a register, but the cost of suspend checks was just too high in our current environment. There are things that can be done in future releases to avoid the register burn, but for now it's worthwhile. The general strategy is to reserve r4 as a suspend check counter. Rather than poll the thread suspendPending counter, we instead simply decrement the counter register. When it rolls to zero, we check. For now I'm just using the counter scheme on backwards branches - we always poll on returns (which is already heavyweight enough that the extra cost isn't especially noticable). I've also added an optimization hint to the MIR in case we have enough time to test and enable the existing loop analysis code that omits the suspend check on smallish counted loops. Change-Id: I82d8bad5882a4cf2ccff590942e2d1520d58969d
Diffstat (limited to 'src/compiler/codegen/arm/ArchUtility.cc')
-rw-r--r--src/compiler/codegen/arm/ArchUtility.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/codegen/arm/ArchUtility.cc b/src/compiler/codegen/arm/ArchUtility.cc
index 1d6bb41b8a..45e1b19ee7 100644
--- a/src/compiler/codegen/arm/ArchUtility.cc
+++ b/src/compiler/codegen/arm/ArchUtility.cc
@@ -354,6 +354,9 @@ void oatDumpLIRInsn(CompilationUnit* cUnit, LIR* arg, unsigned char* baseAddr)
case kArmPseudoThrowTarget:
LOG(INFO) << "LT" << (intptr_t)lir << ":";
break;
+ case kArmPseudoSuspendTarget:
+ LOG(INFO) << "LS" << (intptr_t)lir << ":";
+ break;
case kArmPseudoCaseLabel:
LOG(INFO) << "LC" << (intptr_t)lir << ": Case target 0x" <<
std::hex << lir->operands[0] << "|" << std::dec <<