Add support to BBVectorize for vectorizing selects.
[oota-llvm.git] / include / llvm / Transforms / Utils / FunctionUtils.h
index 12291cb473a39d1263897490bbf3f5316ec1def9..8d71e43aa92169891ff0deadeadd07a1e9fcd173 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
 #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H
 #define LLVM_TRANSFORMS_UTILS_FUNCTION_H
 
-#include <llvm/Analysis/Dominators.h>
+#include "llvm/ADT/ArrayRef.h"
 #include <vector>
 
 namespace llvm {
   class BasicBlock;
-  class DominatorSet;
+  class DominatorTree;
   class Function;
   class Loop;
 
-  /// ExtractCodeRegion - rip out a sequence of basic blocks into a new function
+  /// ExtractCodeRegion - Rip out a sequence of basic blocks into a new
+  /// function.
   ///
-  Function* ExtractCodeRegion(ETForest &DS, DominatorTree& DT,
-                              const std::vector<BasicBlock*> &code,
+  Function* ExtractCodeRegion(DominatorTree& DT,
+                              ArrayRef<BasicBlock*> code,
                               bool AggregateArgs = false);
 
-  /// ExtractLoop - rip out a natural loop into a new function
+  /// ExtractLoop - Rip out a natural loop into a new function.
   ///
-  Function* ExtractLoop(ETForest &DS, DominatorTree& DT, Loop *L,
+  Function* ExtractLoop(DominatorTree& DT, Loop *L,
                         bool AggregateArgs = false);
 
-  /// ExtractBasicBlock - rip out a basic block into a new function
+  /// ExtractBasicBlock - Rip out a basic block (and the associated landing pad)
+  /// into a new function.
   ///
-  Function* ExtractBasicBlock(BasicBlock *BB, bool AggregateArgs = false);
+  Function* ExtractBasicBlock(ArrayRef<BasicBlock*> BBs,
+                              bool AggregateArgs = false);
 }
 
 #endif