[llvm] [LoopInterchange] Constrain number of load/stores in a loop (PR #118973)
Madhur Amilkanthwar via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 20:42:37 PST 2025
================
@@ -109,7 +115,16 @@ static bool populateDependencyMatrix(CharMatrix &DepMatrix, unsigned Level,
LLVM_DEBUG(dbgs() << "Found " << MemInstr.size()
<< " Loads and Stores to analyze\n");
-
+ if (MemInstr.size() > MaxMemInstrCount) {
+ LLVM_DEBUG(dbgs() << "The transform doesn't support more than "
+ << MaxMemInstrCount << " load stores in a loop\n");
+ ORE->emit([&]() {
+ return OptimizationRemarkMissed(DEBUG_TYPE, "UnsupportedLoop",
+ L->getStartLoc(), L->getHeader())
+ << "Number of loads/stores in the loop are more than threshold.";
----------------
madhur13490 wrote:
Done
https://github.com/llvm/llvm-project/pull/118973
More information about the llvm-commits
mailing list