AMDGPU: Really implement getFrameRegister

Currently this seems to only really be used for debug
info.

llvm-svn: 328677
This commit is contained in:
Matt Arsenault 2018-03-27 23:26:59 +00:00
parent 07480bd177
commit bd49eccca1
2 changed files with 5 additions and 1 deletions

View File

@ -82,5 +82,6 @@ const uint32_t *SIRegisterInfo::getCallPreservedMask(const MachineFunction &MF,
}
unsigned SIRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
return AMDGPU::NoRegister;
const SIMachineFunctionInfo *FuncInfo = MF.getInfo<SIMachineFunctionInfo>();
return FuncInfo->getFrameOffsetReg();
}

View File

@ -31,6 +31,9 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata)
; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_addr 0x0)
@GlobB = common addrspace(1) global i32 0, align 4, !dbg !6
; CHECK: {{.*}}DW_TAG_subprogram
; CHECK: DW_AT_frame_base [DW_FORM_block1] (DW_OP_reg9 SGPR9)
define amdgpu_kernel void @kernel1(
; CHECK: {{.*}}DW_TAG_formal_parameter
; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (DW_OP_fbreg +4, DW_OP_constu 0x1, DW_OP_swap, DW_OP_xderef)