[llvm] [LoopDist] Add some runtime checks for cross partition loads (PR #145623)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 5 03:15:33 PDT 2025
================
@@ -521,6 +521,38 @@ class InstPartitionContainer {
Partition = -1;
}
assert(Partition != -2 && "Pointer not belonging to any partition");
+ // All the store context uses of our address were processed,
+ // Now make sure we don't have cross partition loads.
+ if (RtPtrCheck->Pointers[I].IsWritePtr) {
+ if (Ptr->hasOneUse() || Partition == -1)
+ continue;
+
+ bool ProcessLoads = false;
+ for (auto *U : Ptr->users()) {
+ auto *CurLoad = dyn_cast<LoadInst>(U);
----------------
Meinersbur wrote:
`LAI.getInstructionsForAccess(Ptr, false)` should already contain all the LoadInsts. No need to iterate over all instructions.
https://github.com/llvm/llvm-project/pull/145623
More information about the llvm-commits
mailing list