From 43e92fe306ac1fa4fb36062a458a18a9aed23855 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 24 Jun 2016 06:30:11 +0000 Subject: 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 --- llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp') diff --git a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp index cd382f5ab26..60a0bc3380e 100644 --- a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp +++ b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp @@ -590,9 +590,10 @@ bool SILowerControlFlow::indirectDst(MachineInstr &MI) { } bool SILowerControlFlow::runOnMachineFunction(MachineFunction &MF) { - TII = static_cast(MF.getSubtarget().getInstrInfo()); - TRI = - static_cast(MF.getSubtarget().getRegisterInfo()); + const SISubtarget &ST = MF.getSubtarget(); + TII = ST.getInstrInfo(); + TRI = &TII->getRegisterInfo(); + SIMachineFunctionInfo *MFI = MF.getInfo(); bool HaveKill = false; -- cgit v1.2.3