LLVM  7.0.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::rdf::DataFlowGraph Struct Reference

#include "Target/Hexagon/RDFGraph.h"

Classes

struct  DefStack
 

Public Types

using DefStackMap = std::unordered_map< RegisterId, DefStack >
 

Public Member Functions

 DataFlowGraph (MachineFunction &mf, const TargetInstrInfo &tii, const TargetRegisterInfo &tri, const MachineDominatorTree &mdt, const MachineDominanceFrontier &mdf, const TargetOperandInfo &toi)
 
NodeBase * ptr (NodeId N) const
 
template<typename T >
T ptr (NodeId N) const
 
NodeId id (const NodeBase *P) const
 
template<typename T >
NodeAddr< T > addr (NodeId N) const
 
NodeAddr< FuncNode * > getFunc () const
 
MachineFunction & getMF () const
 
const TargetInstrInfo & getTII () const
 
const TargetRegisterInfo & getTRI () const
 
const PhysicalRegisterInfo & getPRI () const
 
const MachineDominatorTree & getDT () const
 
const MachineDominanceFrontier & getDF () const
 
const RegisterAggr & getLiveIns () const
 
void build (unsigned Options=BuildOptions::None)
 
void pushAllDefs (NodeAddr< InstrNode *> IA, DefStackMap &DM)
 
void markBlock (NodeId B, DefStackMap &DefM)
 
void releaseBlock (NodeId B, DefStackMap &DefM)
 
PackedRegisterRef pack (RegisterRef RR)
 
PackedRegisterRef pack (RegisterRef RR) const
 
RegisterRef unpack (PackedRegisterRef PR) const
 
RegisterRef makeRegRef (unsigned Reg, unsigned Sub) const
 
RegisterRef makeRegRef (const MachineOperand &Op) const
 
RegisterRef restrictRef (RegisterRef AR, RegisterRef BR) const
 
NodeAddr< RefNode * > getNextRelated (NodeAddr< InstrNode *> IA, NodeAddr< RefNode *> RA) const
 
NodeAddr< RefNode * > getNextImp (NodeAddr< InstrNode *> IA, NodeAddr< RefNode *> RA, bool Create)
 
NodeAddr< RefNode * > getNextImp (NodeAddr< InstrNode *> IA, NodeAddr< RefNode *> RA) const
 
NodeAddr< RefNode * > getNextShadow (NodeAddr< InstrNode *> IA, NodeAddr< RefNode *> RA, bool Create)
 
NodeAddr< RefNode * > getNextShadow (NodeAddr< InstrNode *> IA, NodeAddr< RefNode *> RA) const
 
NodeList getRelatedRefs (NodeAddr< InstrNode *> IA, NodeAddr< RefNode *> RA) const
 
NodeAddr< BlockNode * > findBlock (MachineBasicBlock *BB) const
 
void unlinkUse (NodeAddr< UseNode *> UA, bool RemoveFromOwner)
 
void unlinkDef (NodeAddr< DefNode *> DA, bool RemoveFromOwner)
 

Static Public Member Functions

template<uint16_t Kind>
static bool IsRef (const NodeAddr< NodeBase *> BA)
 
template<uint16_t Kind>
static bool IsCode (const NodeAddr< NodeBase *> BA)
 
static bool IsDef (const NodeAddr< NodeBase *> BA)
 
static bool IsUse (const NodeAddr< NodeBase *> BA)
 
static bool IsPhi (const NodeAddr< NodeBase *> BA)
 
static bool IsPreservingDef (const NodeAddr< DefNode *> DA)
 

Detailed Description

Definition at line 645 of file RDFGraph.h.

Member Typedef Documentation

◆ DefStackMap

Definition at line 734 of file RDFGraph.h.

Constructor & Destructor Documentation

◆ DataFlowGraph()

DataFlowGraph::DataFlowGraph ( MachineFunction &  mf,
const TargetInstrInfo &  tii,
const TargetRegisterInfo &  tri,
const MachineDominatorTree &  mdt,
const MachineDominanceFrontier &  mdf,
const TargetOperandInfo &  toi 
)

Definition at line 670 of file RDFGraph.cpp.

References llvm::SIInstrFlags::DS.

Member Function Documentation

◆ addr()

template<typename T >
NodeAddr<T> llvm::rdf::DataFlowGraph::addr ( NodeId  N) const
inline

◆ build()

void DataFlowGraph::build ( unsigned  Options = BuildOptions::None)

◆ findBlock()

NodeAddr<BlockNode*> llvm::rdf::DataFlowGraph::findBlock ( MachineBasicBlock *  BB) const
inline

Definition at line 769 of file RDFGraph.h.

Referenced by build(), getNextShadow(), and llvm::rdf::CopyPropagation::interpretAsCopy().

◆ getDF()

const MachineDominanceFrontier& llvm::rdf::DataFlowGraph::getDF ( ) const
inline

Definition at line 667 of file RDFGraph.h.

◆ getDT()

const MachineDominatorTree& llvm::rdf::DataFlowGraph::getDT ( ) const
inline

Definition at line 666 of file RDFGraph.h.

◆ getFunc()

NodeAddr<FuncNode*> llvm::rdf::DataFlowGraph::getFunc ( ) const
inline

Definition at line 661 of file RDFGraph.h.

References llvm::rdf::NodeAttrs::Func.

◆ getLiveIns()

const RegisterAggr& llvm::rdf::DataFlowGraph::getLiveIns ( ) const
inline

Definition at line 668 of file RDFGraph.h.

◆ getMF()

MachineFunction& llvm::rdf::DataFlowGraph::getMF ( ) const
inline

Definition at line 662 of file RDFGraph.h.

Referenced by llvm::rdf::CopyPropagation::run().

◆ getNextImp() [1/2]

NodeAddr<RefNode*> llvm::rdf::DataFlowGraph::getNextImp ( NodeAddr< InstrNode *>  IA,
NodeAddr< RefNode *>  RA,
bool  Create 
)

◆ getNextImp() [2/2]

NodeAddr<RefNode*> llvm::rdf::DataFlowGraph::getNextImp ( NodeAddr< InstrNode *>  IA,
NodeAddr< RefNode *>  RA 
) const

◆ getNextRelated()

NodeAddr< RefNode * > DataFlowGraph::getNextRelated ( NodeAddr< InstrNode *>  IA,
NodeAddr< RefNode *>  RA 
) const

◆ getNextShadow() [1/2]

NodeAddr< RefNode * > DataFlowGraph::getNextShadow ( NodeAddr< InstrNode *>  IA,
NodeAddr< RefNode *>  RA,
bool  Create 
)

◆ getNextShadow() [2/2]

NodeAddr< RefNode * > DataFlowGraph::getNextShadow ( NodeAddr< InstrNode *>  IA,
NodeAddr< RefNode *>  RA 
) const

Definition at line 1255 of file RDFGraph.cpp.

References llvm::rdf::CodeNode::addMember(), llvm::rdf::NodeAddr< T >::Addr, llvm::rdf::PhysicalRegisterInfo::alias(), assert(), llvm::rdf::DataFlowGraph::DefStack::bottom(), llvm::rdf::NodeAttrs::Clobbering, llvm::rdf::NodeAttrs::Dead, llvm::rdf::NodeAttrs::Def, llvm::SIInstrFlags::DS, E, llvm::SetVector< T, Vector, Set >::empty(), llvm::rdf::DataFlowGraph::DefStack::empty(), llvm::MachineDominanceFrontier::end(), F(), llvm::MachineDominanceFrontier::find(), findBlock(), llvm::rdf::NodeAttrs::Fixed, llvm::rdf::BlockNode::getCode(), llvm::rdf::CodeNode::getFirstMember(), llvm::rdf::NodeBase::getFlags(), llvm::rdf::NodeBase::getKind(), getNextShadow(), llvm::MachineDominatorTree::getNode(), llvm::MachineInstr::getNumOperands(), llvm::MCRegisterInfo::getNumRegs(), llvm::MachineInstr::getOperand(), llvm::rdf::DefNode::getReachedDef(), llvm::rdf::DefNode::getReachedUse(), llvm::rdf::RefNode::getReachingDef(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getRegMask(), llvm::rdf::RefNode::getRegRef(), llvm::rdf::RefNode::getSibling(), llvm::rdf::RegisterAggr::hasAliasOf(), llvm::rdf::RegisterAggr::hasCoverOf(), I, llvm::rdf::NodeAddr< T >::Id, llvm::tgtok::In, llvm::SetVector< T, Vector, Set >::insert(), llvm::rdf::RegisterAggr::insert(), llvm::MachineInstr::isBranch(), llvm::MachineInstr::isCall(), llvm::rdf::TargetOperandInfo::isClobbering(), llvm::rdf::RegisterAggr::isCoverOf(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isDef(), llvm::rdf::RefNode::isDef(), IsDef(), llvm::MachineBasicBlock::isEHPad(), llvm::rdf::TargetOperandInfo::isFixedReg(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isImplicit(), llvm::MachineInstr::isIndirectBranch(), IsPhi(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::rdf::TargetOperandInfo::isPreserving(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isRegMask(), llvm::MachineOperand::isSymbol(), llvm::MachineOperand::isUndef(), llvm::MachineOperand::isUse(), IsUse(), Kind, llvm_unreachable, makeRegRef(), markBlock(), llvm::rdf::CodeNode::members(), llvm::rdf::CodeNode::members_if(), N, llvm::rdf::NodeAttrs::None, llvm::MachineInstr::operands(), llvm::rdf::NodeAttrs::PhiRef, llvm::MachineBasicBlock::predecessors(), llvm::rdf::NodeAttrs::Preserving, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), RA, llvm::rdf::RegisterRef::Reg, releaseBlock(), llvm::SetVector< T, Vector, Set >::remove(), llvm::rdf::CodeNode::removeMember(), llvm::NVPTX::PTXCvtMode::RM, llvm::rdf::NodeAttrs::Shadow, llvm::sort(), llvm::rdf::NodeAttrs::Stmt, llvm::MachineBasicBlock::successors(), llvm::X86II::TA, llvm::rdf::DataFlowGraph::DefStack::top(), llvm::rdf::NodeAttrs::Undef, unlinkDef(), unlinkUse(), llvm::rdf::NodeAttrs::Use, and X.

◆ getPRI()

const PhysicalRegisterInfo& llvm::rdf::DataFlowGraph::getPRI ( ) const
inline

Definition at line 665 of file RDFGraph.h.

◆ getRelatedRefs()

NodeList DataFlowGraph::getRelatedRefs ( NodeAddr< InstrNode *>  IA,
NodeAddr< RefNode *>  RA 
) const

Definition at line 1147 of file RDFGraph.cpp.

References assert(), and llvm::rdf::NodeAddr< T >::Id.

Referenced by pushAllDefs().

◆ getTII()

const TargetInstrInfo& llvm::rdf::DataFlowGraph::getTII ( ) const
inline

Definition at line 663 of file RDFGraph.h.

References TII.

◆ getTRI()

const TargetRegisterInfo& llvm::rdf::DataFlowGraph::getTRI ( ) const
inline

Definition at line 664 of file RDFGraph.h.

References TRI.

Referenced by llvm::rdf::CopyPropagation::interpretAsCopy(), and llvm::rdf::CopyPropagation::run().

◆ id()

NodeId DataFlowGraph::id ( const NodeBase *  P) const

◆ IsCode()

template<uint16_t Kind>
static bool llvm::rdf::DataFlowGraph::IsCode ( const NodeAddr< NodeBase *>  BA)
inlinestatic

◆ IsDef()

static bool llvm::rdf::DataFlowGraph::IsDef ( const NodeAddr< NodeBase *>  BA)
inlinestatic

◆ IsPhi()

static bool llvm::rdf::DataFlowGraph::IsPhi ( const NodeAddr< NodeBase *>  BA)
inlinestatic

◆ IsPreservingDef()

static bool llvm::rdf::DataFlowGraph::IsPreservingDef ( const NodeAddr< DefNode *>  DA)
inlinestatic

◆ IsRef()

template<uint16_t Kind>
static bool llvm::rdf::DataFlowGraph::IsRef ( const NodeAddr< NodeBase *>  BA)
inlinestatic

Definition at line 787 of file RDFGraph.h.

References llvm::rdf::NodeAddr< T >::Addr, Kind, and llvm::rdf::NodeAttrs::Ref.

◆ IsUse()

static bool llvm::rdf::DataFlowGraph::IsUse ( const NodeAddr< NodeBase *>  BA)
inlinestatic

◆ makeRegRef() [1/2]

RegisterRef DataFlowGraph::makeRegRef ( unsigned  Reg,
unsigned  Sub 
) const

◆ makeRegRef() [2/2]

RegisterRef DataFlowGraph::makeRegRef ( const MachineOperand &  Op) const

◆ markBlock()

void DataFlowGraph::markBlock ( NodeId  B,
DefStackMap &  DefM 
)

Definition at line 1017 of file RDFGraph.cpp.

References E, and I.

Referenced by getNextShadow().

◆ pack() [1/2]

PackedRegisterRef llvm::rdf::DataFlowGraph::pack ( RegisterRef  RR)
inline

Definition at line 741 of file RDFGraph.h.

References llvm::rdf::RegisterRef::Mask, and llvm::rdf::RegisterRef::Reg.

Referenced by llvm::rdf::RefNode::setRegRef().

◆ pack() [2/2]

PackedRegisterRef llvm::rdf::DataFlowGraph::pack ( RegisterRef  RR) const
inline

Definition at line 744 of file RDFGraph.h.

References llvm::rdf::RegisterRef::Mask, and llvm::rdf::RegisterRef::Reg.

◆ ptr() [1/2]

NodeBase * DataFlowGraph::ptr ( NodeId  N) const

Definition at line 783 of file RDFGraph.cpp.

◆ ptr() [2/2]

template<typename T >
T llvm::rdf::DataFlowGraph::ptr ( NodeId  N) const
inline

Definition at line 651 of file RDFGraph.h.

References P.

◆ pushAllDefs()

void DataFlowGraph::pushAllDefs ( NodeAddr< InstrNode *>  IA,
DefStackMap &  DM 
)

◆ releaseBlock()

void DataFlowGraph::releaseBlock ( NodeId  B,
DefStackMap &  DefM 
)

Definition at line 1024 of file RDFGraph.cpp.

References E, and I.

Referenced by getNextShadow().

◆ restrictRef()

RegisterRef DataFlowGraph::restrictRef ( RegisterRef  AR,
RegisterRef  BR 
) const

◆ unlinkDef()

void llvm::rdf::DataFlowGraph::unlinkDef ( NodeAddr< DefNode *>  DA,
bool  RemoveFromOwner 
)
inline

Definition at line 779 of file RDFGraph.h.

Referenced by getNextShadow().

◆ unlinkUse()

void llvm::rdf::DataFlowGraph::unlinkUse ( NodeAddr< UseNode *>  UA,
bool  RemoveFromOwner 
)
inline

Definition at line 773 of file RDFGraph.h.

Referenced by getNextShadow(), and llvm::rdf::CopyPropagation::run().

◆ unpack()

RegisterRef llvm::rdf::DataFlowGraph::unpack ( PackedRegisterRef  PR) const
inline

The documentation for this struct was generated from the following files: