P4C
The P4 Compiler
Loading...
Searching...
No Matches
BFN::ParserLoopsInfo Struct Reference

#include <parser_loops_info.h>

Classes

struct  GetMaxLoopDepth
 

Public Member Functions

 ParserLoopsInfo (P4::ReferenceMap *refMap, const IR::BFN::TnaParser *parser, const ParserPragmas &pm)
 
bool dont_unroll (cstring state) const
 
const std::set< cstring > * find_loop (cstring state) const
 
bool has_next_on_loop (cstring state) const
 Returns true if the state is on loop that has "next" reference.
 
bool need_strided_allocation (cstring state) const
 state is on loop that requires strided allocation
 

Public Attributes

std::set< cstringhas_next
 
std::set< std::set< cstring > > loops
 
std::map< cstring, int > max_loop_depth
 
const ParserPragmasparserPragmas
 

Detailed Description

Collect loop information in the frontend parser IR.

  • Where are the loops?
  • What is the depth (max iterations) of each loop?