diff options
author | 2024-07-18 14:32:48 +0000 | |
---|---|---|
committer | 2024-07-23 15:19:10 +0000 | |
commit | 623a4456a0e5d2525e8aa180a82c581767ece8fd (patch) | |
tree | 43f57868e02b461a74748bddecc87c5c9bfb8571 | |
parent | bdb056806d3daefbe923913cf50d57710a1b0a2a (diff) |
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
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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: { |