aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms/Utils/BasicBlockUtils.h
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-08-06 02:43:45 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-08-06 02:43:45 +0000
commit01d7203ef8316fdd71c3cec59f8e68fb869e0dbf (patch)
tree51efd9e28de5addbea893b2742c5bca28f8e9445 /include/llvm/Transforms/Utils/BasicBlockUtils.h
parent99c22aaeed3d519c0ec958c77aa35aad2e3b0ae9 (diff)
downloadexternal_llvm-01d7203ef8316fdd71c3cec59f8e68fb869e0dbf.zip
external_llvm-01d7203ef8316fdd71c3cec59f8e68fb869e0dbf.tar.gz
external_llvm-01d7203ef8316fdd71c3cec59f8e68fb869e0dbf.tar.bz2
Factor FlattenCFG out from SimplifyCFG
Patch by: Mei Ye git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/BasicBlockUtils.h')
-rw-r--r--include/llvm/Transforms/Utils/BasicBlockUtils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/BasicBlockUtils.h b/include/llvm/Transforms/Utils/BasicBlockUtils.h
index b5478cb..65cafe2 100644
--- a/include/llvm/Transforms/Utils/BasicBlockUtils.h
+++ b/include/llvm/Transforms/Utils/BasicBlockUtils.h
@@ -205,6 +205,15 @@ ReturnInst *FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB,
TerminatorInst *SplitBlockAndInsertIfThen(Instruction *Cmp,
bool Unreachable, MDNode *BranchWeights = 0);
+///
+/// GetIfCondition - Check whether BB is the merge point of a if-region.
+/// If so, return the boolean condition that determines which entry into
+/// BB will be taken. Also, return by references the block that will be
+/// entered from if the condition is true, and the block that will be
+/// entered if the condition is false.
+
+Value *GetIfCondition(BasicBlock *BB, BasicBlock *&IfTrue,
+ BasicBlock *&IfFalse);
} // End llvm namespace
#endif