mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-20 03:17:48 +00:00
[ARM] Refactor the prologue/epilogue emission to be more robust.
This is the first step toward supporting shrink-wrapping for this target.
The changes could be summarized by these items:
- Expand the tail-call return as part of the expand pseudo pass.
- Get rid of the assumptions that the epilogue is the exit block:
* Do not assume which registers are free in the epilogue. (This indirectly
improve the lowering of the code for the segmented stacks, see the test
cases.)
* Take into account that the basic block can be empty.
Related to <rdar://problem/20821730>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -170,9 +170,9 @@ define void @test_varsize(...) minsize {
|
||||
; CHECK-T1: push {r5, r6, r7, lr}
|
||||
; ...
|
||||
; CHECK-T1: pop {r2, r3, r7}
|
||||
; CHECK-T1: pop {r3}
|
||||
; CHECK-T1: pop {[[POP_REG:r[0-3]]]}
|
||||
; CHECK-T1: add sp, #16
|
||||
; CHECK-T1: bx r3
|
||||
; CHECK-T1: bx [[POP_REG]]
|
||||
|
||||
; CHECK-LABEL: test_varsize:
|
||||
; CHECK: sub sp, #16
|
||||
|
||||
Reference in New Issue
Block a user