aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar')
-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
5 files changed, 26 insertions, 26 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index 8219855faf..5bfb587cbe 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::Node *LastNode = DT[TI->getSuccessor(i)];
- PostDominatorTree::Node *NextNode = 0;
+ PostDominatorTree::DomTreeNode *LastNode = DT[TI->getSuccessor(i)];
+ PostDominatorTree::DomTreeNode *NextNode = 0;
if (LastNode) {
NextNode = LastNode->getIDom();
diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp
index c46c36a1cb..eb68f5a272 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::Node*> DI = df_begin(DT.getRootNode()),
+ for (df_iterator<DominatorTree::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 6a9a08e430..2a5e0f3fa7 100644
--- a/lib/Transforms/Scalar/GVNPRE.cpp
+++ b/lib/Transforms/Scalar/GVNPRE.cpp
@@ -87,7 +87,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::Node* DI,
+ DominatorTree::DomTreeNode* DI,
std::set<Value*, ExprLT>& currExps,
std::set<PHINode*>& currPhis,
std::set<Value*, ExprLT>& currTemps,
@@ -262,7 +262,7 @@ void GVNPRE::dump(GVNPRE::ValueTable& VN, std::set<Value*, ExprLT>& s) {
}
void GVNPRE::CalculateAvailOut(GVNPRE::ValueTable& VN, std::set<Value*, ExprLT>& MS,
- DominatorTree::Node* DI,
+ DominatorTree::DomTreeNode* DI,
std::set<Value*, ExprLT>& currExps,
std::set<PHINode*>& currPhis,
std::set<Value*, ExprLT>& currTemps,
@@ -324,7 +324,7 @@ bool GVNPRE::runOnFunction(Function &F) {
// First Phase of BuildSets - calculate AVAIL_OUT
// Top-down walk of the dominator tree
- for (df_iterator<DominatorTree::Node*> DI = df_begin(DT.getRootNode()),
+ for (df_iterator<DominatorTree::DomTreeNode*> DI = df_begin(DT.getRootNode()),
E = df_end(DT.getRootNode()); DI != E; ++DI) {
// Get the sets to update for this block
@@ -350,7 +350,7 @@ bool GVNPRE::runOnFunction(Function &F) {
std::set<Value*, ExprLT> anticOut;
// Top-down walk of the postdominator tree
- for (df_iterator<PostDominatorTree::Node*> PDI =
+ for (df_iterator<PostDominatorTree::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 3b16814fe8..81284d4f52 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::Node *N);
+ void SinkRegion(DominatorTree::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::Node *N);
+ void HoistRegion(DominatorTree::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::Node *BlockInLoopNode = DT->getNode(BlockInLoop);
- DominatorTree::Node *IDom = DT->getNode(ExitBlock);
+ DominatorTree::DomTreeNode *BlockInLoopNode = DT->getNode(BlockInLoop);
+ DominatorTree::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::Node *N) {
+void LICM::SinkRegion(DominatorTree::DomTreeNode *N) {
assert(N != 0 && "Null dominator tree node?");
BasicBlock *BB = N->getBlock();
@@ -289,7 +289,7 @@ void LICM::SinkRegion(DominatorTree::Node *N) {
if (!CurLoop->contains(BB)) return;
// We are processing blocks in reverse dfo, so process children first...
- const std::vector<DominatorTree::Node*> &Children = N->getChildren();
+ const std::vector<DominatorTree::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::Node *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::Node *N) {
+void LICM::HoistRegion(DominatorTree::DomTreeNode *N) {
assert(N != 0 && "Null dominator tree node?");
BasicBlock *BB = N->getBlock();
@@ -340,7 +340,7 @@ void LICM::HoistRegion(DominatorTree::Node *N) {
hoist(I);
}
- const std::vector<DominatorTree::Node*> &Children = N->getChildren();
+ const std::vector<DominatorTree::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 b7718d0cff..5385c1a818 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::Node *> WorkList;
+ std::vector<DominatorTree::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::Node *DTNode;
+ DominatorTree::DomTreeNode *DTNode;
public:
InequalityGraph &IG;
UnreachableBlocks &UB;
ValueRanges &VR;
- Forwards(PredicateSimplifier *PS, DominatorTree::Node *DTNode)
+ Forwards(PredicateSimplifier *PS, DominatorTree::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::Node *Current) {
- for (DominatorTree::Node::iterator I = Current->begin(),
+ void proceedToSuccessors(DominatorTree::DomTreeNode *Current) {
+ for (DominatorTree::DomTreeNode::iterator I = Current->begin(),
E = Current->end(); I != E; ++I) {
WorkList.push_back(*I);
}
}
- void proceedToSuccessor(DominatorTree::Node *Next) {
+ void proceedToSuccessor(DominatorTree::DomTreeNode *Next) {
WorkList.push_back(Next);
}
// Visits each instruction in the basic block.
- void visitBasicBlock(DominatorTree::Node *Node) {
+ void visitBasicBlock(DominatorTree::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::Node *DT, ETNode *ET) {
+ void visitInstruction(Instruction *I, DominatorTree::DomTreeNode *DT, ETNode *ET) {
DOUT << "Considering instruction " << *I << "\n";
DEBUG(IG->dump());
@@ -2132,7 +2132,7 @@ namespace {
WorkList.push_back(DT->getRootNode());
do {
- DominatorTree::Node *DTNode = WorkList.back();
+ DominatorTree::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::Node::iterator I = DTNode->begin(), E = DTNode->end();
+ for (DominatorTree::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::Node::iterator I = DTNode->begin(), E = DTNode->end();
+ for (DominatorTree::DomTreeNode::iterator I = DTNode->begin(), E = DTNode->end();
I != E; ++I) {
BasicBlock *BB = (*I)->getBlock();
DOUT << "Switch thinking about BB %" << BB->getName()