[PATCH] D146906: Generate `MachineValueType.h` (partially) from `ValueTypes.td`

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 11:10:58 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/unittests/Support/MVTTest.cpp:27-28
+    SCOPED_TRACE("i=" + std::to_string(i));
+    auto Org = MVT(MVT::SimpleValueType(i));
+    auto New = tmp::MVT(tmp::MVT::SimpleValueType(i));
+
----------------
auto is longer than MVT, just declare the type 


================
Comment at: llvm/utils/TableGen/VTEmitter.cpp:39
+
+  std::vector<const Record *> VTsByNumber(256);
+  auto ValueTypes = Records.getAllDerivedDefinitions("ValueType");
----------------
You never resize this, use std::array


================
Comment at: llvm/utils/TableGen/VTEmitter.cpp:55
+
+  std::map<StringRef, VTRange> VTRanges;
+
----------------
DenseMap?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146906



More information about the llvm-commits mailing list