mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-18 17:39:04 +00:00
minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35807 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
89b1f46a10
commit
8645fb9524
@ -48,19 +48,6 @@ using namespace llvm;
|
||||
static RegisterPass<ImmediateDominators>
|
||||
C("idom", "Immediate Dominators Construction", true);
|
||||
|
||||
namespace {
|
||||
class DFCalculateWorkObject {
|
||||
public:
|
||||
DFCalculateWorkObject(BasicBlock *B, BasicBlock *P,
|
||||
const DominatorTree::Node *N,
|
||||
const DominatorTree::Node *PN)
|
||||
: currentBB(B), parentBB(P), Node(N), parentNode(PN) {}
|
||||
BasicBlock *currentBB;
|
||||
BasicBlock *parentBB;
|
||||
const DominatorTree::Node *Node;
|
||||
const DominatorTree::Node *parentNode;
|
||||
};
|
||||
}
|
||||
unsigned ImmediateDominators::DFSPass(BasicBlock *V, InfoRec &VInfo,
|
||||
unsigned N) {
|
||||
VInfo.Semi = ++N;
|
||||
@ -362,6 +349,20 @@ void DominatorTreeBase::print(std::ostream &o, const Module* ) const {
|
||||
static RegisterPass<DominanceFrontier>
|
||||
G("domfrontier", "Dominance Frontier Construction", true);
|
||||
|
||||
namespace {
|
||||
class DFCalculateWorkObject {
|
||||
public:
|
||||
DFCalculateWorkObject(BasicBlock *B, BasicBlock *P,
|
||||
const DominatorTree::Node *N,
|
||||
const DominatorTree::Node *PN)
|
||||
: currentBB(B), parentBB(P), Node(N), parentNode(PN) {}
|
||||
BasicBlock *currentBB;
|
||||
BasicBlock *parentBB;
|
||||
const DominatorTree::Node *Node;
|
||||
const DominatorTree::Node *parentNode;
|
||||
};
|
||||
}
|
||||
|
||||
const DominanceFrontier::DomSetType &
|
||||
DominanceFrontier::calculate(const DominatorTree &DT,
|
||||
const DominatorTree::Node *Node) {
|
||||
@ -406,7 +407,8 @@ DominanceFrontier::calculate(const DominatorTree &DT,
|
||||
DominatorTree::Node *IDominee = *NI;
|
||||
BasicBlock *childBB = IDominee->getBlock();
|
||||
if (visited.count(childBB) == 0) {
|
||||
workList.push_back(DFCalculateWorkObject(childBB, currentBB, IDominee, currentNode));
|
||||
workList.push_back(DFCalculateWorkObject(childBB, currentBB,
|
||||
IDominee, currentNode));
|
||||
visitChild = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user