diff options
author | Florian Hahn <flo@fhahn.com> | 2022-12-15 22:22:20 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2022-12-15 22:22:22 +0000 |
commit | d459be4527ea4c6212382bd615f6a4ef05d9782e (patch) | |
tree | 6c408106cac86777e9ef0a8ecb74240042184757 /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | |
parent | 7e4218bfcedc62a36e453ad1aabef528c9b6fa97 (diff) | |
download | llvm-d459be4527ea4c6212382bd615f6a4ef05d9782e.zip llvm-d459be4527ea4c6212382bd615f6a4ef05d9782e.tar.gz llvm-d459be4527ea4c6212382bd615f6a4ef05d9782e.tar.bz2 |
[LoopRotate] Clear block and loop dispo cache when merging blocks.
Merging blocks in LoopRotate may remove blocks reference in the block
disposition cache. Clear the cache.
Fixes #59534.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp index ce13723..1a9eaf24 100644 --- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp @@ -795,6 +795,11 @@ bool LoopRotate::simplifyLoopLatch(Loop *L) { MergeBlockIntoPredecessor(Latch, &DTU, LI, MSSAU, nullptr, /*PredecessorWithTwoSuccessors=*/true); + if (SE) { + // Merging blocks may remove blocks reference in the block disposition cache. Clear the cache. + SE->forgetBlockAndLoopDispositions(); + } + if (MSSAU && VerifyMemorySSA) MSSAU->getMemorySSA()->verifyMemorySSA(); |