[llvm] [Sink] Allow sinking of loads to distant blocks (PR #135986)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 26 06:19:33 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."));
----------------
LU-JOHN wrote:
I see a MaxCheckLimit in MemorySSA.cpp, but it is local to MemorySSA.cpp. EarlyCSE.cpp, DeadStoreElimination.cpp, and LICM.cpp all have hidden options setting limits on memory SSA usage. Is it okay if we stick with a hidden option? Otherwise, by "pass parameter" do you mean a limit specific to Sink that is not implemented as a user option?
https://github.com/llvm/llvm-project/pull/135986
More information about the llvm-commits
mailing list