Misc fixes, new compiler unit tests
Fixed disassembly logging, miscellaneous codegen bugs and added a
set of unit tests (most of which fail because array allocation isn't quite
there yet in the codegen).
Failing tests conditionally compiled out for now.
Change-Id: I39c148f9a7686fac21c844a7a7f5ec86d4e0e1c5
diff --git a/src/compiler/Frontend.cc b/src/compiler/Frontend.cc
index 17d6a34..4202a39 100644
--- a/src/compiler/Frontend.cc
+++ b/src/compiler/Frontend.cc
@@ -697,9 +697,14 @@
*/
bool oatCompileMethod(Method* method, art::InstructionSet insnSet)
{
- if (PrettyMethod(method, false) != "Fibonacci.fibonacci") {
+ if ((method->GetName()->ToModifiedUtf8().find("init>") !=
+ std::string::npos) ||
+ (method->GetName()->ToModifiedUtf8().find("foo") !=
+ std::string::npos)) {
LOG(INFO) << "not compiling " << PrettyMethod(method, false);
return false;
+ } else {
+ LOG(INFO) << "Compiling " << PrettyMethod(method, false);
}
CompilationUnit cUnit;
@@ -724,17 +729,16 @@
cUnit.insns = code_item->insns_;
cUnit.insnsSize = code_item->insns_size_;
#if 1
+ // TODO: Use command-line argument passing mechanism
cUnit.printMe = true;
cUnit.printMeVerbose = true;
-#endif
-#if 1
- cUnit.disableOpt = 0 |
- (1 << kLoadStoreElimination) |
- (1 << kLoadHoisting) |
- (1 << kTrackLiveTemps) |
- (1 << kSuppressLoads) |
- //(1 << kPromoteRegs) |:
- 0;
+ cUnit.disableOpt = 0 |
+ (1 << kLoadStoreElimination) |
+ (1 << kLoadHoisting) |
+ (1 << kTrackLiveTemps) |
+ (1 << kSuppressLoads) |
+ (1 << kPromoteRegs) |
+ 0;
#endif
/* Initialize the block list */