This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/2] New pass to partition single function into multiple sections
- From: Revital1 Eres <ERES at il dot ibm dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Alan Modra <amodra at au1 dot ibm dot com>, Ayal Zaks <ZAKS at il dot ibm dot com>, gcc-patches at gcc dot gnu dot org, Ira Rosen <IRAR at il dot ibm dot com>, rguenther at suse dot de, stevenb dot gcc at gmail dot com, Tehila Meyzels <TEHILA at il dot ibm dot com>, trevor_smigiel at playstation dot sony dot com, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>, Victor Kaplansky <VICTORK at il dot ibm dot com>
- Date: Tue, 26 Aug 2008 10:18:22 +0300
- Subject: Re: [PATCH 1/2] New pass to partition single function into multiple sections
Hello,
> As a minor comment, I don't think:
>
> +several sections which can be swapped while running. This may result
> +in an undefined behavior when an @code{asm} statement contains code that
> +should reside in a single section.
>
> is clear. Perhaps you mean to say that using an asm statement in code
> compiled with this flag is undefined? The user doesn't have any way of
> controlling where the asm ends up, so from a language semantics point of
> view, I think what you're saying is that this new optimization is
> incompatible with asm statements.
Thanks, I'll fix that.
>
> Also, like Mike, I think that it would make sense to make this and the
> hot/cold stuff work out of the same pass, if possible. It seems like
> there are two steps: (1) figure out which basic blocks go in which
> sections, (2) modify the code so that things go where you've decided.
> The hot/cold algorithm will perform the computation in (1) differently
> than the new option, but it seems like (2) could work the same in either
> case.
To make sure I understand - making the function partitioning and the
hot/cold stuff work out of the same pass means that this combined pass
will be called twice - first for the hot/cold and the second time for
the function partitioning. Is that correct?
Thanks,
Revital