Skip to content

Commit 0314b93

Browse files
authored
[Headers][X86] avx ifma - move constexpr to the end of the function attribute lists. NFC. (#166523)
Makes it easier to compare constexpr/non-constexpr attribute defines Allows clang-format to pack the attributes more efficiently
1 parent 7b3fe5f commit 0314b93

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

clang/lib/Headers/avx512ifmaintrin.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
/* Define the default attributes for the functions in this file. */
1818
#if defined(__cplusplus) && (__cplusplus >= 201103L)
1919
#define __DEFAULT_FN_ATTRS \
20-
constexpr \
21-
__attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"), \
22-
__min_vector_width__(512)))
20+
__attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"), \
21+
__min_vector_width__(512))) constexpr
2322
#else
2423
#define __DEFAULT_FN_ATTRS \
2524
__attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"), \

clang/lib/Headers/avx512ifmavlintrin.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
/* Define the default attributes for the functions in this file. */
1919
#if defined(__cplusplus) && (__cplusplus >= 201103L)
2020
#define __DEFAULT_FN_ATTRS128 \
21-
constexpr __attribute__((__always_inline__, __nodebug__, \
22-
__target__("avx512ifma,avx512vl"), \
23-
__min_vector_width__(128)))
21+
__attribute__((__always_inline__, __nodebug__, \
22+
__target__("avx512ifma,avx512vl"), \
23+
__min_vector_width__(128))) constexpr
2424
#define __DEFAULT_FN_ATTRS256 \
25-
constexpr __attribute__((__always_inline__, __nodebug__, \
26-
__target__("avx512ifma,avx512vl"), \
27-
__min_vector_width__(256)))
25+
__attribute__((__always_inline__, __nodebug__, \
26+
__target__("avx512ifma,avx512vl"), \
27+
__min_vector_width__(256))) constexpr
2828
#else
2929
#define __DEFAULT_FN_ATTRS128 \
3030
__attribute__((__always_inline__, __nodebug__, \
@@ -34,7 +34,6 @@
3434
__attribute__((__always_inline__, __nodebug__, \
3535
__target__("avx512ifma,avx512vl"), \
3636
__min_vector_width__(256)))
37-
3837
#endif
3938

4039
#if !(defined(__AVXIFMA__) || defined(__AVX512IFMA__))

clang/lib/Headers/avxifmaintrin.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
/* Define the default attributes for the functions in this file. */
1818
#if defined(__cplusplus) && (__cplusplus >= 201103L)
1919
#define __DEFAULT_FN_ATTRS128 \
20-
constexpr __attribute__((__always_inline__, __nodebug__, \
21-
__target__("avxifma"), __min_vector_width__(128)))
20+
__attribute__((__always_inline__, __nodebug__, __target__("avxifma"), \
21+
__min_vector_width__(128))) constexpr
2222
#define __DEFAULT_FN_ATTRS256 \
23-
constexpr __attribute__((__always_inline__, __nodebug__, \
24-
__target__("avxifma"), __min_vector_width__(256)))
23+
__attribute__((__always_inline__, __nodebug__, __target__("avxifma"), \
24+
__min_vector_width__(256))) constexpr
2525
#else
2626
#define __DEFAULT_FN_ATTRS128 \
2727
__attribute__((__always_inline__, __nodebug__, __target__("avxifma"), \

0 commit comments

Comments
 (0)