19#ifndef BACKENDS_TOFINO_BF_P4C_PARDE_PARSER_LOOPS_INFO_H_
20#define BACKENDS_TOFINO_BF_P4C_PARDE_PARSER_LOOPS_INFO_H_
22#include "backends/tofino/bf-p4c/ir/gress.h"
24#include "lib/cstring.h"
25#include "lib/exceptions.h"
26#include "logging/pass_manager.h"
34 static bool checkGress(
cstring pragma,
const IR::StringLiteral *gress);
36 bool preorder(
const IR::Annotation *annot)
override;
38 std::set<const IR::ParserState *> terminate_parsing;
39 std::map<const IR::ParserState *, unsigned> force_shift;
40 std::map<const IR::ParserState *, unsigned> max_loop_depth;
42 std::set<cstring> dont_unroll;
58 std::set<std::set<cstring>> loops;
59 std::map<cstring, int> max_loop_depth;
60 std::set<cstring> has_next;
62 const std::set<cstring> *find_loop(
cstring state)
const;
67 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
Definition parser_loops_info.h:48
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:30