[LLVMdev] Parallel Loop Metadata

Tobias Grosser tobias at grosser.es
Tue Feb 12 13:54:19 PST 2013


On 02/12/2013 10:41 PM, Pekka Jääskeläinen wrote:
> Hi,
>
> Here it is, just synched against the latest LLVM trunk. Shall I commit this
> now?

Looks good from my side. If there are no further remarks, I believe you 
can commit it.

> After committing, it could be worth some planning what is the best way to
> provide an easy to use mechanism to "refresh" the parallel loop mem
> access metadata (llvm.mem.parallel_loop_access) after optimizations that
> do not
> render the loop to a serial one. Some kind of helper function should be
> added to make it as easy as possible.
>
> E.g., if the inliner inlines a call to a parallel loop's body, how can it
> easily and robustly refresh the parallel loop metadata to the inlined
> function?
> It needs to annotate only the new memory instructions in the loop with the
> parallel mem metadata, but not any of the old ones as there might
> have been a parallel-loop-unaware pass before that has added mem
> instructions
> without the metadata. Thus, we cannot just blindly refresh the whole
> parallel
> loop with the parallel mem access metadata after the pass finishes.

Yes. That is an interesting question. I don't have any solution in mind yet.

Tobi



More information about the llvm-dev mailing list