diff options
author | Devang Patel <dpatel@apple.com> | 2008-09-08 22:14:17 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-09-08 22:14:17 +0000 |
commit | 2379089a6ee44934aa128df69297a2f613954e40 (patch) | |
tree | 10f5c78678497a4061d2ba1032f0eaed505799cd /lib/Transforms | |
parent | 14b0a2b13705d47916b6ea7e2d7c0db898a0fb81 (diff) | |
download | llvm-2379089a6ee44934aa128df69297a2f613954e40.tar.gz llvm-2379089a6ee44934aa128df69297a2f613954e40.tar.bz2 llvm-2379089a6ee44934aa128df69297a2f613954e40.tar.xz |
s/RemoveUnreachableBlocks/RemoveUnreachableBlocksFromFn/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55965 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/SimplifyCFGPass.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/lib/Transforms/Scalar/SimplifyCFGPass.cpp index cd063079f6..de04fda915 100644 --- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/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; |