LLVM  6.0.0svn
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...
 
PassManagerBuilderunwrap (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< boolRunPartialInlining ("enable-partial-inlining", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Run Partial inlinining pass"))
 
static cl::opt< boolRunLoopVectorization ("vectorize-loops", cl::Hidden, cl::desc("Run the Loop vectorization passes"))
 
static cl::opt< boolRunSLPVectorization ("vectorize-slp", cl::Hidden, cl::desc("Run the SLP vectorization passes"))
 
static cl::opt< boolUseGVNAfterVectorization ("use-gvn-after-vectorization", cl::init(false), cl::Hidden, cl::desc("Run GVN instead of Early CSE after vectorization passes"))
 
static cl::opt< boolExtraVectorizerPasses ("extra-vectorizer-passes", cl::init(false), cl::Hidden, cl::desc("Run cleanup optimization passes after vectorization."))
 
static cl::opt< boolRunLoopRerolling ("reroll-loops", cl::Hidden, cl::desc("Run the loop rerolling pass"))
 
static cl::opt< boolRunNewGVN ("enable-newgvn", cl::init(false), cl::Hidden, cl::desc("Run the NewGVN pass"))
 
static cl::opt< boolRunSLPAfterLoopVectorization ("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< CFLAATypeUseCFLAA ("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< boolEnableLoopInterchange ("enable-loopinterchange", cl::init(false), cl::Hidden, cl::desc("Enable the new, experimental LoopInterchange Pass"))
 
static cl::opt< boolEnableNonLTOGlobalsModRef ("enable-non-lto-gmr", cl::init(true), cl::Hidden, cl::desc("Enable the GlobalsModRef AliasAnalysis outside of the LTO pipeline."))
 
static cl::opt< boolEnableLoopLoadElim ("enable-loop-load-elim", cl::init(true), cl::Hidden, cl::desc("Enable the LoopLoadElimination Pass"))
 
static cl::opt< boolEnablePrepareForThinLTO ("prepare-for-thinlto", cl::init(false), cl::Hidden, cl::desc("Enable preparation for ThinLTO."))
 
static cl::opt< boolRunPGOInstrGen ("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< boolUseLoopVersioningLICM ("enable-loop-versioning-licm", cl::init(false), cl::Hidden, cl::desc("Enable the experimental Loop Versioning LICM pass"))
 
static cl::opt< boolDisablePreInliner ("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< boolEnableEarlyCSEMemSSA ("enable-earlycse-memssa", cl::init(true), cl::Hidden, cl::desc("Enable the EarlyCSE w/ MemorySSA pass (default = on)"))
 
static cl::opt< boolEnableGVNHoist ("enable-gvn-hoist", cl::init(false), cl::Hidden, cl::desc("Enable the GVN hoisting pass (default = off)"))
 
static cl::opt< boolDisableLibCallsShrinkWrap ("disable-libcalls-shrinkwrap", cl::init(false), cl::Hidden, cl::desc("Disable shrink-wrap library calls"))
 
static cl::opt< boolEnableSimpleLoopUnswitch ("enable-simple-loop-unswitch", cl::init(false), cl::Hidden, cl::desc("Enable the simple loop unswitch pass."))
 
static cl::opt< boolEnableGVNSink ("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

◆ CFLAAType

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

Definition at line 81 of file PassManagerBuilder.cpp.

Function Documentation

◆ GlobalExtensionsNotEmpty()

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.

Referenced by llvm::PassManagerBuilder::addExtension(), and llvm::PassManagerBuilder::populateModulePassManager().

◆ unwrap()

Definition at line 904 of file PassManagerBuilder.cpp.

References P.

◆ wrap()

Definition at line 908 of file PassManagerBuilder.cpp.

References P.

Variable Documentation

◆ DisableLibCallsShrinkWrap

cl::opt<bool> DisableLibCallsShrinkWrap("disable-libcalls-shrinkwrap", cl::init(false), cl::Hidden, cl::desc("Disable shrink-wrap library calls"))
static

◆ DisablePreInliner

cl::opt<bool> DisablePreInliner("disable-preinline", cl::init(false), cl::Hidden, cl::desc("Disable pre-instrumentation inliner"))
static

◆ EnableEarlyCSEMemSSA

cl::opt<bool> EnableEarlyCSEMemSSA("enable-earlycse-memssa", cl::init(true), cl::Hidden, cl::desc("Enable the EarlyCSE w/ MemorySSA pass (default = on)"))
static

◆ EnableGVNHoist

cl::opt<bool> EnableGVNHoist("enable-gvn-hoist", cl::init(false), cl::Hidden, cl::desc("Enable the GVN hoisting pass (default = off)"))
static

◆ EnableGVNSink

cl::opt<bool> EnableGVNSink("enable-gvn-sink", cl::init(false), cl::Hidden, cl::desc("Enable the GVN sinking pass (default = off)"))
static

◆ EnableLoopInterchange

cl::opt<bool> EnableLoopInterchange("enable-loopinterchange", cl::init(false), cl::Hidden, cl::desc("Enable the new, experimental LoopInterchange Pass"))
static

◆ EnableLoopLoadElim

cl::opt<bool> EnableLoopLoadElim("enable-loop-load-elim", cl::init(true), cl::Hidden, cl::desc("Enable the LoopLoadElimination Pass"))
static

◆ EnableNonLTOGlobalsModRef

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

◆ EnablePrepareForThinLTO

cl::opt<bool> EnablePrepareForThinLTO("prepare-for-thinlto", cl::init(false), cl::Hidden, cl::desc("Enable preparation for ThinLTO."))
static

◆ EnableSimpleLoopUnswitch

cl::opt<bool> EnableSimpleLoopUnswitch("enable-simple-loop-unswitch", cl::init(false), cl::Hidden, cl::desc("Enable the simple loop unswitch pass."))
static

◆ ExtraVectorizerPasses

cl::opt<bool> ExtraVectorizerPasses("extra-vectorizer-passes", cl::init(false), cl::Hidden, cl::desc("Run cleanup optimization passes after vectorization."))
static

◆ GlobalExtensions

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

Definition at line 189 of file PassManagerBuilder.cpp.

◆ PGOOutputFile

cl::opt<std::string> PGOOutputFile("profile-generate-file", cl::init(""), cl::Hidden, cl::desc("Specify the path of profile data file."))
static

◆ PreInlineThreshold

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

◆ RunLoopRerolling

cl::opt<bool> RunLoopRerolling("reroll-loops", cl::Hidden, cl::desc("Run the loop rerolling pass"))
static

◆ RunLoopVectorization

cl::opt<bool> RunLoopVectorization("vectorize-loops", cl::Hidden, cl::desc("Run the Loop vectorization passes"))
static

◆ RunNewGVN

cl::opt<bool> RunNewGVN("enable-newgvn", cl::init(false), cl::Hidden, cl::desc("Run the NewGVN pass"))
static

◆ RunPartialInlining

cl::opt<bool> RunPartialInlining("enable-partial-inlining", cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::desc("Run Partial inlinining pass"))
static

◆ RunPGOInstrGen

cl::opt<bool> RunPGOInstrGen("profile-generate", cl::init(false), cl::Hidden, cl::desc("Enable PGO instrumentation."))
static

◆ RunPGOInstrUse

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

◆ RunSLPAfterLoopVectorization

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

◆ RunSLPVectorization

cl::opt<bool> RunSLPVectorization("vectorize-slp", cl::Hidden, cl::desc("Run the SLP vectorization passes"))
static

◆ UseCFLAA

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

◆ UseGVNAfterVectorization

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

◆ UseLoopVersioningLICM

cl::opt<bool> UseLoopVersioningLICM("enable-loop-versioning-licm", cl::init(false), cl::Hidden, cl::desc("Enable the experimental Loop Versioning LICM pass"))
static