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: [PING][PR67476] Add param parloops-schedule


On 10/04/2015 05:36 PM, Tom de Vries wrote:
I'll try to give a bit of context:

The omp-expand machinery is used in two contexts:
1. when omp annotations are added to the source. In that case,
    omp-expand is used in non-ssa gimple context.
2. when parloops annotates a loop with omp annotations. In that case,
    omp-expand is used in ssa gimple context.

This much I remembered. The rest is at least useful background information.

In addition, I've recently (r226427) fixed parloops such that it no
longer invalidates the loops structure and cancels the loop tree. At the
parloops side, that involved adding an empty latch block, in order not
to break the LOOPS_HAVE_SIMPLE_LATCHES property. At the omp-expand side,
that meant handling the empty latch block, as well as updating the loops
structure. In r227435, I've applied a similar fix for
expand_omp_for_static_chunk.

Ok, I see similar pieces in that commit. Probably this means we're looking at some changes that are independent from each other and should be submitted as such. Is there a way to make these functions share code?

For example - this thing is entirely unexplained:
[...]
This bit is adding missing ssa support. In expand_omp_for_generic, we
add a loop around the loop we're expanding. Since we're in ssa, that
means we need to:
- add phis to the outer loop that connect to the phis in the inner,
   original loop, and
- move the loop entry value of the inner phi to the loop entry value of
   the outer phi.

Explanations like this should go into a comment.

Also, you're using l2_bb in that block, but as far as I can tell it could be NULL (if broken_loop). Is there a reason why this can't happen?


Bernd


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