[all-commits] [llvm/llvm-project] 813f06: [AMDGPU] IGroupLP: Avoid DAG manipulation in greed...
Frederik Harwath via All-commits
all-commits at lists.llvm.org
Fri Jul 3 00:11:11 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 813f06de0df4f0af5601cb1b109eb19b2373cad3
https://github.com/llvm/llvm-project/commit/813f06de0df4f0af5601cb1b109eb19b2373cad3
Author: Frederik Harwath <frederik.harwath at amd.com>
Date: 2026-07-03 (Fri, 03 Jul 2026)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp
M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.iglp.opt.single.2b.mir
M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.iglp.opt.single.2c.mir
M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.sched.group.barrier.ll
M llvm/test/CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
M llvm/test/CodeGen/AMDGPU/sched-group-barrier-pre-RA.mir
Log Message:
-----------
[AMDGPU] IGroupLP: Avoid DAG manipulation in greedyFind (#194827)
The greedy pipeline solver needs to determine the edges that are
implied by assigning an SUnit to a SchedGroup and the cost of this
assignment. The cost is the number of edges that cannot be added without
introducing cycles. The current implementation (addEdges) adds the
edges to the DAG and uses the DAG reachability function for cycle
checking. This happens for each candidate SchedGroup and needs to be
undone before other candidates are considered. The DAG manipulations
become a significant performance bottleneck on bigger pipelines.
This commit implements an alternative function for computing the edges
and cost of an assignment. This function performs the reachability
analysis that is necessary for the cyclicity checks without modifying
the DAG.
The new function returns the same cost as addEdges. The concrete edge
set may show insignificant differences, because, for instance,
the link function called from addEdges chooses not to add transitive
edges (DAG manipulations are more expensive than the check to avoid
this), but the new function includes such edges since this means that
it can avoid to update reachability information in one direction.
The schedule changes are caused due to the existing implementation not
resetting the DAG's topological order after removing the edges that
are added while examining the SchedGroup candidates. Hence it may have
used incorrect reachability information.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list