[PATCH] D55710: add pragmas to control Software Pipelining optimisation

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 23 07:02:20 PST 2018


aaron.ballman added a reviewer: tonic.
aaron.ballman added a subscriber: tonic.
aaron.ballman added a comment.

Adding @tonic as a reviewer, who may have suggestions on how to improve the documentation wording.



================
Comment at: include/clang/Basic/AttrDocs.td:2655
+  dependence violated. This constant interval(in cycles) between the start
+  of iterations called initiation interval. Cycles number of one iteration
+  of newly generated loop matches with Initiation Interval. For further
----------------
alexey.lapshin wrote:
> aaron.ballman wrote:
> > is called the initiation interval.
> > 
> > I can't quite parse the second sentence, though. Is it trying to say that the initiation interval is the number of cycles for a single iteration of the optimized loop?
> Not quite right : initiation interval is not a number of cycles for a single iteration of the optimized loop. But initiation interval matches with number of cycles for a single iteration of the optimized loop. Initiation interval is the number of cycles between next and previous iteration of original loop. New loop created so that single iteration of the optimized loop has the same number cycles as initiation interval( thus every new iteration of original loop started each time when new iteration of optimized loop started - difference between iterations is initiation interval). 
> 
> trying to rephrase : number of cycles for a single iteration of the optimized loop matches with number of cycles of initiation interval.
I am still a bit fuzzy on the details (optimizations are not my area of expertise). Is this an accurate what to rephrase it?

"The initiation interval is the number of cycles between two iterations of an unoptimized loop. These pragmas cause a new. optimized loop to be created such that a single iteration of the loop executes in the same number of cycles as the initiation interval."


================
Comment at: include/clang/Basic/AttrDocs.td:2676
+  the software pipeliner to try the specified initiation interval.
+  If schedule found the resulting loop iteration would have specified
+  cycle count. The positive number greater than zero can be specified:
----------------
alexey.lapshin wrote:
> aaron.ballman wrote:
> > I'm can't quite parse this sentence either. Is it trying to say that the scheduler will try to find a loop iteration cycle count that most-closely matches the specified initiation interval?
> I wanted to say that pipeliner will try to find a schedule that exactly matches the specified initiation interval. And if schedule would be found then single iteration of the optimized loop would have exactly the same amount of cycles as initiation interval. trying to rephrase :
> 
> If schedule would be found then single iteration of the optimized loop would have exactly the same amount of cycles as initiation interval has. 
Ah, okay! So what happens if an exact match cannot be found? Does it behave as though the pragma was not specified at all (as in, the pragma is ignored)?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55710/new/

https://reviews.llvm.org/D55710





More information about the cfe-commits mailing list