This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Prefer indirect calls in minsize mode
ClosedPublic

Authored by jmolloy on Jul 11 2016, 6:02 AM.

Details

Summary

... When we emit several calls to the same function in the same basic block.

An indirect call uses a "BLX r0" instruction which has a 16-bit encoding. If many calls are made to the same target, this can enable significant code size reductions.

Diff Detail

Repository
rL LLVM

Event Timeline

jmolloy updated this revision to Diff 63496.Jul 11 2016, 6:02 AM
jmolloy retitled this revision from to [ARM] Prefer indirect calls in minsize mode.
jmolloy updated this object.
jmolloy added reviewers: t.p.northover, mcrosier.
jmolloy set the repository for this revision to rL LLVM.
jmolloy added a subscriber: llvm-commits.
mcrosier accepted this revision.Jul 13 2016, 6:51 AM
mcrosier edited edge metadata.

LGTM.

lib/Target/ARM/ARMISelLowering.cpp
1852

many times -> three or more times

This revision is now accepted and ready to land.Jul 13 2016, 6:51 AM
jmolloy closed this revision.Jul 15 2016, 1:05 AM

Thanks Chad, committed in r275538.