This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Set __tls_align to 1 when there is no TLS
ClosedPublic

Authored by quantum on Jul 23 2019, 5:24 PM.

Details

Summary

We want the tool conventions to state that __tls_align will be a power of 2.
It makes sense to not have an exception for when there is no TLS.

Diff Detail

Repository
rL LLVM

Event Timeline

quantum created this revision.Jul 23 2019, 5:24 PM
tlively accepted this revision.Jul 23 2019, 5:45 PM
tlively added inline comments.
lld/test/wasm/no-tls.test
1 ↗(On Diff #211392)

Why not have the input in this file?

lld/wasm/Driver.cpp
532 ↗(On Diff #211392)

May as well update these calls to explicitly pass zero as well, and make it nonoptional. I assume there are no other calls to this function elsewhere?

This revision is now accepted and ready to land.Jul 23 2019, 5:45 PM
quantum updated this revision to Diff 211393.Jul 23 2019, 5:56 PM

Switched to not using default arguments

quantum marked 4 inline comments as done.Jul 23 2019, 5:57 PM
quantum added inline comments.
lld/test/wasm/no-tls.test
1 ↗(On Diff #211392)

I did a test like this before and @sbc100 asked for it to be made into a .test file that uses one of the existing input files.

lld/wasm/Driver.cpp
532 ↗(On Diff #211392)

Done.

tlively accepted this revision.Jul 24 2019, 11:24 AM
tlively added inline comments.
lld/test/wasm/no-tls.test
1 ↗(On Diff #211392)

Please add a comment saying what this is meant to be testing. I don't think it will be clear just from the name and contents for future readers.

quantum updated this revision to Diff 211593.Jul 24 2019, 1:18 PM
quantum marked 3 inline comments as done.

Add a comment to explain what the test is testing.

This revision was automatically updated to reflect the committed changes.