[llvm] [LCSSA] Cache the loop exit blocks across recursive analysis (NFC) (PR #101087)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 13:57:17 PDT 2024


================
@@ -374,6 +388,8 @@ bool llvm::formLCSSA(Loop &L, const DominatorTree &DT, const LoopInfo *LI,
 
   SmallVector<BasicBlock *, 8> ExitBlocks;
   L.getExitBlocks(ExitBlocks);
+  if (!LoopExitBlocks.count(&L))
+    L.getExitBlocks(LoopExitBlocks[&L]);
----------------
teresajohnson wrote:

The change I made here wasn't complete, I've fixed the code now.

https://github.com/llvm/llvm-project/pull/101087


More information about the llvm-commits mailing list