Rename some GC classes so that their roll will hopefully be clearer.
[oota-llvm.git] / include / llvm / Transforms / Scalar.h
index 94ad3764009dce47a522539c7e369f84b6a230ad..b4c3e7caf5b644273d8d17b5c8cea6a433c11c92 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.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -15,8 +15,6 @@
 #ifndef LLVM_TRANSFORMS_SCALAR_H
 #define LLVM_TRANSFORMS_SCALAR_H
 
-#include <cstdlib>
-
 namespace llvm {
 
 class FunctionPass;
@@ -78,15 +76,6 @@ FunctionPass *createAggressiveDCEPass();
 //
 FunctionPass *createScalarReplAggregatesPass(signed Threshold = -1);
 
-//===----------------------------------------------------------------------===//
-//
-// GCSE - This pass is designed to be a very quick global transformation that
-// eliminates global common subexpressions from a function.  It does this by
-// examining the SSA value graph of the function, instead of doing slow
-// bit-vector computations.
-//
-FunctionPass *createGCSEPass();
-
 //===----------------------------------------------------------------------===//
 //
 // InductionVariableSimplify - Transform induction variables in a program to all
@@ -141,6 +130,13 @@ LoopPass *createLoopUnrollPass();
 //
 LoopPass *createLoopRotatePass();
 
+//===----------------------------------------------------------------------===//
+//
+// LoopIndexSplit - This pass divides loop's iteration range by spliting loop
+// such that each individual loop is executed efficiently.
+//
+LoopPass *createLoopIndexSplitPass();
+
 
 //===----------------------------------------------------------------------===//
 //
@@ -155,7 +151,7 @@ LoopPass *createLoopRotatePass();
 //   ret int %Y
 //
 FunctionPass *createPromoteMemoryToRegisterPass();
-extern const PassInfo *PromoteMemoryToRegisterID;
+extern const PassInfo *const PromoteMemoryToRegisterID;
 
 //===----------------------------------------------------------------------===//
 //
@@ -164,7 +160,7 @@ extern const PassInfo *PromoteMemoryToRegisterID;
 // hacking easier.
 //
 FunctionPass *createDemoteRegisterToMemoryPass();
-extern const PassInfo *DemoteRegisterToMemoryID;
+extern const PassInfo *const DemoteRegisterToMemoryID;
 
 //===----------------------------------------------------------------------===//
 //
@@ -175,17 +171,6 @@ extern const PassInfo *DemoteRegisterToMemoryID;
 //
 FunctionPass *createReassociatePass();
 
-//===----------------------------------------------------------------------===//
-//
-// CorrelatedExpressionElimination - This pass eliminates correlated
-// conditions, such as these:
-//  if (X == 0)
-//    if (X > 2) ;   // Known false
-//    else
-//      Y = X * Z;   // = 0
-//
-FunctionPass *createCorrelatedExpressionEliminationPass();
-
 //===----------------------------------------------------------------------===//
 //
 // CondPropagationPass - This pass propagates information about conditional
@@ -201,6 +186,13 @@ FunctionPass *createCondPropagationPass();
 //
 FunctionPass *createTailDuplicationPass();
 
+//===----------------------------------------------------------------------===//
+//
+// JumpThreading - Thread control through mult-pred/multi-succ blocks where some
+// preds always go to some succ.
+//
+FunctionPass *createJumpThreadingPass();
+  
 //===----------------------------------------------------------------------===//
 //
 // CFGSimplification - Merge basic blocks, eliminate unreachable blocks,
@@ -220,7 +212,7 @@ FunctionPass *createCFGSimplificationPass();
 // (set, immediate dominators, tree, and frontier) information.
 //
 FunctionPass *createBreakCriticalEdgesPass();
-extern const PassInfo *BreakCriticalEdgesID;
+extern const PassInfo *const BreakCriticalEdgesID;
 
 //===----------------------------------------------------------------------===//
 //
@@ -231,16 +223,7 @@ extern const PassInfo *BreakCriticalEdgesID;
 //   AU.addRequiredID(LoopSimplifyID);
 //
 FunctionPass *createLoopSimplifyPass();
-extern const PassInfo *LoopSimplifyID;
-
-//===----------------------------------------------------------------------===//
-//
-// LowerSelect - This pass converts SelectInst instructions into conditional
-// branch and PHI instructions. If the OnlyFP flag is set to true, then only
-// floating point select instructions are lowered.
-//
-FunctionPass *createLowerSelectPass(bool OnlyFP = false);
-extern const PassInfo *LowerSelectID;
+extern const PassInfo *const LoopSimplifyID;
 
 //===----------------------------------------------------------------------===//
 //
@@ -250,7 +233,7 @@ extern const PassInfo *LowerSelectID;
 //   AU.addRequiredID(LowerAllocationsID);
 //
 Pass *createLowerAllocationsPass(bool LowerMallocArgToInteger = false);
-extern const PassInfo *LowerAllocationsID;
+extern const PassInfo *const LowerAllocationsID;
 
 //===----------------------------------------------------------------------===//
 //
@@ -265,14 +248,7 @@ FunctionPass *createTailCallEliminationPass();
 // chained binary branch instructions.
 //
 FunctionPass *createLowerSwitchPass();
-extern const PassInfo *LowerSwitchID;
-
-//===----------------------------------------------------------------------===//
-//
-// LowerPacked - This pass converts VectorType operations into low-level scalar
-// operations.
-//
-FunctionPass *createLowerPackedPass();
+extern const PassInfo *const LowerSwitchID;
 
 //===----------------------------------------------------------------------===//
 //
@@ -284,15 +260,8 @@ FunctionPass *createLowerPackedPass();
 // purpose "my LLVM-to-LLVM pass doesn't support the invoke instruction yet"
 // lowering pass.
 //
-FunctionPass *createLowerInvokePass(const TargetLowering *TLI = NULL);
-extern const PassInfo *LowerInvokePassID;
-
-//===----------------------------------------------------------------------===//
-//
-// LowerGCPass - This function returns an instance of the "lowergc" pass, which
-// lowers garbage collection intrinsics to normal LLVM code.
-//
-FunctionPass *createLowerGCPass();
+FunctionPass *createLowerInvokePass(const TargetLowering *TLI = 0);
+extern const PassInfo *const LowerInvokePassID;
 
 //===----------------------------------------------------------------------===//
 //
@@ -307,7 +276,7 @@ FunctionPass *createBlockPlacementPass();
 // optimizations.
 //
 LoopPass *createLCSSAPass();
-extern const PassInfo *LCSSAID;
+extern const PassInfo *const LCSSAID;
 
 //===----------------------------------------------------------------------===//
 //
@@ -325,17 +294,30 @@ FunctionPass *createGVNPREPass();
 
 //===----------------------------------------------------------------------===//
 //
-// RedundantLoadElimination - This pass deletes loads that are dominated by
-// must-aliased loads and are not stored to between the loads.
+// GVN - This pass performs global value numbering and redundant load 
+// elimination cotemporaneously.
+//
+FunctionPass *createGVNPass();
+
+//===----------------------------------------------------------------------===//
+//
+// MemCpyOpt - This pass performs optimizations related to eliminating memcpy
+// calls and/or combining multiple stores into memset's.
 //
-FunctionPass *createRedundantLoadEliminationPass();
+FunctionPass *createMemCpyOptPass();
 
 //===----------------------------------------------------------------------===//
 //
-// GVN - This pass performs global value numbering and redundant load 
-// elimination cotemporaneously.
+// LoopDeletion - This pass performs DCE of non-infinite loops that it
+// can prove are dead.
 //
-FunctionPass *createGVNPass();
+LoopPass *createLoopDeletionPass();
+  
+//===----------------------------------------------------------------------===//
+//
+/// createSimplifyLibCallsPass - This pass optimizes specific calls to
+/// specific well-known (library) functions.
+FunctionPass *createSimplifyLibCallsPass();
 
 //===----------------------------------------------------------------------===//
 //