[llvm] AMDGPU/GlobalISel: Uniformity info based regbankselect (PR #73684)

Petar Avramovic via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 02:23:24 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) {
----------------
petar-avramovic wrote:

>From /llvm/lib/
`unsigned I =` 1185 `int I =` 276
`unsigned i =` 2833 `int i =` 551

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


More information about the llvm-commits mailing list