[PATCH] D95016: [Clang][RISCV] Add custom TableGen backend for riscv-vector intrinsics.
    Craig Topper via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jan 19 20:33:18 PST 2021
    
    
  
craig.topper added inline comments.
================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:687
+      [this](const std::vector<int64_t> &IntrinsicTypes) {
+        std::string S = "  ID = Intrinsic::riscv_" + getIRName() + ";\n";
+
----------------
Might be better to use raw_string_ostream here so you can use stream operators and not keep creating temporary std::strings and then appending them.
================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:707
+    return getIntrinsicTypesString(getIntrinsicTypes());
+  } else {
+    // IntrinsicTypes is ummasked version index
----------------
Drop else since previous if returned.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95016/new/
https://reviews.llvm.org/D95016
    
    
More information about the llvm-commits
mailing list