[llvm-commits] [llvm] r166595 - /llvm/trunk/tools/opt/opt.cpp
Duncan Sands
baldrick at free.fr
Wed Oct 24 10:47:35 PDT 2012
Hi Nadav,
> Opt needs to initialize the different targets.
it's pretty nasty that an IR level tool like opt is now having to
initialize asm printers and parsers. Why is this needed? I thought
you had created a limited and tightly controlled interface to provide
target cost information, but instead it looks like you are pulling in
vast amounts of target stuff...
Ciao, Duncan.
> --- llvm/trunk/tools/opt/opt.cpp (original)
> +++ llvm/trunk/tools/opt/opt.cpp Wed Oct 24 12:23:50 2012
> @@ -564,6 +565,11 @@
> llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
> LLVMContext &Context = getGlobalContext();
>
> + InitializeAllTargets();
> + InitializeAllTargetMCs();
> + InitializeAllAsmPrinters();
> + InitializeAllAsmParsers();
> +
> // Initialize passes
> PassRegistry &Registry = *PassRegistry::getPassRegistry();
> initializeCore(Registry);
More information about the llvm-commits
mailing list