Targets sometimes assign fixed stack object to spill certain callee-saved

registers based on dynamic conditions. For example, X86 EBP/RBP, when used as
frame register has to be spilled in the first fixed object. It should inform
PEI this so it doesn't get allocated another stack object. Also, it should not
be spilled as other callee-saved registers but rather its spilling and restoring
are being handled by emitPrologue and emitEpilogue. Avoid spilling it twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75116 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2009-07-09 06:53:48 +00:00
parent 1945b7b5c5
commit 910139f9ca
8 changed files with 52 additions and 18 deletions
@@ -1,4 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86 | grep {(%esp}
; RUN: llvm-as < %s | llc -march=x86 | grep {pushl %ebp} | count 1
; RUN: llvm-as < %s | llc -march=x86 | grep {popl %ebp} | count 1
declare i8* @llvm.returnaddress(i32)
+1 -1
View File
@@ -1,5 +1,5 @@
; Check that eh_return & unwind_init were properly lowered
; RUN: llvm-as < %s | llc | grep %ebp | count 9
; RUN: llvm-as < %s | llc | grep %ebp | count 7
; RUN: llvm-as < %s | llc | grep %ecx | count 5
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
+1 -1
View File
@@ -1,5 +1,5 @@
; Check that eh_return & unwind_init were properly lowered
; RUN: llvm-as < %s | llc | grep %rbp | count 7
; RUN: llvm-as < %s | llc | grep %rbp | count 5
; RUN: llvm-as < %s | llc | grep %rcx | count 3
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"