OpenASIP
2.0
|
#include <VirtRegIndependenceGraph.hh>
Public Member Functions | |
VirtRegIndependenceGraph (llvm::MachineFunction &mf, llvm::VirtRegMap &vrm) | |
int | newFalseDepsFromAssign (llvm::LiveInterval *interval, MachineInstrDDG::Register physReg) |
void | addNode (MachineInstrDDG::Register virtReg) |
void | addEdge (MachineInstrDDG::Register nodeA, MachineInstrDDG::Register nodeB) |
std::set< MachineInstrDDG::Register > | adjacentNodes (MachineInstrDDG::Register node) |
Private Types | |
typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, boost::property< boost::vertex_name_t, MachineInstrDDG::Register > > | FDPG |
Private Attributes | |
llvm::VirtRegMap & | vrm_ |
FDPG | fdpg_ |
std::map< MachineInstrDDG::Register, FDPG::vertex_descriptor > | vertexMap_ |
std::map< FDPG::vertex_descriptor, MachineInstrDDG::Register > | vregMap_ |
Virtual register independence graph AKA False Dependence Prevention Graph (FDPG).
Nodes in the graph are virtual registers. They have edges between if the live ranges could be scheduled in parallel or reordered if there were no false dependencies. In other words, two virtual registers / live ranges / variables are considered independent in case they do not have real data dependencies between them.
Definition at line 80 of file VirtRegIndependenceGraph.hh.
|
private |
Definition at line 99 of file VirtRegIndependenceGraph.hh.
VirtRegIndependenceGraph::VirtRegIndependenceGraph | ( | llvm::MachineFunction & | mf, |
llvm::VirtRegMap & | vrm | ||
) |
Constructs the graph from an LLVM MachineFunction.
Definition at line 46 of file VirtRegIndependenceGraph.cc.
References abortWithError, addEdge(), addNode(), MachineInstrDDG::allRegisters(), fdpg_, BoostGraph< GraphNode, GraphEdge >::findAllPaths(), BoostGraph< GraphNode, GraphEdge >::hasPath(), Application::logStream(), and MachineInstrDDG::vregDefiner().
void VirtRegIndependenceGraph::addEdge | ( | MachineInstrDDG::Register | nodeA, |
MachineInstrDDG::Register | nodeB | ||
) |
Definition at line 149 of file VirtRegIndependenceGraph.cc.
References fdpg_, and vertexMap_.
Referenced by VirtRegIndependenceGraph().
void VirtRegIndependenceGraph::addNode | ( | MachineInstrDDG::Register | virtReg | ) |
Definition at line 142 of file VirtRegIndependenceGraph.cc.
References fdpg_, vertexMap_, and vregMap_.
Referenced by VirtRegIndependenceGraph().
std::set< MachineInstrDDG::Register > VirtRegIndependenceGraph::adjacentNodes | ( | MachineInstrDDG::Register | node | ) |
Definition at line 155 of file VirtRegIndependenceGraph.cc.
References fdpg_, vertexMap_, and vregMap_.
Referenced by newFalseDepsFromAssign().
int VirtRegIndependenceGraph::newFalseDepsFromAssign | ( | llvm::LiveInterval * | interval, |
MachineInstrDDG::Register | physReg | ||
) |
Returns the number of new false deps introduced by assigning the given physical register to the given live interval.
Definition at line 114 of file VirtRegIndependenceGraph.cc.
References adjacentNodes(), Application::logStream(), and vrm_.
|
private |
Definition at line 104 of file VirtRegIndependenceGraph.hh.
Referenced by addEdge(), addNode(), adjacentNodes(), and VirtRegIndependenceGraph().
|
private |
Definition at line 106 of file VirtRegIndependenceGraph.hh.
Referenced by addEdge(), addNode(), and adjacentNodes().
|
private |
Definition at line 107 of file VirtRegIndependenceGraph.hh.
Referenced by addNode(), and adjacentNodes().
|
private |
Definition at line 102 of file VirtRegIndependenceGraph.hh.
Referenced by newFalseDepsFromAssign().