Detect special methods at the end of verification.
This moves special method handling to method inliner
and prepares for eventual inlining of these methods.
Change-Id: I51c51b940fb7bc714e33135cd61be69467861352
diff --git a/compiler/dex/mir_analysis.cc b/compiler/dex/mir_analysis.cc
index 89af06e..ab55333 100644
--- a/compiler/dex/mir_analysis.cc
+++ b/compiler/dex/mir_analysis.cc
@@ -16,6 +16,8 @@
#include "compiler_internals.h"
#include "dataflow_iterator-inl.h"
+#include "dex/quick/dex_file_method_inliner.h"
+#include "dex/quick/dex_file_to_method_inliner_map.h"
namespace art {
@@ -1052,7 +1054,9 @@
}
// Filter 3: if this method is a special pattern, go ahead and emit the canned pattern.
- if (IsSpecialCase()) {
+ if (cu_->compiler_driver->GetMethodInlinerMap() != nullptr &&
+ cu_->compiler_driver->GetMethodInlinerMap()->GetMethodInliner(cu_->dex_file)
+ ->IsSpecial(cu_->method_idx)) {
return false;
}