[llvm] [GlobalISel] Remove AssumptionCacheTracker from O0 pipeline (PR #195031)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 00:55:11 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-globalisel
Author: Cullen Rhodes (c-rhodes)
<details>
<summary>Changes</summary>
This is for an optimizer hint that shouldn't be necessary at O0. Small -0.09% compile time improvement on aarch64-O0-g.
https://llvm-compile-time-tracker.com/compare.php?from=4e6d3722fca73c97367720180a8d547057fda380&to=95b13462d4ff97f3fe5542e3eede0ad029a635f3&stat=instructions%3Au
---
Full diff: https://github.com/llvm/llvm-project/pull/195031.diff
1 Files Affected:
- (modified) llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp (+4-4)
``````````diff
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 0ea59a38db40f..ae44aa81636d6 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -174,8 +174,8 @@ void IRTranslator::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<StackProtector>();
AU.addRequired<TargetPassConfig>();
AU.addRequired<GISelCSEAnalysisWrapperPass>();
- AU.addRequired<AssumptionCacheTracker>();
if (OptLevel != CodeGenOptLevel::None) {
+ AU.addRequired<AssumptionCacheTracker>();
AU.addRequired<BranchProbabilityInfoWrapperPass>();
AU.addRequired<AAResultsWrapperPass>();
}
@@ -4221,13 +4221,13 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
if (EnableOpts) {
AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
FuncInfo.BPI = &getAnalysis<BranchProbabilityInfoWrapperPass>().getBPI();
+ AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(
+ MF->getFunction());
} else {
AA = nullptr;
FuncInfo.BPI = nullptr;
+ AC = nullptr;
}
-
- AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(
- MF->getFunction());
LibInfo = &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(F);
Libcalls = &getAnalysis<LibcallLoweringInfoWrapper>().getLibcallLowering(
*F.getParent(), Subtarget);
``````````
</details>
https://github.com/llvm/llvm-project/pull/195031
More information about the llvm-commits
mailing list