OSDN Git Service

Extend a trace with a backward branch into a loop.
authorBen Cheng <bccheng@android.com>
Thu, 17 Mar 2011 00:19:06 +0000 (17:19 -0700)
committerBen Cheng <bccheng@android.com>
Sat, 19 Mar 2011 00:02:20 +0000 (17:02 -0700)
commit46cd4fb73824ab57160994c149ce2d7a06923b83
tree0839bd9c762c10ca1f4656f8f340b0d6113f1a22
parent4ee46dbdc0d6ab1337a483b870775e0929a011cc
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
14 files changed:
CleanSpec.mk
vm/Dvm.mk
vm/Globals.h
vm/SignalCatcher.c
vm/compiler/Compiler.h
vm/compiler/CompilerIR.h
vm/compiler/Dataflow.c
vm/compiler/Frontend.c
vm/compiler/Loop.c
vm/compiler/Loop.h
vm/compiler/SSATransformation.c [moved from vm/compiler/MethodSSATransformation.c with 82% similarity]
vm/compiler/Utility.c
vm/compiler/codegen/arm/ArchFactory.c
vm/compiler/codegen/arm/Assemble.c