X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FTransforms%2FScalar.h;h=5c703966eb16d57fec81bf2b5d615b9ce2ede644;hb=1be7ea773a8396a50a70dbd43fd18dec42c9ea05;hp=2d754d038fe889b21af61be305f7fafc45b0e0d2;hpb=b3ad90eaccfa0a5ca51119395de624139ca630f7;p=oota-llvm.git diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index 2d754d038fe..5c703966eb1 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/include/llvm/Transforms/Scalar.h @@ -16,10 +16,12 @@ #define LLVM_TRANSFORMS_SCALAR_H #include "llvm/ADT/StringRef.h" +#include namespace llvm { class BasicBlockPass; +class Function; class FunctionPass; class ModulePass; class Pass; @@ -91,7 +93,7 @@ FunctionPass *createBitTrackingDCEPass(); // // SROA - Replace aggregates or pieces of aggregates with scalar SSA values. // -FunctionPass *createSROAPass(bool RequiresDomTree = true); +FunctionPass *createSROAPass(); //===----------------------------------------------------------------------===// // @@ -152,7 +154,15 @@ Pass *createLoopInterchangePass(); // Pass *createLoopStrengthReducePass(); -Pass *createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset); +//===----------------------------------------------------------------------===// +// +// 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); //===----------------------------------------------------------------------===// // @@ -238,7 +248,8 @@ FunctionPass *createJumpThreadingPass(int Threshold = -1); // CFGSimplification - Merge basic blocks, eliminate unreachable blocks, // simplify terminator instructions, etc... // -FunctionPass *createCFGSimplificationPass(int Threshold = -1); +FunctionPass *createCFGSimplificationPass( + int Threshold = -1, std::function Ftor = nullptr); //===----------------------------------------------------------------------===// // @@ -395,13 +406,6 @@ FunctionPass *createLowerExpectIntrinsicPass(); // FunctionPass *createPartiallyInlineLibCallsPass(); -//===----------------------------------------------------------------------===// -// -// SampleProfilePass - Loads sample profile data from disk and generates -// IR metadata to reflect the profile. -FunctionPass *createSampleProfileLoaderPass(); -FunctionPass *createSampleProfileLoaderPass(StringRef Name); - //===----------------------------------------------------------------------===// // // ScalarizerPass - Converts vector operations into scalar operations @@ -421,12 +425,24 @@ FunctionPass * createSeparateConstOffsetFromGEPPass(const TargetMachine *TM = nullptr, bool LowerGEP = false); +//===----------------------------------------------------------------------===// +// +// SpeculativeExecution - Aggressively hoist instructions to enable +// speculative execution on targets where branches are expensive. +// +FunctionPass *createSpeculativeExecutionPass(); + //===----------------------------------------------------------------------===// // // LoadCombine - Combine loads into bigger loads. // BasicBlockPass *createLoadCombinePass(); +//===----------------------------------------------------------------------===// +// +// StraightLineStrengthReduce - This pass strength-reduces some certain +// instruction patterns in straight-line code. +// FunctionPass *createStraightLineStrengthReducePass(); //===----------------------------------------------------------------------===// @@ -437,14 +453,32 @@ FunctionPass *createStraightLineStrengthReducePass(); // RewriteStatepointsForGC which can be run at an arbitrary point in the pass // order following this pass. // -ModulePass *createPlaceSafepointsPass(); +FunctionPass *createPlaceSafepointsPass(); //===----------------------------------------------------------------------===// // // RewriteStatepointsForGC - Rewrite any gc.statepoints which do not yet have // explicit relocations to include explicit relocations. // -FunctionPass *createRewriteStatepointsForGCPass(); +ModulePass *createRewriteStatepointsForGCPass(); + +//===----------------------------------------------------------------------===// +// +// Float2Int - Demote floats to ints where possible. +// +FunctionPass *createFloat2IntPass(); + +//===----------------------------------------------------------------------===// +// +// NaryReassociate - Simplify n-ary operations by reassociation. +// +FunctionPass *createNaryReassociatePass(); + +//===----------------------------------------------------------------------===// +// +// LoopDistribute - Distribute loops. +// +FunctionPass *createLoopDistributePass(); } // End llvm namespace