diff options
author | Ben Cheng <bccheng@android.com> | 2011-03-16 17:19:06 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@android.com> | 2011-03-18 17:02:20 -0700 |
commit | 46cd4fb73824ab57160994c149ce2d7a06923b83 (patch) | |
tree | 0839bd9c762c10ca1f4656f8f340b0d6113f1a22 /vm/compiler/Compiler.h | |
parent | 4ee46dbdc0d6ab1337a483b870775e0929a011cc (diff) | |
download | android_dalvik-46cd4fb73824ab57160994c149ce2d7a06923b83.tar.gz android_dalvik-46cd4fb73824ab57160994c149ce2d7a06923b83.tar.bz2 android_dalvik-46cd4fb73824ab57160994c149ce2d7a06923b83.zip |
Extend a trace with a backward branch into a loop.
When seeing a trace that ends with a backward branch, exhaust all code
blocks reachable from that trace and try to identify if there exists a
non-nested loop. If the derived loop is found to be too complex or only
acyclic code is seen, revert to the original compilation mechanism to
translate a simple trace.
This CL uses the whole-method parser/dataflow analysis framework to
identify such loops. No optimization/codegen are performed yet.
Bug: 4086718
Change-Id: I19ed3ee53ea1cbda33940c533de8e9220e647156
Diffstat (limited to 'vm/compiler/Compiler.h')
-rw-r--r-- | vm/compiler/Compiler.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vm/compiler/Compiler.h b/vm/compiler/Compiler.h index 2a0eef46e..5d5036fbd 100644 --- a/vm/compiler/Compiler.h +++ b/vm/compiler/Compiler.h @@ -232,6 +232,7 @@ void dvmCompilerDataFlowAnalysisDispatcher(struct CompilationUnit *cUnit, DataFlowAnalysisMode dfaMode, bool isIterative); void dvmCompilerMethodSSATransformation(struct CompilationUnit *cUnit); +bool dvmCompilerBuildLoop(struct CompilationUnit *cUnit); void dvmCompilerStateRefresh(void); JitTraceDescription *dvmCopyTraceDescriptor(const u2 *pc, const struct JitEntry *desc); |