LLVM  5.0.0
Enumerations | Functions | Variables
PassManagerBuilder.cpp File Reference
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "llvm-c/Transforms/PassManagerBuilder.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/BasicAliasAnalysis.h"
#include "llvm/Analysis/CFLAndersAliasAnalysis.h"
#include "llvm/Analysis/CFLSteensAliasAnalysis.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/ScopedNoAliasAA.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TypeBasedAliasAnalysis.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/ModuleSummaryIndex.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/ForceFunctionAttrs.h"
#include "llvm/Transforms/IPO/FunctionAttrs.h"
#include "llvm/Transforms/IPO/InferFunctionAttrs.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Scalar/GVN.h"
#include "llvm/Transforms/Scalar/SimpleLoopUnswitch.h"
#include "llvm/Transforms/Vectorize.h"
Include dependency graph for PassManagerBuilder.cpp:

Go to the source code of this file.

Enumerations

enum  CFLAAType {
  CFLAAType::None, CFLAAType::Steensgaard, CFLAAType::Andersen, CFLAAType::Both,
  CFLAAType::None, CFLAAType::Steensgaard, CFLAAType::Andersen, CFLAAType::Both
}
 

Functions

static bool GlobalExtensionsNotEmpty ()
 Check if GlobalExtensions is constructed and not empty. More...
 
PassManagerBuilder * unwrap (LLVMPassManagerBuilderRef P)
 
LLVMPassManagerBuilderRef wrap (PassManagerBuilder *P)
 
LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate ()
 See llvm::PassManagerBuilder. More...
 
void LLVMPassManagerBuilderDispose (LLVMPassManagerBuilderRef PMB)
 
void LLVMPassManagerBuilderSetOptLevel (LLVMPassManagerBuilderRef PMB, unsigned OptLevel)
 See llvm::PassManagerBuilder::OptLevel. More...
 
void LLVMPassManagerBuilderSetSizeLevel (LLVMPassManagerBuilderRef PMB, unsigned SizeLevel)
 See llvm::PassManagerBuilder::SizeLevel. More...
 
void LLVMPassManagerBuilderSetDisableUnitAtATime (LLVMPassManagerBuilderRef PMB, LLVMBool Value)
 See llvm::PassManagerBuilder::DisableUnitAtATime. More...
 
void LLVMPassManagerBuilderSetDisableUnrollLoops (LLVMPassManagerBuilderRef PMB, LLVMBool Value)
 See llvm::PassManagerBuilder::DisableUnrollLoops. More...
 
void LLVMPassManagerBuilderSetDisableSimplifyLibCalls (LLVMPassManagerBuilderRef PMB, LLVMBool Value)
 See llvm::PassManagerBuilder::DisableSimplifyLibCalls. More...
 
void LLVMPassManagerBuilderUseInlinerWithThreshold (LLVMPassManagerBuilderRef PMB, unsigned Threshold)
 See llvm::PassManagerBuilder::Inliner. More...
 
void LLVMPassManagerBuilderPopulateFunctionPassManager (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM)
 See llvm::PassManagerBuilder::populateFunctionPassManager. More...
 
void LLVMPassManagerBuilderPopulateModulePassManager (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM)
 See llvm::PassManagerBuilder::populateModulePassManager. More...
 
void LLVMPassManagerBuilderPopulateLTOPassManager (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM, LLVMBool Internalize, LLVMBool RunInliner)
 See llvm::PassManagerBuilder::populateLTOPassManager. More...
 

Variables

static cl::opt< bool > RunPartialInlining ("enable-partial-inlining", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Run Partial inlinining pass"))
 
static cl::opt< bool > RunLoopVectorization ("vectorize-loops", cl::Hidden, cl::desc("Run the Loop vectorization passes"))
 
static cl::opt< bool > RunSLPVectorization ("vectorize-slp", cl::Hidden, cl::desc("Run the SLP vectorization passes"))
 
static cl::opt< bool > UseGVNAfterVectorization ("use-gvn-after-vectorization", cl::init(false), cl::Hidden, cl::desc("Run GVN instead of Early CSE after vectorization passes"))
 
static cl::opt< bool > ExtraVectorizerPasses ("extra-vectorizer-passes", cl::init(false), cl::Hidden, cl::desc("Run cleanup optimization passes after vectorization."))
 
static cl::opt< bool > RunLoopRerolling ("reroll-loops", cl::Hidden, cl::desc("Run the loop rerolling pass"))
 
static cl::opt< bool > RunNewGVN ("enable-newgvn", cl::init(false), cl::Hidden, cl::desc("Run the NewGVN pass"))
 
static cl::opt< bool > RunSLPAfterLoopVectorization ("run-slp-after-loop-vectorization", cl::init(true), cl::Hidden, cl::desc("Run the SLP vectorizer (and BB vectorizer) after the Loop ""vectorizer instead of before"))
 
static cl::opt< CFLAAType > UseCFLAA ("use-cfl-aa", cl::init(CFLAAType::None), cl::Hidden, cl::desc("Enable the new, experimental CFL alias analysis"), cl::values(clEnumValN(CFLAAType::None,"none","Disable CFL-AA"), clEnumValN(CFLAAType::Steensgaard,"steens","Enable unification-based CFL-AA"), clEnumValN(CFLAAType::Andersen,"anders","Enable inclusion-based CFL-AA"), clEnumValN(CFLAAType::Both,"both","Enable both variants of CFL-AA")))
 
static cl::opt< bool > EnableLoopInterchange ("enable-loopinterchange", cl::init(false), cl::Hidden, cl::desc("Enable the new, experimental LoopInterchange Pass"))
 
static cl::opt< bool > EnableNonLTOGlobalsModRef ("enable-non-lto-gmr", cl::init(true), cl::Hidden, cl::desc("Enable the GlobalsModRef AliasAnalysis outside of the LTO pipeline."))
 
static cl::opt< bool > EnableLoopLoadElim ("enable-loop-load-elim", cl::init(true), cl::Hidden, cl::desc("Enable the LoopLoadElimination Pass"))
 
static cl::opt< bool > EnablePrepareForThinLTO ("prepare-for-thinlto", cl::init(false), cl::Hidden, cl::desc("Enable preparation for ThinLTO."))
 
static cl::opt< bool > RunPGOInstrGen ("profile-generate", cl::init(false), cl::Hidden, cl::desc("Enable PGO instrumentation."))
 
static cl::opt< std::string > PGOOutputFile ("profile-generate-file", cl::init(""), cl::Hidden, cl::desc("Specify the path of profile data file."))
 
static cl::opt< std::string > RunPGOInstrUse ("profile-use", cl::init(""), cl::Hidden, cl::value_desc("filename"), cl::desc("Enable use phase of PGO instrumentation and specify the path ""of profile data file"))
 
static cl::opt< bool > UseLoopVersioningLICM ("enable-loop-versioning-licm", cl::init(false), cl::Hidden, cl::desc("Enable the experimental Loop Versioning LICM pass"))
 
static cl::opt< bool > DisablePreInliner ("disable-preinline", cl::init(false), cl::Hidden, cl::desc("Disable pre-instrumentation inliner"))
 
static cl::opt< int > PreInlineThreshold ("preinline-threshold", cl::Hidden, cl::init(75), cl::ZeroOrMore, cl::desc("Control the amount of inlining in pre-instrumentation inliner ""(default = 75)"))
 
static cl::opt< bool > EnableEarlyCSEMemSSA ("enable-earlycse-memssa", cl::init(true), cl::Hidden, cl::desc("Enable the EarlyCSE w/ MemorySSA pass (default = on)"))
 
static cl::opt< bool > EnableGVNHoist ("enable-gvn-hoist", cl::init(false), cl::Hidden, cl::desc("Enable the GVN hoisting pass (default = off)"))
 
static cl::opt< bool > DisableLibCallsShrinkWrap ("disable-libcalls-shrinkwrap", cl::init(false), cl::Hidden, cl::desc("Disable shrink-wrap library calls"))
 
static cl::opt< bool > EnableSimpleLoopUnswitch ("enable-simple-loop-unswitch", cl::init(false), cl::Hidden, cl::desc("Enable the simple loop unswitch pass."))
 
static cl::opt< bool > EnableGVNSink ("enable-gvn-sink", cl::init(false), cl::Hidden, cl::desc("Enable the GVN sinking pass (default = off)"))
 
static ManagedStatic
< SmallVector< std::pair
< PassManagerBuilder::ExtensionPointTy,
PassManagerBuilder::ExtensionFn >, 8 > > 
GlobalExtensions
 Set of global extensions, automatically added as part of the standard set. More...
 

Enumeration Type Documentation

enum CFLAAType
strong
Enumerator
None 
Steensgaard 
Andersen 
Both 
None 
Steensgaard 
Andersen 
Both 

Definition at line 81 of file PassManagerBuilder.cpp.

Function Documentation

static bool GlobalExtensionsNotEmpty ( )
static

Check if GlobalExtensions is constructed and not empty.

Since GlobalExtensions is a managed static, calling 'empty()' will trigger the construction of the object.

Definition at line 194 of file PassManagerBuilder.cpp.

References GlobalExtensions.

Referenced by llvm::PassManagerBuilder::populateModulePassManager().

Definition at line 904 of file PassManagerBuilder.cpp.

References P.

Definition at line 908 of file PassManagerBuilder.cpp.

References P.

Variable Documentation

cl::opt<bool> DisableLibCallsShrinkWrap("disable-libcalls-shrinkwrap", cl::init(false), cl::Hidden, cl::desc("Disable shrink-wrap library calls"))
static
cl::opt<bool> DisablePreInliner("disable-preinline", cl::init(false), cl::Hidden, cl::desc("Disable pre-instrumentation inliner"))
static
cl::opt<bool> EnableEarlyCSEMemSSA("enable-earlycse-memssa", cl::init(true), cl::Hidden, cl::desc("Enable the EarlyCSE w/ MemorySSA pass (default = on)"))
static
cl::opt<bool> EnableGVNHoist("enable-gvn-hoist", cl::init(false), cl::Hidden, cl::desc("Enable the GVN hoisting pass (default = off)"))
static
cl::opt<bool> EnableGVNSink("enable-gvn-sink", cl::init(false), cl::Hidden, cl::desc("Enable the GVN sinking pass (default = off)"))
static
cl::opt<bool> EnableLoopInterchange("enable-loopinterchange", cl::init(false), cl::Hidden, cl::desc("Enable the new, experimental LoopInterchange Pass"))
static
cl::opt<bool> EnableLoopLoadElim("enable-loop-load-elim", cl::init(true), cl::Hidden, cl::desc("Enable the LoopLoadElimination Pass"))
static
cl::opt<bool> EnableNonLTOGlobalsModRef("enable-non-lto-gmr", cl::init(true), cl::Hidden, cl::desc("Enable the GlobalsModRef AliasAnalysis outside of the LTO pipeline."))
static
cl::opt<bool> EnablePrepareForThinLTO("prepare-for-thinlto", cl::init(false), cl::Hidden, cl::desc("Enable preparation for ThinLTO."))
static
cl::opt<bool> EnableSimpleLoopUnswitch("enable-simple-loop-unswitch", cl::init(false), cl::Hidden, cl::desc("Enable the simple loop unswitch pass."))
static
cl::opt<bool> ExtraVectorizerPasses("extra-vectorizer-passes", cl::init(false), cl::Hidden, cl::desc("Run cleanup optimization passes after vectorization."))
static

Set of global extensions, automatically added as part of the standard set.

Definition at line 189 of file PassManagerBuilder.cpp.

Referenced by llvm::PassManagerBuilder::addGlobalExtension(), and GlobalExtensionsNotEmpty().

cl::opt<std::string> PGOOutputFile("profile-generate-file", cl::init(""), cl::Hidden, cl::desc("Specify the path of profile data file."))
static
cl::opt<int> PreInlineThreshold("preinline-threshold", cl::Hidden, cl::init(75), cl::ZeroOrMore, cl::desc("Control the amount of inlining in pre-instrumentation inliner ""(default = 75)"))
static
cl::opt<bool> RunLoopRerolling("reroll-loops", cl::Hidden, cl::desc("Run the loop rerolling pass"))
static
cl::opt<bool> RunLoopVectorization("vectorize-loops", cl::Hidden, cl::desc("Run the Loop vectorization passes"))
static
cl::opt<bool> RunNewGVN("enable-newgvn", cl::init(false), cl::Hidden, cl::desc("Run the NewGVN pass"))
static
cl::opt<bool> RunPartialInlining("enable-partial-inlining", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Run Partial inlinining pass"))
static
cl::opt<bool> RunPGOInstrGen("profile-generate", cl::init(false), cl::Hidden, cl::desc("Enable PGO instrumentation."))
static
cl::opt<std::string> RunPGOInstrUse("profile-use", cl::init(""), cl::Hidden, cl::value_desc("filename"), cl::desc("Enable use phase of PGO instrumentation and specify the path ""of profile data file"))
static
cl::opt<bool> RunSLPAfterLoopVectorization("run-slp-after-loop-vectorization", cl::init(true), cl::Hidden, cl::desc("Run the SLP vectorizer (and BB vectorizer) after the Loop ""vectorizer instead of before"))
static
cl::opt<bool> RunSLPVectorization("vectorize-slp", cl::Hidden, cl::desc("Run the SLP vectorization passes"))
static
cl::opt<CFLAAType> UseCFLAA("use-cfl-aa", cl::init(CFLAAType::None), cl::Hidden, cl::desc("Enable the new, experimental CFL alias analysis"), cl::values(clEnumValN(CFLAAType::None,"none","Disable CFL-AA"),clEnumValN(CFLAAType::Steensgaard,"steens","Enable unification-based CFL-AA"),clEnumValN(CFLAAType::Andersen,"anders","Enable inclusion-based CFL-AA"),clEnumValN(CFLAAType::Both,"both","Enable both variants of CFL-AA")))
static
cl::opt<bool> UseGVNAfterVectorization("use-gvn-after-vectorization", cl::init(false), cl::Hidden, cl::desc("Run GVN instead of Early CSE after vectorization passes"))
static
cl::opt<bool> UseLoopVersioningLICM("enable-loop-versioning-licm", cl::init(false), cl::Hidden, cl::desc("Enable the experimental Loop Versioning LICM pass"))
static