[PATCH] D111682: [TableGen][PGO] Disable profile instrumentation for printInstruction function
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 14 10:42:48 PDT 2021
rnk added inline comments.
================
Comment at: llvm/include/llvm/Support/Compiler.h:560
+/// Disable the profile instrument for a function.
+#if __has_attribute(no_profile_instrument_function) && defined(__GNUC__)
+#define LLVM_NO_PROFILE_INSTRUMENT_FUNCTION \
----------------
Is the `&& defined(__GNUC__)` necessary? There are two ways to get clang to not define `__GNUC__`: target MSVC (clang-cl) or pass `-fgnuc-version=0`. In both cases, we would probably want to disable PGO instrumentation for printInstruction. I think `__has_attribute` is sufficient.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111682/new/
https://reviews.llvm.org/D111682
More information about the llvm-commits
mailing list