From 623a4456a0e5d2525e8aa180a82c581767ece8fd Mon Sep 17 00:00:00 2001 From: Mythri Alle Date: Thu, 18 Jul 2024 14:32:48 +0000 Subject: Mark methods that failed compilation as kAccCompileDontBother We might fail to compile methods for several reasons like large methods, have invalid bytecode and others. There is no need to retry compilations on such methods since they will fail again. So mark such methods with kAccCompileDontBother. Bug: 350094426 Test: art/test.py Change-Id: I86b7b62bafcd4d4461cec2aa3459a50726043de7 --- compiler/optimizing/optimizing_compiler.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 3f73459a00..89edbed54d 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -868,6 +868,11 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* allocator, compilation_stats_.get()); GraphAnalysisResult result = builder.BuildGraph(); if (result != kAnalysisSuccess) { + // Don't try recompiling this method again. + if (method != nullptr) { + ScopedObjectAccess soa(Thread::Current()); + method->SetDontCompile(); + } SCOPED_TRACE << "Not compiling because of " << result; switch (result) { case kAnalysisSkipped: { -- cgit v1.2.3-59-g8ed1b