062d16a2de66f7b3255faae59f2a537777bf97dd
[oota-llvm.git] / include / llvm / Analysis / SimplifyCFG.h
1 //===- llvm/Analysis/SimplifyCFG.h - CFG Simplification XForms ---*- C++ -*--=//
2 //
3 // This file provides several routines that are useful for simplifying CFGs in
4 // various ways...
5 //
6 //===----------------------------------------------------------------------===//
7
8 #ifndef LLVM_ANALYSIS_SIMPLIFY_CFG_H
9 #define LLVM_ANALYSIS_SIMPLIFY_CFG_H
10
11 class BasicBlock;
12 class Method;
13
14 namespace cfg {
15
16   // UnifyAllExitNodes - Unify all exit nodes of the CFG by creating a new
17   // BasicBlock, and converting all returns to unconditional branches to this
18   // new basic block.  The singular exit node is returned.
19   //
20   // If there are no return stmts in the Method, a null pointer is returned.
21   //
22   BasicBlock *UnifyAllExitNodes(Method *M);
23
24 }  // End Namespace cfg
25
26
27 #endif