[PATCH] D133537: [pipelines] RecomputeGlobalsAAPass after OptimizerEarlyEPCallbacks

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 10:11:00 PDT 2022


aeubanks added a comment.

`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


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