[llvm] [AMDGPU] Register allocation anti-hints to reduce MFMA hazard NOPs (PR #156943)
Janek van Oirschot via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 6 06:18:58 PST 2026
================
@@ -92,6 +96,13 @@ class LLVM_LIBRARY_VISIBILITY AllocationOrder {
: Hints(std::move(Hints)), Order(Order),
IterationLimit(HardHints ? 0 : static_cast<int>(Order.size())) {}
+ /// Create an AllocationOrder with pre-computed FilteredOrderStorage.
+ AllocationOrder(SmallVector<MCPhysReg, 16> &&Hints, ArrayRef<MCPhysReg> Order,
+ bool HardHints, SmallVector<MCPhysReg, 16> &&Storage)
+ : Hints(std::move(Hints)), FilteredOrderStorage(std::move(Storage)),
+ Order(FilteredOrderStorage.empty() ? Order : FilteredOrderStorage),
+ IterationLimit(HardHints ? 0 : static_cast<int>(this->Order.size())) {}
+
----------------
JanekvO wrote:
Should there be unittest coverage for this ctor as well?
https://github.com/llvm/llvm-project/pull/156943
More information about the llvm-commits
mailing list