P4C
The P4 Compiler
Loading...
Searching...
No Matches
ActionAnalysis::FieldAction Struct Reference

#include <action_analysis.h>

Public Types

enum  container_overwrite_t { DST_ONLY , HIGHER_BITS , ALL_BITS }
 
enum  error_code_t {
  NO_PROBLEM = 0 , READ_AFTER_WRITES = 1 << 0 , REPEATED_WRITES = 1 << 1 , MULTIPLE_ACTION_DATA = 1 << 2 ,
  DIFFERENT_OP_SIZE = 1 << 3 , BAD_CONDITIONAL_SET = 1 << 4
}
 
enum  source_type_t { CONSTANT , ACTION_DATA_CONSTANT , OTHER }
 

Public Member Functions

void clear ()
 
std::pair< container_overwrite_t, source_type_t > container_write_type () const
 
bool is_bitwise_overwritable () const
 
bool is_funnel_shift () const
 
bool is_shift () const
 
bool is_single_shift () const
 
void setWrite (ActionParam w)
 
std::string to_string () const
 

Public Attributes

bool constant_to_ad = false
 
unsigned error_code = 0
 
const IR::MAU::Instruction * instruction
 
cstring name
 
safe_vector< ActionParamreads
 
bool requires_split = false
 
ActionParam write
 
bool write_found = false
 

Static Public Attributes

static std::set< unsigned > codesForErrorCases
 

Friends

std::ostream & operator<< (std::ostream &out, const FieldAction &fa)
 

Detailed Description

Information on the entire instruction, essentially what field is written and from which fields the field is written from. These can be broken down and analyzed on a container by container basis.

Member Data Documentation

◆ codesForErrorCases

std::set< unsigned > ActionAnalysis::FieldAction::codesForErrorCases
static
Initial value:
= {
READ_AFTER_WRITES, REPEATED_WRITES, MULTIPLE_ACTION_DATA, BAD_CONDITIONAL_SET}