LLVM  6.0.0svn
Classes | Namespaces | Functions | Variables
InlineCost.h File Reference
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include <cassert>
#include <climits>
Include dependency graph for InlineCost.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::InlineCost
 Represents the cost of inlining a function. More...
 
struct  llvm::InlineParams
 Thresholds to tune inline cost analysis. More...
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 
 llvm::InlineConstants
 

Functions

InlineParams llvm::getInlineParams ()
 Generate the parameters to tune the inline cost analysis based only on the commandline options. More...
 
InlineParams llvm::getInlineParams (int Threshold)
 Generate the parameters to tune the inline cost analysis based on command line options. More...
 
InlineParams llvm::getInlineParams (unsigned OptLevel, unsigned SizeOptLevel)
 Generate the parameters to tune the inline cost analysis based on command line options. More...
 
int llvm::getCallsiteCost (CallSite CS, const DataLayout &DL)
 Return the cost associated with a callsite, including parameter passing and the call/return instruction. More...
 
InlineCost llvm::getInlineCost (CallSite CS, const InlineParams &Params, TargetTransformInfo &CalleeTTI, std::function< AssumptionCache &(Function &)> &GetAssumptionCache, Optional< function_ref< BlockFrequencyInfo &(Function &)>> GetBFI, ProfileSummaryInfo *PSI, OptimizationRemarkEmitter *ORE=nullptr)
 Get an InlineCost object representing the cost of inlining this callsite. More...
 
InlineCost llvm::getInlineCost (CallSite CS, Function *Callee, const InlineParams &Params, TargetTransformInfo &CalleeTTI, std::function< AssumptionCache &(Function &)> &GetAssumptionCache, Optional< function_ref< BlockFrequencyInfo &(Function &)>> GetBFI, ProfileSummaryInfo *PSI, OptimizationRemarkEmitter *ORE)
 Get an InlineCost with the callee explicitly specified. More...
 
bool llvm::isInlineViable (Function &Callee)
 Minimal filter to detect invalid constructs for inlining. More...
 

Variables

const int llvm::InlineConstants::OptSizeThreshold = 50
 Use when optsize (-Os) is specified. More...
 
const int llvm::InlineConstants::OptMinSizeThreshold = 5
 Use when minsize (-Oz) is specified. More...
 
const int llvm::InlineConstants::OptAggressiveThreshold = 250
 Use when -O3 is specified. More...
 
const int llvm::InlineConstants::InstrCost = 5
 
const int llvm::InlineConstants::IndirectCallThreshold = 100
 
const int llvm::InlineConstants::CallPenalty = 25
 
const int llvm::InlineConstants::LastCallToStaticBonus = 15000
 
const int llvm::InlineConstants::ColdccPenalty = 2000
 
const int llvm::InlineConstants::NoreturnPenalty = 10000
 
const unsigned llvm::InlineConstants::TotalAllocaSizeRecursiveCaller = 1024
 Do not inline functions which allocate this many bytes on the stack when the caller is recursive. More...