diff options
Diffstat (limited to 'include/llvm/Transforms/Scalar.h')
-rw-r--r-- | include/llvm/Transforms/Scalar.h | 94 |
1 files changed, 63 insertions, 31 deletions
diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index 9173de1112f37..167cc94ec81f2 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/include/llvm/Transforms/Scalar.h @@ -15,7 +15,6 @@ #ifndef LLVM_TRANSFORMS_SCALAR_H #define LLVM_TRANSFORMS_SCALAR_H -#include "llvm/ADT/StringRef.h" #include <functional> namespace llvm { @@ -82,6 +81,16 @@ FunctionPass *createDeadStoreEliminationPass(); // FunctionPass *createAggressiveDCEPass(); + +//===----------------------------------------------------------------------===// +// +// GuardWidening - An optimization over the @llvm.experimental.guard intrinsic +// that (optimistically) combines multiple guards into one to have fewer checks +// at runtime. +// +FunctionPass *createGuardWideningPass(); + + //===----------------------------------------------------------------------===// // // BitTrackingDCE - This pass uses a bit-tracking DCE algorithm in order to @@ -97,17 +106,6 @@ FunctionPass *createSROAPass(); //===----------------------------------------------------------------------===// // -// ScalarReplAggregates - Break up alloca's of aggregates into multiple allocas -// if possible. -// -FunctionPass *createScalarReplAggregatesPass(signed Threshold = -1, - bool UseDomTree = true, - signed StructMemberThreshold = -1, - signed ArrayElementThreshold = -1, - signed ScalarLoadThreshold = -1); - -//===----------------------------------------------------------------------===// -// // InductiveRangeCheckElimination - Transform loops to elide range checks on // linear functions of the induction variable. // @@ -132,7 +130,7 @@ Pass *createIndVarSimplifyPass(); // into: // %Z = add int 2, %X // -FunctionPass *createInstructionCombiningPass(); +FunctionPass *createInstructionCombiningPass(bool ExpensiveCombines = true); //===----------------------------------------------------------------------===// // @@ -156,16 +154,6 @@ Pass *createLoopStrengthReducePass(); //===----------------------------------------------------------------------===// // -// GlobalMerge - This pass merges internal (by default) globals into structs -// to enable reuse of a base pointer by indexed addressing modes. -// It can also be configured to focus on size optimizations only. -// -Pass *createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset, - bool OnlyOptimizeForSize = false, - bool MergeExternalByDefault = false); - -//===----------------------------------------------------------------------===// -// // LoopUnswitch - This pass is a simple loop unswitching pass. // Pass *createLoopUnswitchPass(bool OptimizeForSize = false); @@ -205,6 +193,12 @@ Pass *createLoopIdiomPass(); //===----------------------------------------------------------------------===// // +// LoopVersioningLICM - This pass is a loop versioning pass for LICM. +// +Pass *createLoopVersioningLICMPass(); + +//===----------------------------------------------------------------------===// +// // PromoteMemoryToRegister - This pass is used to promote memory references to // be register references. A simple example of the transformation performed by // this pass is: @@ -262,7 +256,10 @@ FunctionPass *createFlattenCFGPass(); // // CFG Structurization - Remove irreducible control flow // -Pass *createStructurizeCFGPass(); +/// +/// When \p SkipUniformRegions is true the structizer will not structurize +/// regions that only contain uniform branches. +Pass *createStructurizeCFGPass(bool SkipUniformRegions = false); //===----------------------------------------------------------------------===// // @@ -329,17 +326,17 @@ FunctionPass *createEarlyCSEPass(); //===----------------------------------------------------------------------===// // -// MergedLoadStoreMotion - This pass merges loads and stores in diamonds. Loads -// are hoisted into the header, while stores sink into the footer. +// GVNHoist - This pass performs a simple and fast GVN pass over the dominator +// tree to hoist common expressions from sibling branches. // -FunctionPass *createMergedLoadStoreMotionPass(); +FunctionPass *createGVNHoistPass(); //===----------------------------------------------------------------------===// // -// GVN - This pass performs global value numbering and redundant load -// elimination cotemporaneously. +// MergedLoadStoreMotion - This pass merges loads and stores in diamonds. Loads +// are hoisted into the header, while stores sink into the footer. // -FunctionPass *createGVNPass(bool NoLoads = false); +FunctionPass *createMergedLoadStoreMotionPass(); //===----------------------------------------------------------------------===// // @@ -382,6 +379,12 @@ Pass *createLowerAtomicPass(); //===----------------------------------------------------------------------===// // +// LowerGuardIntrinsic - Lower guard intrinsics to normal control flow. +// +Pass *createLowerGuardIntrinsicPass(); + +//===----------------------------------------------------------------------===// +// // ValuePropagation - Propagate CFG-derived value information // Pass *createCorrelatedValuePropagationPass(); @@ -432,6 +435,10 @@ createSeparateConstOffsetFromGEPPass(const TargetMachine *TM = nullptr, // FunctionPass *createSpeculativeExecutionPass(); +// Same as createSpeculativeExecutionPass, but does nothing unless +// TargetTransformInfo::hasBranchDivergence() is true. +FunctionPass *createSpeculativeExecutionIfHasBranchDivergencePass(); + //===----------------------------------------------------------------------===// // // LoadCombine - Combine loads into bigger loads. @@ -478,7 +485,10 @@ FunctionPass *createNaryReassociatePass(); // // LoopDistribute - Distribute loops. // -FunctionPass *createLoopDistributePass(); +// ProcessAllLoopsByDefault instructs the pass to look for distribution +// opportunities in all loops unless -enable-loop-distribute or the +// llvm.loop.distribute.enable metadata data override this default. +FunctionPass *createLoopDistributePass(bool ProcessAllLoopsByDefault); //===----------------------------------------------------------------------===// // @@ -486,6 +496,28 @@ FunctionPass *createLoopDistributePass(); // FunctionPass *createLoopLoadEliminationPass(); +//===----------------------------------------------------------------------===// +// +// LoopSimplifyCFG - This pass performs basic CFG simplification on loops, +// primarily to help other loop passes. +// +Pass *createLoopSimplifyCFGPass(); + +//===----------------------------------------------------------------------===// +// +// LoopVersioning - Perform loop multi-versioning. +// +FunctionPass *createLoopVersioningPass(); + +//===----------------------------------------------------------------------===// +// +// LoopDataPrefetch - Perform data prefetching in loops. +// +FunctionPass *createLoopDataPrefetchPass(); + +///===---------------------------------------------------------------------===// +ModulePass *createNameAnonFunctionPass(); + } // End llvm namespace #endif |