[PATCH] D59002: Use bitset for assembler predicates

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 8 17:28:28 PST 2019


rampitec marked an inline comment as done.
rampitec added inline comments.


================
Comment at: utils/TableGen/AsmMatcherEmitter.cpp:3392
                << " ConvertFn;\n";
-  OS << "    " << getMinimalTypeForEnumBitfield(Info.SubtargetFeatures.size())
-               << " RequiredFeatures;\n";
+  OS << "    " << "unsigned RequiredFeaturesIdx;\n";
   OS << "    " << getMinimalTypeForRange(
----------------
craig.topper wrote:
> rampitec wrote:
> > craig.topper wrote:
> > > Surely we can bound this to less than a full unsigned? X86 uses almost no features in the assembler which means we can probably use a uint8_t and MatchEntry is used about 28000 times. So that's going to save like 3 * 28000 bytes just from X86.
> > BTW, table is now smaller. It used to be full 64 bit before per record. OperandMatchEntry can also be rearranged to save on padding now.
> It wasn't a full 64 bit before, getMinimalTypeForEnumBitfield was making it uint8_t for X86.
Oh, I see. It was for us AMDGPU. Also a pretty big table.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59002/new/

https://reviews.llvm.org/D59002





More information about the llvm-commits mailing list