15 #define DEBUG_TYPE "inline"
34 class AlwaysInliner :
public Inliner {
39 AlwaysInliner() :
Inliner(
ID, -2000000000,
true), ICA(0) {
43 AlwaysInliner(
bool InsertLifetime)
44 :
Inliner(
ID, -2000000000, InsertLifetime), ICA(0) {
56 virtual bool doFinalization(
CallGraph &CG) {
57 return removeDeadFunctions(CG,
true);
65 "Inliner for always_inline functions",
false,
false)
74 return new AlwaysInliner(InsertLifetime);
98 ICA->isInlineViable(*Callee))
105 ICA = &getAnalysis<InlineCostAnalysis>();
109 void AlwaysInliner::getAnalysisUsage(
AnalysisUsage &AU)
const {
static PassRegistry * getPassRegistry()
Pass * createAlwaysInlinerPass()
bool hasAttribute(unsigned Index, Attribute::AttrKind Kind) const
Return true if the attribute exists at the given index.
Represents the cost of inlining a function.
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
virtual bool doFinalization(Module &)
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
ID
LLVM Calling Convention Representation.
Cost analyzer used by inliner.
always Inliner for always_inline false
static InlineCost getNever()
for(unsigned i=0, e=MI->getNumOperands();i!=e;++i)
void initializeAlwaysInlinerPass(PassRegistry &)
AttributeSet getAttributes() const
Return the attribute list for this Function.
bool isDeclaration() const
virtual void getAnalysisUsage(AnalysisUsage &Info) const
INITIALIZE_PASS_BEGIN(AlwaysInliner,"always-inline","Inliner for always_inline functions", false, false) INITIALIZE_PASS_END(AlwaysInliner
CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on.
virtual bool runOnSCC(CallGraphSCC &SCC)
always Inliner for always_inline functions
static InlineCost getAlways()
FunTy * getCalledFunction() const