This is an archive of the discontinued LLVM Phabricator instance.

[SLC] Add an alignment to printf->puts global string
ClosedPublic

Authored by dmgreen on Aug 29 2018, 3:49 AM.

Details

Summary

Previously the alignment on the newly created puts string was not set,
meaning that DataLayout::getPreferredAlignment was free to overalign
it to 16 bytes. This causes unnecessary code bloat.

Diff Detail

Event Timeline

dmgreen created this revision.Aug 29 2018, 3:49 AM

CreateGlobalString itself should probably set the alignment on the global.

dmgreen updated this revision to Diff 163669.Sep 3 2018, 1:49 AM

Moved to CreateGlobalString

This revision is now accepted and ready to land.Sep 4 2018, 11:21 AM
This revision was automatically updated to reflect the committed changes.