mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
f7ea499702
Part of the effort to refactoring frame pointer code generation. We used to use two function attributes "no-frame-pointer-elim" and "no-frame-pointer-elim-non-leaf" to represent three kinds of frame pointer usage: (all) frames use frame pointer, (non-leaf) frames use frame pointer, (none) frame use frame pointer. This CL makes the idea explicit by using only one enum function attribute "frame-pointer" Option "-frame-pointer=" replaces "-disable-fp-elim" for tools such as llc. "no-frame-pointer-elim" and "no-frame-pointer-elim-non-leaf" are still supported for easy migration to "frame-pointer". tests are mostly updated with // replace command line args ‘-disable-fp-elim=false’ with ‘-frame-pointer=none’ grep -iIrnl '\-disable-fp-elim=false' * | xargs sed -i '' -e "s/-disable-fp-elim=false/-frame-pointer=none/g" // replace command line args ‘-disable-fp-elim’ with ‘-frame-pointer=all’ grep -iIrnl '\-disable-fp-elim' * | xargs sed -i '' -e "s/-disable-fp-elim/-frame-pointer=all/g" Patch by Yuanfang Chen (tabloid.adroit)! Differential Revision: https://reviews.llvm.org/D56351 llvm-svn: 351049
40 lines
1.9 KiB
LLVM
40 lines
1.9 KiB
LLVM
; RUN: %llc_dwarf -debugger-tune=lldb -asm-verbose -O1 -o - < %s | FileCheck %s
|
|
; RUN: %llc_dwarf -debugger-tune=gdb -asm-verbose -O1 -o - < %s | FileCheck %s --check-prefix=DISABLE
|
|
; RUN: %llc_dwarf -frame-pointer=all -debugger-tune=lldb -asm-verbose -O1 -o - < %s | FileCheck %s --check-prefix=DISABLE
|
|
|
|
; CHECK: DW_AT_APPLE_omit_frame_ptr
|
|
; DISABLE-NOT: DW_AT_APPLE_omit_frame_ptr
|
|
|
|
|
|
define i32 @foo() nounwind ssp !dbg !1 {
|
|
entry:
|
|
%retval = alloca i32 ; <i32*> [#uses=2]
|
|
%0 = alloca i32 ; <i32*> [#uses=2]
|
|
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
|
store i32 42, i32* %0, align 4, !dbg !0
|
|
%1 = load i32, i32* %0, align 4, !dbg !0 ; <i32> [#uses=1]
|
|
store i32 %1, i32* %retval, align 4, !dbg !0
|
|
br label %return, !dbg !0
|
|
|
|
return: ; preds = %entry
|
|
%retval1 = load i32, i32* %retval, !dbg !0 ; <i32> [#uses=1]
|
|
ret i32 %retval1, !dbg !7
|
|
}
|
|
|
|
!llvm.dbg.cu = !{!3}
|
|
!llvm.module.flags = !{!12}
|
|
!9 = !{!1}
|
|
|
|
!0 = !DILocation(line: 2, scope: !1)
|
|
!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 2, file: !10, scope: null, type: !4)
|
|
!2 = !DIFile(filename: "a.c", directory: "/tmp")
|
|
!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11, imports: null)
|
|
!4 = !DISubroutineType(types: !5)
|
|
!5 = !{!6}
|
|
!6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
|
!7 = !DILocation(line: 2, scope: !8)
|
|
!8 = distinct !DILexicalBlock(line: 2, column: 0, file: !10, scope: !1)
|
|
!10 = !DIFile(filename: "a.c", directory: "/tmp")
|
|
!11 = !{}
|
|
!12 = !{i32 1, !"Debug Info Version", i32 3}
|