This is an archive of the discontinued LLVM Phabricator instance.

[lli/COFF] Set the correct alignment for common symbols
ClosedPublic

Authored by davide on Oct 31 2016, 4:32 PM.

Details

Summary

Otherwise we set it always to zero, which is not correct, and we assert inside alignTo (Assertion failed: Align != 0u && "Align can't be 0."). Makes lli slightly better on Windows, at least for me =)

Diff Detail

Repository
rL LLVM

Event Timeline

davide updated this revision to Diff 76504.Oct 31 2016, 4:32 PM
davide retitled this revision from to [lli/COFF] Set the correct alignment for common symbols.
davide updated this object.
davide added reviewers: ruiu, majnemer, rnk, lhames.
davide added a subscriber: llvm-commits.
rnk accepted this revision.Nov 2 2016, 10:15 AM
rnk edited edge metadata.

lgtm

test/ExecutionEngine/MCJIT/coff-alignment.ll
5–8 ↗(On Diff #76504)

Want to return the i32 from main so that this isn't fragile to codegen changes?

This revision is now accepted and ready to land.Nov 2 2016, 10:15 AM
davide added inline comments.Nov 2 2016, 10:28 AM
test/ExecutionEngine/MCJIT/coff-alignment.ll
5–8 ↗(On Diff #76504)

Sure. Thanks for your review, Reid.

This revision was automatically updated to reflect the committed changes.
majnemer edited edge metadata.Nov 2 2016, 11:17 AM

We probably need some logic to handle when the aligncomm directive is present but this is still a good improvement :)