Invoke support for Quick Compiler
Fleshed out invoke and const-string support. Fixed a bug in Phi node
insertion.
With this CL, the "Recursive Fibonacci" and "HelloWorld" milestones are
met.
Added are a set of "HL" (for High-Level) invoke intrinsics. Until we
complete the merging of the Quick & Iceland runtime models the invoke
code sequences are slightly different. Thus, the Greenland IR needs
to represent invokes at a somewhat higher level than Iceland. The
test for fast/slow path needs to happen during the lowering of the
HLInvokeXXX intrinsics in both the Quick and Portable paths.
This will generally be the case in the short term - push fast/slow
path determination below the Greenland IR level. As unification
proceeds, we'll pull as much as makes sense into the common front end.
Change-Id: I0a18edf1be18583c0afdc3f7e10a3e4691968e77
diff --git a/src/compiler/Frontend.cc b/src/compiler/Frontend.cc
index 70de4fc..d5e6b12 100644
--- a/src/compiler/Frontend.cc
+++ b/src/compiler/Frontend.cc
@@ -765,7 +765,11 @@
cUnit->numRegs = code_item->registers_size_ - cUnit->numIns;
cUnit->numOuts = code_item->outs_size_;
#if defined(ART_USE_QUICK_COMPILER)
- cUnit->genBitcode = PrettyMethod(method_idx, dex_file).find("Fibonacci.fibonacci") != std::string::npos;
+ if ((PrettyMethod(method_idx, dex_file).find("fibonacci") != std::string::npos)
+ || (PrettyMethod(method_idx, dex_file).find("HelloWorld") != std::string::npos)
+ ) {
+ cUnit->genBitcode = true;
+ }
#endif
/* Adjust this value accordingly once inlining is performed */
cUnit->numDalvikRegisters = code_item->registers_size_;
@@ -782,7 +786,9 @@
(cUnit->enableDebug & (1 << kDebugVerbose));
}
#if defined(ART_USE_QUICK_COMPILER)
- if (cUnit->genBitcode) cUnit->printMe = true;
+ if (cUnit->genBitcode) {
+ cUnit->printMe = true;
+ }
#endif
if (cUnit->instructionSet == kX86) {
// Disable optimizations on X86 for now