[llvm] [MachinePipeliner] Improve loop carried dependence analysis (PR #94185)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 11:51:20 PST 2025


================
@@ -1,14 +1,15 @@
 # RUN: llc -mtriple=hexagon -run-pass pipeliner -debug-only=pipeliner %s -o /dev/null 2>&1 -pipeliner-experimental-cg=true | FileCheck %s
 # REQUIRES: asserts
 
-# Test that the loop carried dependence check correctly identifies a recurrence
+# Test that it correctly recognizes that there is no loop carried dependence
----------------
bcahoon wrote:

If I understand correctly, the existing code in `addLoopCarriedDependence()` does add a loop carried dependence between the load and store due to the [code previously mentioned](https://github.com/llvm/llvm-project/blob/dfa5ee2af27da2eee835560bd1f1c872991a558d/llvm/lib/CodeGen/MachinePipeliner.cpp#L877-L879).

It is a little confusing because the pipeliner represents the dependence as an order/barrier edge and relies upon other functions, such as `isLoopCarriedDep()`, to indicate if the order dependence is a loop carried dependence.

https://github.com/llvm/llvm-project/pull/94185


More information about the llvm-commits mailing list