[PATCH] D82063: Preserve GlobalsAA analysis result in LowerConstantIntrinsics and InjectTLIMappings

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 19 09:45:09 PDT 2020


fhahn added a reviewer: fhahn.
fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM. Neither InjectTLIMappings nor LowerConstantIntrinsics should modify globals and can preserve GlobalsAA. This is also in line with what we currently do in many other passes.



================
Comment at: llvm/lib/Transforms/Scalar/LowerConstantIntrinsics.cpp:141
+  if (lowerConstantIntrinsics(F,
+                              AM.getCachedResult<TargetLibraryAnalysis>(F))) {
+    PreservedAnalyses PA;
----------------
hmm, there's probably potential for preserving more here. But that's for potential follow-ups.


================
Comment at: llvm/lib/Transforms/Utils/InjectTLIMappings.cpp:148
   AU.addPreserved<OptimizationRemarkEmitterWrapperPass>();
+  AU.addPreserved<GlobalsAAWrapperPass>();
 }
----------------
fpetrogalli wrote:
> Hi @rsanthir.quic 
> 
> Thank you for your patch.
> 
> Didn't you have to add this pass to the tests checking the pass sequence? Have you run `make check-all` on your changes?
> 
> Francesco
AFAIK if GlobalsAA is only used if it is available. So if it is not preserved, it won't be re-built, so this change won't impact any of the pipeline tests.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82063/new/

https://reviews.llvm.org/D82063





More information about the llvm-commits mailing list