This should more accurately reflect what the AsmPrinter will actually do.
This is NFC, as far as I can tell; all the places that might be affected already have an extra check to avoid using the result of getPreferredAlignment in this situation.
Differential D51377
[NFC] Make getPreferredAlignment honor section markings. efriedma on Aug 28 2018, 12:46 PM. Authored by
Details This should more accurately reflect what the AsmPrinter will actually do. This is NFC, as far as I can tell; all the places that might be affected already have an extra check to avoid using the result of getPreferredAlignment in this situation.
Diff Detail
Event TimelineComment Actions Yeah, that works for me. If we start getting something wrong it's an edge case we should probably document :) Comment Actions Thanks for this.
|
About this, it keeps adding very visible codesize (technially datasize) to our images, which because our linker reports all the padding is very visible to customers, and unnecissarily bloats the images.
I ran some benchmarks and couldn't find any places it was improving performance, at least on ARM/AArch64. Remove this actually improved things in a few places.
The over-aligning globals dates back to a long time ago, I'm just not sure it's worth doing on many architectures. From what I remember, removing it does fail some X86 tests though, with worse looking code.
We may need be smarter than that and come up with some way to remove it for targets (or a way to mark globals as optsize :-/ )