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 10 2018, 10:02 AM.

Details

Summary

Moved Explicit Locals pass to last.
Made that pass obligatory.
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

Event Timeline

aardappel created this revision.Aug 10 2018, 10:02 AM

Out of curiosity, what was the problem that broke the waterfall?

Fixed failure in exception.ll due to register re-ordering.

Moving the ExplicitLocals pass further down caused register numbers to
be assigned differently which made a test in exception.ll brittle.

@aheejin the assert caught by the waterfall ended up being caused by a remaining register in the tablegen defs for br_table (an error from a previous CL).
There was also a brittle test which triggered a failure due to changing $push register assignments (caused by pass reordering) in exception.ll, have a look.

Oh I see. Sorry, and thanks for fixing exception.ll bug.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 10 2018, 2:33 PM
This revision was automatically updated to reflect the committed changes.