1
0
mirror of https://github.com/RPCSX/llvm.git synced 2025-04-04 09:11:43 +00:00

Drop graph_ prefix

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294621 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Berlin 2017-02-09 20:37:46 +00:00
parent c0fb95811a
commit 61d13b1c02
9 changed files with 16 additions and 16 deletions

@ -91,27 +91,27 @@ template <class T> struct GraphTraits<Inverse<Inverse<T>>> : GraphTraits<T> {};
// Provide iterator ranges for the graph traits nodes and children
template <class GraphType>
iterator_range<typename GraphTraits<GraphType>::nodes_iterator>
graph_nodes(const GraphType &G) {
nodes(const GraphType &G) {
return make_range(GraphTraits<GraphType>::nodes_begin(G),
GraphTraits<GraphType>::nodes_end(G));
}
template <class GraphType>
iterator_range<typename GraphTraits<Inverse<GraphType>>::nodes_iterator>
inverse_graph_nodes(const GraphType &G) {
inverse_nodes(const GraphType &G) {
return make_range(GraphTraits<Inverse<GraphType>>::nodes_begin(G),
GraphTraits<Inverse<GraphType>>::nodes_end(G));
}
template <class GraphType>
iterator_range<typename GraphTraits<GraphType>::ChildIteratorType>
graph_children(const typename GraphTraits<GraphType>::NodeRef &G) {
children(const typename GraphTraits<GraphType>::NodeRef &G) {
return make_range(GraphTraits<GraphType>::child_begin(G),
GraphTraits<GraphType>::child_end(G));
}
template <class GraphType>
iterator_range<typename GraphTraits<Inverse<GraphType>>::ChildIteratorType>
inverse_graph_children(const typename GraphTraits<GraphType>::NodeRef &G) {
inverse_children(const typename GraphTraits<GraphType>::NodeRef &G) {
return make_range(GraphTraits<Inverse<GraphType>>::child_begin(G),
GraphTraits<Inverse<GraphType>>::child_end(G));
}

@ -782,7 +782,7 @@ public:
Calculate<FT, NodeT *>(*this, F);
} else {
// Initialize the roots list
for (auto *Node : graph_nodes(&F))
for (auto *Node : nodes(&F))
if (TraitsTy::child_begin(Node) == TraitsTy::child_end(Node))
addRoot(Node);

@ -200,7 +200,7 @@ void Calculate(DominatorTreeBaseByGraphTraits<GraphTraits<NodeT>> &DT,
// initialize the semi dominator to point to the parent node
WInfo.Semi = WInfo.Parent;
for (const auto &N : inverse_graph_children<NodeT>(W))
for (const auto &N : inverse_children<NodeT>(W))
if (DT.Info.count(N)) { // Only if this predecessor is reachable!
unsigned SemiU = DT.Info[Eval<GraphT>(DT, N, i + 1)].Semi;
if (SemiU < WInfo.Semi)

@ -64,7 +64,7 @@ void IDFCalculator<NodeTy>::calculate(
BasicBlock *BB = Node->getBlock();
// Succ is the successor in the direction we are calculating IDF, so it is
// successor for IDF, and predecessor for Reverse IDF.
for (auto *Succ : graph_children<NodeTy>(BB)) {
for (auto *Succ : children<NodeTy>(BB)) {
DomTreeNode *SuccNode = DT.getNode(Succ);
// Quickly skip all CFG edges that are also dominator tree edges instead

@ -912,7 +912,7 @@ void AMDGPUCFGStructurizer::orderBlocks(MachineFunction *MF) {
}
// walk through all the block in func to check for unreachable
for (auto *MBB : graph_nodes(MF)) {
for (auto *MBB : nodes(MF)) {
SccNum = getSCCNum(MBB);
if (SccNum == INVALIDSCCNUM)
dbgs() << "unreachable block BB" << MBB->getNumber() << "\n";
@ -1078,7 +1078,7 @@ int AMDGPUCFGStructurizer::mergeLoop(MachineLoop *LoopRep) {
MachineBasicBlock *ExitBlk = *ExitBlks.begin();
assert(ExitBlk && "Loop has several exit block");
MBBVector LatchBlks;
for (auto *LB : inverse_graph_children<MachineBasicBlock*>(LoopHeader))
for (auto *LB : inverse_children<MachineBasicBlock*>(LoopHeader))
if (LoopRep->contains(LB))
LatchBlks.push_back(LB);

@ -260,7 +260,7 @@ bool HexagonBitSimplify::visitBlock(MachineBasicBlock &B, Transformation &T,
RegisterSet NewAVs = AVs;
NewAVs.insert(Defs);
for (auto *DTN : graph_children<MachineDomTreeNode*>(MDT->getNode(&B)))
for (auto *DTN : children<MachineDomTreeNode*>(MDT->getNode(&B)))
Changed |= visitBlock(*(DTN->getBlock()), T, NewAVs);
if (!T.TopDown)
@ -982,7 +982,7 @@ bool DeadCodeElimination::isDead(unsigned R) const {
bool DeadCodeElimination::runOnNode(MachineDomTreeNode *N) {
bool Changed = false;
for (auto *DTN : graph_children<MachineDomTreeNode*>(N))
for (auto *DTN : children<MachineDomTreeNode*>(N))
Changed |= runOnNode(DTN);
MachineBasicBlock *B = N->getBlock();

@ -315,7 +315,7 @@ void HexagonCommonGEP::getBlockTraversalOrder(BasicBlock *Root,
// visited".
Order.push_back(Root);
for (auto *DTN : graph_children<DomTreeNode*>(DT->getNode(Root)))
for (auto *DTN : children<DomTreeNode*>(DT->getNode(Root)))
getBlockTraversalOrder(DTN->getBlock(), Order);
}
@ -1232,7 +1232,7 @@ void HexagonCommonGEP::removeDeadCode() {
for (unsigned i = 0; i < BO.size(); ++i) {
BasicBlock *B = cast<BasicBlock>(BO[i]);
for (auto DTN : graph_children<DomTreeNode*>(DT->getNode(B)))
for (auto DTN : children<DomTreeNode*>(DT->getNode(B)))
BO.push_back(DTN->getBlock());
}

@ -221,7 +221,7 @@ bool HexagonGenExtract::convert(Instruction *In) {
bool HexagonGenExtract::visitBlock(BasicBlock *B) {
// Depth-first, bottom-up traversal.
for (auto *DTN : graph_children<DomTreeNode*>(DT->getNode(B)))
for (auto *DTN : children<DomTreeNode*>(DT->getNode(B)))
visitBlock(DTN->getBlock());
// Allow limiting the number of generated extracts for debugging purposes.

@ -947,7 +947,7 @@ void HexagonGenInsert::collectInBlock(MachineBasicBlock *B,
BlockDefs.insert(InsDefs);
}
for (auto *DTN : graph_children<MachineDomTreeNode*>(MDT->getNode(B))) {
for (auto *DTN : children<MachineDomTreeNode*>(MDT->getNode(B))) {
MachineBasicBlock *SB = DTN->getBlock();
collectInBlock(SB, AVs);
}
@ -1420,7 +1420,7 @@ bool HexagonGenInsert::generateInserts() {
bool HexagonGenInsert::removeDeadCode(MachineDomTreeNode *N) {
bool Changed = false;
for (auto *DTN : graph_children<MachineDomTreeNode*>(N))
for (auto *DTN : children<MachineDomTreeNode*>(N))
Changed |= removeDeadCode(DTN);
MachineBasicBlock *B = N->getBlock();