[PATCH] D95016: [Clang][RISCV] Add custom TableGen backend for riscv-vector intrinsics.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 21 14:15:04 PST 2021


craig.topper added inline comments.


================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:772
+  // Parse records
+  SmallVector<std::unique_ptr<RVVIntrinsic>, 512> Defs;
+  std::vector<Record *> RV = Records.getAllDerivedDefinitions("RVVBuiltin");
----------------
craig.topper wrote:
> craig.topper wrote:
> > This getAllDerivedDefinitions, loop, call createRVVIntrinsic is repeated in 4 places. I realize it was copied from the NeonEmitter to the SveEmitter, but I don't think we should repeat that.
> > 
> > Maybe just sink the loop and getAllDerivedDefinitions into createRVVIntrinsic, rename it createRVVIntrinsics and have it return the Defs vector?
> Given what I know about the namer of builtins we need, there's no way we're going to fit in this 512 right? Except if we're only generate a subset of tests? If that's the case probably should just use a std::vector.
Oops that should have said "number of builtins we need"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95016



More information about the cfe-commits mailing list