P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::LocationSet Class Reference

#include <def_use.h>

Inheritance diagram for P4::LocationSet:
[legend]

Public Member Functions

 LocationSet (const ordered_set< const StorageLocation * > &other)
 
 LocationSet (const StorageLocation *location)
 
void add (const StorageLocation *location)
 
void addCanonical (const StorageLocation *location)
 
const LocationSet * allElements () const
 
auto begin () const
 
auto canon_begin () const
 
auto canon_end () const
 
auto canonical () const
 
const LocationSet * canonicalize () const
 
void dbprint (std::ostream &out) const override
 
auto end () const
 
const LocationSet * getArrayLastIndex () const
 
const LocationSet * getField (cstring field) const
 
const LocationSet * getIndex (unsigned index) const
 
const LocationSet * getValidField () const
 
bool isEmpty () const
 
const LocationSet * join (const LocationSet *other) const
 
bool operator== (const LocationSet &other) const
 
bool overlaps (const LocationSet *other) const
 
- Public Member Functions inherited from P4::IHasDbPrint
void print () const
 

Static Public Attributes

static const LocationSet * empty = new LocationSet()
 

Detailed Description

A set of locations that may be read or written by a computation. In general this is a conservative approximation of the actual location set.

Member Function Documentation

◆ canonicalize()

const LocationSet * P4::LocationSet::canonicalize ( ) const
Returns
this location set expressed only in terms of BaseLocation; e.g., a StructLocation is expanded in all its fields.

◆ dbprint()

void P4::LocationSet::dbprint ( std::ostream & out) const
inlineoverridevirtual

Implements P4::IHasDbPrint.