1 //===-- AMDGPUInstrInfo.h - AMDGPU Instruction Information ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief Contains the definition of a TargetInstrInfo class that is common
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRINFO_H
17 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRINFO_H
20 #include "Utils/AMDGPUBaseInfo.h"
21 #include "llvm/CodeGen/TargetInstrInfo.h"
23 #define GET_INSTRINFO_HEADER
24 #include "AMDGPUGenInstrInfo.inc"
25 #undef GET_INSTRINFO_HEADER
29 class AMDGPUSubtarget;
30 class MachineFunction;
32 class MachineInstrBuilder;
34 class AMDGPUInstrInfo : public AMDGPUGenInstrInfo {
36 const AMDGPUSubtarget &ST;
38 virtual void anchor();
43 explicit AMDGPUInstrInfo(const AMDGPUSubtarget &st);
45 bool shouldScheduleLoadsNear(SDNode *Load1, SDNode *Load2,
46 int64_t Offset1, int64_t Offset2,
47 unsigned NumLoads) const override;
49 /// \brief Return a target-specific opcode if Opcode is a pseudo instruction.
50 /// Return -1 if the target-specific opcode for the pseudo instruction does
51 /// not exist. If Opcode is not a pseudo instruction, this is identity.
52 int pseudoToMCOpcode(int Opcode) const;
54 } // End llvm namespace