[PATCH] D67968: [TableGen] Introduce a generic automaton (DFA) backend

James Molloy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 05:23:35 PDT 2019


jmolloy marked 2 inline comments as done.
jmolloy added a comment.

Hi Daniel,

> Sorry for the slow reply. Our target isn't a VLIW, our instructions words are just very long :-). We don't have the usual VLIW issues, it just takes a lot of bits to describe some operations.

Ah, apologies for the mischaracterization. Thanks so much for taking a look!

I've added descriptions to the Transition class which I hadn't realised was missing documentation. PTAL!

Cheers,

James



================
Comment at: llvm/unittests/TableGen/AutomataTest.cpp:101-117
+TEST(Automata, BinPackerAutomatonAccepts) {
+  Automaton<BinPackerAutomatonAction> A(makeArrayRef(BinPackerAutomatonTransitions));
+
+  // Expect that we can pack two double-bins in 0-4, then no more in 0-4.
+  A.reset();
+  EXPECT_TRUE(A.add(BRK_0_to_4_dbl));
+  EXPECT_TRUE(A.add(BRK_0_to_4_dbl));
----------------
dsanders wrote:
> I notice that there isn't a test where one of the two-bin constraints is trying to pack into a state where only one of the two bins are available.
> Shouldn't there be one that does something like pack BRK_0_to_6 five times and then checks that packing BRK_0_to_6_dbl fails?
Great point, thanks! Added a test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67968





More information about the llvm-commits mailing list