P4C
The P4 Compiler
Loading...
Searching...
No Matches
eliminate_empty_states.h
1
19#ifndef BACKENDS_TOFINO_BF_P4C_PARDE_LOWERED_ELIMINATE_EMPTY_STATES_H_
20#define BACKENDS_TOFINO_BF_P4C_PARDE_LOWERED_ELIMINATE_EMPTY_STATES_H_
21
22#include "bf-p4c/parde/parde_visitor.h"
23#include "bf-p4c/parde/parser_info.h"
24
25namespace Parde::Lowered {
26
35 const CollectParserInfo &parser_info;
36
37 explicit EliminateEmptyStates(const CollectParserInfo &pi) : parser_info(pi) {}
38
39 bool is_empty(const IR::BFN::ParserState *state);
40
41 const IR::BFN::Transition *get_unconditional_transition(const IR::BFN::ParserState *state);
42
43 IR::Node *preorder(IR::BFN::Transition *transition) override;
44};
45
46} // namespace Parde::Lowered
47
48#endif /* BACKENDS_TOFINO_BF_P4C_PARDE_LOWERED_ELIMINATE_EMPTY_STATES_H_ */
Definition node.h:95
Eliminates empty states.
Definition eliminate_empty_states.h:34
Definition parde_visitor.h:90
Definition lower_parser.cpp:72