HomePhabricator

[mips] Optimize stack pointer adjustments.
Audit RequiredrL272666

Description

[mips] Optimize stack pointer adjustments.

Instead of always using addu to adjust the stack pointer when the
size out is of the range of an addiu instruction, use subu so that
a smaller constant can be generated.

This can give savings of ~3 instructions whenever a function has a
a stack frame whose size is out of range of an addiu instruction.

This change may break some naive stack unwinders.

Partially resolves PR/26291.

Thanks to David Chisnall for reporting the issue.

Reviewers: dsanders, vkalintiris

Differential Review: http://reviews.llvm.org/D21321

Details

Auditors
dsanders
Committed
sdardisJun 14 2016, 6:39 AM
Parents
rL272665: [Thumb] Fix off-by-one error in r272007
Branches
Unknown
Tags
Unknown