2012-12-11 21:25:42 +00:00
|
|
|
//===-- AMDGPUInstrInfo.h - AMDGPU Instruction Information ------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
/// \file
|
|
|
|
/// \brief Contains the definition of a TargetInstrInfo class that is common
|
|
|
|
/// to all AMD GPUs.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2016-03-11 08:00:27 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRINFO_H
|
|
|
|
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRINFO_H
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2017-03-27 14:04:01 +00:00
|
|
|
#include "AMDGPU.h"
|
2016-10-07 14:46:06 +00:00
|
|
|
#include "Utils/AMDGPUBaseInfo.h"
|
2017-11-08 01:01:31 +00:00
|
|
|
#include "llvm/CodeGen/TargetInstrInfo.h"
|
2012-12-11 21:25:42 +00:00
|
|
|
|
|
|
|
#define GET_INSTRINFO_HEADER
|
|
|
|
#include "AMDGPUGenInstrInfo.inc"
|
2017-12-13 21:07:51 +00:00
|
|
|
#undef GET_INSTRINFO_HEADER
|
2012-12-11 21:25:42 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2014-06-13 01:32:00 +00:00
|
|
|
class AMDGPUSubtarget;
|
2012-12-11 21:25:42 +00:00
|
|
|
class MachineFunction;
|
|
|
|
class MachineInstr;
|
|
|
|
class MachineInstrBuilder;
|
|
|
|
|
|
|
|
class AMDGPUInstrInfo : public AMDGPUGenInstrInfo {
|
|
|
|
private:
|
2014-06-13 01:32:00 +00:00
|
|
|
const AMDGPUSubtarget &ST;
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2016-06-24 06:30:11 +00:00
|
|
|
virtual void anchor();
|
2017-03-27 14:04:01 +00:00
|
|
|
protected:
|
|
|
|
AMDGPUAS AMDGPUASI;
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2014-09-15 15:41:53 +00:00
|
|
|
public:
|
2016-06-24 06:30:11 +00:00
|
|
|
explicit AMDGPUInstrInfo(const AMDGPUSubtarget &st);
|
|
|
|
|
2012-12-11 21:25:42 +00:00
|
|
|
bool shouldScheduleLoadsNear(SDNode *Load1, SDNode *Load2,
|
|
|
|
int64_t Offset1, int64_t Offset2,
|
2014-04-29 07:57:24 +00:00
|
|
|
unsigned NumLoads) const override;
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2015-01-15 18:42:51 +00:00
|
|
|
/// \brief Return a target-specific opcode if Opcode is a pseudo instruction.
|
|
|
|
/// Return -1 if the target-specific opcode for the pseudo instruction does
|
|
|
|
/// not exist. If Opcode is not a pseudo instruction, this is identity.
|
|
|
|
int pseudoToMCOpcode(int Opcode) const;
|
2012-12-11 21:25:42 +00:00
|
|
|
};
|
2015-06-23 09:49:53 +00:00
|
|
|
} // End llvm namespace
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#endif
|