summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-07-29 20:15:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-07-29 20:15:26 +0000
commit344a3780b2e33f6ca763666c380202b18aab72a3 (patch)
treef0b203ee6eb71d7fdd792373e3c81eb18d6934dd /llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
parentb60736ec1405bb0a8dd40989f67ef4c93da068ab (diff)
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h52
1 files changed, 19 insertions, 33 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
index d70f18098cd7..cb05a1cb6369 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
@@ -36,6 +36,8 @@ struct ImageDimIntrinsicInfo;
class AMDGPUInstrInfo;
class AMDGPURegisterBankInfo;
class AMDGPUTargetMachine;
+class BlockFrequencyInfo;
+class ProfileSummaryInfo;
class GCNSubtarget;
class MachineInstr;
class MachineIRBuilder;
@@ -45,6 +47,7 @@ class RegisterBank;
class SIInstrInfo;
class SIMachineFunctionInfo;
class SIRegisterInfo;
+class TargetRegisterClass;
class AMDGPUInstructionSelector final : public InstructionSelector {
private:
@@ -59,8 +62,9 @@ public:
bool select(MachineInstr &I) override;
static const char *getName();
- void setupMF(MachineFunction &MF, GISelKnownBits &KB,
- CodeGenCoverage &CoverageInfo) override;
+ void setupMF(MachineFunction &MF, GISelKnownBits *KB,
+ CodeGenCoverage &CoverageInfo, ProfileSummaryInfo *PSI,
+ BlockFrequencyInfo *BFI) override;
private:
struct GEPInfo {
@@ -105,6 +109,7 @@ private:
bool selectG_PTR_ADD(MachineInstr &I) const;
bool selectG_IMPLICIT_DEF(MachineInstr &I) const;
bool selectG_INSERT(MachineInstr &I) const;
+ bool selectG_SBFX_UBFX(MachineInstr &I) const;
bool selectInterpP1F16(MachineInstr &MI) const;
bool selectWritelane(MachineInstr &MI) const;
@@ -143,7 +148,8 @@ private:
bool selectG_INSERT_VECTOR_ELT(MachineInstr &I) const;
bool selectG_SHUFFLE_VECTOR(MachineInstr &I) const;
bool selectAMDGPU_BUFFER_ATOMIC_FADD(MachineInstr &I) const;
- bool selectGlobalAtomicFaddIntrinsic(MachineInstr &I) const;
+ bool selectGlobalAtomicFadd(MachineInstr &I, MachineOperand &AddrOp,
+ MachineOperand &DataOp) const;
bool selectBVHIntrinsic(MachineInstr &I) const;
std::pair<Register, unsigned> selectVOP3ModsImpl(MachineOperand &Root,
@@ -187,14 +193,15 @@ private:
InstructionSelector::ComplexRendererFns
selectSmrdSgpr(MachineOperand &Root) const;
- template <bool Signed>
- std::pair<Register, int>
- selectFlatOffsetImpl(MachineOperand &Root) const;
+ std::pair<Register, int> selectFlatOffsetImpl(MachineOperand &Root,
+ uint64_t FlatVariant) const;
InstructionSelector::ComplexRendererFns
selectFlatOffset(MachineOperand &Root) const;
InstructionSelector::ComplexRendererFns
- selectFlatOffsetSigned(MachineOperand &Root) const;
+ selectGlobalOffset(MachineOperand &Root) const;
+ InstructionSelector::ComplexRendererFns
+ selectScratchOffset(MachineOperand &Root) const;
InstructionSelector::ComplexRendererFns
selectGlobalSAddr(MachineOperand &Root) const;
@@ -274,26 +281,6 @@ private:
void renderTruncTImm(MachineInstrBuilder &MIB, const MachineInstr &MI,
int OpIdx) const;
- void renderTruncTImm1(MachineInstrBuilder &MIB, const MachineInstr &MI,
- int OpIdx) const {
- renderTruncTImm(MIB, MI, OpIdx);
- }
-
- void renderTruncTImm8(MachineInstrBuilder &MIB, const MachineInstr &MI,
- int OpIdx) const {
- renderTruncTImm(MIB, MI, OpIdx);
- }
-
- void renderTruncTImm16(MachineInstrBuilder &MIB, const MachineInstr &MI,
- int OpIdx) const {
- renderTruncTImm(MIB, MI, OpIdx);
- }
-
- void renderTruncTImm32(MachineInstrBuilder &MIB, const MachineInstr &MI,
- int OpIdx) const {
- renderTruncTImm(MIB, MI, OpIdx);
- }
-
void renderNegateImm(MachineInstrBuilder &MIB, const MachineInstr &MI,
int OpIdx) const;
@@ -302,14 +289,13 @@ private:
void renderPopcntImm(MachineInstrBuilder &MIB, const MachineInstr &MI,
int OpIdx) const;
- void renderExtractGLC(MachineInstrBuilder &MIB, const MachineInstr &MI,
- int OpIdx) const;
- void renderExtractSLC(MachineInstrBuilder &MIB, const MachineInstr &MI,
- int OpIdx) const;
- void renderExtractDLC(MachineInstrBuilder &MIB, const MachineInstr &MI,
- int OpIdx) const;
+ void renderExtractCPol(MachineInstrBuilder &MIB, const MachineInstr &MI,
+ int OpIdx) const;
void renderExtractSWZ(MachineInstrBuilder &MIB, const MachineInstr &MI,
int OpIdx) const;
+ void renderSetGLC(MachineInstrBuilder &MIB, const MachineInstr &MI,
+ int OpIdx) const;
+
void renderFrameIndex(MachineInstrBuilder &MIB, const MachineInstr &MI,
int OpIdx) const;