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/AMDGPUMCInstLower.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/AMDGPUMCInstLower.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp b/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp index 154e992590e..9453fb06bb5 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp @@ -15,6 +15,7 @@ #include "AMDGPUMCInstLower.h" #include "AMDGPUAsmPrinter.h" +#include "AMDGPUSubtarget.h" #include "AMDGPUTargetMachine.h" #include "InstPrinter/AMDGPUInstPrinter.h" #include "SIInstrInfo.h" @@ -36,8 +37,7 @@ using namespace llvm; AMDGPUMCInstLower::AMDGPUMCInstLower(MCContext &ctx, const AMDGPUSubtarget &st): - Ctx(ctx), ST(st) -{ } + Ctx(ctx), ST(st) { } void AMDGPUMCInstLower::lower(const MachineInstr *MI, MCInst &OutMI) const { @@ -140,10 +140,9 @@ void AMDGPUAsmPrinter::EmitInstruction(const MachineInstr *MI) { raw_string_ostream DisasmStream(DisasmLine); AMDGPUInstPrinter InstPrinter(*TM.getMCAsmInfo(), - *MF->getSubtarget().getInstrInfo(), - *MF->getSubtarget().getRegisterInfo()); - InstPrinter.printInst(&TmpInst, DisasmStream, StringRef(), - MF->getSubtarget()); + *STI.getInstrInfo(), + *STI.getRegisterInfo()); + InstPrinter.printInst(&TmpInst, DisasmStream, StringRef(), STI); // Disassemble instruction/operands to hex representation. SmallVector<MCFixup, 4> Fixups; |