Namespaces | |
| namespace | ControlPlaneAPI |
| TODO(antonin): High level goals of the generator go here!! | |
| namespace | Coverage |
| namespace | literals |
Typedefs | |
| typedef SimpleCallInfo< IR::P4Action, IR::MethodCallStatement > | ActionCallInfo |
| typedef SimpleInlineList< IR::P4Action, ActionCallInfo, AInlineWorkList > | ActionsInlineList |
| typedef SimpleInlineWorkList< IR::P4Action, IR::MethodCallStatement, ActionCallInfo > | AInlineWorkList |
| typedef SimpleCallInfo< IR::Node, IR::Statement > | FunctionCallInfo |
| typedef SimpleInlineList< IR::Node, FunctionCallInfo, FunctionsInlineWorkList > | FunctionsInlineList |
| typedef SimpleInlineWorkList< IR::Node, IR::Statement, FunctionCallInfo > | FunctionsInlineWorkList |
| using | GeneratedVariablesMap = std::map<cstring, const IR::PathExpression *> |
| typedef InlineDriver< ActionsInlineList, AInlineWorkList > | InlineActionsDriver |
| typedef InlineDriver< FunctionsInlineList, FunctionsInlineWorkList > | InlineFunctionsDriver |
| typedef CallGraph< const IR::ParserState * > | ParserCallGraph |
| typedef std::unordered_map< StackVariable, const IR::Expression *, StackVariableHash > | StackVariableIndexMap |
| typedef std::unordered_map< StackVariable, size_t, StackVariableHash > | StackVariableMap |
| typedef CallGraph< const IR::ParserState * > | StateCallGraph |
| using | TypeLogMsgParams = std::pair<IR::IndexedVector<IR::NamedExpression>, std::string> |
Enumerations | |
| enum class | P4RuntimeFormat { BINARY , JSON , TEXT , TEXT_PROTOBUF } |
| P4Runtime serialization formats. | |
| enum class | ResolutionType { Any , Type , TypeVariable } |
| Helper class to indicate types of nodes that may be returned during resolution. | |
| enum class | StandardExceptions { NoError , PacketTooShort , NoMatch , StackOutOfBounds , OverwritingHeader , HeaderTooShort , ParserTimeout } |
| enum class | TernaryBool { Yes , No , Maybe } |
Functions | |
| cstring | cgMakeString (char c) |
| cstring | cgMakeString (const IR::INode *node) |
| cstring | cgMakeString (const IR::Node *node) |
| cstring | cgMakeString (cstring s) |
| void | checkParametersForMap (const IR::ParameterList *params, std::map< cstring, const IR::Expression * > *vars) |
| void | compareValuesInMaps (std::map< cstring, const IR::Expression * > *oldValues, std::map< cstring, const IR::Expression * > *newValues) |
| const IR::Expression * | convert (const IR::Expression *expression, const IR::Type *type) |
| void | dump (P4::TypeVariableSubstitution &tvs) |
| void | dump (P4::TypeVariableSubstitution *tvs) |
| void | dumpP4 (const IR::INode *node) |
| P4RuntimeAPI | generateP4Runtime (const IR::P4Program *program, cstring arch) |
| const IR::Expression * | getConstant (const ScalarValue *constant) |
| bool | hasVarbitsOrUnions (const TypeMap *typeMap, const IR::Type *type) |
| True if the type contains any varbit or header_union subtypes. | |
| bool | isAsync (const IR::Vector< IR::Method > methods, cstring callee, cstring caller) |
| bool | isTerminalState (IR::ID id) |
| bool | names_overlap (cstring name1, cstring name2) |
| Test to see if names denote overlapping locations. | |
| std::ostream & | operator<< (std::ostream &out, const ComputeDefUse::defuse_t &du) |
| std::ostream & | operator<< (std::ostream &out, const ComputeDefUse::loc_t &loc) |
| std::ostream & | operator<< (std::ostream &out, const std::pair< const IR::Node *, const ordered_set< const ComputeDefUse::loc_t * > > &p) |
| const IR::Expression * | optimizeExpression (const IR::Expression *node) |
| template<typename C = P4V1::Converter> | |
| const IR::P4Program * | parseP4File (ParserOptions &options) |
| const IR::P4Program * | parseP4String (const char *sourceFile, unsigned sourceLine, const std::string &input, CompilerOptions::FrontendVersion version) |
| const IR::P4Program * | parseP4String (const std::string &input, CompilerOptions::FrontendVersion version) |
| void | removeVarsContaining (std::map< cstring, const IR::Expression * > *vars, cstring name) |
| void | serializeP4RuntimeIfRequired (const IR::P4Program *program, const CompilerOptions &options) |
| std::string | toP4 (const IR::INode *node) |
| cstring | toString (const TernaryBool &c) |
| template<typename... T> | |
| void | typeError (const char *format, T... args) |
| UnparsedConstant | unparsedConstant (const IR::AnnotationToken *token) |
Variables | |
| const char | outOfBoundsStateName [] = "stateOutOfBound" |
| Name of out of bound state. | |
| std::set< cstring > | reservedWords |
This file has common data structures used for inlining functions and actions. Inlining these is simpler than inlining controls and parsers
| class P4::TableInsertions |
| const IR::Expression * P4::convert | ( | const IR::Expression * | expression, |
| const IR::Type * | type ) |
Given an expression and a destination type, convert ListExpressions that occur within expression to StructExpression if the destination type matches.
| bool P4::isTerminalState | ( | IR::ID | id | ) |
Checks for terminal state.
|
inline |
Applies expression optimizations to the input node. Currently, performs constant folding and strength reduction.
| const IR::P4Program * P4::parseP4File | ( | ParserOptions & | options | ) |
Parse P4 source from a file. The filename and language version are specified by @options. If the language version is not P4-16, then the program is converted to P4-16 before being returned.
| const IR::P4Program * P4::parseP4String | ( | const char * | sourceFile, |
| unsigned | sourceLine, | ||
| const std::string & | input, | ||
| CompilerOptions::FrontendVersion | version ) |
Parse P4 source from the string @input, interpreting it as having language version
| std::set< cstring > P4::reservedWords |