[PATCH] D88385: [TableGen][M68K] (Patch 1/8) Utilities for complex instruction addressing modes: CodeBeads and logical operand helper functions

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 11:01:02 PST 2020


RKSimon added inline comments.


================
Comment at: llvm/utils/TableGen/CodeBeadsGen.cpp:50
+
+  unsigned Length = 192;
+  unsigned Size = 8;
----------------
myhsu wrote:
> craig.topper wrote:
> > Where do these numbers come from? Are they specific to 68K?
> no really...this number depends on maximum bit length among all code beads. As the TODO comment on line 55 suggested we should have a way to evaluate this dynamically. Also the for loop on line 84 need this number to reverse the byte order
Please add a comment explaining these magic numbers.


================
Comment at: llvm/utils/TableGen/InstrInfoEmitter.cpp:489
+    for (int r = 0, rs = LogicalOpSizeList.size(); r < rs; ++r) {
+      auto &Row = *LogicalOpSizeList[r];
+      OS << "   {";
----------------
const auto &Row


================
Comment at: llvm/utils/TableGen/InstrInfoEmitter.cpp:507
+      auto OpMapIdx = P.first;
+      auto &Insts = P.second;
+      for (const auto &Inst : Insts) {
----------------
const auto &Instrs


================
Comment at: llvm/utils/TableGen/InstrInfoEmitter.cpp:581
+    for (int r = 0, rs = LogicalOpTypeList.size(); r < rs; ++r) {
+      auto &Row = *LogicalOpTypeList[r];
+      OS << "   {";
----------------
const auto &Row


================
Comment at: llvm/utils/TableGen/InstrInfoEmitter.cpp:605
+      auto OpMapIdx = P.first;
+      auto &Insts = P.second;
+      for (const auto &Inst : Insts) {
----------------
const auto &Insts


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

https://reviews.llvm.org/D88385



More information about the llvm-commits mailing list