Rewrite intrinsics detection.
Intrinsic methods should be treated as a special case of
inline methods. They should be detected early and used to
guide other optimizations. This CL rewrites the intrinsics
detection so that it can be moved to any compilation phase.
Change-Id: I4424a6a869bd98b9c478953c9e3bcaf1c6de2b33
diff --git a/compiler/dex/frontend.h b/compiler/dex/frontend.h
index b9b4178..b6e8577 100644
--- a/compiler/dex/frontend.h
+++ b/compiler/dex/frontend.h
@@ -82,6 +82,9 @@
kDebugTimings
};
+class DexFileToMethodInlinerMap;
+class CompilerDriver;
+
class LLVMInfo {
public:
LLVMInfo();
@@ -110,6 +113,19 @@
UniquePtr<art::llvm::IRBuilder> ir_builder_;
};
+class QuickCompilerContext {
+ public:
+ QuickCompilerContext(CompilerDriver& compiler);
+ ~QuickCompilerContext();
+
+ DexFileToMethodInlinerMap* GetInlinerMap() {
+ return inliner_map_.get();
+ }
+
+ private:
+ UniquePtr<DexFileToMethodInlinerMap> inliner_map_;
+};
+
struct CompilationUnit;
struct BasicBlock;