I'd like to start the discussion about how reductions are going to be
handled in PCP code.
There are two major parts that should be aware of reductions: data
dependence and code generation.
data dependence should basically ignore the dependences carried by this
reduction and code generation
is producing special code to handle reductions in the paralleized code.
I'll start the discussion with handling data dependency:
For simple reductions, containing only one stmt, producing a special
reduc_stmt in PCP could probably work,
for the data dependency part: data dep will ignore the def and use in that
stmt.
For more complex reduction patterns (although most are not supported by
GCC reductions detection yet),
I think the whole reduction cycle needs to be marked as part of a
reduction.
For example:
for(i)
{
a=b+C[i];
b=a+D[i];
}
both stmts are a part of the reduction cycle, hence should be considered
as such by data dependence analysis.
(and therefore allow parallelism for this loop)
Thanks,
Razya