This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ARM patch: Improve Thumb epilogues (PR40657)


When optimizing for size, the Thumb-1 epilogue

        add     sp, sp, #12
        pop     {pc}

can be improved to

        pop     {r1-r3, pc}

I previously added this kind of optimization for prologues, and somehow
overlooked that the PR also mentions epilogues.

Regression tested with

Schedule of variations:
    qemu-system-armv7-2/arch=armv5te/thumb
    qemu-system-armv7-2/thumb

(as v4 and v5 apparently have slightly different epilogues)

Ok?


Bernd

Attachment: t1-epilogue3.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]