If another inlining session came after a ModuleInlinerWrapperPass, the
advisor alanysis would still be cached, but its Result would be cleared.
We need to clear both.
This addresses PR52118
Differential D111586
[Inline] Make sure the InlineAdvisor is correctly cleared. Authored by mtrofin on Oct 11 2021, 4:46 PM.
Details If another inlining session came after a ModuleInlinerWrapperPass, the This addresses PR52118
Diff Detail
Unit Tests Event Timeline
| ||||||||||||||||||
this seems like it's reimplementing the invalidation.
can we get rid of clear() and use
bool invalidate(Module &, const PreservedAnalyses &PA, ModuleAnalysisManager::Invalidator &) { // Check whether the analysis has been explicitly invalidated. Otherwise, it's // stateless and remains preserved. auto PAC = PA.getChecker<InlineAdvisorAnalysis>(); return !PAC.preservedWhenStateless(); }?