[PATCH] D111682: [TableGen][PGO] Disable profile instrumentation for printInstruction function
Rong Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 14 12:18:18 PDT 2021
xur added inline comments.
================
Comment at: llvm/include/llvm/Support/Compiler.h:38
#ifndef __has_attribute
# define __has_attribute(x) 0
#endif
----------------
xur wrote:
> rnk wrote:
> > `__has_attribute` is defined to false here if it is not available. I believe that will handle MSVC.
> Is this for __has_attriubte__ itself? I thought __has_attribute(<attribute>) is defined in some config.
>
> For example, the "noinline" attribute, it is also defined for MSVC -- otherwise, the check of MSC_VER is useless.
>
> #if __has_attribute(noinline)
> #define LLVM_ATTRIBUTE_NOINLINE __attribute__((noinline))
> #elif defined(_MSC_VER)
> #define LLVM_ATTRIBUTE_NOINLINE __declspec(noinline)
> #else
> #define LLVM_ATTRIBUTE_NOINLINE
> #endif
>
I take back the last message. I read the code wrong.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111682/new/
https://reviews.llvm.org/D111682
More information about the llvm-commits
mailing list