mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-08 03:58:42 +00: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
38 lines
1.0 KiB
LLVM
38 lines
1.0 KiB
LLVM
; RUN: llc -mtriple=aarch64-none-linux-gnu -frame-pointer=all < %s | FileCheck %s
|
|
@var = global i32 0
|
|
|
|
declare void @bar()
|
|
|
|
define void @test_w29_reserved() {
|
|
; CHECK-LABEL: test_w29_reserved:
|
|
; CHECK: add x29, sp, #{{[0-9]+}}
|
|
|
|
%val1 = load volatile i32, i32* @var
|
|
%val2 = load volatile i32, i32* @var
|
|
%val3 = load volatile i32, i32* @var
|
|
%val4 = load volatile i32, i32* @var
|
|
%val5 = load volatile i32, i32* @var
|
|
%val6 = load volatile i32, i32* @var
|
|
%val7 = load volatile i32, i32* @var
|
|
%val8 = load volatile i32, i32* @var
|
|
%val9 = load volatile i32, i32* @var
|
|
|
|
; CHECK-NOT: ldr w29,
|
|
|
|
; Call to prevent fp-elim that occurs regardless in leaf functions.
|
|
call void @bar()
|
|
|
|
store volatile i32 %val1, i32* @var
|
|
store volatile i32 %val2, i32* @var
|
|
store volatile i32 %val3, i32* @var
|
|
store volatile i32 %val4, i32* @var
|
|
store volatile i32 %val5, i32* @var
|
|
store volatile i32 %val6, i32* @var
|
|
store volatile i32 %val7, i32* @var
|
|
store volatile i32 %val8, i32* @var
|
|
store volatile i32 %val9, i32* @var
|
|
|
|
ret void
|
|
; CHECK: ret
|
|
}
|