[llvm] AMDGPU/GlobalISel: Uniformity info based regbankselect (PR #73684)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 29 02:12:39 PST 2023
================
@@ -3355,6 +3429,28 @@ AMDGPURegisterBankInfo::getDefaultMappingVOP(const MachineInstr &MI) const {
MI.getNumOperands());
}
+const RegisterBankInfo::InstructionMapping &
+AMDGPURegisterBankInfo::getDefaultMappingVOPWithPreassignedDef(
+ const MachineInstr &MI) const {
+ SmallVector<const ValueMapping *, 8> OpdsMapping(MI.getNumOperands());
+ const MachineRegisterInfo &MRI = MI.getMF()->getRegInfo();
+ // Dst reg bank should have been set already by uniformity info
+ OpdsMapping[0] =
+ getPreAssignedOpMapping(MI.getOperand(0).getReg(), MRI, *TRI);
+
+ for (unsigned i = 1, e = MI.getNumOperands(); i != e; ++i) {
----------------
Pierre-vh wrote:
Where in the codebase do you see `i` ? A quick search for `i =` shows no result for me
In any case, coding style says variables should be uppercase so I think it's better to follow the coding style
https://github.com/llvm/llvm-project/pull/73684
More information about the llvm-commits
mailing list