summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-06-04 00:32:22 +0000
committerDevang Patel <dpatel@apple.com>2007-06-04 00:32:22 +0000
commit26042420d642e810f5cdfb2da6156b74aaf80945 (patch)
tree4def1d88dd9e52a242b5429d93aacda9f076509e /lib/Transforms
parent0fa6b37c6fca4c7abe544df82cc6e021aff892a6 (diff)
downloadllvm-26042420d642e810f5cdfb2da6156b74aaf80945.tar.gz
llvm-26042420d642e810f5cdfb2da6156b74aaf80945.tar.bz2
llvm-26042420d642e810f5cdfb2da6156b74aaf80945.tar.xz
s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp4
-rw-r--r--lib/Transforms/Scalar/GCSE.cpp2
-rw-r--r--lib/Transforms/Scalar/GVNPRE.cpp8
-rw-r--r--lib/Transforms/Scalar/LICM.cpp16
-rw-r--r--lib/Transforms/Scalar/PredicateSimplifier.cpp22
-rw-r--r--lib/Transforms/Utils/BreakCriticalEdges.cpp8
-rw-r--r--lib/Transforms/Utils/LCSSA.cpp16
-rw-r--r--lib/Transforms/Utils/LoopSimplify.cpp6
8 files changed, 41 insertions, 41 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index 5bfb587cbe..4968fc9ed7 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/lib/Transforms/Scalar/ADCE.cpp
@@ -387,8 +387,8 @@ bool ADCE::doADCE() {
// postdominator that is alive, and the last postdominator that is
// dead...
//
- PostDominatorTree::DomTreeNode *LastNode = DT[TI->getSuccessor(i)];
- PostDominatorTree::DomTreeNode *NextNode = 0;
+ DomTreeNode *LastNode = DT[TI->getSuccessor(i)];
+ DomTreeNode *NextNode = 0;
if (LastNode) {
NextNode = LastNode->getIDom();
diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp
index eb68f5a272..d9f57c486c 100644
--- a/lib/Transforms/Scalar/GCSE.cpp
+++ b/lib/Transforms/Scalar/GCSE.cpp
@@ -94,7 +94,7 @@ bool GCSE::runOnFunction(Function &F) {
// Traverse the CFG of the function in dominator order, so that we see each
// instruction after we see its operands.
- for (df_iterator<DominatorTree::DomTreeNode*> DI = df_begin(DT.getRootNode()),
+ for (df_iterator<DomTreeNode*> DI = df_begin(DT.getRootNode()),
E = df_end(DT.getRootNode()); DI != E; ++DI) {
BasicBlock *BB = DI->getBlock();
diff --git a/lib/Transforms/Scalar/GVNPRE.cpp b/lib/Transforms/Scalar/GVNPRE.cpp
index f3ca084df4..f4c002cf41 100644
--- a/lib/Transforms/Scalar/GVNPRE.cpp
+++ b/lib/Transforms/Scalar/GVNPRE.cpp
@@ -88,7 +88,7 @@ namespace {
// For a given block, calculate the generated expressions, temporaries,
// and the AVAIL_OUT set
void CalculateAvailOut(ValueTable& VN, std::set<Value*, ExprLT>& MS,
- DominatorTree::DomTreeNode* DI,
+ DomTreeNode* DI,
std::set<Value*, ExprLT>& currExps,
std::set<PHINode*>& currPhis,
std::set<Value*>& currTemps,
@@ -271,7 +271,7 @@ void GVNPRE::dump_unique(GVNPRE::ValueTable& VN, std::set<Value*, ExprLT>& s) {
}
void GVNPRE::CalculateAvailOut(GVNPRE::ValueTable& VN, std::set<Value*, ExprLT>& MS,
- DominatorTree::DomTreeNode* DI,
+ DomTreeNode* DI,
std::set<Value*, ExprLT>& currExps,
std::set<PHINode*>& currPhis,
std::set<Value*>& currTemps,
@@ -333,7 +333,7 @@ bool GVNPRE::runOnFunction(Function &F) {
// First Phase of BuildSets - calculate AVAIL_OUT
// Top-down walk of the dominator tree
- for (df_iterator<DominatorTree::DomTreeNode*> DI = df_begin(DT.getRootNode()),
+ for (df_iterator<DomTreeNode*> DI = df_begin(DT.getRootNode()),
E = df_end(DT.getRootNode()); DI != E; ++DI) {
// Get the sets to update for this block
@@ -359,7 +359,7 @@ bool GVNPRE::runOnFunction(Function &F) {
std::set<Value*, ExprLT> anticOut;
// Top-down walk of the postdominator tree
- for (df_iterator<PostDominatorTree::DomTreeNode*> PDI =
+ for (df_iterator<DomTreeNode*> PDI =
df_begin(PDT.getRootNode()), E = df_end(DT.getRootNode());
PDI != E; ++PDI) {
BasicBlock* BB = PDI->getBlock();
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 81284d4f52..1680e43fe4 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -107,7 +107,7 @@ namespace {
/// visit uses before definitions, allowing us to sink a loop body in one
/// pass without iteration.
///
- void SinkRegion(DominatorTree::DomTreeNode *N);
+ void SinkRegion(DomTreeNode *N);
/// HoistRegion - Walk the specified region of the CFG (defined by all
/// blocks dominated by the specified block, and that are in the current
@@ -115,7 +115,7 @@ namespace {
/// visit definitions before uses, allowing us to hoist a loop body in one
/// pass without iteration.
///
- void HoistRegion(DominatorTree::DomTreeNode *N);
+ void HoistRegion(DomTreeNode *N);
/// inSubLoop - Little predicate that returns true if the specified basic
/// block is in a subloop of the current one, not the current one itself.
@@ -140,8 +140,8 @@ namespace {
if (BlockInLoop == LoopHeader)
return true;
- DominatorTree::DomTreeNode *BlockInLoopNode = DT->getNode(BlockInLoop);
- DominatorTree::DomTreeNode *IDom = DT->getNode(ExitBlock);
+ DomTreeNode *BlockInLoopNode = DT->getNode(BlockInLoop);
+ DomTreeNode *IDom = DT->getNode(ExitBlock);
// Because the exit block is not in the loop, we know we have to get _at
// least_ its immediate dominator.
@@ -281,7 +281,7 @@ bool LICM::runOnLoop(Loop *L, LPPassManager &LPM) {
/// uses before definitions, allowing us to sink a loop body in one pass without
/// iteration.
///
-void LICM::SinkRegion(DominatorTree::DomTreeNode *N) {
+void LICM::SinkRegion(DomTreeNode *N) {
assert(N != 0 && "Null dominator tree node?");
BasicBlock *BB = N->getBlock();
@@ -289,7 +289,7 @@ void LICM::SinkRegion(DominatorTree::DomTreeNode *N) {
if (!CurLoop->contains(BB)) return;
// We are processing blocks in reverse dfo, so process children first...
- const std::vector<DominatorTree::DomTreeNode*> &Children = N->getChildren();
+ const std::vector<DomTreeNode*> &Children = N->getChildren();
for (unsigned i = 0, e = Children.size(); i != e; ++i)
SinkRegion(Children[i]);
@@ -318,7 +318,7 @@ void LICM::SinkRegion(DominatorTree::DomTreeNode *N) {
/// first order w.r.t the DominatorTree. This allows us to visit definitions
/// before uses, allowing us to hoist a loop body in one pass without iteration.
///
-void LICM::HoistRegion(DominatorTree::DomTreeNode *N) {
+void LICM::HoistRegion(DomTreeNode *N) {
assert(N != 0 && "Null dominator tree node?");
BasicBlock *BB = N->getBlock();
@@ -340,7 +340,7 @@ void LICM::HoistRegion(DominatorTree::DomTreeNode *N) {
hoist(I);
}
- const std::vector<DominatorTree::DomTreeNode*> &Children = N->getChildren();
+ const std::vector<DomTreeNode*> &Children = N->getChildren();
for (unsigned i = 0, e = Children.size(); i != e; ++i)
HoistRegion(Children[i]);
}
diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp
index 5385c1a818..eedf2c2d46 100644
--- a/lib/Transforms/Scalar/PredicateSimplifier.cpp
+++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp
@@ -1986,7 +1986,7 @@ namespace {
UnreachableBlocks UB;
ValueRanges *VR;
- std::vector<DominatorTree::DomTreeNode *> WorkList;
+ std::vector<DomTreeNode *> WorkList;
public:
static char ID; // Pass identification, replacement for typeid
@@ -2012,14 +2012,14 @@ namespace {
class VISIBILITY_HIDDEN Forwards : public InstVisitor<Forwards> {
friend class InstVisitor<Forwards>;
PredicateSimplifier *PS;
- DominatorTree::DomTreeNode *DTNode;
+ DomTreeNode *DTNode;
public:
InequalityGraph &IG;
UnreachableBlocks &UB;
ValueRanges &VR;
- Forwards(PredicateSimplifier *PS, DominatorTree::DomTreeNode *DTNode)
+ Forwards(PredicateSimplifier *PS, DomTreeNode *DTNode)
: PS(PS), DTNode(DTNode), IG(*PS->IG), UB(PS->UB), VR(*PS->VR) {}
void visitTerminatorInst(TerminatorInst &TI);
@@ -2040,19 +2040,19 @@ namespace {
// Used by terminator instructions to proceed from the current basic
// block to the next. Verifies that "current" dominates "next",
// then calls visitBasicBlock.
- void proceedToSuccessors(DominatorTree::DomTreeNode *Current) {
- for (DominatorTree::DomTreeNode::iterator I = Current->begin(),
+ void proceedToSuccessors(DomTreeNode *Current) {
+ for (DomTreeNode::iterator I = Current->begin(),
E = Current->end(); I != E; ++I) {
WorkList.push_back(*I);
}
}
- void proceedToSuccessor(DominatorTree::DomTreeNode *Next) {
+ void proceedToSuccessor(DomTreeNode *Next) {
WorkList.push_back(Next);
}
// Visits each instruction in the basic block.
- void visitBasicBlock(DominatorTree::DomTreeNode *Node) {
+ void visitBasicBlock(DomTreeNode *Node) {
BasicBlock *BB = Node->getBlock();
ETNode *ET = Forest->getNodeForBlock(BB);
DOUT << "Entering Basic Block: " << BB->getName()
@@ -2064,7 +2064,7 @@ namespace {
// Tries to simplify each Instruction and add new properties to
// the PropertySet.
- void visitInstruction(Instruction *I, DominatorTree::DomTreeNode *DT, ETNode *ET) {
+ void visitInstruction(Instruction *I, DomTreeNode *DT, ETNode *ET) {
DOUT << "Considering instruction " << *I << "\n";
DEBUG(IG->dump());
@@ -2132,7 +2132,7 @@ namespace {
WorkList.push_back(DT->getRootNode());
do {
- DominatorTree::DomTreeNode *DTNode = WorkList.back();
+ DomTreeNode *DTNode = WorkList.back();
WorkList.pop_back();
if (!UB.isDead(DTNode->getBlock())) visitBasicBlock(DTNode);
} while (!WorkList.empty());
@@ -2164,7 +2164,7 @@ namespace {
return;
}
- for (DominatorTree::DomTreeNode::iterator I = DTNode->begin(), E = DTNode->end();
+ for (DomTreeNode::iterator I = DTNode->begin(), E = DTNode->end();
I != E; ++I) {
BasicBlock *Dest = (*I)->getBlock();
DOUT << "Branch thinking about %" << Dest->getName()
@@ -2194,7 +2194,7 @@ namespace {
// Set the EQProperty in each of the cases BBs, and the NEProperties
// in the default BB.
- for (DominatorTree::DomTreeNode::iterator I = DTNode->begin(), E = DTNode->end();
+ for (DomTreeNode::iterator I = DTNode->begin(), E = DTNode->end();
I != E; ++I) {
BasicBlock *BB = (*I)->getBlock();
DOUT << "Switch thinking about BB %" << BB->getName()
diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp
index 03cd533cf2..a234b9cc42 100644
--- a/lib/Transforms/Utils/BreakCriticalEdges.cpp
+++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp
@@ -203,20 +203,20 @@ bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P,
// Should we update DominatorTree information?
if (DominatorTree *DT = P->getAnalysisToUpdate<DominatorTree>()) {
- DominatorTree::DomTreeNode *TINode = DT->getNode(TIBB);
+ DomTreeNode *TINode = DT->getNode(TIBB);
// The new block is not the immediate dominator for any other nodes, but
// TINode is the immediate dominator for the new node.
//
if (TINode) { // Don't break unreachable code!
- DominatorTree::DomTreeNode *NewBBNode = DT->createNewNode(NewBB, TINode);
- DominatorTree::DomTreeNode *DestBBNode = 0;
+ DomTreeNode *NewBBNode = DT->createNewNode(NewBB, TINode);
+ DomTreeNode *DestBBNode = 0;
// If NewBBDominatesDestBB hasn't been computed yet, do so with DT.
if (!OtherPreds.empty()) {
DestBBNode = DT->getNode(DestBB);
while (!OtherPreds.empty() && NewBBDominatesDestBB) {
- if (DominatorTree::DomTreeNode *OPNode = DT->getNode(OtherPreds.back()))
+ if (DomTreeNode *OPNode = DT->getNode(OtherPreds.back()))
NewBBDominatesDestBB = DestBBNode->dominates(OPNode);
OtherPreds.pop_back();
}
diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp
index 84b00b2fdc..c43370be9b 100644
--- a/lib/Transforms/Utils/LCSSA.cpp
+++ b/lib/Transforms/Utils/LCSSA.cpp
@@ -75,8 +75,8 @@ namespace {
void getLoopValuesUsedOutsideLoop(Loop *L,
SetVector<Instruction*> &AffectedValues);
- Value *GetValueForBlock(DominatorTree::DomTreeNode *BB, Instruction *OrigInst,
- std::map<DominatorTree::DomTreeNode*, Value*> &Phis);
+ Value *GetValueForBlock(DomTreeNode *BB, Instruction *OrigInst,
+ std::map<DomTreeNode*, Value*> &Phis);
/// inLoop - returns true if the given block is within the current loop
const bool inLoop(BasicBlock* B) {
@@ -146,16 +146,16 @@ void LCSSA::ProcessInstruction(Instruction *Instr,
++NumLCSSA; // We are applying the transformation
// Keep track of the blocks that have the value available already.
- std::map<DominatorTree::DomTreeNode*, Value*> Phis;
+ std::map<DomTreeNode*, Value*> Phis;
- DominatorTree::DomTreeNode *InstrNode = DT->getNode(Instr->getParent());
+ DomTreeNode *InstrNode = DT->getNode(Instr->getParent());
// Insert the LCSSA phi's into the exit blocks (dominated by the value), and
// add them to the Phi's map.
for (std::vector<BasicBlock*>::const_iterator BBI = exitBlocks.begin(),
BBE = exitBlocks.end(); BBI != BBE; ++BBI) {
BasicBlock *BB = *BBI;
- DominatorTree::DomTreeNode *ExitBBNode = DT->getNode(BB);
+ DomTreeNode *ExitBBNode = DT->getNode(BB);
Value *&Phi = Phis[ExitBBNode];
if (!Phi && InstrNode->dominates(ExitBBNode)) {
PHINode *PN = new PHINode(Instr->getType(), Instr->getName()+".lcssa",
@@ -229,8 +229,8 @@ void LCSSA::getLoopValuesUsedOutsideLoop(Loop *L,
/// GetValueForBlock - Get the value to use within the specified basic block.
/// available values are in Phis.
-Value *LCSSA::GetValueForBlock(DominatorTree::DomTreeNode *BB, Instruction *OrigInst,
- std::map<DominatorTree::DomTreeNode*, Value*> &Phis) {
+Value *LCSSA::GetValueForBlock(DomTreeNode *BB, Instruction *OrigInst,
+ std::map<DomTreeNode*, Value*> &Phis) {
// If there is no dominator info for this BB, it is unreachable.
if (BB == 0)
return UndefValue::get(OrigInst->getType());
@@ -239,7 +239,7 @@ Value *LCSSA::GetValueForBlock(DominatorTree::DomTreeNode *BB, Instruction *Orig
Value *&V = Phis[BB];
if (V) return V;
- DominatorTree::DomTreeNode *IDom = BB->getIDom();
+ DomTreeNode *IDom = BB->getIDom();
// Otherwise, there are two cases: we either have to insert a PHI node or we
// don't. We need to insert a PHI node if this block is not dominated by one
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp
index 67ffa71202..f641264f12 100644
--- a/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/lib/Transforms/Utils/LoopSimplify.cpp
@@ -778,15 +778,15 @@ void LoopSimplify::UpdateDomInfoForRevectoredPreds(BasicBlock *NewBB,
}
assert(NewBBIDom && "No immediate dominator found??");
}
- DominatorTree::DomTreeNode *NewBBIDomNode = DT->getNode(NewBBIDom);
+ DomTreeNode *NewBBIDomNode = DT->getNode(NewBBIDom);
// Create the new dominator tree node... and set the idom of NewBB.
- DominatorTree::DomTreeNode *NewBBNode = DT->createNewNode(NewBB, NewBBIDomNode);
+ DomTreeNode *NewBBNode = DT->createNewNode(NewBB, NewBBIDomNode);
// If NewBB strictly dominates other blocks, then it is now the immediate
// dominator of NewBBSucc. Update the dominator tree as appropriate.
if (NewBBDominatesNewBBSucc) {
- DominatorTree::DomTreeNode *NewBBSuccNode = DT->getNode(NewBBSucc);
+ DomTreeNode *NewBBSuccNode = DT->getNode(NewBBSucc);
DT->changeImmediateDominator(NewBBSuccNode, NewBBNode);
}
}