[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation
Jonas Hahnfeld via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 16 08:15:55 PDT 2018
Hahnfeld added a comment.
In https://reviews.llvm.org/D50845#1202540, @ABataev wrote:
> Maybe for device compilation we also should define `__NO_MATH_INLINES` and `__NO_STRING_INLINES` macros to disable inline assembly in glibc?
The problem is that `__NO_MATH_INLINES` doesn't even avoid all inline assembly from `bits/mathinline.h` :-( incidentally Clang already defines `__NO_MATH_INLINES` for x86 (due to an old bug which has been fixed long ago) - and on CentOS we still have problems as described in PR38464.
As a second thought: This might be valid for NVPTX, but I don't think it's a good idea for x86-like offloading targets - they might well profit from inline assembly code.
Repository:
rC Clang
https://reviews.llvm.org/D50845
More information about the cfe-commits
mailing list