This revision was automatically updated to reflect the committed changes.
Closed by commit rL261779: [CUDA] Mark all CUDA device-side function defs,
decls, and calls as convergent. (authored by jlebar).
Changed prior to commit:
http://reviews.llvm.org/D17056?vs=48261&id=48979#toc
Repository:
majnemer accepted this revision.
majnemer added a comment.
This revision is now accepted and ready to land.
LGTM
http://reviews.llvm.org/D17056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cf
jlebar added a comment.
Friendly ping -- are we happy with this?
http://reviews.llvm.org/D17056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jlebar updated this revision to Diff 48261.
jlebar added a comment.
Move code into ConstructAttributeList. Now it applies to both functions and
calls.
http://reviews.llvm.org/D17056
Files:
lib/CodeGen/CGCall.cpp
test/CodeGenCUDA/convergent.cu
test/CodeGenCUDA/device-var-init.cu
Index:
majnemer added inline comments.
Comment at: lib/CodeGen/CodeGenModule.cpp:817-823
@@ -816,1 +816,9 @@
+
+ if (getLangOpts().CUDA && getLangOpts().CUDAIsDevice) {
+// Conservatively, mark all functions in CUDA as convergent (meaning, they
+// may call an intrinsically conv
jlebar added a comment.
In http://reviews.llvm.org/D17056#355228, @jlebar wrote:
> Move coded into SetLLVMFunctionAttributes (not ForDefinition).
Much better. :)
http://reviews.llvm.org/D17056
___
cfe-commits mailing list
cfe-commits@lists.llvm.
jlebar updated this revision to Diff 48260.
jlebar added a comment.
Move coded into SetLLVMFunctionAttributes (not ForDefinition).
http://reviews.llvm.org/D17056
Files:
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCUDA/convergent.cu
Index: test/CodeGenCUDA/convergent.cu
==
jlebar added a comment.
In http://reviews.llvm.org/D17056#355198, @jlebar wrote:
> Move code into SetLLVMFunctionAttributesForDefinition.
Actually, this doesn't work -- we don't annotate
__host__ __device__ void baz();
as convergent. (I ran the tests, but of course I didn't notice it faili
jlebar updated this revision to Diff 48255.
jlebar added a comment.
Move code into SetLLVMFunctionAttributesForDefinition.
http://reviews.llvm.org/D17056
Files:
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCUDA/convergent.cu
Index: test/CodeGenCUDA/convergent.cu
==
majnemer added a subscriber: majnemer.
majnemer added a comment.
SetLLVMFunctionAttributesForDefinition seems like the more obvious place
for this logic.
http://reviews.llvm.org/D17056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://l
jlebar updated this revision to Diff 47409.
jlebar marked 2 inline comments as done.
jlebar added a comment.
Update per tra's review.
http://reviews.llvm.org/D17056
Files:
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCUDA/convergent.cu
Index: test/CodeGenCUDA/convergent.cu
===
tra added inline comments.
Comment at: lib/CodeGen/CodeGenModule.cpp:1880
@@ +1879,3 @@
+// Conservatively, mark all functions in CUDA as convergent (meaning, they
+// may call an intrinsicly convergent op, such as __syncthreads(), and so
+// can't have certain optimiz
jlebar created this revision.
jlebar added a reviewer: majnemer.
jlebar added subscribers: tra, echristo, jhen, cfe-commits.
This is important for e.g. the following case:
void sync() { __syncthreads(); }
void foo() {
do_something();
sync();
do_something_else():
}
Without this
13 matches
Mail list logo