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

Jessica Clarke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 26 11:31:06 PST 2021


jrtc27 added inline comments.


================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:567
+  // Compute type transformers
+  for (char I : Transformer.take_front(Transformer.size() - 1)) {
+    switch (I) {
----------------
craig.topper wrote:
> jrtc27 wrote:
> > craig.topper wrote:
> > > Can we do Transformer = Transformer.drop_back() right before this loop. That take_front code is harder to think about.
> > Or would it be better as a pop_back in the switch above?
> I don't think StringRef has a pop_back.
Right, and it's an immutable data structure anyway so you'd need to have to deal with two return values. Never mind then.


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