Remove Intel compiler support
Subsystems (3)
RFC PATCH 1/1 Remove Intel compiler support
include/linux/compiler-intel.h had no update in the past 3 years.
We often forget about the third C compiler to build the kernel.
For example, commit a0a12c3ed057 ("asm goto: eradicate CC_HAS_ASM_GOTO") only mentioned GCC and Clang.
init/Kconfig defines CC_IS_GCC and CC_IS_CLANG but not CC_IS_ICC, and nobody has reported any issue.
I guess the Intel Compiler support is broken, and nobody is caring about it.
---
I am sending this to Linus and the x86 maintainers with RFC. If somebody is still using ICC, please speak up!
arch/ia64/include/uapi/asm/cmpxchg.h | 6 +- arch/ia64/include/uapi/asm/intel_intrin.h | 162 ---------------------- arch/ia64/include/uapi/asm/intrinsics.h | 6 +- include/acpi/platform/acenv.h | 5 +- include/acpi/platform/acenvex.h | 2 +- include/acpi/platform/acintel.h | 55 -------- include/linux/compiler-intel.h | 34 ----- include/linux/compiler_types.h | 2 - lib/zstd/common/compiler.h | 2 +- lib/zstd/compress/zstd_fast.c | 7 - scripts/cc-version.sh | 2 - scripts/min-tool-version.sh | 4 - 12 files changed, 5 insertions(+), 282 deletions(-) delete mode 100644 arch/ia64/include/uapi/asm/intel_intrin.h delete mode 100644 include/acpi/platform/acintel.h delete mode 100644 include/linux/compiler-intel.h
arch/ia64/include/uapi/asm/cmpxchg.h +1 -5
@@ -15,11 +15,7 @@#include <linux/types.h> /* include compiler specific intrinsics */ #include <asm/ia64regs.h> -#ifdef __INTEL_COMPILER -# include <asm/intel_intrin.h> -#else -# include <asm/gcc_intrin.h> -#endif +#include <asm/gcc_intrin.h> /* * This function doesn't exist, so you'll get a linker error if
arch/ia64/include/uapi/asm/intel_intrin.h deleted +0 -162
162 lines not on this page · raw message
arch/ia64/include/uapi/asm/intrinsics.h +1 -5
@@ -14,11 +14,7 @@#include <linux/types.h> /* include compiler specific intrinsics */ #include <asm/ia64regs.h> -#ifdef __INTEL_COMPILER -# include <asm/intel_intrin.h> -#else -# include <asm/gcc_intrin.h> -#endif +#include <asm/gcc_intrin.h> #include <asm/cmpxchg.h> #define ia64_set_rr0_to_rr4 (val0, val1, val2, val3, val4) \
include/acpi/platform/acenv.h +1 -4
@@ -148,15 +148,12 @@* *****************************************************************************/ -#if defined(__GNUC__) && !defined(__INTEL_COMPILER) +#if defined(__GNUC__)#include <acpi/platform/acgcc.h> #elif defined(_MSC_VER)#include "acmsvc.h" -#elif defined(__INTEL_COMPILER) -#include <acpi/platform/acintel.h> -#endif #if defined(_LINUX) || defined(__linux__)
include/acpi/platform/acenvex.h +1 -1
@@ -35,7 +35,7 @@#endif -#if defined(__GNUC__) && !defined(__INTEL_COMPILER) +#if defined(__GNUC__)#include "acgccex.h" #elif defined(_MSC_VER)
include/acpi/platform/acintel.h deleted +0 -55
55 lines not on this page · raw message
include/linux/compiler-intel.h deleted +0 -34
@@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __LINUX_COMPILER_TYPES_H -#error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead." -#endif - -#ifdef __ECC - -/* Compiler specific definitions for Intel ECC compiler */ - -#include <asm/intrinsics.h> - -/* Intel ECC compiler doesn't support gcc specific asm stmts. -* It uses intrinsics to do the equivalent things. -*/ - -#define barrier () __memory_barrier() -#define barrier_data (ptr) barrier() - -#define RELOC_HIDE (ptr, off) \ - ({ unsigned long __ptr; \ - __ptr = (unsigned long) (ptr); \ - (typeof(ptr)) (__ptr + (off)); }) - -/* This should act as an optimization barrier on var. -* Given that this compiler does not have inline assembly, a compiler barrier -* is the best we can do. -*/ -#define OPTIMIZER_HIDE_VAR (var) barrier() - -#endif - -/* icc has this, but it's called _bswap16 */ -#define __HAVE_BUILTIN_BSWAP16__ -#define __builtin_bswap16 _bswap16
include/linux/compiler_types.h +0 -2
@@ -92,8 +92,6 @@ static inline void __chk_io_ptr(const volatile void __iomem *ptr) { }/* Compiler specific macros. */ #ifdef __clang__#include <linux/compiler-clang.h> -#elif defined(__INTEL_COMPILER) -#include <linux/compiler-intel.h> #elif defined(__GNUC__)/* The above compilers also define __GNUC__, so order is important here. */ #include <linux/compiler-gcc.h>
lib/zstd/common/compiler.h +1 -1
@@ -116,7 +116,7 @@/* vectorization * older GCC (pre gcc-4.3 picked as the cutoff) uses a different syntax */ -#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) +#if !defined(__clang__) && defined(__GNUC__) # if (__GNUC__ = 4 && __GNUC_MINOR__ > 3) || (__GNUC__ >= 5)# define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize")))# else
lib/zstd/compress/zstd_fast.c +0 -7
@@ -80,13 +80,6 @@ ZSTD_compressBlock_fast_generic( }/* Main Search Loop */ -#ifdef __INTEL_COMPILER -/* From intel 'The vector pragma indicates that the loop should be -* vectorized if it is legal to do so'. Can be used together with -* #pragma ivdep (but have opted to exclude that because intel -* warns against using it).*/ -#pragma vector always -#endif while (ip1 < ilimit) {/* < instead of <=, because check at ip0+2 */ size_t mLength;BYTE const * ip2 = ip0 +2 ;
scripts/cc-version.sh +0 -2
@@ -12,8 +12,6 @@ get_c_compiler_info() cat <<- EOF | "$@" -E -P -x c - 2>/dev/null #if defined(__clang__) Clang __clang_major__ __clang_minor__ __clang_patchlevel__ - #elif defined(__INTEL_COMPILER) - ICC __INTEL_COMPILER __INTEL_COMPILER_UPDATE #elif defined(__GNUC__) GCC __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ #else
scripts/min-tool-version.sh +0 -4
@@ -19,10 +19,6 @@ binutils) gcc) echo 5.1.0 ;; -icc) - # temporary - echo 16.0.3 - ;; llvm) if [ "$SRCARCH" = s390 ]; then echo 14.0.0
Signature · 1 line
2.34.1
Quoted 3 lines · Masahiro Yamada
I am sending this to Linus and the x86 maintainers with RFC. If somebody is still using ICC, please speak up!
Ack. I don't think anybody ever really used icc.
I can't recall having heard a single peep about icc problems, and I don't think it's because it was *so* good at emulating gcc that nobody ever hit any issues.
Linus
Masahiro Yamada [11/10/2022 05.18]:
Quoted 4 lines
include/linux/compiler-intel.hhad no update in the past 3 years.We often forget about the third C compiler to build the kernel.
Quoted 8 lines
For example, commit
a0a12c3ed057("asm goto: eradicateCC_HAS_ASM_GOTO") only mentioned GCC and Clang.init/Kconfig defines
CC_IS_GCCandCC_IS_CLANGbut notCC_IS_ICC, and nobody has reported any issue.I guess the Intel Compiler support is broken, and nobody is caring about it.
Also, Intel ICC is deprecated:
$ icc -v icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message. icc version 2021.7.0 (gcc version 12.1.0 compatibility) $
Signature · 1 line
Hilsen Harald
Quoted 3 lines · Masahiro Yamada
include/linux/compiler-intel.h | 34 ----- include/linux/compiler_types.h | 2 -
You can also remove a few lines from compiler_attributes.h:
* Optional: not supported by icc
Thanks for this!
Cheers,
Miguel
Quoted 6 lines · Miguel Ojeda
Quoted 3 lines · Masahiro Yamada
include/linux/compiler-intel.h | 34 ----- include/linux/compiler_types.h | 2 -
Quoted 8 lines
You can also remove a few lines from
compiler_attributes.h:* Optional: not supported by icc
Thanks for this!
Cheers,
Miguel
Thanks.
Maybe, we can drop #if ... #else ... #endif
around __assume_aligned(a, ...), but I will leave it to you.
I will just drop the comment lines for now.
(Then, you will clean up compiler_attributes.h in the next cycle) Is this your expectation for v2 ?
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 23 lines · Masahiro Yamada
Quoted 6 lines · Miguel Ojeda
Quoted 3 lines · Masahiro Yamada
include/linux/compiler-intel.h | 34 ----- include/linux/compiler_types.h | 2 -Quoted 8 lines
You can also remove a few lines from
compiler_attributes.h:* Optional: not supported by icc
Thanks for this!
Cheers,
MiguelThanks.
Quoted 7 lines
Maybe, we can drop #if ... #else ... #endif
around__assume_aligned(a, ...), but I will leave it to you.I will just drop the comment lines for now.
(Then, you will clean upcompiler_attributes.hin the next cycle) Is this your expectation for v2 ?
Taking a look at the code, there is only one redundant #if. So, I will clean up __assume_aligned() in v2.
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 10 lines · Masahiro Yamada
include/linux/compiler-intel.hhad no update in the past 3 years.We often forget about the third C compiler to build the kernel.
For example, commit
a0a12c3ed057("asm goto: eradicateCC_HAS_ASM_GOTO") only mentioned GCC and Clang.init/Kconfig defines
CC_IS_GCCandCC_IS_CLANGbut notCC_IS_ICC, and nobody has reported any issue.
Quoted 8 lines
I guess the Intel Compiler support is broken, and nobody is caring about it.
Signed-off-by Masahiro Yamada <[email protected]>---
I am sending this to Linus and the x86 maintainers with RFC. If somebody is still using ICC, please speak up!
I had the same thought a while back and tried to show that it as already broken, but I never managed to actually download the compiler at the time.
It appears that in the meantime, Intel have completely dropped their old codebase and moved to using LLVM[1], so my guess is that with the current releases it will behave the same as clang. It might help to verify that this is indeed the case if you want to add that to the changelog text.
Arnd
Nick Desaulniers
Reviewed-byQuoted 28 lines · Arnd Bergmann
Quoted 10 lines · Masahiro Yamada
include/linux/compiler-intel.hhad no update in the past 3 years.We often forget about the third C compiler to build the kernel.
For example, commit
a0a12c3ed057("asm goto: eradicateCC_HAS_ASM_GOTO") only mentioned GCC and Clang.init/Kconfig defines
CC_IS_GCCandCC_IS_CLANGbut notCC_IS_ICC, and nobody has reported any issue.Quoted 8 lines
I guess the Intel Compiler support is broken, and nobody is caring about it.
Signed-off-by Masahiro Yamada <[email protected]>---
I am sending this to Linus and the x86 maintainers with RFC. If somebody is still using ICC, please speak up!
Acked-by Arnd Bergmann <[email protected]>I had the same thought a while back and tried to show that it as already broken, but I never managed to actually download the compiler at the time.
Quoted 5 lines
It appears that in the meantime, Intel have completely dropped their old codebase and moved to using LLVM[1], so my guess is that with the current releases it will behave the same as clang. It might help to verify that this is indeed the case if you want to add that to the changelog text.
This is my thought, too. I'm happy to help folks working on icx to get icx up and running for kernel builds, if there's interest.
Change LGTM; there's probably some refactoring we might be able to do as a result of this; we might be able to move more common definitions out of include/linux/compiler-gcc.h and include/linux/compiler-clang.h into include/linux/compiler_types.h, but that can wait until after this change.
Quoted 4 lines
Arnd
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 2 lines · Masahiro Yamada
I am sending this to Linus and the x86 maintainers with RFC. If somebody is still using ICC, please speak up!
Yeah, the bit rot is not a good sign. I honestly can't remember seeing anyone actually use icc during my entire tenure at Intel. I'll ask around to see if there's any plausible reason to fix this up and keep it. But, I'm not holding my breath.