forked from OSchip/llvm-project
llvm-profgen: Parse command line arguments after initializing targets
I am experimenting with turning backends into loadable modules and in that scenario, target specific command line arguments won't be available until after the targets are initialized. Also, most other tools initialize targets before parsing arguments. Reviewed By: wlei Differential Revision: https://reviews.llvm.org/D93348
This commit is contained in:
parent
be96137461
commit
4ad0cfd4de
|
@ -35,13 +35,13 @@ using namespace sampleprof;
|
|||
int main(int argc, const char *argv[]) {
|
||||
InitLLVM X(argc, argv);
|
||||
|
||||
cl::ParseCommandLineOptions(argc, argv, "llvm SPGO profile generator\n");
|
||||
|
||||
// Initialize targets and assembly printers/parsers.
|
||||
InitializeAllTargetInfos();
|
||||
InitializeAllTargetMCs();
|
||||
InitializeAllDisassemblers();
|
||||
|
||||
cl::ParseCommandLineOptions(argc, argv, "llvm SPGO profile generator\n");
|
||||
|
||||
// Load binaries and parse perf events and samples
|
||||
PerfReader Reader(BinaryFilenames);
|
||||
Reader.parsePerfTraces(PerfTraceFilenames);
|
||||
|
|
Loading…
Reference in New Issue