The CorrelatedExpressionElimination pass is known to be buggy. Remove it.
[oota-llvm.git] / include / llvm / Transforms / Scalar.h
index ea5692b206b810be2c35d7f94bde3f506a7e1e62..8e06dc8271190cd842fdeac653c5ee8f214a18a7 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.
 //
 //===----------------------------------------------------------------------===//
 //
 namespace llvm {
 
 class FunctionPass;
+class LoopPass;
 class Pass;
 class GetElementPtrInst;
 class PassInfo;
 class TerminatorInst;
 class TargetLowering;
 
-//===----------------------------------------------------------------------===//
-//
-// RaisePointerReferences - Try to eliminate as many pointer arithmetic
-// expressions as possible, by converting expressions to use getelementptr and
-// friends.
-//
-FunctionPass *createRaisePointerReferencesPass();
-
 //===----------------------------------------------------------------------===//
 //
 // ConstantPropagation - A worklist driven constant propagation pass
@@ -83,7 +76,7 @@ FunctionPass *createAggressiveDCEPass();
 // ScalarReplAggregates - Break up alloca's of aggregates into multiple allocas
 // if possible.
 //
-FunctionPass *createScalarReplAggregatesPass();
+FunctionPass *createScalarReplAggregatesPass(signed Threshold = -1);
 
 //===----------------------------------------------------------------------===//
 //
@@ -99,7 +92,7 @@ FunctionPass *createGCSEPass();
 // InductionVariableSimplify - Transform induction variables in a program to all
 // use a single canonical induction variable per loop.
 //
-FunctionPass *createIndVarSimplifyPass();
+LoopPass *createIndVarSimplifyPass();
 
 //===----------------------------------------------------------------------===//
 //
@@ -119,7 +112,7 @@ FunctionPass *createInstructionCombiningPass();
 //
 // LICM - This pass is a loop invariant code motion and memory promotion pass.
 //
-FunctionPass *createLICMPass();
+LoopPass *createLICMPass();
 
 //===----------------------------------------------------------------------===//
 //
@@ -128,19 +121,33 @@ FunctionPass *createLICMPass();
 // optional parameter used to consult the target machine whether certain
 // transformations are profitable.
 //
-FunctionPass *createLoopStrengthReducePass(const TargetLowering *TLI = NULL);
+LoopPass *createLoopStrengthReducePass(const TargetLowering *TLI = 0);
 
 //===----------------------------------------------------------------------===//
 //
 // LoopUnswitch - This pass is a simple loop unswitching pass.
 //
-FunctionPass *createLoopUnswitchPass();
+LoopPass *createLoopUnswitchPass(bool OptimizeForSize = false);
 
 //===----------------------------------------------------------------------===//
 //
 // LoopUnroll - This pass is a simple loop unrolling pass.
 //
-FunctionPass *createLoopUnrollPass();
+LoopPass *createLoopUnrollPass();
+
+//===----------------------------------------------------------------------===//
+//
+// LoopRotate - This pass is a simple loop rotating pass.
+//
+LoopPass *createLoopRotatePass();
+
+//===----------------------------------------------------------------------===//
+//
+// LoopIndexSplit - This pass divides loop's iteration range by spliting loop
+// such that each individual loop is executed efficiently.
+//
+LoopPass *createLoopIndexSplitPass();
+
 
 //===----------------------------------------------------------------------===//
 //
@@ -175,17 +182,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
@@ -269,7 +265,7 @@ extern const PassInfo *LowerSwitchID;
 
 //===----------------------------------------------------------------------===//
 //
-// LowerPacked - This pass converts PackedType operations into low-level scalar
+// LowerPacked - This pass converts VectorType operations into low-level scalar
 // operations.
 //
 FunctionPass *createLowerPackedPass();
@@ -287,13 +283,6 @@ FunctionPass *createLowerPackedPass();
 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();
-
 //===----------------------------------------------------------------------===//
 //
 // BlockPlacement - This pass reorders basic blocks in order to increase the
@@ -306,7 +295,7 @@ FunctionPass *createBlockPlacementPass();
 // LCSSA - This pass inserts phi nodes at loop boundaries to simplify other loop
 // optimizations.
 //
-FunctionPass *createLCSSAPass();
+LoopPass *createLCSSAPass();
 extern const PassInfo *LCSSAID;
 
 //===----------------------------------------------------------------------===//
@@ -316,6 +305,26 @@ extern const PassInfo *LCSSAID;
 //
 FunctionPass *createPredicateSimplifierPass();
 
+//===----------------------------------------------------------------------===//
+//
+// GVN-PRE - This pass performs global value numbering and partial redundancy
+// elimination.
+//
+FunctionPass *createGVNPREPass();
+
+//===----------------------------------------------------------------------===//
+//
+// GVN - This pass performs global value numbering and redundant load 
+// elimination cotemporaneously.
+//
+FunctionPass *createGVNPass();
+
+//===----------------------------------------------------------------------===//
+//
+// CodeGenPrepare - This pass prepares a function for instruction selection.
+//
+FunctionPass *createCodeGenPreparePass(const TargetLowering *TLI = 0);
+
 } // End llvm namespace
 
 #endif