summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-06-24 06:30:11 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-06-24 06:30:11 +0000
commit43e92fe306ac1fa4fb36062a458a18a9aed23855 (patch)
tree275b08407e8fb1478bd185b851b497c43fbe0877 /llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp
parentf11b9798f4cd1d3dbcae7e0003d79c7b428b4d04 (diff)
downloadbcm5719-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.cpp6
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;
OpenPOWER on IntegriCloud