[llvm] [Sink] Allow sinking of loads to distant blocks (PR #135986)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 11:24:57 PDT 2025
================
@@ -27,43 +27,71 @@ using namespace llvm;
STATISTIC(NumSunk, "Number of instructions sunk");
STATISTIC(NumSinkIter, "Number of sinking iterations");
-static bool isSafeToMove(Instruction *Inst, AliasAnalysis &AA,
- SmallPtrSetImpl<Instruction *> &Stores) {
-
- if (Inst->mayWriteToMemory()) {
- Stores.insert(Inst);
- return false;
- }
-
+static bool hasStoreConflict(Instruction *Inst, AliasAnalysis &AA,
+ SmallPtrSetImpl<Instruction *> &Stores) {
----------------
LU-JOHN wrote:
Undid changes to isSafeToMove. Save for later PR.
https://github.com/llvm/llvm-project/pull/135986
More information about the llvm-commits
mailing list