LLVM 20.0.0git
|
#include "llvm/CodeGen/RDFLiveness.h"
Public Types | |
using | LiveMapType = RegisterAggrMap< MachineBasicBlock * > |
using | NodeRef = detail::NodeRef |
using | NodeRefSet = std::unordered_set< NodeRef > |
using | RefMap = std::unordered_map< RegisterId, NodeRefSet > |
Definition at line 55 of file RDFLiveness.h.
Definition at line 57 of file RDFLiveness.h.
Definition at line 58 of file RDFLiveness.h.
using llvm::rdf::Liveness::NodeRefSet = std::unordered_set<NodeRef> |
Definition at line 59 of file RDFLiveness.h.
using llvm::rdf::Liveness::RefMap = std::unordered_map<RegisterId, NodeRefSet> |
Definition at line 60 of file RDFLiveness.h.
|
inline |
Definition at line 62 of file RDFLiveness.h.
void llvm::rdf::Liveness::computeLiveIns | ( | ) |
Definition at line 743 of file RDFLiveness.cpp.
References llvm::rdf::NodeAddr< T >::Addr, llvm::rdf::DataFlowGraph::addr(), B, llvm::SetVector< T, Vector, Set, N >::begin(), Blocks, computePhiInfo(), D, llvm::dbgs(), llvm::SetVector< T, Vector, Set, N >::end(), llvm::MachineDominanceFrontier::end(), llvm::MachineDominanceFrontier::find(), llvm::MachineFunction::front(), getAllReachingDefs(), llvm::rdf::DataFlowGraph::getFunc(), llvm::rdf::DataFlowGraph::getLiveIns(), llvm::rdf::DataFlowGraph::getMF(), llvm::rdf::DataFlowGraph::getRelatedRefs(), I, llvm::SetVector< T, Vector, Set, N >::insert(), llvm::NodeSet::insert(), llvm::rdf::DataFlowGraph::IsCode(), llvm::rdf::DataFlowGraph::IsRef(), llvm::rdf::CodeNode::members(), P, llvm::rdf::NodeAttrs::Phi, llvm::printMBBReference(), RA, llvm::rdf::RegisterRef::Reg, llvm::SetVector< T, Vector, Set, N >::size(), llvm::sort(), and llvm::rdf::NodeAttrs::Use.
void llvm::rdf::Liveness::computePhiInfo | ( | ) |
Definition at line 460 of file RDFLiveness.cpp.
References A, llvm::rdf::NodeAddr< T >::Addr, llvm::rdf::DataFlowGraph::addr(), llvm::append_range(), assert(), Blocks, llvm::rdf::RegisterAggr::clearIn(), llvm::NodeSet::count(), D, llvm::dbgs(), llvm::rdf::NodeAttrs::Dead, llvm::rdf::NodeAttrs::Def, F, getAllReachingDefs(), llvm::rdf::DataFlowGraph::getFunc(), llvm::rdf::DataFlowGraph::getRelatedRefs(), llvm::rdf::RegisterAggr::hasAliasOf(), llvm::rdf::RegisterAggr::hasCoverOf(), I, llvm::rdf::NodeAddr< T >::Id, llvm::SetVector< T, Vector, Set, N >::insert(), llvm::rdf::RegisterAggr::insert(), llvm::NodeSet::insert(), llvm::rdf::RegisterAggr::intersectWith(), llvm::rdf::DataFlowGraph::IsCode(), IsDead, llvm::rdf::DataFlowGraph::IsRef(), llvm::rdf::PhysicalRegisterInfo::mapTo(), llvm::rdf::RegisterRef::Mask, P, llvm::rdf::NodeAttrs::Phi, llvm::rdf::NodeAttrs::PhiRef, llvm::SetVector< T, Vector, Set, N >::size(), llvm::rdf::NodeAttrs::Undef, llvm::rdf::NodeAttrs::Use, and Uses.
Referenced by computeLiveIns().
|
inline |
Definition at line 82 of file RDFLiveness.h.
References getAllReachedUses().
NodeSet llvm::rdf::Liveness::getAllReachedUses | ( | RegisterRef | RefRR, |
NodeAddr< DefNode * > | DefA, | ||
const RegisterAggr & | DefRRs | ||
) |
Definition at line 414 of file RDFLiveness.cpp.
References llvm::rdf::NodeAddr< T >::Addr, llvm::rdf::DataFlowGraph::addr(), llvm::rdf::PhysicalRegisterInfo::alias(), D, llvm::rdf::NodeAttrs::Dead, getAllReachedUses(), llvm::rdf::RegisterAggr::hasCoverOf(), llvm::rdf::RegisterAggr::insert(), IsDead, llvm::rdf::DataFlowGraph::IsPreservingDef(), llvm::rdf::NodeAttrs::Undef, and Uses.
Referenced by getAllReachedUses().
Definition at line 70 of file RDFLiveness.h.
References llvm::rdf::NodeAddr< T >::Addr, and getAllReachingDefs().
|
inline |
Definition at line 75 of file RDFLiveness.h.
References getAllReachingDefs().
NodeList llvm::rdf::Liveness::getAllReachingDefs | ( | RegisterRef | RefRR, |
NodeAddr< RefNode * > | RefA, | ||
bool | TopShadows, | ||
bool | FullChain, | ||
const RegisterAggr & | DefRRs | ||
) |
Definition at line 104 of file RDFLiveness.cpp.
References A, llvm::rdf::NodeAddr< T >::Addr, llvm::rdf::DataFlowGraph::addr(), llvm::rdf::PhysicalRegisterInfo::alias(), llvm::append_range(), assert(), B, llvm::MachineBasicBlock::begin(), Blocks, llvm::SmallSet< T, N, C >::count(), llvm::rdf::NodeAttrs::Dead, llvm::rdf::NodeAttrs::Def, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::MachineBasicBlock::end(), llvm::erase_if(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getParent(), llvm::rdf::DataFlowGraph::getRelatedRefs(), llvm::rdf::RegisterAggr::hasCoverOf(), llvm::rdf::NodeAddr< T >::Id, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::SmallSet< T, N, C >::insert(), llvm::SetVector< T, Vector, Set, N >::insert(), llvm::rdf::RegisterAggr::insert(), llvm::rdf::DataFlowGraph::IsCode(), llvm::rdf::RegisterAggr::isCoverOf(), llvm::rdf::DataFlowGraph::IsPreservingDef(), llvm_unreachable, MBB, N, llvm::rdf::NodeAttrs::Phi, llvm::rdf::NodeAttrs::PhiRef, llvm::rdf::NodeAttrs::Preserving, llvm::DominatorTreeBase< NodeT, IsPostDom >::properlyDominates(), llvm::reverse(), llvm::SetVector< T, Vector, Set, N >::size(), llvm::sort(), llvm::rdf::NodeAttrs::Stmt, and llvm::rdf::NodeAttrs::Undef.
Referenced by computeLiveIns(), computePhiInfo(), and getAllReachingDefs().
std::pair< NodeSet, bool > llvm::rdf::Liveness::getAllReachingDefsRec | ( | RegisterRef | RefRR, |
NodeAddr< RefNode * > | RefA, | ||
NodeSet & | Visited, | ||
const NodeSet & | Defs | ||
) |
Definition at line 304 of file RDFLiveness.cpp.
References MaxRecNest.
|
inline |
Definition at line 94 of file RDFLiveness.h.
|
inline |
Definition at line 95 of file RDFLiveness.h.
NodeAddr< RefNode * > llvm::rdf::Liveness::getNearestAliasedRef | ( | RegisterRef | RefRR, |
NodeAddr< InstrNode * > | IA | ||
) |
Find the nearest ref node aliased to RefRR, going upwards in the data flow, starting from the instruction immediately preceding Inst.
Definition at line 357 of file RDFLiveness.cpp.
References llvm::rdf::NodeAddr< T >::Addr, llvm::rdf::PhysicalRegisterInfo::alias(), B, llvm::rdf::NodeAttrs::Clobbering, llvm::rdf::DataFlowGraph::findBlock(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), I, llvm::rdf::NodeAddr< T >::Id, llvm::rdf::DataFlowGraph::IsDef(), llvm::make_range(), and N.
Definition at line 97 of file RDFLiveness.h.
void llvm::rdf::Liveness::resetKills | ( | ) |
Definition at line 910 of file RDFLiveness.cpp.
References B, llvm::rdf::DataFlowGraph::getMF(), and resetKills().
Referenced by resetKills().
void llvm::rdf::Liveness::resetKills | ( | MachineBasicBlock * | B | ) |
Definition at line 915 of file RDFLiveness.cpp.
References B, llvm::MCRegisterInfo::getNumRegs(), llvm::MCSubRegIndexIterator::getSubReg(), llvm::MCSubRegIndexIterator::getSubRegIndex(), llvm::TargetRegisterInfo::getSubRegIndexLaneMask(), I, llvm::MCSubRegIndexIterator::isValid(), llvm::MCRegAliasIterator::isValid(), Live, MI, llvm::reverse(), and llvm::MCRegisterInfo::subregs_inclusive().
void llvm::rdf::Liveness::resetLiveIns | ( | ) |
Definition at line 895 of file RDFLiveness.cpp.
References B, llvm::rdf::DataFlowGraph::getMF(), I, and llvm::rdf::RegisterAggr::refs().
|
inline |
Definition at line 108 of file RDFLiveness.h.
References T.