On Wed, 18 Jan 2017, Jakub Jelinek wrote: > We are talking here about addressable vars, right (so if we turn it into > non-addressable, in the SIMT region we just use the normal PTX pseudos), > right? We could emit inner ={v} {CLOBBER}; before SIMT_EXIT() to make it > clear it shouldn't be moved afterwards. For the private vars used directly > in SIMD region, for the vars from inlined functions I assume if they are > addressable we emit clobbers for them too. Or perhaps the alias oracle can > say that SIMT_EXIT ifn can clobber any addressable var with that > flag/attribute. And yes, SRA would need to propagate it.
What about motion in the other direction, upwards across SIMT_ENTER()? > But I believe it is worth it, because inlining is essential for good > performance of the simd regions. It is, but I think my approach is compatible with inlining too (and has a more localized impact on the compiler). Alexander