This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Conservatively mark inline asm as convergent.
ClosedPublic

Authored by jlebar on May 31 2016, 2:23 PM.

Details

Summary

This is particularly important because a some convergent CUDA intrinsics
(e.g. __shfl_down) are implemented in terms of inline asm.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 59130.May 31 2016, 2:23 PM
jlebar retitled this revision from to [CUDA] Conservatively mark inline asm as convergent..
jlebar updated this object.
jlebar added a reviewer: tra.
jlebar added a subscriber: cfe-commits.
tra accepted this revision.May 31 2016, 2:31 PM
tra edited edge metadata.
This revision is now accepted and ready to land.May 31 2016, 2:31 PM
tra added a comment.May 31 2016, 2:33 PM

I guess we would not be able to remove convergent from inline asm automatically. Do we need a way to explicitly remove convergent from inline asm?

This revision was automatically updated to reflect the committed changes.
In D20836#444911, @tra wrote:

I guess we would not be able to remove convergent from inline asm automatically. Do we need a way to explicitly remove convergent from inline asm?

We can think about it. I'm not sure it will make a big difference, frankly. Like, if this encourages people to write less inline asm, I'm onboard with that. :)