diff options
author | 2024-02-09 11:30:36 +0000 | |
---|---|---|
committer | 2024-02-13 17:57:29 +0000 | |
commit | 0d5dbf73461556afcd6e1a7e1109199d0fc16887 (patch) | |
tree | d5904ca2d1cb0682efe283f3219495c2a10361ed /compiler/optimizing/profiling_info_builder.cc | |
parent | 008db94e90e07bc4d262c80ef2975681299b32fa (diff) |
Reland "Only compile optimized if it is useful."
This reverts commit 35a1479ab434257e9db629fda5f4ca96bfbef3fc.
Reason for revert: Disable failing test on debuggable
Change-Id: Icd012ac9e3b37c1187adf5e915ba7c1ffc415805
Diffstat (limited to 'compiler/optimizing/profiling_info_builder.cc')
-rw-r--r-- | compiler/optimizing/profiling_info_builder.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/optimizing/profiling_info_builder.cc b/compiler/optimizing/profiling_info_builder.cc index 905d8d0f2f..7faf2bf5be 100644 --- a/compiler/optimizing/profiling_info_builder.cc +++ b/compiler/optimizing/profiling_info_builder.cc @@ -28,6 +28,7 @@ namespace art HIDDEN { void ProfilingInfoBuilder::Run() { + DCHECK(GetGraph()->IsUsefulOptimizing()); DCHECK_EQ(GetGraph()->GetProfilingInfo(), nullptr); // Order does not matter. for (HBasicBlock* block : GetGraph()->GetReversePostOrder()) { @@ -119,6 +120,12 @@ bool ProfilingInfoBuilder::IsInlineCacheUseful(HInvoke* invoke, CodeGenerator* c return false; } } + + if (!codegen->GetGraph()->IsUsefulOptimizing()) { + // Earlier pass knew what the calling target was. No need for an inline + // cache. + return false; + } return true; } |