diff options
author | Chris Lattner <sabre@nondot.org> | 2008-12-03 06:37:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-12-03 06:37:44 +0000 |
commit | 2b1ba24fb75e633560846e551acadade92783bb3 (patch) | |
tree | c35b89ce8a58f3305c854e83a1d3126160614545 /include/llvm/Transforms/Utils/BasicBlockUtils.h | |
parent | 62c939d7d5572e57963a5f26fb6fe802e13dc0bf (diff) |
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
Diffstat (limited to 'include/llvm/Transforms/Utils/BasicBlockUtils.h')
-rw-r--r-- | include/llvm/Transforms/Utils/BasicBlockUtils.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/BasicBlockUtils.h b/include/llvm/Transforms/Utils/BasicBlockUtils.h index 0de82433be..881bcffc12 100644 --- a/include/llvm/Transforms/Utils/BasicBlockUtils.h +++ b/include/llvm/Transforms/Utils/BasicBlockUtils.h @@ -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); |