[PATCH] D133537: [pipelines] RecomputeGlobalsAAPass after OptimizerEarlyEPCallbacks
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 13 15:40:18 PDT 2022
vitalybuka added a comment.
In D133537#3786958 <https://reviews.llvm.org/D133537#3786958>, @aeubanks wrote:
> `RecomputeGlobalsAAPass` is essentially equivalent to "if GlobalsAA exists in the cache, abandon it and recompute", so it's similar to
>
> if (GlobalsAA in analysis cache) {
> MPM.addPass(RequireAnalysisPass<GlobalsAA, Module>());
> MPM.addPass(InvalidateAnalysisPass<GlobalsAA>());
> }
>
> since `RecomputeGlobalsAAPass` doesn't work if the analysis doesn't exist in the cache, if we've added a sanitizer that may abandon GlobalsAA, we can just add a
> `MPM.addPass(RequireAnalysisPass<GlobalsAA, Module>());` in `BackendUtil.cpp/SanitizersCallback` which will fully compute GlobalsAA from scratch
>
> that would be better than this patch because `OptimizerEarlyEPCallbacks` still has an up-to-date GlobalsAA, but if we add sanitizers we'll still have an up-to-date GlobalsAA right after
Wouldn't be better to do so on PassBuilderPipelines like this, so we can cover any other future abandoning hooks?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133537/new/
https://reviews.llvm.org/D133537
More information about the llvm-commits
mailing list