[llvm-commits] FW: [PATCH] Fix to pass options from Gold plugin to LTO codegen

Viktor Kutuzov vkutuzov at accesssoftek.com
Mon Oct 26 17:23:20 PDT 2009


Hello Nick,
Thanks for the review.

Please find the updated patch attached.

I didn't remove the lto_codegen_debug_options yet, just marked it as deprecated.
It is actually used in Ada, in files

bindings/ada/llvm/llvm_linktimeoptimizer_wrap.cxx
bindings/ada/llvm/llvm_link_time_optimizer-binding.ads

Edward, is this fine to use lto_codegen_set_options there instead?

> And that would be even better if it took an argc+argv pair

Gold plug-in gets all arguments from gold one by one.
It is not a big dial to construct argc+argv pair there and pass it down to the LTO, but LTO internally keeps a vector of char*, so, 
argc+argv doesn't make much sense unless we want to replace that vector with argc+argv pair as well and to change setCodeGenOptions 
behavior to set options instead of add them.

If this is fine with everyone, I can prepare this patch, but would prefer to make it separately from this one since it would change 
the API and will break a backward compatibility.
What do you think?

Thanks,
Viktor

----- Original Message ----- 
From: "Nick Lewycky" <nicholas at mxc.ca>
To: "Viktor Kutuzov" <vkutuzov at accesssoftek.com>
Cc: "Commit Messages and Patches for LLVM" <llvm-commits at cs.uiuc.edu>
Sent: Friday, October 23, 2009 5:56 PM
Subject: Re: [llvm-commits] FW: [PATCH] Fix to pass options from Gold plugin to LTO codegen


Viktor Kutuzov wrote:
> Hello everyone,
>
> Please find the patch attached.
> This should fix the issue when gold plugin doesn't pass the  -plugin-opt options down to the LTO codegen.
> See the thread "[LLVMdev] getting gold plugin to work?" for more details.
>
> This is the second try.
> It looks like the first one was bounced, not sure why.
> Sorry if anyone will get it twise.

Hi Viktor, this looks like the same patch I already reviewed here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20091019/089467.html

To reiterate:
"What's the difference between setCodeGenDebugOptions and
setCodeGenOption? It looks like they should be merged into one then
exposed by lto_codegen_set_option. And that would be even better if it
took an argc+argv pair, even if that's a little harder to construct from
the gold plugin, many option parsing packages work by removing the
options they recognize from argc+argv and leaving the rest in place."

Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-gold-plugin-process_command_line.diff
Type: application/octet-stream
Size: 6622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091026/d4af8bdc/attachment.obj>


More information about the llvm-commits mailing list