[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation
Greg Rodgers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 23 13:37:36 PDT 2018
gregrodgers added a comment.
I have a longer comment on header files, but let me first understand this patch.
IIUC,the concept of this patch is to fake the macros to think it is seeing
a host on the device patch.
if ((LangOpts.CUDA || LangOpts.OpenMPIsDevice) && PP.getAuxTargetInfo())
InitializePredefinedAuxMacros(*PP.getAuxTargetInfo(), Builder);
That would be counterproductive because well-behaved headers that only
provide optized asm definitions would wrap that asm with
#ifdef __x86_64__
do some x86 asm function definition
#else
just provide the function declaration to be implemented somewhere else.
#endif
What am I missing?
Repository:
rC Clang
https://reviews.llvm.org/D50845
More information about the cfe-commits
mailing list