This is the mail archive of the
mailing list for the GCC project.
Re: ????: Is there any possibility to parallel compilation in a single file?
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: "Gengyulei (Gengyl)" <gengyulei at huawei dot com>
- Cc: Markus Trippelsdorf <markus at trippelsdorf dot de>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 29 Jul 2014 12:37:38 +0200
- Subject: Re: ????: Is there any possibility to parallel compilation in a single file?
- Authentication-results: sourceware.org; auth=none
- References: <68F796C32E86164B912241DBB365994357E5AF8D at SZXEMA501-MBS dot china dot huawei dot com> <20140729082118 dot GC22904 at x4> <68F796C32E86164B912241DBB365994357E5AFB1 at SZXEMA501-MBS dot china dot huawei dot com>
> Thank you for your answer. I find the most time consuming process in compiling a file is the optimization of the cgraph nodes (execute all_passes),
> This process is sequence, one node by one node. If we divide the cgraph nodes into unrelated forest, we can parallel it, is this way feasible?
callgraph generally do not divide into unrelated nodes very well, but -flto=<num cores>
should do the trick. It splits program into partitions and compiles them independently.
You may need to play with partitioning parameters for best performance.
> Thank you.
> ??????: Markus Trippelsdorf [mailto:firstname.lastname@example.org]
> ????????: 2014??7??29?? 16:21
> ??????: Gengyulei (Gengyl)
> ????: email@example.com
> ????: Re: Is there any possibility to parallel compilation in a single file?
> On 2014.07.29 at 08:07 +0000, Gengyulei (Gengyl) wrote:
> > Hi:
> > Is there any possibility to parallel the compilation in a single file
> > scope? For large application the compilation time is long, although
> > we can parallel the process at the level of files, we still try to
> > find a way to accelerate the compilation in a single file. Can we
> > change some serial process into
> > Parallel? Could you give me some advices? Thank you very much.
> Compiling with -flto=<number of cores> and gcc-4.9 should help.