12 #ifndef LLVM_LIB_TARGET_HEXAGON_RDFLIVENESS_H 13 #define LLVM_LIB_TARGET_HEXAGON_RDFLIVENESS_H 25 class MachineBasicBlock;
26 class MachineDominanceFrontier;
27 class MachineDominatorTree;
28 class MachineRegisterInfo;
29 class TargetRegisterInfo;
41 return Map.emplace(B, Empty).first->second;
46 std::map<MachineBasicBlock*,RegisterAggr> Map;
49 using NodeRef = std::pair<NodeId, LaneBitmask>;
52 using RefMap = std::map<RegisterId, NodeRefSet>;
55 : DFG(g),
TRI(g.getTRI()), PRI(g.getPRI()), MDT(g.getDT()),
56 MDF(g.getDF()), LiveMap(g.getPRI()), Empty(), NoRegs(g.getPRI()) {}
59 bool TopShadows,
bool FullChain,
const RegisterAggr &DefRRs);
87 auto F = RealUseMap.find(P);
88 return F == RealUseMap.end() ? Empty :
F->second;
121 std::map<NodeId, RefMap> RealUseMap;
124 std::map<MachineBasicBlock*,std::set<MachineBasicBlock*>> IIDF;
127 std::map<MachineBasicBlock*,RefMap> PhiLON;
134 std::map<MachineBasicBlock*,RefMap> PhiLOX;
140 std::pair<NodeSet,bool> getAllReachingDefsRecImpl(
RegisterRef RefRR,
142 unsigned Nest,
unsigned MaxNest);
145 raw_ostream &operator<<(raw_ostream &OS, const Print<Liveness::RefMap> &
P);
151 #endif // LLVM_LIB_TARGET_HEXAGON_RDFLIVENESS_H const LiveMapType & getLiveMap() const
A common definition of LaneBitmask for use in TableGen and CodeGen.
This class represents lattice values for constants.
NodeList getAllReachingDefs(RegisterRef RefRR, NodeAddr< RefNode *> RefA)
std::pair< NodeSet, bool > getAllReachingDefsRec(RegisterRef RefRR, NodeAddr< RefNode *> RefA, NodeSet &Visited, const NodeSet &Defs)
unsigned const TargetRegisterInfo * TRI
NodeAddr< RefNode * > getNearestAliasedRef(RegisterRef RefRR, NodeAddr< InstrNode *> IA)
Find the nearest ref node aliased to RefRR, going upwards in the data flow, starting from the instruc...
LiveMapType(const PhysicalRegisterInfo &pri)
RegisterAggr & operator[](MachineBasicBlock *B)
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
NodeSet getAllReachedUses(RegisterRef RefRR, NodeAddr< DefNode *> DefA)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
NodeList getAllReachingDefs(RegisterRef RefRR, NodeAddr< RefNode *> RefA, bool TopShadows, bool FullChain, const RegisterAggr &DefRRs)
const RefMap & getRealUses(NodeId P) const
std::pair< NodeId, LaneBitmask > NodeRef
LiveMapType & getLiveMap()
std::map< RegisterId, NodeRefSet > RefMap
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
std::set< NodeId > NodeSet
NodeList getAllReachingDefs(NodeAddr< RefNode *> RefA)
std::set< NodeRef > NodeRefSet
NodeSet getAllReachedUses(RegisterRef RefRR, NodeAddr< DefNode *> DefA, const RegisterAggr &DefRRs)
This class implements an extremely fast bulk output stream that can only output to a stream...
Liveness(MachineRegisterInfo &mri, const DataFlowGraph &g)
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...