Tabs -> Spaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36094 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2007-04-15 23:14:18 +00:00
parent 4575ab2186
commit e934fefd6b
4 changed files with 22 additions and 22 deletions

View File

@ -69,7 +69,7 @@ protected:
Node *RootNode;
struct InfoRec {
struct InfoRec {
unsigned Semi;
unsigned Size;
BasicBlock *Label, *Parent, *Child, *Ancestor;
@ -213,7 +213,7 @@ public:
return Roots[0];
}
virtual bool runOnFunction(Function &F);
virtual bool runOnFunction(Function &F);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
@ -225,10 +225,10 @@ private:
void Compress(BasicBlock *V, InfoRec &VInfo);
BasicBlock *Eval(BasicBlock *v);
void Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo);
inline BasicBlock *getIDom(BasicBlock *BB) const {
std::map<BasicBlock*, BasicBlock*>::const_iterator I = IDoms.find(BB);
return I != IDoms.end() ? I->second : 0;
}
inline BasicBlock *getIDom(BasicBlock *BB) const {
std::map<BasicBlock*, BasicBlock*>::const_iterator I = IDoms.find(BB);
return I != IDoms.end() ? I->second : 0;
}
};
//===-------------------------------------

View File

@ -37,14 +37,14 @@ private:
void calculate(Function &F);
Node *getNodeForBlock(BasicBlock *BB);
unsigned DFSPass(BasicBlock *V, InfoRec &VInfo,unsigned N);
void Compress(BasicBlock *V, InfoRec &VInfo);
BasicBlock *Eval(BasicBlock *V);
void Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo);
void Compress(BasicBlock *V, InfoRec &VInfo);
BasicBlock *Eval(BasicBlock *V);
void Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo);
inline BasicBlock *getIDom(BasicBlock *BB) const {
std::map<BasicBlock*, BasicBlock*>::const_iterator I = IDoms.find(BB);
return I != IDoms.end() ? I->second : 0;
}
std::map<BasicBlock*, BasicBlock*>::const_iterator I = IDoms.find(BB);
return I != IDoms.end() ? I->second : 0;
}
};

View File

@ -216,8 +216,8 @@ ETNode *PostETForest::getNodeForBlock(BasicBlock *BB) {
// If we are unreachable, we may not have an immediate dominator.
if (!node)
return 0;
else if (!node->getIDom())
return 0;
else if (!node->getIDom())
return BBNode = new ETNode(BB);
else {
ETNode *IDomNode = getNodeForBlock(node->getIDom()->getBlock());
@ -242,7 +242,7 @@ void PostETForest::calculate(const PostDominatorTree &DT) {
ETNode *&BBNode = Nodes[BB];
if (!BBNode) {
ETNode *IDomNode = NULL;
PostDominatorTree::Node *node = DT.getNode(BB);
PostDominatorTree::Node *node = DT.getNode(BB);
if (node && node->getIDom())
IDomNode = getNodeForBlock(node->getIDom()->getBlock());

View File

@ -210,8 +210,8 @@ void DominatorTree::Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo){
}
void DominatorTree::calculate(Function& F) {
BasicBlock* Root = Roots[0];
BasicBlock* Root = Roots[0];
Nodes[Root] = RootNode = new Node(Root, 0); // Add a node for the root...
Vertex.push_back(0);
@ -260,7 +260,7 @@ void DominatorTree::calculate(Function& F) {
// Loop over all of the reachable blocks in the function...
for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I)
if (BasicBlock *ImmDom = getIDom(I)) { // Reachable block.
Node *&BBNode = Nodes[I];
Node *&BBNode = Nodes[I];
if (!BBNode) { // Haven't calculated this node yet?
// Get or calculate the node for the immediate dominator
Node *IDomNode = getNodeForBlock(ImmDom);
@ -273,7 +273,7 @@ void DominatorTree::calculate(Function& F) {
// Free temporary memory used to construct idom's
Info.clear();
IDoms.clear();
IDoms.clear();
std::vector<BasicBlock*>().swap(Vertex);
}
@ -283,8 +283,8 @@ void DominatorTreeBase::reset() {
for (NodeMapType::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I)
delete I->second;
Nodes.clear();
IDoms.clear();
Roots.clear();
IDoms.clear();
Roots.clear();
RootNode = 0;
}
@ -343,7 +343,7 @@ void DominatorTreeBase::print(std::ostream &o, const Module* ) const {
bool DominatorTree::runOnFunction(Function &F) {
reset(); // Reset from the last time we were run...
Roots.push_back(&F.getEntryBlock());
Roots.push_back(&F.getEntryBlock());
calculate(F);
return false;
}