From c75e266d31eba62bda9e2a8e3dd1ea1080221caa Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Thu, 30 Mar 2023 10:43:37 +0100 Subject: [PATCH] [AMDGPU] Remove two unused ComplexRendererFns These were left over after https://reviews.llvm.org/D98663 --- .../Target/AMDGPU/AMDGPUInstructionSelector.cpp | 58 ---------------------- llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h | 6 --- 2 files changed, 64 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp index cd1f815..5be65aa 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp @@ -4704,64 +4704,6 @@ AMDGPUInstructionSelector::selectMUBUFOffset(MachineOperand &Root) const { }}; } -InstructionSelector::ComplexRendererFns -AMDGPUInstructionSelector::selectMUBUFAddr64Atomic(MachineOperand &Root) const { - Register VAddr; - Register RSrcReg; - Register SOffset; - int64_t Offset = 0; - - if (!selectMUBUFAddr64Impl(Root, VAddr, RSrcReg, SOffset, Offset)) - return {}; - - // FIXME: Use defaulted operands for trailing 0s and remove from the complex - // pattern. - return {{ - [=](MachineInstrBuilder &MIB) { // rsrc - MIB.addReg(RSrcReg); - }, - [=](MachineInstrBuilder &MIB) { // vaddr - MIB.addReg(VAddr); - }, - [=](MachineInstrBuilder &MIB) { // soffset - if (SOffset) - MIB.addReg(SOffset); - else - MIB.addImm(0); - }, - [=](MachineInstrBuilder &MIB) { // offset - MIB.addImm(Offset); - }, - [=](MachineInstrBuilder &MIB) { - MIB.addImm(AMDGPU::CPol::GLC); // cpol - } - }}; -} - -InstructionSelector::ComplexRendererFns -AMDGPUInstructionSelector::selectMUBUFOffsetAtomic(MachineOperand &Root) const { - Register RSrcReg; - Register SOffset; - int64_t Offset = 0; - - if (!selectMUBUFOffsetImpl(Root, RSrcReg, SOffset, Offset)) - return {}; - - return {{ - [=](MachineInstrBuilder &MIB) { // rsrc - MIB.addReg(RSrcReg); - }, - [=](MachineInstrBuilder &MIB) { // soffset - if (SOffset) - MIB.addReg(SOffset); - else - MIB.addImm(0); - }, - [=](MachineInstrBuilder &MIB) { MIB.addImm(Offset); }, // offset - [=](MachineInstrBuilder &MIB) { MIB.addImm(AMDGPU::CPol::GLC); } // cpol - }}; -} - /// Get an immediate that must be 32-bits, and treated as zero extended. static std::optional getConstantZext32Val(Register Reg, const MachineRegisterInfo &MRI) { diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h index 9f1376e..0844d18 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h @@ -288,12 +288,6 @@ private: InstructionSelector::ComplexRendererFns selectMUBUFOffset(MachineOperand &Root) const; - InstructionSelector::ComplexRendererFns - selectMUBUFOffsetAtomic(MachineOperand &Root) const; - - InstructionSelector::ComplexRendererFns - selectMUBUFAddr64Atomic(MachineOperand &Root) const; - ComplexRendererFns selectSMRDBufferImm(MachineOperand &Root) const; ComplexRendererFns selectSMRDBufferImm32(MachineOperand &Root) const; ComplexRendererFns selectSMRDBufferSgprImm(MachineOperand &Root) const; -- 2.7.4