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

#include "llvm/CodeGen/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)
 
 DataFlowGraph (MachineFunction &mf, const TargetInstrInfo &tii, const TargetRegisterInfo &tri, const MachineDominatorTree &mdt, const MachineDominanceFrontier &mdf, const TargetOperandInfo &toi)
 
NodeBaseptr (NodeId N) const
 
template<typename T >
T ptr (NodeId N) const
 
NodeId id (const NodeBase *P) const
 
template<typename T >
NodeAddr< Taddr (NodeId N) const
 
NodeAddr< FuncNode * > getFunc () const
 
MachineFunctiongetMF () const
 
const TargetInstrInfogetTII () const
 
const TargetRegisterInfogetTRI () const
 
const PhysicalRegisterInfogetPRI () const
 
const MachineDominatorTreegetDT () const
 
const MachineDominanceFrontiergetDF () const
 
const RegisterAggrgetLiveIns () 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
 
NodeAddr< RefNode * > getNextRelated (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 737 of file RDFGraph.h.

Constructor & Destructor Documentation

◆ DataFlowGraph() [1/2]

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

Definition at line 649 of file RDFGraph.cpp.

◆ DataFlowGraph() [2/2]

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

Definition at line 657 of file RDFGraph.cpp.

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 767 of file RDFGraph.h.

References BB.

Referenced by build(), and llvm::rdf::Liveness::getNearestAliasedRef().

◆ getDF()

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

Definition at line 670 of file RDFGraph.h.

◆ getDT()

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

Definition at line 669 of file RDFGraph.h.

◆ getFunc()

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

◆ getLiveIns()

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

Definition at line 671 of file RDFGraph.h.

Referenced by llvm::rdf::Liveness::computeLiveIns().

◆ getMF()

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

◆ 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 
) const

◆ getNextShadow() [2/2]

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

◆ getPRI()

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

Definition at line 668 of file RDFGraph.h.

◆ getRelatedRefs()

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

◆ getTII()

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

Definition at line 666 of file RDFGraph.h.

◆ getTRI()

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

◆ id()

NodeId DataFlowGraph::id ( const NodeBase P) const

Definition at line 779 of file RDFGraph.cpp.

References P.

Referenced by llvm::rdf::CodeNode::addMember().

◆ 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

◆ IsUse()

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

◆ makeRegRef() [1/2]

RegisterRef DataFlowGraph::makeRegRef ( const MachineOperand Op) const

◆ makeRegRef() [2/2]

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

◆ markBlock()

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

Definition at line 989 of file RDFGraph.cpp.

References B, and P.

◆ pack() [1/2]

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

◆ pack() [2/2]

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

◆ ptr() [1/2]

NodeBase * DataFlowGraph::ptr ( NodeId  N) const

Definition at line 772 of file RDFGraph.cpp.

References N.

Referenced by ptr().

◆ ptr() [2/2]

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

Definition at line 654 of file RDFGraph.h.

References N, ptr(), and T.

◆ pushAllDefs()

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

Definition at line 1014 of file RDFGraph.cpp.

References llvm::AArch64PACKey::IA.

◆ releaseBlock()

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

Definition at line 996 of file RDFGraph.cpp.

References B, E, I, and P.

◆ unlinkDef()

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

Definition at line 777 of file RDFGraph.h.

References llvm::AArch64PACKey::DA.

Referenced by llvm::rdf::DeadCodeElimination::erase().

◆ unlinkUse()

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

◆ unpack()

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

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