#include "bolt/Core/BinaryFunctionCallGraph.h"
#include "bolt/Core/BinaryContext.h"
#include "bolt/Core/BinaryFunction.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Timer.h"
#include <stack>
#define DEBUG_TYPE …
usingnamespacellvm;
namespace opts {
extern cl::opt<bool> TimeOpts;
extern cl::opt<unsigned> Verbosity;
extern cl::OptionCategory BoltCategory;
static cl::opt<std::string>
DumpCGDot("dump-cg", cl::desc("dump callgraph to the given file"),
cl::cat(BoltCategory));
}
namespace llvm {
namespace bolt {
CallGraph::NodeId BinaryFunctionCallGraph::addNode(BinaryFunction *BF,
uint32_t Size,
uint64_t Samples) { … }
std::deque<BinaryFunction *> BinaryFunctionCallGraph::buildTraversalOrder() { … }
BinaryFunctionCallGraph
buildCallGraph(BinaryContext &BC, CgFilterFunction Filter, bool CgFromPerfData,
bool IncludeSplitCalls, bool UseFunctionHotSize,
bool UseSplitHotSize, bool UseEdgeCounts,
bool IgnoreRecursiveCalls) { … }
}
}