This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Old school parallelization of WPA streaming
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Richard Biener <rguenther at suse dot de>, Michael Matz <matz at suse dot de>, Andi Kleen <ak at linux dot intel dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Diego Novillo <dnovillo at google dot com>, David Malcolm <dmalcolm at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 20 Feb 2014 14:58:07 -0800
- Subject: Re: [RFC] Old school parallelization of WPA streaming
- Authentication-results: sourceware.org; auth=none
- References: <20130821145853 dot GB2139 at tassilo dot jf dot intel dot com> <aa686933-7ae6-461b-9403-d5d47ad11289 at email dot android dot com> <alpine dot LNX dot 2 dot 00 dot 1308281728110 dot 9949 at wotan dot suse dot de> <alpine dot LNX dot 2 dot 00 dot 1308290931540 dot 20077 at zhemvz dot fhfr dot qr> <20130829125103 dot GB20627 at kam dot mff dot cuni dot cz> <alpine dot LNX dot 2 dot 00 dot 1308291536280 dot 20077 at zhemvz dot fhfr dot qr> <20131120230239 dot GA28683 at atrey dot karlin dot mff dot cuni dot cz> <alpine dot LNX dot 2 dot 00 dot 1311211021570 dot 8615 at zhemvz dot fhfr dot qr> <20131121101909 dot GC10503 at kam dot mff dot cuni dot cz> <alpine dot LNX dot 2 dot 00 dot 1311211131110 dot 8615 at zhemvz dot fhfr dot qr> <20131205235410 dot GB9577 at kam dot mff dot cuni dot cz>
On Thu, Dec 5, 2013 at 3:54 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> On Thu, 21 Nov 2013, Jan Hubicka wrote:
>>
>> > >
>> > > Why do you need an additional -fparallelism? Wouldn't
>> > > -fwpa=... be a better match, matching -flto=...? As we already
>> > > pass down a -fwpa option to WPA this would make things easier, no?
>> >
>> > My plan was to possibly use same option later for parallelizing more parts of
>> > compiler, not only WPA streaming. Streaming in may have some chance if we get
>> > into thread safety of GGC or move sufficient amount of stuff out of GGC. Also
>> > we can parallelize inliner heuristic or IPA-PTA if it will ever work. So it
>> > would make sense with -flto-partition=none and perhaps with local optimization,
>> > too.
>>
>> I'd like to drop -flto-partition=none eventually. It's just one more
>> path through the compiler to support ...
>>
>> > But I can definitely update the patch to use -fwpa=N and we can deal with this
>> > once this becomes real. (i.e. I have no clue how to parallelize inliner without
>> > making its decisions dependent on the parallelizm and declining with parallelizm
>> > increased nor I have real plans for stream in procedure)
>>
>> Please.
>>
>
> Hi,
> here is updated patch. Sorry for taking time, I should have more time for hacking again
> now...
>
> Honza
>
> * lto-cgraph.c (asm_nodes_output): Make global.
> * lto-wrapper.c (run_gcc): Pass down paralelizm to WPA.
> * lto.c (lto_parallelism): New static var.
> (do_stream_out, wait_for_child, stream_out): New static functions.
> (lto_wpa_write_files): Add support for parallel streaming.
> (do_whole_program_analysis): Set parallelism.
> * lang.opt (fwpa): Add parameter.
> * lto-lang.c (lto_handle_option): Handle flag_wpa.
> (lto_init): Update use of flag_wpa.
> * lto-streamer.h (asm_nodes_output): Declare.
This caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60295
H.J.