LLVM API Documentation
#include "Inliner.h"
#include "llvm/Module.h"
#include "llvm/Instructions.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/ADT/Statistic.h"
#include <iostream>
#include <set>
Include dependency graph for Inliner.cpp:
Go to the source code of this file.
Functions | |
static bool | InlineCallIfPossible (CallSite CS, CallGraph &CG, const std::set< Function * > &SCCFunctions) |
Variables | |
Statistic | NumInlined ("inline","Number of functions inlined") |
Statistic | NumDeleted ("inline","Number of functions deleted because all callers found") |
cl::opt< unsigned > | InlineLimit ("inline-threshold", cl::Hidden, cl::init(200), cl::desc("Control the amount of inlining to perform (default = 200)")) |
static bool InlineCallIfPossible | ( | CallSite | CS, | |
CallGraph & | CG, | |||
const std::set< Function * > & | SCCFunctions | |||
) | [static] |
Definition at line 42 of file Inliner.cpp.
References llvm::CallGraphNode::begin(), DEBUG, llvm::CallGraphNode::end(), llvm::CallSite::getCalledFunction(), llvm::Value::getName(), llvm::GlobalValue::hasInternalLinkage(), llvm::InlineFunction(), NumDeleted, llvm::CallGraphNode::removeCallEdgeTo(), llvm::CallGraph::removeFunctionFromModule(), second, and llvm::Value::use_empty().
Referenced by llvm::Inliner::runOnSCC().
cl::opt<unsigned> InlineLimit("inline-threshold", cl::Hidden, cl::init(200), cl::desc("Control the amount of inlining to perform (default = 200)")) [static] |
Statistic NumDeleted("inline","Number of functions deleted because all callers found") [static] |
Statistic NumInlined("inline","Number of functions inlined") [static] |
Referenced by llvm::Inliner::runOnSCC().