[Polly] Isl AST reduction pragmas [V2]

Johannes Doerfert jdoerfert at codeaurora.org
Thu Jun 19 09:56:45 PDT 2014


So if I have the dependences and schedule like shown below (assume they are e.g., WAW dependences).
Would a function like "astScheduleDimIsParallel" in IslAst tell me it is parallel or not (without my patch and reductions)?

I was under the impression that it would (and should) say __not__ parallel.

--

Johannes Doerfert
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


-----Original Message-----
From: Tobias Grosser [mailto:tobias at grosser.es] 
Sent: Thursday, June 19, 2014 9:37 AM
To: Johannes Doerfert; 'Johannes Doerfert'
Cc: llvm-commits at cs.uiuc.edu; 'Sebastian Pop'
Subject: Re: [Polly] Isl AST reduction pragmas [V2]

On 19/06/2014 18:17, Johannes Doerfert wrote:
> I think we are getting somewhere (as we are only discussing this one detail), but I'm still not sure where I'm wrong.
>
>>> The dependences for the first program are:
>>>
>>> {S[i] -> S[i+1]}
>>>
>>> The dependences for the second program are the same, but the schedule is modified to:
>>>
>>> {S1[i] -> [0, i]: i % 2 = 0; S1[i] -> [1, i]: i % 2 = 1}
>
> Isn't there still the transitive reduction dependency S[i] --t--> S[i+2] in the same direction as the scheduling dimensions?
> If so,  why wouldn't the parallelism test not say "parallel" but "reduction parallel".
> If not, please explain why we don't have forward dependences of length 2 here?

isl by default removes dependences that are implied transitively by other dependences. This is e.g. useful if you want perform dead code elimination by following dependences backwards. If we would keep transitive dependences, such dependences may lead to statement instances which only compute data that is overwritten without ever being read.

Cheers,
Tobias






More information about the llvm-commits mailing list