[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: StandaloneRegBankSelect (PR #112863)
Petar Avramovic via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Oct 23 08:04:08 PDT 2024
================
@@ -63,4 +70,189 @@ char &llvm::AMDGPURBSelectID = AMDGPURBSelect::ID;
FunctionPass *llvm::createAMDGPURBSelectPass() { return new AMDGPURBSelect(); }
-bool AMDGPURBSelect::runOnMachineFunction(MachineFunction &MF) { return true; }
+bool shouldRBSelect(MachineInstr &MI) {
+ if (isTargetSpecificOpcode(MI.getOpcode()) && !MI.isPreISelOpcode())
+ return false;
+
+ if (MI.getOpcode() == AMDGPU::PHI || MI.getOpcode() == AMDGPU::IMPLICIT_DEF)
+ return false;
----------------
petar-avramovic wrote:
I copied that from existing regbankselect. MI.isPreISelOpcode() || MI.isCopy() also works
https://github.com/llvm/llvm-project/pull/112863
More information about the llvm-branch-commits
mailing list