diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-06-24 06:30:11 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-06-24 06:30:11 +0000 |
commit | 43e92fe306ac1fa4fb36062a458a18a9aed23855 (patch) | |
tree | 275b08407e8fb1478bd185b851b497c43fbe0877 /llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp | |
parent | f11b9798f4cd1d3dbcae7e0003d79c7b428b4d04 (diff) | |
download | bcm5719-llvm-43e92fe306ac1fa4fb36062a458a18a9aed23855.tar.gz bcm5719-llvm-43e92fe306ac1fa4fb36062a458a18a9aed23855.zip |
AMDGPU: Cleanup subtarget handling.
Split AMDGPUSubtarget into amdgcn/r600 specific subclasses.
This removes most of the static_casting of the basic codegen
classes everywhere, and tries to restrict the features
visible on the wrong target.
llvm-svn: 273652
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp b/llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp index 8883770efe1..65ceff3930a 100644 --- a/llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp +++ b/llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp @@ -20,6 +20,7 @@ //===----------------------------------------------------------------------===// #include "SIInstrInfo.h" +#include "AMDGPUSubtarget.h" #include "llvm/ADT/DenseSet.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" @@ -61,7 +62,7 @@ FunctionPass *llvm::createSIDebuggerInsertNopsPass() { bool SIDebuggerInsertNops::runOnMachineFunction(MachineFunction &MF) { // Skip this pass if "amdgpu-debugger-insert-nops" attribute was not // specified. - const AMDGPUSubtarget &ST = MF.getSubtarget<AMDGPUSubtarget>(); + const SISubtarget &ST = MF.getSubtarget<SISubtarget>(); if (!ST.debuggerInsertNops()) return false; @@ -70,8 +71,7 @@ bool SIDebuggerInsertNops::runOnMachineFunction(MachineFunction &MF) { return false; // Target instruction info. - const SIInstrInfo *TII = - static_cast<const SIInstrInfo*>(MF.getSubtarget().getInstrInfo()); + const SIInstrInfo *TII = ST.getInstrInfo(); // Set containing line numbers that have nop inserted. DenseSet<unsigned> NopInserted; |