The new stackification backend generates the giant switch statement
used to translate instructions to their stackified forms. I did this
because it was more interesting than adding all the different vector
versions of the various SIMD instructions to the switch statment
manually.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Wow! That was quick! Simpler than expected. Thanks for cleaning it up :)
utils/TableGen/WebAssemblyStackifierEmitter.cpp | ||
---|---|---|
22 ↗ | (On Diff #162730) | This will work, but it seems a bit of a hack. We actually have a flag you can use: auto Bit = Record.TheDef.getValue("StackBased")->getValue()->getCastTo(BitRecTy::get()); auto IsStackBased = Bit && reinterpret_cast<const BitInit *>(Bit)->getValue(); |
utils/TableGen/WebAssemblyStackifierEmitter.cpp | ||
---|---|---|
24 ↗ | (On Diff #162746) | This is going to throw an exception if the field isn't there, but I guess that is ok in this situation? |
utils/TableGen/WebAssemblyStackifierEmitter.cpp | ||
---|---|---|
24 ↗ | (On Diff #162746) | This is why I check to make sure the Record is a subclass of WebAssemblyInst first. |
llvm/trunk/utils/TableGen/WebAssemblyStackifierEmitter.cpp | ||
---|---|---|
29 | Sorry for the late comment, but can you clang-format this? |
Sorry for the late comment, but can you clang-format this?