Disable the use of inline caches in AOT mode

Until we figure out why we see the crashes in b/36371709.

Test: m test-art-host
Bug: 36371709
Change-Id: If47f917373d26825f0b8121bb8b5e0b77ff83c01
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 8a813bd..62f5114 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -55,6 +55,9 @@
 // Avoid inlining within a huge method due to memory pressure.
 static constexpr size_t kMaximumCodeUnitSize = 4096;
 
+// Controls the use of inline caches in AOT mode.
+static constexpr bool kUseAOTInlineCaches = false;
+
 void HInliner::Run() {
   const CompilerOptions& compiler_options = compiler_driver_->GetCompilerOptions();
   if ((compiler_options.GetInlineDepthLimit() == 0)
@@ -376,6 +379,10 @@
                                         HInvoke* invoke_instruction,
                                         ArtMethod* resolved_method)
     REQUIRES_SHARED(Locks::mutator_lock_) {
+  if (Runtime::Current()->IsAotCompiler() && !kUseAOTInlineCaches) {
+    return false;
+  }
+
   StackHandleScope<1> hs(Thread::Current());
   Handle<mirror::ObjectArray<mirror::Class>> inline_cache;
   InlineCacheType inline_cache_type = Runtime::Current()->IsAotCompiler()