[llvm-commits] [llvm] r55965 - /llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp
Devang Patel
dpatel at apple.com
Mon Sep 8 15:14:18 PDT 2008
Author: dpatel
Date: Mon Sep 8 17:14:17 2008
New Revision: 55965
URL: http://llvm.org/viewvc/llvm-project?rev=55965&view=rev
Log:
s/RemoveUnreachableBlocks/RemoveUnreachableBlocksFromFn/g
Modified:
llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp?rev=55965&r1=55964&r2=55965&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp Mon Sep 8 17:14:17 2008
@@ -148,9 +148,10 @@
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 @@
// 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;
More information about the llvm-commits
mailing list