This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Enable shrink-wrapping by default
ClosedPublic

Authored by qcolombet on Nov 4 2015, 4:20 PM.

Details

Summary

Hi,

This patch enables shrink-wrapping by default for ARM.
I have tested shrink-wrapping and no correctness problems came out or runtime regressions.
Although the gain may be small, the code looks nicer with shrink-wrapping enabled and the performance could just be better.

For the record shrink-wrapping was introduced after this review:
http://reviews.llvm.org/D9210

More information on Shrink-Wrapping:
http://lists.llvm.org/pipermail/llvm-dev/2015-May/085220.html

OK to commit?

Thanks,
-Quentin

Diff Detail

Repository
rL LLVM

Event Timeline

qcolombet updated this revision to Diff 39285.Nov 4 2015, 4:20 PM
qcolombet retitled this revision from to [ARM] Enable shrink-wrapping by default.
qcolombet updated this object.
qcolombet added reviewers: t.p.northover, rengolin.
qcolombet set the repository for this revision to rL LLVM.
qcolombet added a subscriber: llvm-commits.
rengolin accepted this revision.Nov 11 2015, 4:48 AM
rengolin edited edge metadata.

Sorry Quentin, I've been meaning to look at this for a while. Thanks for doing this. LGTM.

This revision is now accepted and ready to land.Nov 11 2015, 4:48 AM
qcolombet closed this revision.Nov 11 2015, 3:41 PM

Thanks!
This is Committed revision 252825.

Q.

This finally landed in Committed revision 253411.

This change led to generation of invalid code on Thumb1 targets.

Attaching a reproducer. The function epilogue gets compiled into pop {r4, r5, r6, lr}, which is invalid for Thumb1; then, it's replaced with a (valid) pop {r4, r5, r6} instruction, which leaves the stack unbalanced.

Nice catch!

Looks like we could produce an error when we see this kind of assembly.

Q.

Hi Artyom,

Unless I am mistaken, http://reviews.llvm.org/D14986 fixes that problem, right?

I have added a couple of comments there.

Cheers,
Q.