[PATCH] D73081: [LICM] Don't cache AliasSetTrackers when run under legacy PM

Daniil Suchkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 00:13:07 PST 2020


DaniilSuchkov created this revision.
DaniilSuchkov added reviewers: asbirlea, fhahn, efriedma, reames.
Herald added subscribers: llvm-commits, george.burgess.iv, hiraditya.
Herald added a project: LLVM.

This is the first step towards complete removal of AST caching from LICM.
To my knowledge, there are at least two miscompiles caused by attempts to keep LICM's AST cache up to date across passes: https://bugs.llvm.org/show_bug.cgi?id=36801, https://bugs.llvm.org/show_bug.cgi?id=44320
Given LICM has already switched to building ASTs using MemorySSA, we don't have compile-time reasons to keep AST caching any more.
This switch should help us to surface any possible issues that may arise along this way (maybe there are still some compile-time critical uses of LICM out there without access to LICM?), also it turns subsequent removal of AST caching into NFC.


https://reviews.llvm.org/D73081

Files:
  llvm/lib/Transforms/Scalar/LICM.cpp


Index: llvm/lib/Transforms/Scalar/LICM.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LICM.cpp
+++ llvm/lib/Transforms/Scalar/LICM.cpp
@@ -226,7 +226,7 @@
                               *L->getHeader()->getParent()),
                           &getAnalysis<TargetTransformInfoWrapperPass>().getTTI(
                               *L->getHeader()->getParent()),
-                          SE ? &SE->getSE() : nullptr, MSSA, &ORE, false);
+                          SE ? &SE->getSE() : nullptr, MSSA, &ORE, true);
   }
 
   /// This transformation requires natural loop information & requires that


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73081.239234.patch
Type: text/x-patch
Size: 652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200121/d2659e7b/attachment.bin>


More information about the llvm-commits mailing list