This is an archive of the discontinued LLVM Phabricator instance.

wrap OptSize and MinSize attributes for easier and consistent access (NFCI)
ClosedPublic

Authored by spatel on Aug 3 2015, 1:50 PM.

Details

Summary

This patch obsoletes D11685.

Create wrapper methods in the Function class for the OptimizeForSize and MinSize attributes. We want to hide the logic of "or'ing" them together when optimizing just for size (-Os).

Currently, we are not consistent about this and rely on a front-end to always set OptimizeForSize (-Os) if MinSize (-Oz) is on. Thus, there are 18 FIXME changes here that should be added as follow-on patches with regression tests.

This patch is NFC-intended: it just replaces existing direct accesses of the attributes by the equivalent wrapper call.

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 31261.Aug 3 2015, 1:50 PM
spatel retitled this revision from to wrap OptSize and MinSize attributes for easier and consistent access (NFCI).
spatel updated this object.
spatel added reviewers: mkuper, hfinkel, qcolombet.
spatel added a subscriber: llvm-commits.
mkuper accepted this revision.Aug 3 2015, 11:13 PM
mkuper edited edge metadata.

LGTM

This revision is now accepted and ready to land.Aug 3 2015, 11:13 PM
This revision was automatically updated to reflect the committed changes.