Fix LLVM #includes and push one piece of LLVM-specific lossage down.

Change-Id: I9f2b7a9fd4d543a3bd9dd9f4c62367c28c69ea36
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index c5e620b..5ef1710 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -255,7 +255,10 @@
     class_loader, class_linker, dex_file, *dex_cache, NULL,
     method_idx, access_flags);
 
-  return compiler.GetCompilerLLVM()->CompileNativeMethod(&oat_compilation_unit);
+  art::CompiledMethod* result =
+      compiler.GetCompilerLLVM()->CompileNativeMethod(&oat_compilation_unit);
+  compiler.GetCompilerLLVM()->MaterializeIfThresholdReached();
+  return result;
 }
 
 extern "C" art::CompiledInvokeStub* ArtCreateInvokeStub(art::Compiler& compiler, bool is_static,
@@ -270,11 +273,6 @@
   compiler.GetCompilerLLVM()->MaterializeRemainder();
 }
 
-extern "C" void compilerLLVMMaterializeIfThresholdReached(art::Compiler& compiler) {
-  ensureCompilerLLVM(compiler);
-  compiler.GetCompilerLLVM()->MaterializeIfThresholdReached();
-}
-
 // Note: Using this function carefully!!! This is temporary solution, we will remove it.
 extern "C" art::MutexLock* compilerLLVMMutexLock(art::Compiler& compiler) {
   ensureCompilerLLVM(compiler);