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

Yuta Mukai via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 03:11:35 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
----------------
ytmukai wrote:

My understanding is that if there is a loop carried dependence from a store to a load (the store must be above the load in the order of the instruction sequence), `addLoopCarriedDependences()` adds an edge from the load to the store to the DAG to avoid a cycle. Then `computeStart()` determines if an edge from A to B is really a loop carried dependence from B to A using `isLoopCarriedDep()`. This method cannot detect loop carried dependences from loads above in the instruction sequence to stores below.

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


More information about the llvm-commits mailing list