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

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 16:57:04 PDT 2023


chapuni marked an inline comment as done.
chapuni 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));
+
----------------
arsenm wrote:
> auto is longer than MVT, just declare the type 
Each RHS is the constructor of MVT and either is `tmp::MVT`. Could I rewrite both of them?


================
Comment at: llvm/utils/TableGen/VTEmitter.cpp:55
+
+  std::map<StringRef, VTRange> VTRanges;
+
----------------
arsenm wrote:
> DenseMap?
`VTRanges` is accessed by iterator. See L93 and D146179.


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