summaryrefslogtreecommitdiffstats
path: root/vm/compiler/CompilerIR.h
diff options
context:
space:
mode:
authorBen Cheng <bccheng@android.com>2011-02-03 14:02:06 -0800
committerBen Cheng <bccheng@android.com>2011-02-16 14:51:36 -0800
commit7ab74e14ed8dac0e51ce72fc6283ee2f1ffdf087 (patch)
tree091c7f0e4bbadb5d7e9b025323067d5954307bdc /vm/compiler/CompilerIR.h
parent0de7636e6eeb4f10fcfb5d926a59bf1ed3426c83 (diff)
downloadandroid_dalvik-7ab74e14ed8dac0e51ce72fc6283ee2f1ffdf087.tar.gz
android_dalvik-7ab74e14ed8dac0e51ce72fc6283ee2f1ffdf087.tar.bz2
android_dalvik-7ab74e14ed8dac0e51ce72fc6283ee2f1ffdf087.zip
Add support to do suspend polling on backward branches in JIT'ed code.
The polling is expensive for now as it is done through three instructions: ld/ld/branch. As a result, a bunch of bonus stuff has been worked on to mitigate the extra overhead: - Cleaned up resource flags for memory disambiguation. - Rewrote load/store elimination and scheduler routines to hide the ld/ld latency for GC flag. Seperate the dependency checking into memory disambiguation part and resource conflict part. - Allowed code motion for Dalvik/constant/non-aliasing loads to be hoisted above branches for null/range checks. - Created extended basic blocks following goto instructions so that longer instruction streams can be optimized as a whole. Without the bonus stuff, the performance dropped about ~5-10% on some benchmarks because of the lack of headroom to hide the polling latency in tight loops. With the bonus stuff, the performance delta is between +/-5% with polling code generated. With the bonus stuff but disabling polling, the new bonus stuff provides consistent performance improvements: CaffeineMark 3.6% Linpack 11.1% Scimark 9.7% Sieve 33.0% Checkers 6.0% As a result, GC polling is disabled by default but can be turned on through the -Xjitsuspendpoll flag for experimental purposes. Change-Id: Ia81fc85de3e2b70e6cc93bc37c2b845892003cdb
Diffstat (limited to 'vm/compiler/CompilerIR.h')
-rw-r--r--vm/compiler/CompilerIR.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm/compiler/CompilerIR.h b/vm/compiler/CompilerIR.h
index 89cd1414d..271c31be2 100644
--- a/vm/compiler/CompilerIR.h
+++ b/vm/compiler/CompilerIR.h
@@ -251,6 +251,7 @@ typedef struct CompilationUnit {
BasicBlock *entryBlock;
BasicBlock *exitBlock;
BasicBlock *curBlock;
+ BasicBlock *nextCodegenBlock; // for extended trace codegen
GrowableList dfsOrder;
GrowableList domPostOrderTraversal;
BitVector *tryBlockAddr;