[PATCH] D98046: [TableGen] Fix excessive compile time issue in FixedLenDecoderEmitter
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 16 13:25:57 PDT 2021
dsanders added inline comments.
================
Comment at: llvm/utils/TableGen/FixedLenDecoderEmitter.cpp:1125-1133
+ o.indent(Indentation);
+ if (UseInsertBits)
+ o << "insertBits(tmp, ";
+ else
+ o << "tmp = ";
+ o << "fieldFromInstruction(insn, " << EF.Base << ", " << EF.Width << ')';
+ if (UseInsertBits)
----------------
foad wrote:
> dsanders wrote:
> > It looks like insertBits has implementations that cover both values of UseInsertBits. Would it make sense to always use insertBits here and rely on the type of tmp to pick the appropriate version of insertBits()?
> Using insertBits relies on us having written the initial `tmp = 0;` line, which we prefer to avoid for the simple cases. I think that's the only reason not to use insertBits in all cases.
That makes sense to me. Thanks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98046/new/
https://reviews.llvm.org/D98046
More information about the llvm-commits
mailing list