P4C
The P4 Compiler
Loading...
Searching...
No Matches
PHV::SourceOp Struct Reference

SourceOp represents a source operand. More...

#include <action_source_tracker.h>

Public Types

enum class  OpType { move , bitwise , whole_container }
 

Public Member Functions

SourceOp slice (int start, int len) const
 

Public Attributes

bool ad_or_const = false
 
std::optional< PHV::FieldSlicephv_src = std::nullopt
 
OpType t = OpType::move
 

Detailed Description

SourceOp represents a source operand.

Member Function Documentation

◆ slice()

SourceOp PHV::SourceOp::slice ( int start,
int len ) const
Returns
a slice of SourceOp that when ad_or_const is true a clone will be returned. Otherwise, return a a slice of phv_src of (start, len);