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 convergent op, such as __syncthreads(), and so
+ // can't have certain optimizations applied around them). LLVM will remove
+ // this attribute where it safely can.
+ F->addFnAttr(llvm::Attribute::Convergent);
+ }
}
----------------
Sorry for the goose chase...
`ConstructAttributeList` seems better.
http://reviews.llvm.org/D17056
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits