[PATCH] D51318: [WebAssembly] TableGen backend for stackifying instructions
Wouter van Oortmerssen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 27 13:22:14 PDT 2018
aardappel added a comment.
Wow! That was quick! Simpler than expected. Thanks for cleaning it up :)
================
Comment at: utils/TableGen/WebAssemblyStackifierEmitter.cpp:22
+ for (auto &RecordPair : RK.getDefs()) {
+ std::string Stackified = RecordPair.first + "_S";
+ Record *Rec = RK.getDef(Stackified);
----------------
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();
Repository:
rL LLVM
https://reviews.llvm.org/D51318
More information about the llvm-commits
mailing list