summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DFAEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix DfaEmitter::visitDfaState() crash in MSVC x86 debug builds (PR44945)Hans Wennborg2020-02-251-4/+7
| | | | | | | No functionality change (intended), but this seems to make the code a bit clearer for the compiler and maybe for human readers too. (cherry picked from commit edae4be8e21c5deb9a8ffc24a8c17e70b878bf39)
* [TableGen] Pacify gcc-5.4 moreJames Molloy2019-10-071-2/+2
| | | | | | | Followup to a previous pacification, this performs the same workaround to the TableGen generated code for tuple automata. llvm-svn: 373883
* [TableGen] Introduce a generic automaton (DFA) backendJames Molloy2019-10-041-0/+394
Summary: This patch introduces -gen-automata, a backend for generating deterministic finite-state automata. DFAs are already generated by the -gen-dfa-packetizer backend. This backend is more generic and will hopefully be used to implement the DFA generation (and determinization) for the packetizer in the future. This backend allows not only generation of a DFA from an NFA (nondeterministic finite-state automaton), it also emits sidetables that allow a path through the DFA under a sequence of inputs to be analyzed, and the equivalent set of all possible NFA transitions extracted. This allows a user to not just answer "can my problem be solved?" but also "what is the solution?". Clearly this analysis is more expensive than just playing a DFA forwards so is opt-in. The DFAPacketizer has this behaviour already but this is a more compact and generic representation. Examples are bundled in unittests/TableGen/Automata.td. Some are trivial, but the BinPacking example is a stripped-down version of the original target problem I set out to solve, where we pack values (actually immediates) into bins (an immediate pool in a VLIW bundle) subject to a set of esoteric constraints. Reviewers: t.p.northover Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67968 llvm-svn: 373718
OpenPOWER on IntegriCloud