[PATCH] Merging Cilk Plus into Trunk (Patch 1 of approximately 22)

Richard Guenther richard.guenther@gmail.com
Tue Sep 11 08:38:00 GMT 2012


On Mon, Sep 10, 2012 at 6:30 PM, Richard Henderson <rth@redhat.com> wrote:
> On 09/10/2012 09:11 AM, Iyer, Balaji V wrote:
>> Can you please help me get a start on how to get can be done? From
>> what I understand (please correct me if I am wrong), this requires
>> rearranging and duplicating a lot of passes and can potentially open
>> up to a lot of bugs.
>
> Certainly not duplicating passes.  And probably not even rearranging them.
>
> The Important parts are:
>
>   (1) Having a bit in "struct loop" that indicates the special semantics
>       you have for #pragma simd.  I don't know if maybe all loops inside an
>       elemental function are so automatically marked?
>
>   (2) Have bits in "struct function" that summarize the contents of the
>       bit from "struct loop", for all loops in the function.  Note that
>       this bit would need to be updated during inlining.
>
>   (3) Change the "gate" predicates for the relevant function to also check
>       the bit from "struct function".  In some cases the pass might need
>       to run globally (perhaps if-conversion?) and in some cases the pass
>       might be able to restrict work to specific loops (e.g. the vectorizer),
>       skipping loops for which the optimization is not enabled.

Note that we do not preserve the loop tree before the gimple loop optimizer
passes.  Nor do we have a convenient way (currently) to transfer per-loop
information from GENERIC to the point where we can first create the loop
tree (after the CFG is built).  The former is because I didn't want to think
about the inlining case (I'm still chasing bugs for preserving the loop tree
from the start of gimple loop optimizer passes ...), the latter could be done
in a similar way we handle predications or OMP annotations - have
special instructions in the IL.

Richard.

>
> r~
>



More information about the Gcc-patches mailing list