19#ifndef BACKENDS_TOFINO_BF_P4C_PARDE_PARSER_LOOPS_INFO_H_
20#define BACKENDS_TOFINO_BF_P4C_PARDE_PARSER_LOOPS_INFO_H_
22#include "frontends/common/resolveReferences/referenceMap.h"
24#include "lib/cstring.h"
32 static bool checkGress(
cstring pragma,
const IR::StringLiteral *gress);
34 bool preorder(
const IR::Annotation *annot)
override;
36 std::set<const IR::ParserState *> terminate_parsing;
37 std::map<const IR::ParserState *, unsigned> force_shift;
38 std::map<const IR::ParserState *, unsigned> max_loop_depth;
40 std::set<cstring> dont_unroll;
46struct ParserLoopsInfo {
56 std::set<std::set<cstring>> loops;
57 std::map<cstring, int> max_loop_depth;
58 std::set<cstring> has_next;
60 const std::set<cstring> *find_loop(
cstring state)
const;
65 bool dont_unroll(
cstring state)
const;
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition add_t2na_meta.cpp:21
Definition parser_loops_info.cpp:117
bool need_strided_allocation(cstring state) const
state is on loop that requires strided allocation
Definition parser_loops_info.cpp:224
bool has_next_on_loop(cstring state) const
Returns true if the state is on loop that has "next" reference.
Definition parser_loops_info.cpp:202
Definition parser_loops_info.h:28