[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:22:55 PDT 2024
================
@@ -74,21 +74,17 @@ static bool isExitBlock(BasicBlock *BB,
/// For every instruction from the worklist, check to see if it has any uses
/// that are outside the current loop. If so, insert LCSSA PHI nodes and
/// rewrite the uses.
-bool llvm::formLCSSAForInstructions(SmallVectorImpl<Instruction *> &Worklist,
- const DominatorTree &DT, const LoopInfo &LI,
- ScalarEvolution *SE,
- SmallVectorImpl<PHINode *> *PHIsToRemove,
- SmallVectorImpl<PHINode *> *InsertedPHIs) {
+static bool formLCSSAForInstructionsWorker(
+ SmallVectorImpl<Instruction *> &Worklist, const DominatorTree &DT,
+ const LoopInfo &LI, ScalarEvolution *SE,
+ SmallVectorImpl<PHINode *> *PHIsToRemove,
+ SmallVectorImpl<PHINode *> *InsertedPHIs,
+ SmallDenseMap<Loop *, SmallVector<BasicBlock *, 1>> &LoopExitBlocks) {
----------------
teresajohnson wrote:
good idea, done
https://github.com/llvm/llvm-project/pull/101087
More information about the llvm-commits
mailing list