[PATCH] D25343: [OpenCL] Mark group functions as noduplicate in opencl-c.h
Anastasia Stulova via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 8 04:52:26 PDT 2016
Anastasia added a comment.
Do you have any code example where Clang/LLVM performs wrong optimizations with respect to the control flow of SPMD execution?
My understanding from the earlier discussion we have had: https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg22643.html that noduplicate is essentially enough for the frontend to prevent erroneous optimizations. Because in general compiler can't do much with unknown function calls.
For LLVM intrinsics it is slightly different as I can deduce from this discussion:http://lists.llvm.org/pipermail/llvm-dev/2015-May/085558.html . It seems like by default it's assumed to be side effect free and can be optimized in various ways.
https://reviews.llvm.org/D25343
More information about the cfe-commits
mailing list