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 LocationSetallElements () const
 
auto begin () const
 
auto canon_begin () const
 
auto canon_end () const
 
auto canonical () const
 
const LocationSetcanonicalize () const
 
void dbprint (std::ostream &out) const override
 
auto end () const
 
const LocationSetgetArrayLastIndex () const
 
const LocationSetgetField (cstring field) const
 
const LocationSetgetIndex (unsigned index) const
 
const LocationSetgetValidField () const
 
bool isEmpty () const
 
const LocationSetjoin (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 LocationSetempty = 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.