- User Since
- Jan 31 2013, 4:40 AM (289 w, 3 d)
D38798 does not work correctly and there is no stable Sema-based solution to do this absolutely correctly. We need to adapt the codegen so that it emits metadata for the implicit declare target functions.
Fri, Aug 17
Right, warning wasn't a good thought. We really want strict checking and would have to error out when we find a function that wasn't implicitly declare target on the host.
I meant to ask how common that would be? If that's only some known functions we could handle them separately.
Thu, Aug 16
If I understand it correctly, the root cause of this exercise is that we want to compile for GPU using plain C. CUDA avoids this issue by separating device and host code via target attributes and clang has few special cases to ignore inline assembly errors in the host code if we're compiling for device. For OpenMP there's no such separation, not in the system headers, at least.
Yes, that's one of the nice properties of CUDA (for the compiler). There used to be the same restriction for OpenMP where all functions used in target regions needed to be put in declare target. However that was relaxed in favor of implicitly marking all called functions in that TU to be declare target.
So ideally I think Clang should determine which functions are really declare target (either explicit or implicit) and only run semantical analysis on them. If a function is then found to be "broken" it's perfectly desirable to error back to the user.
Maybe for device compilation we also should define __NO_MATH_INLINES and __NO_STRING_INLINES macros to disable inline assembly in glibc?
Yes, looks like the opportunity for the SLP Vectorizer.
Wed, Aug 15
Tue, Aug 14
Mon, Aug 13
Tue, Aug 7
Added an extra test.
Mon, Aug 6
It really requires a test.
Fri, Aug 3
Reworked the patch to change the way we get file id to make it more robust.
Thu, Aug 2
Reworked according to Eric's comments
Reworked according to Eric's comments.
Wed, Aug 1
Updated and reworked to latest changes
Address David's comments
Reworked to control output by DICompileUnit emission kind.
Tue, Jul 31
Mon, Jul 30
nvcc always emits debug location before the very first label that represents function start. So, we can consider this as the requirement for NVPTX.
Fri, Jul 27
Eric accepted the patch offline.
Updated to latest version
Added maximal length of the merged directives.
Updated to the latest revision.
Thu, Jul 26
Address ERic's comments.
Wed, Jul 25
Mon, Jul 23
Yes, it was committed
Jul 20 2018
Fixed SPMD mode barrier for initialized runtime.
Added checks for all possible debug options.
Jul 19 2018
- The new tool definitely requires an RFC at first.
- The patch is too big and should be split into several small patches