aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-09-11 16:26:13 +0000
committerChris Lattner <sabre@nondot.org>2003-09-11 16:26:13 +0000
commitc444a4228f31656f854d15eac671b450df557346 (patch)
treef39ba3bf7089c44f1870b7439a8ccfb2cce64503 /lib
parent317a61b2db56f5be5fc7acbe2c81ebac5f15aca7 (diff)
downloadexternal_llvm-c444a4228f31656f854d15eac671b450df557346.zip
external_llvm-c444a4228f31656f854d15eac671b450df557346.tar.gz
external_llvm-c444a4228f31656f854d15eac671b450df557346.tar.bz2
Renamed DominatorTree::Node::getNode() -> getBlock()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/PostDominators.cpp2
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp6
-rw-r--r--lib/Transforms/Scalar/CorrelatedExprs.cpp4
-rw-r--r--lib/Transforms/Scalar/LICM.cpp8
-rw-r--r--lib/Transforms/Scalar/PRE.cpp10
-rw-r--r--lib/Transforms/Utils/LoopSimplify.cpp2
-rw-r--r--lib/VMCore/Dominators.cpp8
7 files changed, 20 insertions, 20 deletions
diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp
index 6be8f3d..7dbeb35 100644
--- a/lib/Analysis/PostDominators.cpp
+++ b/lib/Analysis/PostDominators.cpp
@@ -174,7 +174,7 @@ const DominanceFrontier::DomSetType &
PostDominanceFrontier::calculate(const PostDominatorTree &DT,
const DominatorTree::Node *Node) {
// Loop over CFG successors to calculate DFlocal[Node]
- BasicBlock *BB = Node->getNode();
+ BasicBlock *BB = Node->getBlock();
DomSetType &S = Frontiers[BB]; // The new set to fill in...
if (getRoots().empty()) return S;
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index 0efdbf4..897e209 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/lib/Transforms/Scalar/ADCE.cpp
@@ -344,14 +344,14 @@ bool ADCE::doADCE() {
} else {
PostDominatorTree::Node *NextNode = LastNode->getIDom();
- while (!AliveBlocks.count(NextNode->getNode())) {
+ while (!AliveBlocks.count(NextNode->getBlock())) {
LastNode = NextNode;
NextNode = NextNode->getIDom();
}
// Get the basic blocks that we need...
- BasicBlock *LastDead = LastNode->getNode();
- BasicBlock *NextAlive = NextNode->getNode();
+ BasicBlock *LastDead = LastNode->getBlock();
+ BasicBlock *NextAlive = NextNode->getBlock();
// Make the conditional branch now go to the next alive block...
TI->getSuccessor(i)->removePredecessor(BB);
diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp
index 9b90155..545c256 100644
--- a/lib/Transforms/Scalar/CorrelatedExprs.cpp
+++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp
@@ -338,7 +338,7 @@ bool CEE::TransformRegion(BasicBlock *BB, std::set<BasicBlock*> &VisitedBlocks){
DominatorTree::Node *BBN = (*DT)[BB];
if (!RI.empty()) // Time opt: only propagate if we can change something
for (unsigned i = 0, e = BBN->getChildren().size(); i != e; ++i) {
- BasicBlock *Dominated = BBN->getChildren()[i]->getNode();
+ BasicBlock *Dominated = BBN->getChildren()[i]->getBlock();
assert(RegionInfoMap.find(Dominated) == RegionInfoMap.end() &&
"RegionInfo should be calculated in dominanace order!");
getRegionInfo(Dominated) = RI;
@@ -363,7 +363,7 @@ bool CEE::TransformRegion(BasicBlock *BB, std::set<BasicBlock*> &VisitedBlocks){
// Now that all of our successors have information, recursively process them.
for (unsigned i = 0, e = BBN->getChildren().size(); i != e; ++i)
- Changed |= TransformRegion(BBN->getChildren()[i]->getNode(), VisitedBlocks);
+ Changed |= TransformRegion(BBN->getChildren()[i]->getBlock(),VisitedBlocks);
return Changed;
}
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 7ad0005..b66b830 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -245,12 +245,12 @@ void LICM::HoistRegion(DominatorTree::Node *N) {
assert(N != 0 && "Null dominator tree node?");
// If this subregion is not in the top level loop at all, exit.
- if (!CurLoop->contains(N->getNode())) return;
+ if (!CurLoop->contains(N->getBlock())) return;
// Only need to hoist the contents of this block if it is not part of a
// subloop (which would already have been hoisted)
- if (!inSubLoop(N->getNode()))
- visit(*N->getNode());
+ if (!inSubLoop(N->getBlock()))
+ visit(*N->getBlock());
const std::vector<DominatorTree::Node*> &Children = N->getChildren();
for (unsigned i = 0, e = Children.size(); i != e; ++i)
@@ -305,7 +305,7 @@ bool LICM::SafeToHoist(Instruction &Inst) {
IDom = IDom->getIDom();
//See if we exited the loop.
- if(!CurLoop->contains(IDom->getNode()))
+ if(!CurLoop->contains(IDom->getBlock()))
return false;
}
}
diff --git a/lib/Transforms/Scalar/PRE.cpp b/lib/Transforms/Scalar/PRE.cpp
index 367b0f5..77711ca 100644
--- a/lib/Transforms/Scalar/PRE.cpp
+++ b/lib/Transforms/Scalar/PRE.cpp
@@ -165,7 +165,7 @@ bool PRE::ProcessBlock(BasicBlock *BB) {
void PRE::MarkPostDominatingBlocksAnticipatible(PostDominatorTree::Node *N,
std::vector<char> &AntBlocks,
Instruction *Occurrence) {
- unsigned BlockNo = BlockNumbering[N->getNode()];
+ unsigned BlockNo = BlockNumbering[N->getBlock()];
if (AntBlocks[BlockNo]) return; // Already known to be anticipatible??
@@ -174,7 +174,7 @@ void PRE::MarkPostDominatingBlocksAnticipatible(PostDominatorTree::Node *N,
// "transparency".
for (unsigned i = 0, e = Occurrence->getNumOperands(); i != e; ++i)
if (Instruction *I = dyn_cast<Instruction>(Occurrence->getOperand(i)))
- if (I->getParent() == N->getNode()) // Operand is defined in this block!
+ if (I->getParent() == N->getBlock()) // Operand is defined in this block!
return;
if (isa<LoadInst>(Occurrence))
@@ -246,14 +246,14 @@ void PRE::MarkOccurrenceAvailableInAllDominatedBlocks(Instruction *Occurrence,
DominatorTree::Node *N = DT->getNode(Occurrence->getParent());
for (df_iterator<DominatorTree::Node*> DI = df_begin(N), E = df_end(N);
DI != E; ++DI)
- AvailableBlocks[(*DI)->getNode()] = Occurrence;
+ AvailableBlocks[(*DI)->getBlock()] = Occurrence;
}
/// ReplaceDominatedAvailableOccurrencesWith - This loops over the region
/// dominated by N, replacing any available expressions with NewOcc.
void PRE::ReplaceDominatedAvailableOccurrencesWith(Instruction *NewOcc,
DominatorTree::Node *N) {
- BasicBlock *BB = N->getNode();
+ BasicBlock *BB = N->getBlock();
Instruction *&ExistingAvailableVal = AvailableBlocks[BB];
// If there isn't a definition already active in this node, make this the new
@@ -280,7 +280,7 @@ void PRE::ReplaceDominatedAvailableOccurrencesWith(Instruction *NewOcc,
// Mark NewOCC as the Available expression in all blocks dominated by BB
for (df_iterator<DominatorTree::Node*> DI = df_begin(N), E = df_end(N);
DI != E; ++DI)
- AvailableBlocks[(*DI)->getNode()] = NewOcc;
+ AvailableBlocks[(*DI)->getBlock()] = NewOcc;
}
}
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp
index 0b45147..56b63f3 100644
--- a/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/lib/Transforms/Utils/LoopSimplify.cpp
@@ -366,7 +366,7 @@ void Preheaders::RewriteLoopExitBlock(Loop *L, BasicBlock *Exit) {
NewBBIDomNode = DT->getNode(NewBBIDom);
} else {
NewBBIDomNode = DT->getNode(LoopBlocks[0]); // Random pred
- while (!NewBBDomSet.count(NewBBIDomNode->getNode())) {
+ while (!NewBBDomSet.count(NewBBIDomNode->getBlock())) {
NewBBIDomNode = NewBBIDomNode->getIDom();
assert(NewBBIDomNode && "No shared dominator found??");
}
diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp
index 4e2fc74..f22bd0c 100644
--- a/lib/VMCore/Dominators.cpp
+++ b/lib/VMCore/Dominators.cpp
@@ -211,7 +211,7 @@ void DominatorTreeBase::reset() {
RootNode = 0;
}
-void DominatorTreeBase::Node2::setIDom(Node2 *NewIDom) {
+void DominatorTreeBase::Node::setIDom(Node *NewIDom) {
assert(IDom && "No immediate dominator?");
if (IDom != NewIDom) {
std::vector<Node*>::iterator I =
@@ -279,8 +279,8 @@ void DominatorTree::calculate(const DominatorSet &DS) {
static std::ostream &operator<<(std::ostream &o,
const DominatorTreeBase::Node *Node) {
- if (Node->getNode())
- WriteAsOperand(o, Node->getNode(), false);
+ if (Node->getBlock())
+ WriteAsOperand(o, Node->getBlock(), false);
else
o << " <<exit node>>";
return o << "\n";
@@ -312,7 +312,7 @@ const DominanceFrontier::DomSetType &
DominanceFrontier::calculate(const DominatorTree &DT,
const DominatorTree::Node *Node) {
// Loop over CFG successors to calculate DFlocal[Node]
- BasicBlock *BB = Node->getNode();
+ BasicBlock *BB = Node->getBlock();
DomSetType &S = Frontiers[BB]; // The new set to fill in...
for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB);