|
LLVM
4.0.0
|
#include "llvm/Analysis/InlineCost.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SetVector.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/Analysis/AssumptionCache.h"#include "llvm/Analysis/CodeMetrics.h"#include "llvm/Analysis/ConstantFolding.h"#include "llvm/Analysis/InstructionSimplify.h"#include "llvm/Analysis/ProfileSummaryInfo.h"#include "llvm/Analysis/TargetTransformInfo.h"#include "llvm/IR/CallSite.h"#include "llvm/IR/CallingConv.h"#include "llvm/IR/DataLayout.h"#include "llvm/IR/GetElementPtrTypeIterator.h"#include "llvm/IR/GlobalAlias.h"#include "llvm/IR/InstVisitor.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Operator.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "inline-cost" |
| #define | DEBUG_PRINT_STAT(x) dbgs() << " " #x ": " << x << "\n" |
Functions | |
| STATISTIC (NumCallsAnalyzed,"Number of call sites analyzed") | |
| template<typename AttrKind > | |
| static bool | attributeMatches (Function *F1, Function *F2, AttrKind Attr) |
| Test that two functions either have or have not the given attribute at the same time. More... | |
| static bool | functionsHaveCompatibleAttributes (Function *Caller, Function *Callee, TargetTransformInfo &TTI) |
| Test that there are no attribute conflicts between Caller and Callee that prevent inlining. More... | |
| static int | computeThresholdFromOptLevels (unsigned OptLevel, unsigned SizeOptLevel) |
Variables | |
| static cl::opt< int > | InlineThreshold ("inline-threshold", cl::Hidden, cl::init(225), cl::ZeroOrMore, cl::desc("Control the amount of inlining to perform (default = 225)")) |
| static cl::opt< int > | HintThreshold ("inlinehint-threshold", cl::Hidden, cl::init(325), cl::desc("Threshold for inlining functions with inline hint")) |
| static cl::opt< int > | ColdThreshold ("inlinecold-threshold", cl::Hidden, cl::init(225), cl::desc("Threshold for inlining functions with cold attribute")) |
| static cl::opt< int > | HotCallSiteThreshold ("hot-callsite-threshold", cl::Hidden, cl::init(3000), cl::ZeroOrMore, cl::desc("Threshold for hot callsites ")) |
| #define DEBUG_PRINT_STAT | ( | x | ) | dbgs() << " " #x ": " << x << "\n" |
| #define DEBUG_TYPE "inline-cost" |
Definition at line 39 of file InlineCost.cpp.
|
static |
Test that two functions either have or have not the given attribute at the same time.
Definition at line 1436 of file InlineCost.cpp.
References llvm::Function::getFnAttribute().
Definition at line 1593 of file InlineCost.cpp.
References InlineThreshold, llvm::InlineConstants::OptAggressiveThreshold, llvm::InlineConstants::OptMinSizeThreshold, and llvm::InlineConstants::OptSizeThreshold.
Referenced by llvm::getInlineParams().
|
static |
Test that there are no attribute conflicts between Caller and Callee that prevent inlining.
Definition at line 1442 of file InlineCost.cpp.
References llvm::AttributeFuncs::areInlineCompatible(), and llvm::TargetTransformInfo::areInlineCompatible().
Referenced by llvm::getInlineCost().
| STATISTIC | ( | NumCallsAnalyzed | , |
| "Number of call sites analyzed" | |||
| ) |
|
static |
Referenced by llvm::getInlineParams().
|
static |
Referenced by llvm::getInlineParams().
|
static |
Referenced by llvm::getInlineParams().
|
static |
Referenced by computeThresholdFromOptLevels(), and llvm::getInlineParams().
1.8.6