ARM: fold prologue/epilogue sp updates into push/pop for code size
authorTim Northover <tnorthover@apple.com>
Fri, 8 Nov 2013 17:18:07 +0000 (17:18 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 8 Nov 2013 17:18:07 +0000 (17:18 +0000)
ARM prologues usually look like:
    push {r7, lr}
    sub sp, sp, #4

If code size is extremely important, this can be optimised to the single
instruction:
    push {r6, r7, lr}

where we don't actually care about the contents of r6, but pushing it subtracts
4 from sp as a side effect.

This should implement such a conversion, predicated on the "minsize" function
attribute (-Oz) since I've yet to find any code it actually makes faster.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194264 91177308-0d34-0410-b5e6-96231b3b80d8


No differences found