[PATCH] D12246: [NVPTX] change threading intrinsics from noduplicate to convergent

Owen Anderson via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 21:27:20 PDT 2015


> On Aug 31, 2015, at 9:11 PM, Marcello Maggioni <mmaggioni at apple.com> wrote:
> 
> Ah, ok, you were referring to the fact that if “we can prove a condition uniform” actually the “control-equivalent locations” category broadens to more basic-blocks than you can actually infer from the shape of the CFG.
> That is certainly true and probably without at least mentioning the concept of “threads” there is no way of define it in a clear way.

This is definitely true, and was acknowledged in the design rationale of the convergent attribute.  Convergent is intended to be core restriction that any LLVM transformation can support without having to embed knowledge of any particular SPMD model.  This will obviously be overly constraining compared to what some models may allow, particularly if they have a concept on non-divergent control flow.

It would be totally reasonable for an optimization that embeds knowledge of a more specific SPMD model to perform more aggressive transformations on convergent operations, but in doing so it will be limited to the SPMD model it was designed for.

—Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150831/9081b040/attachment.html>


More information about the llvm-commits mailing list