LLVM  6.0.0svn
Macros | Functions | Variables
PartialInlining.cpp File Reference
#include "llvm/Transforms/IPO/PartialInlining.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/CodeMetrics.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/OptimizationDiagnosticInfo.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/CodeExtractor.h"
Include dependency graph for PartialInlining.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "partial-inlining"
 

Functions

 STATISTIC (NumPartialInlined, "Number of callsites functions partially inlined into.")
 
static bool hasProfileData (Function *F, FunctionOutliningInfo *OI)
 
 INITIALIZE_PASS_BEGIN (PartialInlinerLegacyPass, "partial-inliner", "Partial Inliner", false, false) INITIALIZE_PASS_END(PartialInlinerLegacyPass
 

Variables

static cl::opt< boolDisablePartialInlining ("disable-partial-inlining", cl::init(false), cl::Hidden, cl::desc("Disable partial ininling"))
 
static cl::opt< boolSkipCostAnalysis ("skip-partial-inlining-cost-analysis", cl::init(false), cl::ZeroOrMore, cl::ReallyHidden, cl::desc("Skip Cost Analysis"))
 
static cl::opt< unsignedMaxNumInlineBlocks ("max-num-inline-blocks", cl::init(5), cl::Hidden, cl::desc("Max Number of Blocks To be Partially Inlined"))
 
static cl::opt< int > MaxNumPartialInlining ("max-partial-inlining", cl::init(-1), cl::Hidden, cl::ZeroOrMore, cl::desc("Max number of partial inlining. The default is unlimited"))
 
static cl::opt< int > OutlineRegionFreqPercent ("outline-region-freq-percent", cl::init(75), cl::Hidden, cl::ZeroOrMore, cl::desc("Relative frequency of outline region to " "the entry block"))
 
static cl::opt< unsignedExtraOutliningPenalty ("partial-inlining-extra-penalty", cl::init(0), cl::Hidden, cl::desc("A debug option to add additional penalty to the computed one."))
 
partial inliner
 
partial Partial Inliner
 
partial Partial false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "partial-inlining"

Definition at line 37 of file PartialInlining.cpp.

Referenced by hasProfileData().

Function Documentation

◆ hasProfileData()

static bool hasProfileData ( Function F,
FunctionOutliningInfo *  OI 
)
static

Definition at line 399 of file PartialInlining.cpp.

References llvm::PHINode::addIncoming(), llvm::all_of(), assert(), llvm::Function::back(), llvm::BasicBlock::begin(), llvm::CloneFunction(), llvm::PHINode::Create(), DEBUG_TYPE, DisablePartialInlining, llvm::dyn_cast(), E, llvm::OptimizationRemarkEmitter::emit(), llvm::BasicBlock::end(), llvm::Instruction::extractProfMetadata(), ExtraOutliningPenalty, F, llvm::find(), llvm::BlockFrequencyInfo::getBlockProfileCount(), llvm::BranchProbability::getBranchProbability(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCaller(), llvm::getCallsiteCost(), llvm::InlineCost::getCost(), llvm::InlineCost::getCostDelta(), llvm::Module::getDataLayout(), llvm::Function::getEntryCount(), llvm::BlockFrequency::getFrequency(), llvm::PHINode::getIncomingValueForBlock(), llvm::getInlineCost(), llvm::getInlineParams(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::IntrinsicInst::getIntrinsicID(), llvm::PHINode::getNumIncomingValues(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::Function::hasAddressTaken(), llvm::Function::hasFnAttribute(), I, INITIALIZE_PASS_BEGIN(), INITIALIZE_PASS_DEPENDENCY, llvm::InlineFunction(), llvm::MipsISD::Ins, llvm::InlineConstants::InstrCost, llvm::InlineCost::isAlways(), llvm::GlobalValue::isDeclaration(), llvm::InlineCost::isNever(), llvm::BranchInst::isUnconditional(), llvm::max(), OutlineRegionFreqPercent, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::DominatorTreeBase< NodeT, IsPostDom >::recalculate(), Recursive(), llvm::PHINode::removeIncomingValue(), llvm::Value::replaceAllUsesWith(), llvm::User::replaceUsesOfWith(), SI, llvm::Module::size(), SkipCostAnalysis, T, llvm::Value::use_empty(), llvm::Value::user_begin(), llvm::Value::user_end(), Users, and llvm::Value::users().

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( PartialInlinerLegacyPass  ,
"partial-inliner ,
"Partial Inliner ,
false  ,
false   
)

Referenced by hasProfileData().

◆ STATISTIC()

STATISTIC ( NumPartialInlined  ,
"Number of callsites functions partially inlined into."   
)

Variable Documentation

◆ DisablePartialInlining

cl::opt<bool> DisablePartialInlining("disable-partial-inlining", cl::init(false), cl::Hidden, cl::desc("Disable partial ininling"))
static

Referenced by hasProfileData().

◆ ExtraOutliningPenalty

cl::opt<unsigned> ExtraOutliningPenalty("partial-inlining-extra-penalty", cl::init(0), cl::Hidden, cl::desc("A debug option to add additional penalty to the computed one."))
static

Referenced by hasProfileData().

◆ false

partial Partial false

Definition at line 962 of file PartialInlining.cpp.

◆ inliner

partial inliner

Definition at line 962 of file PartialInlining.cpp.

◆ Inliner

partial Partial Inliner

◆ MaxNumInlineBlocks

cl::opt<unsigned> MaxNumInlineBlocks("max-num-inline-blocks", cl::init(5), cl::Hidden, cl::desc("Max Number of Blocks To be Partially Inlined"))
static

◆ MaxNumPartialInlining

cl::opt<int> MaxNumPartialInlining("max-partial-inlining", cl::init(-1), cl::Hidden, cl::ZeroOrMore, cl::desc("Max number of partial inlining. The default is unlimited"))
static

◆ OutlineRegionFreqPercent

cl::opt<int> OutlineRegionFreqPercent("outline-region-freq-percent", cl::init(75), cl::Hidden, cl::ZeroOrMore, cl::desc("Relative frequency of outline region to " "the entry block"))
static

Referenced by hasProfileData().

◆ SkipCostAnalysis

cl::opt<bool> SkipCostAnalysis("skip-partial-inlining-cost-analysis", cl::init(false), cl::ZeroOrMore, cl::ReallyHidden, cl::desc("Skip Cost Analysis"))
static

Referenced by hasProfileData().