![]()  | 
  
    P4C
    
   The P4 Compiler 
   | 
 
Encapsulates the details of invoking the P4 compiler for a target device and architecture. More...
#include <compiler_target.h>
Static Public Member Functions | |
| static std::vector< const char * > * | initCompiler (std::string_view toolName, int argc, char **argv) | 
| static ICompileContext * | makeContext (std::string_view toolName) | 
| static CompilerResultOrError | runCompiler (std::string_view toolName) | 
| static CompilerResultOrError | runCompiler (std::string_view toolName, const std::string &source) | 
  Static Public Member Functions inherited from P4Tools::Target | |
| static bool | init (std::string deviceName, std::string archName) | 
| static bool | setArch (std::string archName) | 
| static bool | setDevice (std::string deviceName) | 
Protected Member Functions | |
| CompilerTarget (std::string_view toolName, const std::string &deviceName, const std::string &archName) | |
| virtual std::vector< const char * > * | initCompilerImpl (int argc, char **argv) const | 
| virtual ICompileContext * | makeContextImpl () const | 
| virtual P4::FrontEnd | mkFrontEnd () const | 
| A factory method for providing a target-specific front end implementation.  | |
| virtual MidEnd | mkMidEnd (const CompilerOptions &options) const | 
| A factory method for providing a target-specific mid end implementation.  | |
| virtual CompilerResultOrError | runCompilerImpl (const IR::P4Program *) const | 
| const IR::P4Program * | runFrontend (const IR::P4Program *program) const | 
| const IR::P4Program * | runMidEnd (const IR::P4Program *program) const | 
  Protected Member Functions inherited from P4Tools::Target | |
| Target (std::string_view toolName, const std::string &deviceName, const std::string &archName) | |
Static Protected Member Functions | |
| static const IR::P4Program * | runParser () | 
  Static Protected Member Functions inherited from P4Tools::Target | |
| template<class TargetImpl > | |
| static const TargetImpl & | get (std::string_view toolName) | 
Additional Inherited Members | |
  Public Member Functions inherited from P4Tools::Target | |
| virtual const IR::Expression * | createTargetUninitialized (const IR::Type *type, bool forceTaint) const | 
  Public Attributes inherited from P4Tools::Target | |
| Spec | spec | 
| The device and architecture supported by this instance.  | |
| std::string | toolName | 
| The name of the tool supported by this instance.  | |
Encapsulates the details of invoking the P4 compiler for a target device and architecture.
      
  | 
  static | 
Initializes the P4 compiler with the given compiler-specific command-line arguments.
      
  | 
  protectedvirtual | 
This implementation just forwards the given arguments to the compiler.
      
  | 
  static | 
      
  | 
  nodiscardprotectedvirtual | 
      
  | 
  static | 
Runs the P4 compiler to produce an IR and various other kinds of information on the input program.
      
  | 
  static | 
Runs the P4 compiler to produce an IR and other information for the given source code.
      
  | 
  protectedvirtual | 
Reimplemented in P4Tools::P4Testgen::TestgenTarget.
      
  | 
  protected | 
Runs the front end of the P4 compiler on the given program.
      
  | 
  protected | 
Runs the mid end provided by @mkMidEnd on the given program.
      
  | 
  staticprotected | 
Parses the P4 program specified on the command line.