[llvm] [MachinePipeliner] Fix store-store dependences (#72508) (PR #72575)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 06:20:09 PST 2023
================
@@ -2251,7 +2251,13 @@ bool SwingSchedulerDAG::isLoopCarriedDep(SUnit *Source, const SDep &Dep,
SI->hasOrderedMemoryRef() || DI->hasOrderedMemoryRef())
return true;
- // Only chain dependences between a load and store can be loop carried.
+ // Dependences between stores are loop carried to ensure that the dependent
+ // store is not scheduled after the source store on the next iteration.
+ if (Dep.isNormalMemory() && DI->mayStore() && SI->mayStore())
----------------
bcahoon wrote:
The isNormalMemory function checks MayAliasMem or MustAliasMem. Is a different check more precise?
bool isNormalMemory() const {
return getKind() == Order && (Contents.OrdKind == MayAliasMem
|| Contents.OrdKind == MustAliasMem);
}
https://github.com/llvm/llvm-project/pull/72575
More information about the llvm-commits
mailing list