mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 22:20:37 +00:00
The tarjan iterator now returns a reference to the current SCC, not a possibly null pointer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8262 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b55cae23cb
commit
6c5fd8e055
@ -432,7 +432,7 @@ bool MemoryDepAnalysis::runOnFunction(Function &F) {
|
||||
SCC<Function*>* nextSCC;
|
||||
for (TarjanSCC_iterator<Function*> I = tarj_begin(&F), E = tarj_end(&F);
|
||||
I != E; ++I)
|
||||
ProcessSCC(**I, ModRefAfter);
|
||||
ProcessSCC(*I, ModRefAfter);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -25,6 +25,6 @@ bool CallGraphSCCPass::run(Module &M) {
|
||||
bool Changed = false;
|
||||
for (TarjanSCC_iterator<CallGraph*> I = tarj_begin(&CG), E = tarj_end(&CG);
|
||||
I != E; ++I)
|
||||
Changed = runOnSCC(**I);
|
||||
Changed = runOnSCC(*I);
|
||||
return Changed;
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ bool MemoryDepAnalysis::runOnFunction(Function &F) {
|
||||
SCC<Function*>* nextSCC;
|
||||
for (TarjanSCC_iterator<Function*> I = tarj_begin(&F), E = tarj_end(&F);
|
||||
I != E; ++I)
|
||||
ProcessSCC(**I, ModRefAfter);
|
||||
ProcessSCC(*I, ModRefAfter);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ bool CFGSCC::runOnFunction(Function &F) {
|
||||
std::cout << "SCCs for Function " << F.getName() << " in PostOrder:";
|
||||
for (TarjanSCC_iterator<Function*> I = tarj_begin(&F),
|
||||
E = tarj_end(&F); I != E; ++I) {
|
||||
SCC<Function*> &nextSCC = **I;
|
||||
SCC<Function*> &nextSCC = *I;
|
||||
std::cout << "\nSCC #" << ++sccNum << " : ";
|
||||
for (SCC<Function*>::const_iterator I = nextSCC.begin(),
|
||||
E = nextSCC.end(); I != E; ++I)
|
||||
@ -80,7 +80,7 @@ bool CallGraphSCC::run(Module &M) {
|
||||
std::cout << "SCCs for the program in PostOrder:";
|
||||
for (TarjanSCC_iterator<CallGraphNode*> SCCI = tarj_begin(rootNode),
|
||||
E = tarj_end(rootNode); SCCI != E; ++SCCI) {
|
||||
const SCC<CallGraphNode*> &nextSCC = **SCCI;
|
||||
const SCC<CallGraphNode*> &nextSCC = *SCCI;
|
||||
std::cout << "\nSCC #" << ++sccNum << " : ";
|
||||
for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
|
||||
E = nextSCC.end(); I != E; ++I)
|
||||
|
@ -59,7 +59,7 @@ bool CFGSCC::runOnFunction(Function &F) {
|
||||
std::cout << "SCCs for Function " << F.getName() << " in PostOrder:";
|
||||
for (TarjanSCC_iterator<Function*> I = tarj_begin(&F),
|
||||
E = tarj_end(&F); I != E; ++I) {
|
||||
SCC<Function*> &nextSCC = **I;
|
||||
SCC<Function*> &nextSCC = *I;
|
||||
std::cout << "\nSCC #" << ++sccNum << " : ";
|
||||
for (SCC<Function*>::const_iterator I = nextSCC.begin(),
|
||||
E = nextSCC.end(); I != E; ++I)
|
||||
@ -80,7 +80,7 @@ bool CallGraphSCC::run(Module &M) {
|
||||
std::cout << "SCCs for the program in PostOrder:";
|
||||
for (TarjanSCC_iterator<CallGraphNode*> SCCI = tarj_begin(rootNode),
|
||||
E = tarj_end(rootNode); SCCI != E; ++SCCI) {
|
||||
const SCC<CallGraphNode*> &nextSCC = **SCCI;
|
||||
const SCC<CallGraphNode*> &nextSCC = *SCCI;
|
||||
std::cout << "\nSCC #" << ++sccNum << " : ";
|
||||
for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
|
||||
E = nextSCC.end(); I != E; ++I)
|
||||
|
@ -59,7 +59,7 @@ bool CFGSCC::runOnFunction(Function &F) {
|
||||
std::cout << "SCCs for Function " << F.getName() << " in PostOrder:";
|
||||
for (TarjanSCC_iterator<Function*> I = tarj_begin(&F),
|
||||
E = tarj_end(&F); I != E; ++I) {
|
||||
SCC<Function*> &nextSCC = **I;
|
||||
SCC<Function*> &nextSCC = *I;
|
||||
std::cout << "\nSCC #" << ++sccNum << " : ";
|
||||
for (SCC<Function*>::const_iterator I = nextSCC.begin(),
|
||||
E = nextSCC.end(); I != E; ++I)
|
||||
@ -80,7 +80,7 @@ bool CallGraphSCC::run(Module &M) {
|
||||
std::cout << "SCCs for the program in PostOrder:";
|
||||
for (TarjanSCC_iterator<CallGraphNode*> SCCI = tarj_begin(rootNode),
|
||||
E = tarj_end(rootNode); SCCI != E; ++SCCI) {
|
||||
const SCC<CallGraphNode*> &nextSCC = **SCCI;
|
||||
const SCC<CallGraphNode*> &nextSCC = *SCCI;
|
||||
std::cout << "\nSCC #" << ++sccNum << " : ";
|
||||
for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
|
||||
E = nextSCC.end(); I != E; ++I)
|
||||
|
@ -59,7 +59,7 @@ bool CFGSCC::runOnFunction(Function &F) {
|
||||
std::cout << "SCCs for Function " << F.getName() << " in PostOrder:";
|
||||
for (TarjanSCC_iterator<Function*> I = tarj_begin(&F),
|
||||
E = tarj_end(&F); I != E; ++I) {
|
||||
SCC<Function*> &nextSCC = **I;
|
||||
SCC<Function*> &nextSCC = *I;
|
||||
std::cout << "\nSCC #" << ++sccNum << " : ";
|
||||
for (SCC<Function*>::const_iterator I = nextSCC.begin(),
|
||||
E = nextSCC.end(); I != E; ++I)
|
||||
@ -80,7 +80,7 @@ bool CallGraphSCC::run(Module &M) {
|
||||
std::cout << "SCCs for the program in PostOrder:";
|
||||
for (TarjanSCC_iterator<CallGraphNode*> SCCI = tarj_begin(rootNode),
|
||||
E = tarj_end(rootNode); SCCI != E; ++SCCI) {
|
||||
const SCC<CallGraphNode*> &nextSCC = **SCCI;
|
||||
const SCC<CallGraphNode*> &nextSCC = *SCCI;
|
||||
std::cout << "\nSCC #" << ++sccNum << " : ";
|
||||
for (SCC<CallGraphNode*>::const_iterator I = nextSCC.begin(),
|
||||
E = nextSCC.end(); I != E; ++I)
|
||||
|
Loading…
Reference in New Issue
Block a user