Skip to content

Commit 7ae92a6

Browse files
committed
[MLInliner] No need to invalidate everything post-inlining.
We really just need to invalidate loop info and the dominator tree, in addition to the FunctionPropertiesInfo we were invalidating originally. Doing more adds unnecessary compile time overhead.
1 parent 73709fe commit 7ae92a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Analysis/MLInlineAdvisor.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ void MLInlineAdvisor::onSuccessfulInlining(const MLInlineAdvice &Advice,
232232
Function *Callee = Advice.getCallee();
233233
// The caller features aren't valid anymore.
234234
{
235-
PreservedAnalyses PA = PreservedAnalyses::none();
235+
PreservedAnalyses PA = PreservedAnalyses::all();
236+
PA.abandon<FunctionPropertiesAnalysis>();
237+
PA.abandon<DominatorTreeAnalysis>();
238+
PA.abandon<LoopAnalysis>();
236239
FAM.invalidate(*Caller, PA);
237240
}
238241
Advice.updateCachedCallerFPI(FAM);

0 commit comments

Comments
 (0)