This is an archive of the discontinued LLVM Phabricator instance.

[SDAG] Use ABI type alignment for constant pools when optimizing for size
ClosedPublic

Authored by jmolloy on Oct 12 2016, 5:11 AM.

Details

Summary

SelectionDAG::getConstantPool will automatically determine an appropriate alignment if one is not specified. It does this by querying the type's preferred alignment. This can end up creating quite a lot of padding when the preferred alignment for vectors is 128.

In optimize-for-size mode, it makes sense to instead query the ABI type alignment which is often smaller and causes less padding.

Diff Detail

Repository
rL LLVM

Event Timeline

jmolloy updated this revision to Diff 74362.Oct 12 2016, 5:11 AM
jmolloy retitled this revision from to [SDAG] Use ABI type alignment for constant pools when optimizing for size.
jmolloy updated this object.
jmolloy added reviewers: sanjoy, olista01, hfinkel.
jmolloy set the repository for this revision to rL LLVM.
jmolloy added a subscriber: llvm-commits.
olista01 accepted this revision.Oct 17 2016, 5:32 AM
olista01 edited edge metadata.

LGTM

This revision is now accepted and ready to land.Oct 17 2016, 5:32 AM
Eugene.Zelenko closed this revision.Nov 9 2016, 5:58 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL284381.