|
|
| Transaction (const Allocation &parent) |
| | Constructor.
|
| |
|
virtual | ~Transaction () |
| | Destructor declaration. Does nothing but quiets warnings.
|
| |
| const_iterator | begin () const override |
| |
|
void | clearTransactionStatus () |
| | Clears any allocation added to this transaction.
|
| |
| bool | contains (PHV::Container c) const override |
| |
| const_iterator | end () const override |
| |
| void | foreach_slice (const PHV::Field *f, std::function< void(const AllocSlice &)> cb) const override |
| |
|
ordered_map< PHV::Container, ContainerStatus > | get_actual_diff () const |
| | Returns the actual diff of outstanding writes in this view.
|
| |
| const ordered_map< gress_t, ordered_map< const IR::MAU::Table *, std::set< const IR::MAU::Table * > > > & | getARAedges () const |
| |
|
const ordered_map< const PHV::Field *, FieldStatus > & | getFieldStatus () const |
| |
| std::optional< ActionSet > | getInitPoints (const AllocSlice &slice) const override |
| |
| ActionSet | getInitPointsForField (const PHV::Field *f) const override |
| |
| const ordered_map< const IR::MAU::Action *, ordered_set< const PHV::Field * > > & | getInitWrites () const |
| |
| const ordered_set< const PHV::Field * > | getMetadataInits (const IR::MAU::Action *act) const override |
| |
| const ordered_map< AllocSlice, ActionSet > & | getMetaInitPoints () const |
| |
|
const Allocation * | getParent () const |
| | Returns the allocation that this transaction is based on.
|
| |
| const ContainerStatus * | getStatus (const PHV::Container &c) const override |
| |
| FieldStatus | getStatus (const PHV::Field *f) const override |
| |
| cstring | getTransactionDiff () const |
| |
|
const ordered_map< PHV::Container, ContainerStatus > & | getTransactionStatus () const |
| | Returns the outstanding writes in this view.
|
| |
| cstring | getTransactionSummary () const |
| |
| bool | isDarkReadAvailable (PHV::Container c, unsigned minStage, unsigned maxStage) const override |
| |
| bool | isDarkWriteAvailable (PHV::Container c, unsigned minStage, unsigned maxStage) const override |
| |
| void | printMetaInitPoints () const |
| |
| size_t | size () const override |
| |
|
void | addARAedge (gress_t grs, const IR::MAU::Table *src, const IR::MAU::Table *dst) const |
| | Add a pair of tables in the ara_edges for a new ARA table.
|
| |
| bool | addDarkAllocation (const AllocSlice &slice) |
| |
| virtual void | addMetadataInitialization (AllocSlice slice, LiveRangeShrinkingMap initNodes) |
| |
| virtual ContainerAllocStatus | alloc_status (PHV::Container c) const |
| |
| virtual void | allocate (const AllocSlice slice, LiveRangeShrinkingMap *initNodes=nullptr, bool singleGressParserGroup=false) |
| |
|
std::set< AvailableSpot > | available_spots () const |
| | Return a set of available spots of this allocation.
|
| |
|
virtual MutuallyLiveSlices | byteSlicesByLiveness (const PHV::Container c, const AllocSlice &sl, const PragmaNoInit &noInit) const |
| |
|
Transaction * | clone (const Allocation &parent) const |
| | Extract the child from the parent transaction and return a cloned version of the difference.
|
| |
| cstring | commit (Transaction &view) |
| |
| virtual GressAssignment | deparserGroupGress (PHV::Container c) const |
| |
| int | empty_containers (PHV::Size size) const |
| |
|
void | foreach_slice (const PHV::Field *f, le_bitrange range, int stage, PHV::FieldUse access, std::function< void(const AllocSlice &)> cb) const |
| |
|
void | foreach_slice (const PHV::Field *f, le_bitrange range, std::function< void(const AllocSlice &)> cb) const |
| |
|
void | foreach_slice (PHV::Container c, int stage, PHV::FieldUse access, std::function< void(const AllocSlice &)> cb) const |
| |
|
void | foreach_slice (PHV::Container c, le_bitrange range, int stage, PHV::FieldUse access, std::function< void(const AllocSlice &)> cb) const |
| |
|
void | foreach_slice (PHV::Container c, le_bitrange range, std::function< void(const AllocSlice &)> cb) const |
| |
|
void | foreach_slice (PHV::Container c, std::function< void(const AllocSlice &)> cb) const |
| |
| const ordered_map< gress_t, ordered_map< const IR::MAU::Table *, std::set< const IR::MAU::Table * > > > & | getARAedges () const |
| |
| const ordered_map< const IR::BFN::ParserState *, std::set< PHV::Container > > & | getParserStateToContainers (const PhvInfo &phv, const MapFieldToParserStates &field_to_parser_states) const |
| |
| const ordered_set< unsigned > | getTagalongCollectionsUsed () const |
| |
| virtual GressAssignment | gress (const PHV::Container &c) const |
| |
| virtual MutuallyLiveSlices | liverange_overlapped_slices (const PHV::Container c, const std::vector< AllocSlice > &slices) const |
| |
| virtual Transaction | makeTransaction () const |
| | Create a Transaction based on this Allocation.
|
| |
| virtual ExtractSource | parserExtractGroupSource (PHV::Container c) const |
| |
| virtual GressAssignment | parserGroupGress (PHV::Container c) const |
| |
|
std::string | printARAedges () const |
| |
|
virtual void | removeAllocatedSlice (const ordered_set< PHV::AllocSlice > &slices) |
| |
| ordered_set< PHV::AllocSlice > | slices (const PHV::Field *f) const |
| |
|
ordered_set< PHV::AllocSlice > | slices (const PHV::Field *f, int stage, PHV::FieldUse access) const |
| |
| ordered_set< PHV::AllocSlice > | slices (const PHV::Field *f, le_bitrange range) const |
| |
|
ordered_set< PHV::AllocSlice > | slices (const PHV::Field *f, le_bitrange range, int stage, PHV::FieldUse access) const |
| |
| ordered_set< AllocSlice > | slices (PHV::Container c) const |
| |
| ordered_set< AllocSlice > | slices (PHV::Container c, int stage, PHV::FieldUse access) const |
| |
| ordered_set< AllocSlice > | slices (PHV::Container c, le_bitrange range) const |
| |
|
ordered_set< AllocSlice > | slices (PHV::Container c, le_bitrange range, int stage, PHV::FieldUse access) const |
| |
| virtual MutuallyLiveSlices | slicesByLiveness (const PHV::Container c, const AllocSlice &sl) const |
| |
|
virtual MutuallyLiveSlices | slicesByLiveness (const PHV::Container c, std::vector< AllocSlice > &slices) const |
| |
| virtual std::vector< MutuallyLiveSlices > | slicesByLiveness (PHV::Container c) const |
| |
| virtual cstring | toString () const |
| |
|
|
using | ConditionalConstraint = ordered_map<PHV::FieldSlice, ConditionalConstraintData> |
| |
|
using | ConditionalConstraints = ordered_map<int, ConditionalConstraint> |
| |
|
using | const_iterator = ordered_map<PHV::Container, ContainerStatus>::const_iterator |
| |
| enum class | ContainerAllocStatus { EMPTY
, PARTIAL
, FULL
} |
| |
| enum class | ExtractSource { NONE
, PACKET
, NON_PACKET
} |
| |
|
using | FieldStatus = ordered_set<AllocSlice> |
| |
|
using | GressAssignment = std::optional<gress_t> |
| |
|
using | LiveRangeShrinkingMap = ordered_map<const PHV::Field *, ActionSet> |
| |
|
using | MutuallyLiveSlices = ordered_set<AllocSlice> |
| |
|
| Allocation (const PhvInfo &phv, const PhvUse &uses, bool isTrivial=false) |
| |
| ordered_map< AllocSlice, ActionSet > & | get_meta_init_points () const |
| |
| ordered_map< gress_t, ordered_map< const IR::MAU::Table *, std::set< const IR::MAU::Table * > > > | ara_edges |
| |
|
ordered_map< PHV::Container, ContainerStatus > | container_status_i |
| |
|
assoc::hash_map< PHV::Size, ordered_map< ContainerAllocStatus, int > > | count_by_status_i |
| |
|
ordered_map< PHV::Container, bitvec > | dark_containers_read_allocated_i |
| |
| ordered_map< PHV::Container, bitvec > | dark_containers_write_allocated_i |
| |
|
ordered_map< const PHV::Field *, FieldStatus > | field_status_i |
| |
|
DarkInitMap | init_map_i |
| | Initialization information about allocating to dark containers during certain stages.
|
| |
| ordered_map< const IR::MAU::Action *, ordered_set< const PHV::Field * > > | init_writes_i |
| |
|
bool | isTrivial |
| |
| ordered_map< AllocSlice, ActionSet > | meta_init_points_i |
| |
|
const PhvInfo * | phv_i |
| |
|
ordered_map< const IR::BFN::ParserState *, std::set< PHV::Container > > | state_to_containers_i |
| | parser state to containers
|
| |
|
const PhvUse * | uses_i |
| |
A Transaction allows for speculative allocation that can later be rolled back. Writes are cached in the Transaction and merged into its parent Allocation with Allocation::commit; until that point, writes are only reflected in the Transaction but not its parent Allocation.
Reads on a Transaction read values allocated to the Transaction as well as those of its parent Allocation.
Note that "writes" (i.e. calls to allocation) do not overwrite existing allocation but rather add to it.