17#ifndef FRONTENDS_P4_PARSERCONTROLFLOW_H_ 
   18#define FRONTENDS_P4_PARSERCONTROLFLOW_H_ 
   20#include "frontends/common/resolveReferences/referenceMap.h" 
   21#include "frontends/p4/moveDeclarations.h" 
   22#include "frontends/p4/simplify.h" 
   23#include "frontends/p4/uniqueNames.h" 
   84    const IR::Node *postorder(IR::ParserState *state) 
override;
 
 
   95        setName(
"RemoveParserControlFlow");
 
 
  104    explicit IfInParser(
bool *found) : found(found) {
 
  106        setName(
"IfInParser");
 
  108    void postorder(
const IR::IfStatement *)
 override {
 
  109        if (findContext<IR::P4Parser>()) *found = 
true;
 
 
  122            new PassIf([
this] { 
return found; },
 
 
Converts if statements in parsers into transitions.
Definition parserControlFlow.h:79
 
Detect whether the program contains an 'if' statement in a parser.
Definition parserControlFlow.h:100
 
Definition referenceMap.h:36
 
Definition moveDeclarations.h:34
 
Definition parserControlFlow.h:90
 
Definition parserControlFlow.h:115
 
Definition uniqueNames.h:70
 
Definition pass_manager.h:170
 
Definition pass_manager.h:38
 
Definition pass_manager.h:143
 
Definition applyOptionsPragmas.cpp:24