Page MenuHomePhabricator

[WebAssembly] Store section alignment as a power of 2
ClosedPublic

Authored by sbc100 on Jan 15 2019, 5:01 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Jan 15 2019, 5:01 PM
dschuff accepted this revision.Jan 15 2019, 5:34 PM
This revision is now accepted and ready to land.Jan 15 2019, 5:34 PM
This revision was automatically updated to reflect the committed changes.
msearles added inline comments.
lld/trunk/wasm/OutputSegment.h
29

Looks like one of our internal windows builders is failing due to this change:

c:\buildagent\work\7a156dd62df26211\opencl\drivers\opencl\compiler\llvm\tools\lld\wasm\OutputSegment.h(29): error C2220: warning treated as error - no 'object' file generated
[00:38:36][Step 2/4]

c:\buildagent\work\7a156dd62df26211\opencl\drivers\opencl\compiler\llvm\tools\lld\wasm\OutputSegment.h(29): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)

Perhaps it should be 1ULL , not 1 ?
Trying to get onto our windows builder to test this.
Thanks.

Yes, it looks like ULL should fix the warning: https://reviews.llvm.org/D56874

Yes, it looks like ULL should fix the warning: https://reviews.llvm.org/D56874

One more:

lld/trunk/wasm/Writer.cpp:694
MemoryPtr = alignTo(MemoryPtr, 1 << Seg->Alignment);

1 -> 1ULL