[PATCH] D51320: [WebAssembly] Made disassembler only use stack instructions.
Wouter van Oortmerssen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 27 15:37:27 PDT 2018
aardappel added inline comments.
================
Comment at: utils/TableGen/WebAssemblyDisassemblerEmitter.cpp:47
+ // the instructions for which this is 1.
+ auto Bit = Def.getValue("StackBased")->getValue()->getCastTo(BitRecTy::get());
+ auto IsStackBased = Bit && reinterpret_cast<const BitInit *>(Bit)->getValue();
----------------
tlively wrote:
> `Def.getValueAsBit("StackBased")` might be cleaner here. It assumes "StackBased" is present, but so does the current code.
Yes, I thought about using that, but would prefer it not to be throwing exceptions if we ever add instructions that don't have this field set.
Repository:
rL LLVM
https://reviews.llvm.org/D51320
More information about the llvm-commits
mailing list