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

#include <live_range_split.h>

Public Types

using ContainerSequence = ordered_set<FreeSlice>
 
using ContainerSequences = std::set<ContainerSequence>
 

Public Member Functions

 LiveRangeSplit (const Allocation &alloc, const PhvInfo &phv, const AllocUtils &utils, const DependencyGraph &deps, const std::list< ContainerGroup * > &containerGroups, const DarkLiveRangeMap &liveRangeMap, const NonMochaDarkFields &nonMochaDark)
 
std::set< FreeSlicebuildContainerOccupancy (StageAndAccess begin, StageAndAccess end, const FieldSlice &fs) const
 For each stage, find container (slices) that are available at each one.
 
ContainerSequences buildContainerSeqs (const std::set< FreeSlice > &avail, StageAndAccess begin, StageAndAccess end) const
 Builds a list of all possible allocations.
 
ContainerSequences findLiveRangeSplits (const LiveRangeInfo &lri, const FieldSlice &fs) const
 
ContainerSequences findLiveRangeSplits (StageAndAccess begin, StageAndAccess end, const FieldSlice &fs) const
 

Static Public Member Functions

static void report (const ContainerSequences &splits)
 

Detailed Description

Class for finding ways a live range can be split to fit into a given Allocation.

Member Typedef Documentation

◆ ContainerSequence

List of all sequences of containers that a live range can be split into, each with its full availabile range.

Member Function Documentation

◆ findLiveRangeSplits()

LiveRangeSplit::ContainerSequences PHV::LiveRangeSplit::findLiveRangeSplits ( StageAndAccess begin,
StageAndAccess end,
const FieldSlice & fs ) const

Find all the ways the given live range can be split into multiple containers, and returns all possible sequences of them.