JonChesterfield added a comment.

I wonder if it is necessary for the exec mask to be implicit state, managed by 
a convergent/divergent abstraction.

We could reify it as an argument passed to kernels (where all bits are set), 
and adjusted by phi nodes at entry to basic blocks. Various intrinsics take and 
return that reified value. __ballot, a comparison op, possibly load/store.

At that point all the awkward control flow constraints are raised to data flow, 
and I think (but haven't really chased this into the dark corners) that solves 
the problems I know about. Notably, a uniform branch would be one where the 
exec mask value was unchanged, so the associated phi is constant folded.

Makes a mess of the human readable IR, but possibly at a lower overall 
complexity than continuing to handle divergence as control flow.


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

https://reviews.llvm.org/D69498

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to