[llvm] [LCSSA] Cache the loop exit blocks across recursive analysis (NFC) (PR #101087)
William Junda Huang via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 30 13:28:52 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]);
----------------
huangjd wrote:
LoopExitBlocks.try_emplace(&L, ExitBlocks)
https://github.com/llvm/llvm-project/pull/101087
More information about the llvm-commits
mailing list