#include "bolt/Profile/DataAggregator.h"
#include "bolt/Rewrite/MachORewriteInstance.h"
#include "bolt/Rewrite/RewriteInstance.h"
#include "bolt/Utils/CommandLineOpts.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Object/Binary.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/TargetSelect.h"
#define DEBUG_TYPE …
usingnamespacellvm;
usingnamespaceobject;
usingnamespacebolt;
namespace opts {
static cl::OptionCategory *BoltCategories[] = …;
static cl::OptionCategory *BoltDiffCategories[] = …;
static cl::OptionCategory *Perf2BoltCategories[] = …;
static cl::opt<std::string> InputFilename(cl::Positional,
cl::desc("<executable>"),
cl::Required, cl::cat(BoltCategory),
cl::sub(cl::SubCommand::getAll()));
static cl::opt<std::string>
InputDataFilename("data",
cl::desc("<data file>"),
cl::Optional,
cl::cat(BoltCategory));
static cl::alias
BoltProfile("b",
cl::desc("alias for -data"),
cl::aliasopt(InputDataFilename),
cl::cat(BoltCategory));
cl::opt<std::string>
LogFile("log-file",
cl::desc("redirect journaling to a file instead of stdout/stderr"),
cl::Hidden, cl::cat(BoltCategory));
static cl::opt<std::string>
InputDataFilename2("data2",
cl::desc("<data file>"),
cl::Optional,
cl::cat(BoltCategory));
static cl::opt<std::string>
InputFilename2(
cl::Positional,
cl::desc("<executable>"),
cl::Optional,
cl::cat(BoltDiffCategory));
}
static StringRef ToolName;
static void report_error(StringRef Message, std::error_code EC) { … }
static void report_error(StringRef Message, Error E) { … }
static void printBoltRevision(llvm::raw_ostream &OS) { … }
void perf2boltMode(int argc, char **argv) { … }
void boltDiffMode(int argc, char **argv) { … }
void boltMode(int argc, char **argv) { … }
static std::string GetExecutablePath(const char *Argv0) { … }
int main(int argc, char **argv) { … }