[llvm] [AMDGPU][GISel] Add RegBankLegalize support for G_SI_CALL (PR #165747)

Petar Avramovic via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 12 02:52:43 PST 2026


================
@@ -59,6 +59,7 @@ bool RegBankLegalizeHelper::findRuleAndApplyMapping(MachineInstr &MI) {
   }
 
   SmallSet<Register, 4> WaterfallSgprs;
+  std::optional<iterator_range<MachineBasicBlock::iterator>> WaterfallRange;
----------------
petar-avramovic wrote:

Think it would be best to have one struct argument that would have three fields
SmallSet<Register, 4> WaterfallSgprs;
const MachineInstr *RangeStart
const MachineInstr *RangeEnd

or whatever is appropriate, to have easier time dealing with initialization
also Sgpr32_WF case should have initialized Range with make_range(MI.getIterator(), std::next(MI.getIterator())); 

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


More information about the llvm-commits mailing list