This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]