summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-09-08 22:14:17 +0000
committerDevang Patel <dpatel@apple.com>2008-09-08 22:14:17 +0000
commit3d56051f7033b566c7fe0ecc58b55e4ad6fd0b26 (patch)
tree749d2ee91012201f91fffa0435c3accc9b72ea27 /llvm/lib
parent3d7c90b8ecc5bbfb9c8dbe7a81ea12571db10f6b (diff)
downloadbcm5719-llvm-3d56051f7033b566c7fe0ecc58b55e4ad6fd0b26.tar.gz
bcm5719-llvm-3d56051f7033b566c7fe0ecc58b55e4ad6fd0b26.zip
s/RemoveUnreachableBlocks/RemoveUnreachableBlocksFromFn/g
llvm-svn: 55965
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
index cd063079f68..de04fda9150 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
@@ -148,9 +148,10 @@ static bool MarkAliveBlocks(BasicBlock *BB,
return Changed;
}
-/// RemoveUnreachableBlocks - Remove blocks that are not reachable, even if they
-/// are in a dead cycle. Return true if a change was made, false otherwise.
-static bool RemoveUnreachableBlocks(Function &F) {
+/// RemoveUnreachableBlocksFromFn - Remove blocks that are not reachable, even
+/// if they are in a dead cycle. Return true if a change was made, false
+/// otherwise.
+static bool RemoveUnreachableBlocksFromFn(Function &F) {
SmallPtrSet<BasicBlock*, 128> Reachable;
bool Changed = MarkAliveBlocks(F.begin(), Reachable);
@@ -208,23 +209,23 @@ static bool IterativeSimplifyCFG(Function &F) {
// simplify the CFG.
//
bool CFGSimplifyPass::runOnFunction(Function &F) {
- bool EverChanged = RemoveUnreachableBlocks(F);
+ bool EverChanged = RemoveUnreachableBlocksFromFn(F);
EverChanged |= IterativeSimplifyCFG(F);
// If neither pass changed anything, we're done.
if (!EverChanged) return false;
// IterativeSimplifyCFG can (rarely) make some loops dead. If this happens,
- // RemoveUnreachableBlocks is needed to nuke them, which means we should
+ // RemoveUnreachableBlocksFromFn is needed to nuke them, which means we should
// iterate between the two optimizations. We structure the code like this to
// avoid reruning IterativeSimplifyCFG if the second pass of
- // RemoveUnreachableBlocks doesn't do anything.
- if (!RemoveUnreachableBlocks(F))
+ // RemoveUnreachableBlocksFromFn doesn't do anything.
+ if (!RemoveUnreachableBlocksFromFn(F))
return true;
do {
EverChanged = IterativeSimplifyCFG(F);
- EverChanged |= RemoveUnreachableBlocks(F);
+ EverChanged |= RemoveUnreachableBlocksFromFn(F);
} while (EverChanged);
return true;
OpenPOWER on IntegriCloud