mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[NFC][AMDGPU] Reduce include files dependency.
Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D93813
This commit is contained in:
parent
dac6aa4e2a
commit
d069b95364
@ -12,7 +12,6 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/Support/AMDGPUMetadata.h"
|
||||
#include "llvm/Support/YAMLTraits.h"
|
||||
|
||||
|
@ -10,8 +10,6 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPU_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPU_H
|
||||
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h" // TODO: Sink this.
|
||||
#include "llvm/IR/IntrinsicsR600.h" // TODO: Sink this.
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/Support/CodeGen.h"
|
||||
|
||||
|
@ -10,23 +10,8 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUAliasAnalysis.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/MemoryLocation.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/IR/Argument.h"
|
||||
#include "llvm/IR/Attributes.h"
|
||||
#include "llvm/IR/CallingConv.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/GlobalVariable.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/IR/Value.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include <cassert>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -13,13 +13,7 @@
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUALIASANALYSIS_H
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -34,8 +28,7 @@ class AMDGPUAAResult : public AAResultBase<AMDGPUAAResult> {
|
||||
const DataLayout &DL;
|
||||
|
||||
public:
|
||||
explicit AMDGPUAAResult(const DataLayout &DL, Triple T) : AAResultBase(),
|
||||
DL(DL) {}
|
||||
explicit AMDGPUAAResult(const DataLayout &DL) : AAResultBase(), DL(DL) {}
|
||||
AMDGPUAAResult(AMDGPUAAResult &&Arg)
|
||||
: AAResultBase(std::move(Arg)), DL(Arg.DL) {}
|
||||
|
||||
@ -63,8 +56,7 @@ public:
|
||||
using Result = AMDGPUAAResult;
|
||||
|
||||
AMDGPUAAResult run(Function &F, AnalysisManager<Function> &AM) {
|
||||
return AMDGPUAAResult(F.getParent()->getDataLayout(),
|
||||
Triple(F.getParent()->getTargetTriple()));
|
||||
return AMDGPUAAResult(F.getParent()->getDataLayout());
|
||||
}
|
||||
};
|
||||
|
||||
@ -83,8 +75,7 @@ public:
|
||||
const AMDGPUAAResult &getResult() const { return *Result; }
|
||||
|
||||
bool doInitialization(Module &M) override {
|
||||
Result.reset(new AMDGPUAAResult(M.getDataLayout(),
|
||||
Triple(M.getTargetTriple())));
|
||||
Result.reset(new AMDGPUAAResult(M.getDataLayout()));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -15,10 +15,9 @@
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/Transforms/Utils/Cloning.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -13,26 +13,11 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Analysis/CallGraph.h"
|
||||
#include "llvm/Analysis/CallGraphSCCPass.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/IR/Constant.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Intrinsics.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/IR/Use.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/IR/IntrinsicsR600.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-annotate-kernel-features"
|
||||
|
@ -18,11 +18,8 @@
|
||||
#include "llvm/Analysis/LegacyDivergenceAnalysis.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/InstVisitor.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-annotate-uniform"
|
||||
|
||||
|
@ -6,11 +6,13 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUArgumentUsageInfo.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "SIRegisterInfo.h"
|
||||
#include "llvm/CodeGen/TargetRegisterInfo.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/Support/NativeFormatting.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
|
@ -9,14 +9,13 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUARGUMENTUSAGEINFO_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUARGUMENTUSAGEINFO_H
|
||||
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/CodeGen/Register.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/LowLevelTypeImpl.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class Function;
|
||||
class LLT;
|
||||
class raw_ostream;
|
||||
class TargetRegisterClass;
|
||||
class TargetRegisterInfo;
|
||||
|
@ -17,37 +17,27 @@
|
||||
|
||||
#include "AMDGPUAsmPrinter.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUHSAMetadataStreamer.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "AMDKernelCodeT.h"
|
||||
#include "MCTargetDesc/AMDGPUInstPrinter.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "MCTargetDesc/AMDGPUTargetStreamer.h"
|
||||
#include "R600AsmPrinter.h"
|
||||
#include "R600Defines.h"
|
||||
#include "R600MachineFunctionInfo.h"
|
||||
#include "R600RegisterInfo.h"
|
||||
#include "SIDefines.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "SIRegisterInfo.h"
|
||||
#include "TargetInfo/AMDGPUTargetInfo.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/IR/DiagnosticInfo.h"
|
||||
#include "llvm/MC/MCAssembler.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCSectionELF.h"
|
||||
#include "llvm/MC/MCStreamer.h"
|
||||
#include "llvm/Support/AMDGPUMetadata.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/TargetParser.h"
|
||||
#include "llvm/Support/AMDHSAKernelDescriptor.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
using namespace llvm;
|
||||
using namespace llvm::AMDGPU;
|
||||
using namespace llvm::AMDGPU::HSAMD;
|
||||
|
||||
// We need to tell the runtime some amount ahead of time if we don't know the
|
||||
// true stack size. Assume a smaller number if this is only due to dynamic /
|
||||
@ -110,9 +100,9 @@ AMDGPUAsmPrinter::AMDGPUAsmPrinter(TargetMachine &TM,
|
||||
: AsmPrinter(TM, std::move(Streamer)) {
|
||||
if (TM.getTargetTriple().getOS() == Triple::AMDHSA) {
|
||||
if (isHsaAbiVersion2(getGlobalSTI())) {
|
||||
HSAMetadataStream.reset(new MetadataStreamerV2());
|
||||
HSAMetadataStream.reset(new HSAMD::MetadataStreamerV2());
|
||||
} else {
|
||||
HSAMetadataStream.reset(new MetadataStreamerV3());
|
||||
HSAMetadataStream.reset(new HSAMD::MetadataStreamerV3());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,19 +14,10 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUASMPRINTER_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUASMPRINTER_H
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDKernelCodeT.h"
|
||||
#include "AMDGPUHSAMetadataStreamer.h"
|
||||
#include "SIProgramInfo.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/CodeGen/AsmPrinter.h"
|
||||
#include "llvm/Support/AMDHSAKernelDescriptor.h"
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct amd_kernel_code_t;
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -36,6 +27,16 @@ class MCCodeEmitter;
|
||||
class MCOperand;
|
||||
class GCNSubtarget;
|
||||
|
||||
namespace AMDGPU {
|
||||
namespace HSAMD {
|
||||
class MetadataStreamer;
|
||||
}
|
||||
} // namespace AMDGPU
|
||||
|
||||
namespace amdhsa {
|
||||
struct kernel_descriptor_t;
|
||||
}
|
||||
|
||||
class AMDGPUAsmPrinter final : public AsmPrinter {
|
||||
private:
|
||||
// Track resource usage for callee functions.
|
||||
|
@ -15,12 +15,13 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "SIDefines.h"
|
||||
#include "llvm/Analysis/LegacyDivergenceAnalysis.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/InstVisitor.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-atomic-optimizer"
|
||||
|
@ -14,19 +14,14 @@
|
||||
|
||||
#include "AMDGPUCallLowering.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUISelLowering.h"
|
||||
#include "AMDGPULegalizerInfo.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "SIISelLowering.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "SIRegisterInfo.h"
|
||||
#include "llvm/CodeGen/Analysis.h"
|
||||
#include "llvm/CodeGen/CallingConvLower.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/Support/LowLevelTypeImpl.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-call-lowering"
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUCALLLOWERING_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUCALLLOWERING_H
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/CodeGen/GlobalISel/CallLowering.h"
|
||||
|
||||
namespace llvm {
|
||||
|
@ -15,39 +15,18 @@
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "llvm/ADT/FloatingPointMode.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/ConstantFolding.h"
|
||||
#include "llvm/Analysis/LegacyDivergenceAnalysis.h"
|
||||
#include "llvm/Analysis/Loads.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/IR/Attributes.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/Dominators.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/InstVisitor.h"
|
||||
#include "llvm/IR/InstrTypes.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
#include "llvm/IR/Intrinsics.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/Operator.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/IR/Value.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/KnownBits.h"
|
||||
#include "llvm/Transforms/Utils/IntegerDivision.h"
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-codegenprepare"
|
||||
|
||||
|
@ -12,9 +12,9 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUExportClustering.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "llvm/CodeGen/ScheduleDAGInstrs.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -6,7 +6,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/CodeGen/MachineScheduler.h"
|
||||
#include "llvm/CodeGen/ScheduleDAGMutation.h"
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -10,11 +10,10 @@
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUGLOBALISELUTILS_H
|
||||
|
||||
#include "llvm/CodeGen/Register.h"
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class MachineInstr;
|
||||
class MachineRegisterInfo;
|
||||
|
||||
namespace AMDGPU {
|
||||
|
@ -18,12 +18,7 @@
|
||||
#include "MCTargetDesc/AMDGPUTargetStreamer.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "SIProgramInfo.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
static std::pair<Type *, Align> getArgumentTypeAlign(const Argument &Arg,
|
||||
|
@ -15,9 +15,6 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUHSAMETADATASTREAMER_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUHSAMETADATASTREAMER_H
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDKernelCodeT.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/BinaryFormat/MsgPackDocument.h"
|
||||
#include "llvm/Support/AMDGPUMetadata.h"
|
||||
#include "llvm/Support/Alignment.h"
|
||||
|
@ -12,48 +12,22 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUArgumentUsageInfo.h"
|
||||
#include "AMDGPUISelLowering.h" // For AMDGPUISD
|
||||
#include "AMDGPUInstrInfo.h"
|
||||
#include "AMDGPUPerfHintAnalysis.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "SIDefines.h"
|
||||
#include "SIISelLowering.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "SIRegisterInfo.h"
|
||||
#include "llvm/ADT/APInt.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Analysis/LegacyDivergenceAnalysis.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/CodeGen/FunctionLoweringInfo.h"
|
||||
#include "llvm/CodeGen/ISDOpcodes.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/SelectionDAG.h"
|
||||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
#include "llvm/CodeGen/SelectionDAGNodes.h"
|
||||
#include "llvm/CodeGen/ValueTypes.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
|
||||
#ifdef EXPENSIVE_CHECKS
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/IR/Dominators.h"
|
||||
#endif
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/MC/MCInstrDesc.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/CodeGen.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MachineValueType.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <new>
|
||||
#include <vector>
|
||||
|
||||
#define DEBUG_TYPE "isel"
|
||||
|
||||
|
@ -14,25 +14,17 @@
|
||||
|
||||
#include "AMDGPUISelLowering.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUCallLowering.h"
|
||||
#include "AMDGPUFrameLowering.h"
|
||||
#include "AMDGPUInstrInfo.h"
|
||||
#include "AMDGPUMachineFunction.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "R600MachineFunctionInfo.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/CodeGen/Analysis.h"
|
||||
#include "llvm/CodeGen/CallingConvLower.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/SelectionDAG.h"
|
||||
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/DiagnosticInfo.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/KnownBits.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
#include "AMDGPUGenCallingConv.inc"
|
||||
@ -573,6 +565,17 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(const TargetMachine &TM,
|
||||
setTargetDAGCombine(ISD::INTRINSIC_WO_CHAIN);
|
||||
}
|
||||
|
||||
bool AMDGPUTargetLowering::mayIgnoreSignedZero(SDValue Op) const {
|
||||
if (getTargetMachine().Options.NoSignedZerosFPMath)
|
||||
return true;
|
||||
|
||||
const auto Flags = Op.getNode()->getFlags();
|
||||
if (Flags.hasNoSignedZeros())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Target Information
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -15,10 +15,8 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUISELLOWERING_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUISELLOWERING_H
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/CodeGen/CallingConvLower.h"
|
||||
#include "llvm/CodeGen/TargetLowering.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -145,16 +143,7 @@ protected:
|
||||
public:
|
||||
AMDGPUTargetLowering(const TargetMachine &TM, const AMDGPUSubtarget &STI);
|
||||
|
||||
bool mayIgnoreSignedZero(SDValue Op) const {
|
||||
if (getTargetMachine().Options.NoSignedZerosFPMath)
|
||||
return true;
|
||||
|
||||
const auto Flags = Op.getNode()->getFlags();
|
||||
if (Flags.hasNoSignedZeros())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
bool mayIgnoreSignedZero(SDValue Op) const;
|
||||
|
||||
static inline SDValue stripBitcast(SDValue Val) {
|
||||
return Val.getOpcode() == ISD::BITCAST ? Val.getOperand(0) : Val;
|
||||
|
@ -18,19 +18,11 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/CallGraph.h"
|
||||
#include "llvm/Analysis/InlineCost.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Transforms/IPO.h"
|
||||
#include "llvm/Transforms/IPO/Inliner.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -14,8 +14,9 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUInstrInfo.h"
|
||||
#include "AMDGPUTargetTransformInfo.h"
|
||||
#include "llvm/Support/KnownBits.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/Transforms/InstCombine/InstCombiner.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -13,11 +13,11 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUInstrInfo.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/CodeGen/MachineMemOperand.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/IR/Value.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRINFO_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRINFO_H
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/CodeGen/TargetInstrInfo.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -25,6 +23,7 @@ class GCNSubtarget;
|
||||
class MachineFunction;
|
||||
class MachineInstr;
|
||||
class MachineInstrBuilder;
|
||||
class MachineMemOperand;
|
||||
|
||||
class AMDGPUInstrInfo {
|
||||
public:
|
||||
|
@ -12,28 +12,18 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUInstructionSelector.h"
|
||||
#include "AMDGPUInstrInfo.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUGlobalISelUtils.h"
|
||||
#include "AMDGPUInstrInfo.h"
|
||||
#include "AMDGPURegisterBankInfo.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "llvm/CodeGen/GlobalISel/GISelKnownBits.h"
|
||||
#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
|
||||
#include "llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
|
||||
#include "llvm/CodeGen/GlobalISel/Utils.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
|
||||
#include "llvm/IR/DiagnosticInfo.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-isel"
|
||||
|
||||
|
@ -13,13 +13,11 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRUCTIONSELECTOR_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRUCTIONSELECTOR_H
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUArgumentUsageInfo.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/CodeGen/Register.h"
|
||||
#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
|
||||
#include "llvm/CodeGen/Register.h"
|
||||
#include "llvm/IR/InstrTypes.h"
|
||||
#include "llvm/IR/Intrinsics.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
|
||||
namespace {
|
||||
#define GET_GLOBALISEL_PREDICATE_BITSET
|
||||
@ -37,6 +35,7 @@ struct ImageDimIntrinsicInfo;
|
||||
|
||||
class AMDGPUInstrInfo;
|
||||
class AMDGPURegisterBankInfo;
|
||||
class AMDGPUTargetMachine;
|
||||
class GCNSubtarget;
|
||||
class MachineInstr;
|
||||
class MachineIRBuilder;
|
||||
|
@ -16,15 +16,12 @@
|
||||
#include "llvm/Analysis/AssumptionCache.h"
|
||||
#include "llvm/Analysis/LegacyDivergenceAnalysis.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/InstVisitor.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/KnownBits.h"
|
||||
#include "llvm/Transforms/Utils/Local.h"
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-late-codegenprepare"
|
||||
|
||||
|
@ -15,19 +15,15 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUGlobalISelUtils.h"
|
||||
#include "AMDGPUInstrInfo.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "llvm/ADT/ScopeExit.h"
|
||||
#include "llvm/CodeGen/GlobalISel/LegalizerHelper.h"
|
||||
#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
|
||||
#include "llvm/CodeGen/TargetOpcodes.h"
|
||||
#include "llvm/CodeGen/ValueTypes.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/DiagnosticInfo.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-legalinfo"
|
||||
|
||||
|
@ -24,6 +24,9 @@ class GCNTargetMachine;
|
||||
class LLVMContext;
|
||||
class GCNSubtarget;
|
||||
|
||||
namespace AMDGPU {
|
||||
struct ImageDimIntrinsicInfo;
|
||||
}
|
||||
/// This class provides the information for the target register banks.
|
||||
class AMDGPULegalizerInfo final : public LegalizerInfo {
|
||||
const GCNSubtarget &ST;
|
||||
|
@ -14,27 +14,11 @@
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPULibFunc.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/StringSet.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/Loads.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Intrinsics.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/IR/ValueSymbolTable.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-simplifylib"
|
||||
|
||||
|
@ -12,17 +12,14 @@
|
||||
|
||||
#include "AMDGPULibFunc.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
#include "llvm/IR/Attributes.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/ValueSymbolTable.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <string>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -8,12 +8,15 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/IR/IntrinsicsR600.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Transforms/Utils/LowerMemIntrinsics.h"
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-lower-intrinsics"
|
||||
|
@ -13,29 +13,10 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Analysis/Loads.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/IR/Attributes.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/InstrTypes.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/IR/MDBuilder.h"
|
||||
#include "llvm/IR/Metadata.h"
|
||||
#include "llvm/IR/Operator.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/IR/Value.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#define DEBUG_TYPE "amdgpu-lower-kernel-arguments"
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/InstIterator.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/IR/PatternMatch.h"
|
||||
#include "llvm/Pass.h"
|
||||
|
||||
|
@ -16,9 +16,7 @@
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "MCTargetDesc/AMDGPUInstPrinter.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "R600AsmPrinter.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
|
@ -12,35 +12,16 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/DenseSet.h"
|
||||
#include "llvm/ADT/PostOrderIterator.h"
|
||||
#include "llvm/ADT/SetVector.h"
|
||||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineOperand.h"
|
||||
#include "llvm/CodeGen/MachineRegionInfo.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/TargetOpcodes.h"
|
||||
#include "llvm/CodeGen/TargetRegisterInfo.h"
|
||||
#include "llvm/Config/llvm-config.h"
|
||||
#include "llvm/IR/DebugLoc.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cassert>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -7,9 +7,10 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUMachineFunction.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUPerfHintAnalysis.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/Support/Alignment.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -13,7 +13,6 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUMachineModuleInfo.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -15,11 +15,7 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUMACHINEMODULEINFO_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUMACHINEMODULEINFO_H
|
||||
|
||||
#include "llvm/ADT/None.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
|
||||
#include "AMDGPUMacroFusion.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
|
||||
#include "llvm/CodeGen/MacroFusion.h"
|
||||
|
||||
|
@ -6,7 +6,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/CodeGen/MachineScheduler.h"
|
||||
#include "llvm/CodeGen/ScheduleDAGMutation.h"
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -34,16 +34,11 @@
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/ADT/DenseSet.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Mangler.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/User.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-lower-enqueued-block"
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUPTNOTE_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUPTNOTE_H
|
||||
|
||||
namespace llvm {
|
||||
namespace AMDGPU {
|
||||
|
||||
namespace ElfNote {
|
||||
@ -41,7 +42,7 @@ enum NoteType{
|
||||
NT_AMDGPU_HSA_HLDEBUG_TARGET = 102
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} // End namespace ElfNote
|
||||
} // End namespace AMDGPU
|
||||
} // End namespace llvm
|
||||
#endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUNOTETYPE_H
|
||||
|
@ -22,11 +22,7 @@
|
||||
#include "llvm/CodeGen/TargetLowering.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/CodeGen/TargetSubtargetInfo.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/ValueMap.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "llvm/Analysis/CallGraphSCCPass.h"
|
||||
#include "llvm/IR/ValueMap.h"
|
||||
#include "llvm/Pass.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -11,18 +11,17 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPULegalizerInfo.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "llvm/CodeGen/GlobalISel/Combiner.h"
|
||||
#include "llvm/CodeGen/GlobalISel/CombinerHelper.h"
|
||||
#include "llvm/CodeGen/GlobalISel/CombinerInfo.h"
|
||||
#include "llvm/CodeGen/GlobalISel/GISelKnownBits.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
|
||||
#include "llvm/CodeGen/MachineDominators.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-postlegalizer-combiner"
|
||||
|
||||
|
@ -11,17 +11,15 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/CodeGen/GlobalISel/Combiner.h"
|
||||
#include "llvm/CodeGen/GlobalISel/CombinerHelper.h"
|
||||
#include "llvm/CodeGen/GlobalISel/CombinerInfo.h"
|
||||
#include "llvm/CodeGen/GlobalISel/GISelKnownBits.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
|
||||
#include "llvm/CodeGen/MachineDominators.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-prelegalizer-combiner"
|
||||
|
||||
|
@ -19,27 +19,14 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Analysis/InstructionSimplify.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/Dominators.h"
|
||||
#include "llvm/IR/GlobalVariable.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "printfToRuntime"
|
||||
|
@ -13,53 +13,14 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/APInt.h"
|
||||
#include "llvm/ADT/None.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/Analysis/CaptureTracking.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/IR/Attributes.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/Constant.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/GlobalValue.h"
|
||||
#include "llvm/IR/GlobalVariable.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
#include "llvm/IR/Intrinsics.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/IR/IntrinsicsR600.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/Metadata.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/IR/User.h"
|
||||
#include "llvm/IR/Value.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-promote-alloca"
|
||||
|
||||
|
@ -28,18 +28,10 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Transforms/Utils/Cloning.h"
|
||||
#include <string>
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-propagate-attributes"
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -11,19 +11,18 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPULegalizerInfo.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "llvm/CodeGen/GlobalISel/Combiner.h"
|
||||
#include "llvm/CodeGen/GlobalISel/CombinerHelper.h"
|
||||
#include "llvm/CodeGen/GlobalISel/CombinerInfo.h"
|
||||
#include "llvm/CodeGen/GlobalISel/GISelKnownBits.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
|
||||
#include "llvm/CodeGen/MachineDominators.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#define DEBUG_TYPE "amdgpu-regbank-combiner"
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -70,21 +70,17 @@
|
||||
|
||||
#include "AMDGPURegisterBankInfo.h"
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUGlobalISelUtils.h"
|
||||
#include "AMDGPUInstrInfo.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "SIRegisterInfo.h"
|
||||
#include "llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h"
|
||||
#include "llvm/CodeGen/GlobalISel/LegalizerHelper.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
|
||||
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
|
||||
#include "llvm/CodeGen/GlobalISel/RegisterBank.h"
|
||||
#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
|
||||
#include "llvm/CodeGen/TargetRegisterInfo.h"
|
||||
#include "llvm/CodeGen/TargetSubtargetInfo.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
|
||||
#define GET_TARGET_REGBANK_IMPL
|
||||
#include "AMDGPUGenRegisterBank.inc"
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#define GET_REGBANK_DECLARATIONS
|
||||
#include "AMDGPUGenRegisterBank.inc"
|
||||
#undef GET_REGBANK_DECLARATIONS
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -39,6 +38,7 @@ protected:
|
||||
#define GET_TARGET_REGBANK_CLASS
|
||||
#include "AMDGPUGenRegisterBank.inc"
|
||||
};
|
||||
|
||||
class AMDGPURegisterBankInfo final : public AMDGPUGenRegisterBankInfo {
|
||||
public:
|
||||
const GCNSubtarget &Subtarget;
|
||||
|
@ -43,35 +43,16 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
|
||||
#include "llvm/Analysis/MemoryLocation.h"
|
||||
#include "llvm/IR/Argument.h"
|
||||
#include "llvm/IR/Attributes.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/IR/Use.h"
|
||||
#include "llvm/IR/User.h"
|
||||
#include "llvm/IR/Value.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cassert>
|
||||
#include <utility>
|
||||
|
||||
#define DEBUG_TYPE "amdgpu-rewrite-out-arguments"
|
||||
|
||||
|
@ -13,18 +13,20 @@
|
||||
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "AMDGPUCallLowering.h"
|
||||
#include "AMDGPUInstructionSelector.h"
|
||||
#include "AMDGPULegalizerInfo.h"
|
||||
#include "AMDGPURegisterBankInfo.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/CodeGen/GlobalISel/InlineAsmLowering.h"
|
||||
#include "llvm/CodeGen/MachineScheduler.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/IR/MDBuilder.h"
|
||||
#include "llvm/CodeGen/TargetFrameLowering.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/IR/IntrinsicsR600.h"
|
||||
#include "llvm/IR/MDBuilder.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace llvm;
|
||||
@ -481,6 +483,10 @@ static unsigned getReqdWorkGroupSize(const Function &Kernel, unsigned Dim) {
|
||||
return std::numeric_limits<unsigned>::max();
|
||||
}
|
||||
|
||||
bool AMDGPUSubtarget::isMesaKernel(const Function &F) const {
|
||||
return isMesa3DOS() && !AMDGPU::isShader(F.getCallingConv());
|
||||
}
|
||||
|
||||
unsigned AMDGPUSubtarget::getMaxWorkitemID(const Function &Kernel,
|
||||
unsigned Dimension) const {
|
||||
unsigned ReqdSize = getReqdWorkGroupSize(Kernel, Dimension);
|
||||
@ -551,6 +557,12 @@ bool AMDGPUSubtarget::makeLIDRangeMetadata(Instruction *I) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned AMDGPUSubtarget::getImplicitArgNumBytes(const Function &F) const {
|
||||
if (isMesaKernel(F))
|
||||
return 16;
|
||||
return AMDGPU::getIntegerAttribute(F, "amdgpu-implicitarg-num-bytes", 0);
|
||||
}
|
||||
|
||||
uint64_t AMDGPUSubtarget::getExplicitKernArgSize(const Function &F,
|
||||
Align &MaxAlign) const {
|
||||
assert(F.getCallingConv() == CallingConv::AMDGPU_KERNEL ||
|
||||
|
@ -14,7 +14,6 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUSUBTARGET_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUSUBTARGET_H
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUCallLowering.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "R600FrameLowering.h"
|
||||
@ -23,20 +22,17 @@
|
||||
#include "SIFrameLowering.h"
|
||||
#include "SIISelLowering.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/CodeGen/GlobalISel/InlineAsmLowering.h"
|
||||
#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
|
||||
#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
|
||||
#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/SelectionDAGTargetInfo.h"
|
||||
#include "llvm/MC/MCInstrItineraries.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include "llvm/IR/CallingConv.h"
|
||||
#include "llvm/Support/Alignment.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class MCInst;
|
||||
class MCInstrInfo;
|
||||
|
||||
} // namespace llvm
|
||||
|
||||
#define GET_SUBTARGETINFO_HEADER
|
||||
#include "AMDGPUGenSubtargetInfo.inc"
|
||||
@ -45,7 +41,12 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class Function;
|
||||
class Instruction;
|
||||
class MachineFunction;
|
||||
class StringRef;
|
||||
class TargetMachine;
|
||||
class GCNTargetMachine;
|
||||
|
||||
class AMDGPUSubtarget {
|
||||
public:
|
||||
@ -135,9 +136,7 @@ public:
|
||||
return TargetTriple.getOS() == Triple::Mesa3D;
|
||||
}
|
||||
|
||||
bool isMesaKernel(const Function &F) const {
|
||||
return isMesa3DOS() && !AMDGPU::isShader(F.getCallingConv());
|
||||
}
|
||||
bool isMesaKernel(const Function &F) const;
|
||||
|
||||
bool isAmdHsaOrMesa(const Function &F) const {
|
||||
return isAmdHsaOS() || isMesaKernel(F);
|
||||
@ -249,11 +248,7 @@ public:
|
||||
|
||||
/// \returns Number of bytes of arguments that are passed to a shader or
|
||||
/// kernel in addition to the explicit ones declared for the function.
|
||||
unsigned getImplicitArgNumBytes(const Function &F) const {
|
||||
if (isMesaKernel(F))
|
||||
return 16;
|
||||
return AMDGPU::getIntegerAttribute(F, "amdgpu-implicitarg-num-bytes", 0);
|
||||
}
|
||||
unsigned getImplicitArgNumBytes(const Function &F) const;
|
||||
uint64_t getExplicitKernArgSize(const Function &F, Align &MaxAlign) const;
|
||||
unsigned getKernArgSegmentSize(const Function &F, Align &MaxAlign) const;
|
||||
|
||||
|
@ -15,16 +15,12 @@
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUAliasAnalysis.h"
|
||||
#include "AMDGPUCallLowering.h"
|
||||
#include "AMDGPUExportClustering.h"
|
||||
#include "AMDGPUInstructionSelector.h"
|
||||
#include "AMDGPULegalizerInfo.h"
|
||||
#include "AMDGPUMacroFusion.h"
|
||||
#include "AMDGPUTargetObjectFile.h"
|
||||
#include "AMDGPUTargetTransformInfo.h"
|
||||
#include "GCNIterativeScheduler.h"
|
||||
#include "GCNSchedStrategy.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "R600MachineScheduler.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "SIMachineScheduler.h"
|
||||
@ -36,19 +32,12 @@
|
||||
#include "llvm/CodeGen/GlobalISel/Localizer.h"
|
||||
#include "llvm/CodeGen/GlobalISel/RegBankSelect.h"
|
||||
#include "llvm/CodeGen/MIRParser/MIParser.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/CodeGen/TargetPassConfig.h"
|
||||
#include "llvm/IR/Attributes.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/LegacyPassManager.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Passes/PassBuilder.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||
#include "llvm/Transforms/IPO.h"
|
||||
#include "llvm/Transforms/IPO/AlwaysInliner.h"
|
||||
#include "llvm/Transforms/IPO/GlobalDCE.h"
|
||||
@ -60,7 +49,6 @@
|
||||
#include "llvm/Transforms/Utils.h"
|
||||
#include "llvm/Transforms/Utils/SimplifyLibCalls.h"
|
||||
#include "llvm/Transforms/Vectorize.h"
|
||||
#include <memory>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
@ -652,6 +640,14 @@ const R600Subtarget *R600TargetMachine::getSubtargetImpl(
|
||||
return I.get();
|
||||
}
|
||||
|
||||
int64_t AMDGPUTargetMachine::getNullPointerValue(unsigned AddrSpace) {
|
||||
return (AddrSpace == AMDGPUAS::LOCAL_ADDRESS ||
|
||||
AddrSpace == AMDGPUAS::PRIVATE_ADDRESS ||
|
||||
AddrSpace == AMDGPUAS::REGION_ADDRESS)
|
||||
? -1
|
||||
: 0;
|
||||
}
|
||||
|
||||
bool AMDGPUTargetMachine::isNoopAddrSpaceCast(unsigned SrcAS,
|
||||
unsigned DestAS) const {
|
||||
return AMDGPU::isFlatGlobalAddrSpace(SrcAS) &&
|
||||
|
@ -15,13 +15,7 @@
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETMACHINE_H
|
||||
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/Support/CodeGen.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -61,11 +55,7 @@ public:
|
||||
void registerDefaultAliasAnalyses(AAManager &) override;
|
||||
|
||||
/// Get the integer value of a null pointer in the given address space.
|
||||
static int64_t getNullPointerValue(unsigned AddrSpace) {
|
||||
return (AddrSpace == AMDGPUAS::LOCAL_ADDRESS ||
|
||||
AddrSpace == AMDGPUAS::PRIVATE_ADDRESS ||
|
||||
AddrSpace == AMDGPUAS::REGION_ADDRESS) ? -1 : 0;
|
||||
}
|
||||
static int64_t getNullPointerValue(unsigned AddrSpace);
|
||||
|
||||
bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const override;
|
||||
|
||||
|
@ -7,13 +7,10 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUTargetObjectFile.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCSectionELF.h"
|
||||
|
||||
#include "llvm/IR/GlobalObject.h"
|
||||
#include "llvm/MC/SectionKind.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
using namespace llvm;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -15,41 +15,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUTargetTransformInfo.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/CodeGen/ISDOpcodes.h"
|
||||
#include "llvm/CodeGen/ValueTypes.h"
|
||||
#include "llvm/IR/Argument.h"
|
||||
#include "llvm/IR/Attributes.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
#include "llvm/IR/CallingConv.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/IR/PatternMatch.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/IR/Value.h"
|
||||
#include "llvm/MC/SubtargetFeature.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/KnownBits.h"
|
||||
#include "llvm/Support/MachineValueType.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
@ -104,6 +75,12 @@ static bool dependsOnLocalPhi(const Loop *L, const Value *Cond,
|
||||
return false;
|
||||
}
|
||||
|
||||
AMDGPUTTIImpl::AMDGPUTTIImpl(const AMDGPUTargetMachine *TM, const Function &F)
|
||||
: BaseT(TM, F.getParent()->getDataLayout()),
|
||||
TargetTriple(TM->getTargetTriple()),
|
||||
ST(static_cast<const GCNSubtarget *>(TM->getSubtargetImpl(F))),
|
||||
TLI(ST->getTargetLowering()) {}
|
||||
|
||||
void AMDGPUTTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
|
||||
TTI::UnrollingPreferences &UP) {
|
||||
const Function &F = *L->getHeader()->getParent();
|
||||
@ -261,6 +238,21 @@ void AMDGPUTTIImpl::getPeelingPreferences(Loop *L, ScalarEvolution &SE,
|
||||
TTI::PeelingPreferences &PP) {
|
||||
BaseT::getPeelingPreferences(L, SE, PP);
|
||||
}
|
||||
|
||||
GCNTTIImpl::GCNTTIImpl(const AMDGPUTargetMachine *TM, const Function &F)
|
||||
: BaseT(TM, F.getParent()->getDataLayout()),
|
||||
ST(static_cast<const GCNSubtarget *>(TM->getSubtargetImpl(F))),
|
||||
TLI(ST->getTargetLowering()), CommonTTI(TM, F),
|
||||
IsGraphics(AMDGPU::isGraphics(F.getCallingConv())),
|
||||
MaxVGPRs(ST->getMaxNumVGPRs(
|
||||
std::max(ST->getWavesPerEU(F).first,
|
||||
ST->getWavesPerEUForWorkGroup(
|
||||
ST->getFlatWorkGroupSizes(F).second)))) {
|
||||
AMDGPU::SIModeRegisterDefaults Mode(F);
|
||||
HasFP32Denormals = Mode.allFP32Denormals();
|
||||
HasFP64FP16Denormals = Mode.allFP64FP16Denormals();
|
||||
}
|
||||
|
||||
unsigned GCNTTIImpl::getHardwareNumberOfRegisters(bool Vec) const {
|
||||
// The concept of vector registers doesn't really exist. Some packed vector
|
||||
// operations operate on the normal 32-bit registers.
|
||||
@ -1121,6 +1113,11 @@ void GCNTTIImpl::getPeelingPreferences(Loop *L, ScalarEvolution &SE,
|
||||
CommonTTI.getPeelingPreferences(L, SE, PP);
|
||||
}
|
||||
|
||||
R600TTIImpl::R600TTIImpl(const AMDGPUTargetMachine *TM, const Function &F)
|
||||
: BaseT(TM, F.getParent()->getDataLayout()),
|
||||
ST(static_cast<const R600Subtarget *>(TM->getSubtargetImpl(F))),
|
||||
TLI(ST->getTargetLowering()), CommonTTI(TM, F) {}
|
||||
|
||||
unsigned R600TTIImpl::getHardwareNumberOfRegisters(bool Vec) const {
|
||||
return 4 * 128; // XXX - 4 channels. Should these count as vector instead?
|
||||
}
|
||||
|
@ -19,16 +19,7 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "AMDGPUTargetMachine.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/CodeGen/BasicTTIImpl.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/MC/SubtargetFeature.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include <cassert>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -54,11 +45,7 @@ class AMDGPUTTIImpl final : public BasicTTIImplBase<AMDGPUTTIImpl> {
|
||||
const TargetLoweringBase *getTLI() const { return TLI; }
|
||||
|
||||
public:
|
||||
explicit AMDGPUTTIImpl(const AMDGPUTargetMachine *TM, const Function &F)
|
||||
: BaseT(TM, F.getParent()->getDataLayout()),
|
||||
TargetTriple(TM->getTargetTriple()),
|
||||
ST(static_cast<const GCNSubtarget *>(TM->getSubtargetImpl(F))),
|
||||
TLI(ST->getTargetLowering()) {}
|
||||
explicit AMDGPUTTIImpl(const AMDGPUTargetMachine *TM, const Function &F);
|
||||
|
||||
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
|
||||
TTI::UnrollingPreferences &UP);
|
||||
@ -137,19 +124,7 @@ class GCNTTIImpl final : public BasicTTIImplBase<GCNTTIImpl> {
|
||||
}
|
||||
|
||||
public:
|
||||
explicit GCNTTIImpl(const AMDGPUTargetMachine *TM, const Function &F)
|
||||
: BaseT(TM, F.getParent()->getDataLayout()),
|
||||
ST(static_cast<const GCNSubtarget *>(TM->getSubtargetImpl(F))),
|
||||
TLI(ST->getTargetLowering()), CommonTTI(TM, F),
|
||||
IsGraphics(AMDGPU::isGraphics(F.getCallingConv())),
|
||||
MaxVGPRs(ST->getMaxNumVGPRs(
|
||||
std::max(ST->getWavesPerEU(F).first,
|
||||
ST->getWavesPerEUForWorkGroup(
|
||||
ST->getFlatWorkGroupSizes(F).second)))) {
|
||||
AMDGPU::SIModeRegisterDefaults Mode(F);
|
||||
HasFP32Denormals = Mode.allFP32Denormals();
|
||||
HasFP64FP16Denormals = Mode.allFP64FP16Denormals();
|
||||
}
|
||||
explicit GCNTTIImpl(const AMDGPUTargetMachine *TM, const Function &F);
|
||||
|
||||
bool hasBranchDivergence() { return true; }
|
||||
bool useGPUDivergenceAnalysis() const;
|
||||
@ -278,11 +253,7 @@ class R600TTIImpl final : public BasicTTIImplBase<R600TTIImpl> {
|
||||
AMDGPUTTIImpl CommonTTI;
|
||||
|
||||
public:
|
||||
explicit R600TTIImpl(const AMDGPUTargetMachine *TM, const Function &F)
|
||||
: BaseT(TM, F.getParent()->getDataLayout()),
|
||||
ST(static_cast<const R600Subtarget*>(TM->getSubtargetImpl(F))),
|
||||
TLI(ST->getTargetLowering()),
|
||||
CommonTTI(TM, F) {}
|
||||
explicit R600TTIImpl(const AMDGPUTargetMachine *TM, const Function &F);
|
||||
|
||||
const R600Subtarget *getST() const { return ST; }
|
||||
const AMDGPUTargetLowering *getTLI() const { return TLI; }
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "llvm/IR/InstrTypes.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/Intrinsics.h"
|
||||
#include "llvm/IR/IntrinsicsAMDGPU.h"
|
||||
#include "llvm/IR/Type.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Pass.h"
|
||||
|
@ -12,15 +12,10 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/Metadata.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -8,41 +8,15 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "R600InstrInfo.h"
|
||||
#include "R600RegisterInfo.h"
|
||||
#include "llvm/ADT/DepthFirstIterator.h"
|
||||
#include "llvm/ADT/SCCIterator.h"
|
||||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineDominators.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineJumpTableInfo.h"
|
||||
#include "llvm/CodeGen/MachineLoopInfo.h"
|
||||
#include "llvm/CodeGen/MachineOperand.h"
|
||||
#include "llvm/CodeGen/MachinePostDominators.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/IR/DebugLoc.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MachineValueType.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <deque>
|
||||
#include <iterator>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -11,12 +11,8 @@
|
||||
#ifndef AMDKERNELCODET_H
|
||||
#define AMDKERNELCODET_H
|
||||
|
||||
#include "llvm/MC/SubtargetFeature.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#include "llvm/Support/Debug.h"
|
||||
//---------------------------------------------------------------------------//
|
||||
// AMD Kernel Code, and its dependencies //
|
||||
//---------------------------------------------------------------------------//
|
||||
@ -527,7 +523,7 @@ typedef struct hsa_ext_control_directives_s {
|
||||
/// the kernarg segment is constant for the duration of the kernel execution.
|
||||
///
|
||||
|
||||
typedef struct amd_kernel_code_s {
|
||||
struct amd_kernel_code_t {
|
||||
uint32_t amd_kernel_code_version_major;
|
||||
uint32_t amd_kernel_code_version_minor;
|
||||
uint16_t amd_machine_kind;
|
||||
@ -650,6 +646,6 @@ typedef struct amd_kernel_code_s {
|
||||
uint8_t reserved3[12];
|
||||
uint64_t runtime_loader_kernel_symbol;
|
||||
uint64_t control_directives[16];
|
||||
} amd_kernel_code_t;
|
||||
};
|
||||
|
||||
#endif // AMDKERNELCODET_H
|
||||
|
@ -6,7 +6,6 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDKernelCodeT.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "MCTargetDesc/AMDGPUTargetStreamer.h"
|
||||
@ -17,49 +16,23 @@
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "Utils/AMDKernelCodeTUtils.h"
|
||||
#include "llvm/ADT/APFloat.h"
|
||||
#include "llvm/ADT/APInt.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/SmallBitVector.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
#include "llvm/ADT/StringSet.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "llvm/MC/MCAsmInfo.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCExpr.h"
|
||||
#include "llvm/MC/MCInst.h"
|
||||
#include "llvm/MC/MCInstrDesc.h"
|
||||
#include "llvm/MC/MCInstrInfo.h"
|
||||
#include "llvm/MC/MCParser/MCAsmLexer.h"
|
||||
#include "llvm/MC/MCParser/MCAsmParser.h"
|
||||
#include "llvm/MC/MCParser/MCAsmParserExtension.h"
|
||||
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
|
||||
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
|
||||
#include "llvm/MC/MCRegisterInfo.h"
|
||||
#include "llvm/MC/MCStreamer.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/MC/MCSymbol.h"
|
||||
#include "llvm/Support/AMDGPUMetadata.h"
|
||||
#include "llvm/Support/AMDHSAKernelDescriptor.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/Error.h"
|
||||
#include "llvm/Support/MachineValueType.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/SMLoc.h"
|
||||
#include "llvm/Support/TargetParser.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
using namespace llvm;
|
||||
using namespace llvm::AMDGPU;
|
||||
|
@ -17,36 +17,16 @@
|
||||
// ToDo: What to do with instruction suffixes (v_mov_b32 vs v_mov_b32_e32)?
|
||||
|
||||
#include "Disassembler/AMDGPUDisassembler.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "SIDefines.h"
|
||||
#include "TargetInfo/AMDGPUTargetInfo.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm-c/Disassembler.h"
|
||||
#include "llvm/ADT/APInt.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "llvm-c/DisassemblerTypes.h"
|
||||
#include "llvm/MC/MCAsmInfo.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
|
||||
#include "llvm/MC/MCExpr.h"
|
||||
#include "llvm/MC/MCFixedLenDisassembler.h"
|
||||
#include "llvm/MC/MCInst.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/Support/AMDHSAKernelDescriptor.h"
|
||||
#include "llvm/Support/Endian.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <iterator>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -15,16 +15,9 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_DISASSEMBLER_AMDGPUDISASSEMBLER_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_DISASSEMBLER_AMDGPUDISASSEMBLER_H
|
||||
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
|
||||
#include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
|
||||
#include "llvm/MC/MCDisassembler/MCSymbolizer.h"
|
||||
#include "llvm/MC/MCInstrInfo.h"
|
||||
#include "llvm/Support/DataExtractor.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
|
@ -39,21 +39,8 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineOperand.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/TargetRegisterInfo.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include <cassert>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -12,24 +12,9 @@
|
||||
|
||||
#include "GCNHazardRecognizer.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "SIDefines.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "SIRegisterInfo.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/iterator_range.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineOperand.h"
|
||||
#include "llvm/CodeGen/ScheduleDAG.h"
|
||||
#include "llvm/MC/MCInstrDesc.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <limits>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include "llvm/Support/TargetParser.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/CodeGen/ScheduleDAG.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -13,28 +13,8 @@
|
||||
|
||||
#include "GCNIterativeScheduler.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "GCNRegPressure.h"
|
||||
#include "GCNSchedStrategy.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/CodeGen/LiveIntervals.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/RegisterPressure.h"
|
||||
#include "llvm/CodeGen/ScheduleDAG.h"
|
||||
#include "llvm/Config/llvm-config.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -18,13 +18,7 @@
|
||||
#define LLVM_LIB_TARGET_AMDGPU_GCNITERATIVESCHEDULER_H
|
||||
|
||||
#include "GCNRegPressure.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineScheduler.h"
|
||||
#include "llvm/Support/Allocator.h"
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -13,20 +13,7 @@
|
||||
///
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/ilist_node.h"
|
||||
#include "llvm/ADT/simple_ilist.h"
|
||||
#include "llvm/CodeGen/ScheduleDAG.h"
|
||||
#include "llvm/Support/Allocator.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "machine-scheduler"
|
||||
|
@ -15,17 +15,12 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/CodeGen/LiveInterval.h"
|
||||
#include "llvm/CodeGen/LiveIntervals.h"
|
||||
#include "llvm/CodeGen/LiveRegMatrix.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/VirtRegMap.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -32,20 +32,14 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/CodeGen/LiveInterval.h"
|
||||
#include "llvm/CodeGen/LiveIntervals.h"
|
||||
#include "llvm/CodeGen/LiveRegMatrix.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/MachineLoopInfo.h"
|
||||
#include "llvm/CodeGen/VirtRegMap.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -13,24 +13,7 @@
|
||||
|
||||
#include "GCNRegPressure.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "SIRegisterInfo.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/CodeGen/LiveInterval.h"
|
||||
#include "llvm/CodeGen/LiveIntervals.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineOperand.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/RegisterPressure.h"
|
||||
#include "llvm/CodeGen/SlotIndexes.h"
|
||||
#include "llvm/CodeGen/TargetRegisterInfo.h"
|
||||
#include "llvm/Config/llvm-config.h"
|
||||
#include "llvm/MC/LaneBitmask.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -18,20 +18,14 @@
|
||||
#define LLVM_LIB_TARGET_AMDGPU_GCNREGPRESSURE_H
|
||||
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/CodeGen/LiveIntervals.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/SlotIndexes.h"
|
||||
#include "llvm/MC/LaneBitmask.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class MachineRegisterInfo;
|
||||
class raw_ostream;
|
||||
class SlotIndex;
|
||||
|
||||
struct GCNRegPressure {
|
||||
enum RegKind {
|
||||
|
@ -13,12 +13,7 @@
|
||||
|
||||
#include "GCNSchedStrategy.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "SIInstrInfo.h"
|
||||
#include "SIMachineFunctionInfo.h"
|
||||
#include "SIRegisterInfo.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/CodeGen/RegisterClassInfo.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
|
||||
#define DEBUG_TYPE "machine-scheduler"
|
||||
|
||||
|
@ -9,17 +9,14 @@
|
||||
|
||||
#include "MCTargetDesc/AMDGPUFixupKinds.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/MC/MCAsmBackend.h"
|
||||
#include "llvm/MC/MCAssembler.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCFixupKindInfo.h"
|
||||
#include "llvm/MC/MCObjectWriter.h"
|
||||
#include "llvm/MC/MCValue.h"
|
||||
#include "llvm/Support/EndianStream.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
|
||||
using namespace llvm;
|
||||
using namespace llvm::AMDGPU;
|
||||
|
@ -8,15 +8,9 @@
|
||||
|
||||
#include "AMDGPUFixupKinds.h"
|
||||
#include "AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCELFObjectWriter.h"
|
||||
#include "llvm/MC/MCExpr.h"
|
||||
#include "llvm/MC/MCFixup.h"
|
||||
#include "llvm/MC/MCObjectWriter.h"
|
||||
#include "llvm/MC/MCSymbol.h"
|
||||
#include "llvm/MC/MCValue.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -7,10 +7,9 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUELFStreamer.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "llvm/MC/MCAsmBackend.h"
|
||||
#include "llvm/MC/MCCodeEmitter.h"
|
||||
#include "llvm/MC/MCELFStreamer.h"
|
||||
#include "llvm/MC/MCObjectWriter.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -14,13 +14,15 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUELFSTREAMER_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUELFSTREAMER_H
|
||||
|
||||
#include "llvm/MC/MCELFStreamer.h"
|
||||
|
||||
#include <memory>
|
||||
namespace llvm {
|
||||
class MCAsmBackend;
|
||||
class MCCodeEmitter;
|
||||
class MCContext;
|
||||
class MCSubtargetInfo;
|
||||
class MCELFStreamer;
|
||||
class Triple;
|
||||
class MCObjectWriter;
|
||||
|
||||
MCELFStreamer *createAMDGPUELFStreamer(const Triple &T, MCContext &Context,
|
||||
std::unique_ptr<MCAsmBackend> MAB,
|
||||
|
@ -16,13 +16,9 @@
|
||||
#include "llvm/MC/MCInst.h"
|
||||
#include "llvm/MC/MCInstrDesc.h"
|
||||
#include "llvm/MC/MCInstrInfo.h"
|
||||
#include "llvm/MC/MCRegisterInfo.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cassert>
|
||||
#include "llvm/Support/TargetParser.h"
|
||||
|
||||
using namespace llvm;
|
||||
using namespace llvm::AMDGPU;
|
||||
|
@ -15,7 +15,7 @@
|
||||
#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCCODEEMITTER_H
|
||||
|
||||
#include "llvm/MC/MCCodeEmitter.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cstdint>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -20,15 +20,15 @@
|
||||
#include "TargetInfo/AMDGPUTargetInfo.h"
|
||||
#include "llvm/MC/MCAsmBackend.h"
|
||||
#include "llvm/MC/MCCodeEmitter.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCELFStreamer.h"
|
||||
#include "llvm/MC/MCInstPrinter.h"
|
||||
#include "llvm/MC/MCInstrAnalysis.h"
|
||||
#include "llvm/MC/MCInstrDesc.h"
|
||||
#include "llvm/MC/MCInstrInfo.h"
|
||||
#include "llvm/MC/MCObjectWriter.h"
|
||||
#include "llvm/MC/MCRegisterInfo.h"
|
||||
#include "llvm/MC/MCRegister.h"
|
||||
#include "llvm/MC/MCStreamer.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/MC/MachineLocation.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -15,8 +15,6 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
|
||||
|
||||
#include "llvm/Support/DataTypes.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
@ -58,34 +56,24 @@ createAMDGPUELFObjectWriter(bool Is64Bit, uint8_t OSABI,
|
||||
|
||||
#define GET_REGINFO_ENUM
|
||||
#include "AMDGPUGenRegisterInfo.inc"
|
||||
#undef GET_REGINFO_ENUM
|
||||
|
||||
#define GET_REGINFO_ENUM
|
||||
#include "R600GenRegisterInfo.inc"
|
||||
#undef GET_REGINFO_ENUM
|
||||
|
||||
#define GET_INSTRINFO_ENUM
|
||||
#define GET_INSTRINFO_OPERAND_ENUM
|
||||
#define GET_INSTRINFO_SCHED_ENUM
|
||||
#include "AMDGPUGenInstrInfo.inc"
|
||||
#undef GET_INSTRINFO_SCHED_ENUM
|
||||
#undef GET_INSTRINFO_OPERAND_ENUM
|
||||
#undef GET_INSTRINFO_ENUM
|
||||
|
||||
#define GET_INSTRINFO_ENUM
|
||||
#define GET_INSTRINFO_OPERAND_ENUM
|
||||
#define GET_INSTRINFO_SCHED_ENUM
|
||||
#include "R600GenInstrInfo.inc"
|
||||
#undef GET_INSTRINFO_SCHED_ENUM
|
||||
#undef GET_INSTRINFO_OPERAND_ENUM
|
||||
#undef GET_INSTRINFO_ENUM
|
||||
|
||||
#define GET_SUBTARGETINFO_ENUM
|
||||
#include "AMDGPUGenSubtargetInfo.inc"
|
||||
#undef GET_SUBTARGETINFO_ENUM
|
||||
|
||||
#define GET_SUBTARGETINFO_ENUM
|
||||
#include "R600GenSubtargetInfo.inc"
|
||||
#undef GET_SUBTARGETINFO_ENUM
|
||||
|
||||
#endif
|
||||
|
@ -11,31 +11,21 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUTargetStreamer.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "SIDefines.h"
|
||||
#include "AMDGPUPTNote.h"
|
||||
#include "AMDKernelCodeT.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "Utils/AMDKernelCodeTUtils.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/BinaryFormat/AMDGPUMetadataVerifier.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Metadata.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCELFStreamer.h"
|
||||
#include "llvm/MC/MCObjectFileInfo.h"
|
||||
#include "llvm/MC/MCSectionELF.h"
|
||||
#include "llvm/Support/AMDGPUMetadata.h"
|
||||
#include "llvm/Support/AMDHSAKernelDescriptor.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
#include "llvm/Support/TargetParser.h"
|
||||
|
||||
namespace llvm {
|
||||
#include "AMDGPUPTNote.h"
|
||||
}
|
||||
|
||||
using namespace llvm;
|
||||
using namespace llvm::AMDGPU;
|
||||
using namespace llvm::AMDGPU::HSAMD;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// AMDGPUTargetStreamer
|
||||
@ -247,15 +237,15 @@ bool AMDGPUTargetAsmStreamer::EmitHSAMetadata(
|
||||
if (HSAMD::toString(HSAMetadata, HSAMetadataString))
|
||||
return false;
|
||||
|
||||
OS << '\t' << AssemblerDirectiveBegin << '\n';
|
||||
OS << '\t' << HSAMD::AssemblerDirectiveBegin << '\n';
|
||||
OS << HSAMetadataString << '\n';
|
||||
OS << '\t' << AssemblerDirectiveEnd << '\n';
|
||||
OS << '\t' << HSAMD::AssemblerDirectiveEnd << '\n';
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AMDGPUTargetAsmStreamer::EmitHSAMetadata(
|
||||
msgpack::Document &HSAMetadataDoc, bool Strict) {
|
||||
V3::MetadataVerifier Verifier(Strict);
|
||||
HSAMD::V3::MetadataVerifier Verifier(Strict);
|
||||
if (!Verifier.verify(HSAMetadataDoc.getRoot()))
|
||||
return false;
|
||||
|
||||
@ -263,9 +253,9 @@ bool AMDGPUTargetAsmStreamer::EmitHSAMetadata(
|
||||
raw_string_ostream StrOS(HSAMetadataString);
|
||||
HSAMetadataDoc.toYAML(StrOS);
|
||||
|
||||
OS << '\t' << V3::AssemblerDirectiveBegin << '\n';
|
||||
OS << '\t' << HSAMD::V3::AssemblerDirectiveBegin << '\n';
|
||||
OS << StrOS.str() << '\n';
|
||||
OS << '\t' << V3::AssemblerDirectiveEnd << '\n';
|
||||
OS << '\t' << HSAMD::V3::AssemblerDirectiveEnd << '\n';
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -578,7 +568,7 @@ bool AMDGPUTargetELFStreamer::EmitISAVersion(StringRef IsaVersionString) {
|
||||
|
||||
bool AMDGPUTargetELFStreamer::EmitHSAMetadata(msgpack::Document &HSAMetadataDoc,
|
||||
bool Strict) {
|
||||
V3::MetadataVerifier Verifier(Strict);
|
||||
HSAMD::V3::MetadataVerifier Verifier(Strict);
|
||||
if (!Verifier.verify(HSAMetadataDoc.getRoot()))
|
||||
return false;
|
||||
|
||||
|
@ -9,16 +9,12 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUTARGETSTREAMER_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUTARGETSTREAMER_H
|
||||
|
||||
#include "AMDKernelCodeT.h"
|
||||
#include "Utils/AMDGPUPALMetadata.h"
|
||||
#include "llvm/BinaryFormat/MsgPackDocument.h"
|
||||
#include "llvm/MC/MCStreamer.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/Support/AMDGPUMetadata.h"
|
||||
#include "llvm/Support/AMDHSAKernelDescriptor.h"
|
||||
|
||||
struct amd_kernel_code_t;
|
||||
|
||||
namespace llvm {
|
||||
#include "AMDGPUPTNote.h"
|
||||
|
||||
class DataLayout;
|
||||
class Function;
|
||||
@ -28,6 +24,16 @@ class MDNode;
|
||||
class Module;
|
||||
class Type;
|
||||
|
||||
namespace AMDGPU {
|
||||
namespace HSAMD {
|
||||
struct Metadata;
|
||||
}
|
||||
} // namespace AMDGPU
|
||||
|
||||
namespace amdhsa {
|
||||
struct kernel_descriptor_t;
|
||||
}
|
||||
|
||||
class AMDGPUTargetStreamer : public MCTargetStreamer {
|
||||
AMDGPUPALMetadata PALMetadata;
|
||||
|
||||
|
@ -13,22 +13,15 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "MCTargetDesc/AMDGPUFixupKinds.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "R600Defines.h"
|
||||
#include "llvm/MC/MCCodeEmitter.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCFixup.h"
|
||||
#include "llvm/MC/MCInst.h"
|
||||
#include "llvm/MC/MCInstrDesc.h"
|
||||
#include "llvm/MC/MCInstrInfo.h"
|
||||
#include "llvm/MC/MCRegisterInfo.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/Support/Endian.h"
|
||||
#include "llvm/MC/SubtargetFeature.h"
|
||||
#include "llvm/Support/EndianStream.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -12,29 +12,15 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "MCTargetDesc/AMDGPUFixupKinds.h"
|
||||
#include "MCTargetDesc/AMDGPUMCCodeEmitter.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "SIDefines.h"
|
||||
#include "Utils/AMDGPUBaseInfo.h"
|
||||
#include "llvm/MC/MCCodeEmitter.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCExpr.h"
|
||||
#include "llvm/MC/MCFixup.h"
|
||||
#include "llvm/MC/MCInst.h"
|
||||
#include "llvm/MC/MCInstrDesc.h"
|
||||
#include "llvm/MC/MCInstrInfo.h"
|
||||
#include "llvm/MC/MCRegisterInfo.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/MC/MCSymbol.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "R600Defines.h"
|
||||
#include "R600MachineFunctionInfo.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCSectionELF.h"
|
||||
|
@ -14,16 +14,6 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "R600Defines.h"
|
||||
#include "R600InstrInfo.h"
|
||||
#include "R600MachineFunctionInfo.h"
|
||||
#include "R600RegisterInfo.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -14,34 +14,8 @@
|
||||
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "R600Defines.h"
|
||||
#include "R600InstrInfo.h"
|
||||
#include "R600MachineFunctionInfo.h"
|
||||
#include "R600RegisterInfo.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineOperand.h"
|
||||
#include "llvm/IR/CallingConv.h"
|
||||
#include "llvm/IR/DebugLoc.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -10,8 +10,6 @@
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_R600DEFINES_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_R600DEFINES_H
|
||||
|
||||
#include "llvm/MC/MCRegisterInfo.h"
|
||||
|
||||
// Operand Flags
|
||||
#define MO_FLAG_CLAMP (1 << 0)
|
||||
#define MO_FLAG_NEG (1 << 1)
|
||||
|
@ -16,23 +16,6 @@
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUSubtarget.h"
|
||||
#include "R600Defines.h"
|
||||
#include "R600InstrInfo.h"
|
||||
#include "R600RegisterInfo.h"
|
||||
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineOperand.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user