This is an archive of the discontinued LLVM Phabricator instance.

Bug fix on function epilog optimization (ARM backend)
ClosedPublic

Authored by rOptimizer on Aug 26 2019, 2:19 AM.

Details

Summary

To save a 'add sp,#val' instruction by adding registers to the final pop instruction,
the first register transferred by this pop instruction need to be found.
If the function to be optimized has a non-void return value, the operand list contains
r0 (implicit) which prevents the optimization to take place.
Therefore implicit register references should be skipped in the search loop,
because this registers are never popped from the stack.

Merge branch 'master' of https://github.com/llvm/llvm-project

Diff Detail

Repository
rL LLVM

Event Timeline

rOptimizer created this revision.Aug 26 2019, 2:19 AM
  • Bug fix on function epilog optimization (ARM backend)

Added regression test

lebedev.ri resigned from this revision.Aug 26 2019, 2:59 PM
ostannard accepted this revision.Sep 3 2019, 1:53 AM
ostannard added a subscriber: ostannard.

LGTM

This revision is now accepted and ready to land.Sep 3 2019, 1:53 AM

I don't have commit rights.
Can anybody do this?

Yep, I can commit it for you.

This revision was automatically updated to reflect the committed changes.