This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Added default stack-only instruction mode for MC.
ClosedPublic

Authored by aardappel on Aug 24 2018, 4:43 PM.

Details

Summary

Made it convert from register to stack based instructions, and removed the registers.
Fixes to related code that was expecting register based instructions.
Added the correct testing flag to all tests, depending on what the
format they were expecting so far.
Translated one test to stack format as example: reg-stackify-stack.ll

tested:
llvm-lit -v find test -name WebAssembly
unittests/MC/*

Diff Detail

Repository
rL LLVM

Event Timeline

aardappel created this revision.Aug 24 2018, 4:43 PM

Could you summarize what has changed from D50568?

dschuff accepted this revision.Aug 27 2018, 7:52 AM

@aheejin the main thing is that the instructions are now converted from register to stack in MCInstLower. @aardappel were you also planning on moving ExplicitLocals to the end as before?

This revision is now accepted and ready to land.Aug 27 2018, 7:52 AM

@aheejin What Derek said + I fixed a few more issues with the binary output, in particular a problem with br_table.
@dschuff Yes, ExplicitLocals is back in its old spot in the pass ordering.

This revision was automatically updated to reflect the committed changes.
aheejin added inline comments.Aug 28 2018, 10:08 AM
llvm/trunk/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
296

Nit: this is not Explicit Locals pass anymore.

aardappel added inline comments.Aug 30 2018, 9:06 AM
llvm/trunk/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
296

Ah thanks, will fix in a followup.