This is the first step towards complete removal of AST caching from LICM.
Attempts to keep LICM's AST cache up to date across passes can lead to miscompiles like this one: 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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks you for taking this on!
Could you add a few more details to the motivation and current state of the codebase, something along the lines:
LICM has already switched to using MemorySSA to do sinking and hoisting and only builds an AliasSetTracker on demand for the promoteToScalars step, without caching it from one LICM instance to the next. Given this, we don't have compile-time reasons to keep AST caching any more. The only scenario where the caching would be used currently is when using the LegacyPassManager and setting -enable-mssa-loop-dependency=false.