X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FTransforms%2FIPO%2FPassManagerBuilder.h;h=4c6f3aa1c4549ee08bf14c6274f9619c09c2db0a;hb=62692b442aa19ad7f110faa55577f8c1af237175;hp=734f37e52eb0a7f486f38ba6317ab53e6876bda6;hpb=1db394921b9635980555cc8d7e0d05b5e885784f;p=oota-llvm.git diff --git a/include/llvm/Transforms/IPO/PassManagerBuilder.h b/include/llvm/Transforms/IPO/PassManagerBuilder.h index 734f37e52eb..4c6f3aa1c45 100644 --- a/include/llvm/Transforms/IPO/PassManagerBuilder.h +++ b/include/llvm/Transforms/IPO/PassManagerBuilder.h @@ -12,16 +12,22 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_SUPPORT_PASSMANAGERBUILDER_H -#define LLVM_SUPPORT_PASSMANAGERBUILDER_H +#ifndef LLVM_TRANSFORMS_IPO_PASSMANAGERBUILDER_H +#define LLVM_TRANSFORMS_IPO_PASSMANAGERBUILDER_H #include namespace llvm { - class TargetLibraryInfo; - class PassManagerBase; - class Pass; - class FunctionPassManager; +class TargetLibraryInfo; +class Pass; + +// The old pass manager infrastructure is hidden in a legacy namespace now. +namespace legacy { +class PassManagerBase; +class FunctionPassManager; +} +using legacy::PassManagerBase; +using legacy::FunctionPassManager; /// PassManagerBuilder - This class is used to set up a standard optimization /// sequence for languages like C and C++, allowing some APIs to customize the @@ -80,7 +86,12 @@ public: /// EP_EnabledOnOptLevel0 - This extension point allows adding passes that /// should not be disabled by O0 optimization level. The passes will be /// inserted after the inlining pass. - EP_EnabledOnOptLevel0 + EP_EnabledOnOptLevel0, + + /// EP_Peephole - This extension point allows adding passes that perform + /// peephole optimizations similar to the instruction combiner. These passes + /// will be inserted after each instance of the instruction combiner pass. + EP_Peephole, }; /// The Optimization Level - Specify the basic optimization level. @@ -100,10 +111,13 @@ public: /// added to the per-module passes. Pass *Inliner; - bool DisableSimplifyLibCalls; + bool DisableTailCalls; bool DisableUnitAtATime; bool DisableUnrollLoops; - bool Vectorize; + bool BBVectorize; + bool SLPVectorize; + bool LoopVectorize; + bool RerollLoops; private: /// ExtensionList - This is list of all of the extensions that are registered. @@ -131,8 +145,9 @@ public: /// populateModulePassManager - This sets up the primary pass manager. void populateModulePassManager(PassManagerBase &MPM); void populateLTOPassManager(PassManagerBase &PM, bool Internalize, - bool RunInliner); + bool RunInliner, bool DisableGVNLoadPRE = false); }; + /// Registers a function for adding a standard set of passes. This should be /// used by optimizer plugins to allow all front ends to transparently use /// them. Create a static instance of this class in your plugin, providing a @@ -143,5 +158,6 @@ struct RegisterStandardPasses { PassManagerBuilder::addGlobalExtension(Ty, Fn); } }; + } // end namespace llvm #endif