Factor some code out of SimplifyCFG, forming a new

DeleteBlockIfDead method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60463 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2008-12-03 06:37:44 +00:00
parent 62c939d7d5
commit 2b1ba24fb7
3 changed files with 39 additions and 21 deletions

View File

@ -26,6 +26,11 @@ class Instruction;
class Pass;
class AliasAnalysis;
/// DeleteBlockIfDead - If the specified basic block is trivially dead (has no
/// predecessors and not the entry block), delete it and return true. Otherwise
/// return false.
bool DeleteBlockIfDead(BasicBlock *BB);
/// MergeBlockIntoPredecessor - Attempts to merge a block into its predecessor,
/// if possible. The return value indicates success or failure.
bool MergeBlockIntoPredecessor(BasicBlock* BB, Pass* P = 0);