[llvm] [Sink] Allow sinking of loads to distant blocks (PR #135986)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 26 00:27:26 PDT 2025
================
@@ -60,10 +63,62 @@ static bool isSafeToMove(Instruction *Inst, AliasAnalysis &AA,
return true;
}
+static cl::opt<unsigned> SinkLoadStoreLimit(
+ "sink-load-store-limit", cl::Hidden, cl::init(4),
+ cl::desc("Maximum number of stores in descendant blocks that will be "
+ "analyzed when attempting to sink a load."));
----------------
arsenm wrote:
Can you avoid this super specific flag? Is there some threshold MemorySSA usually uses? At worst can it be a pass parameter instead?
https://github.com/llvm/llvm-project/pull/135986
More information about the llvm-commits
mailing list