LLVM Developers Looking At Phasing Out Intel MMX Support
Upstream developers are looking at phasing out Intel MMX that was popular in the late 90's but has since long been succeeded by SSE and AVX instruction set extensions.
Due to potentially problematic/incorrect usage around MMX intrinsics usage if the programmer doesn't correctly handle the intrinsics and there being a number of LLVM bugs about MMX behavior, a proposal was issued this past weekend to remove MMX support.
The initial proposal was to re-implement all the MMX intrinsics in Clang's headers by using SSE/SSE2 compiler built-ins for x86 32-bit and 64-bit code generation. In turn the MMX implementations of those intrinsics could be removed. Reimplementing the MMX intrinsics using SSE2 would in turn raise the compiler requirements for Clang, but even still SSE2 has been present for CPUs the past decade and a half. The proposal also laid out the idea in time to remove the MMX intrinsics entirely from the LLVM IR. Another possibility is defaulting to -mno-mmx when compiling for x86_64 to ensure MMX support isn't enabled. Developers still could make use of MMX instructions directly using inline Assembly code.
The details are still being discussed among upstream LLVM developers but most will agree there is little purpose in still catering to Pentium MMX / Pentium II / Pentium III and Athlon K6/K7 processors in 2020 and beyond by LLVM.
The discussion is ongoing in this kernel thread.
Due to potentially problematic/incorrect usage around MMX intrinsics usage if the programmer doesn't correctly handle the intrinsics and there being a number of LLVM bugs about MMX behavior, a proposal was issued this past weekend to remove MMX support.
The initial proposal was to re-implement all the MMX intrinsics in Clang's headers by using SSE/SSE2 compiler built-ins for x86 32-bit and 64-bit code generation. In turn the MMX implementations of those intrinsics could be removed. Reimplementing the MMX intrinsics using SSE2 would in turn raise the compiler requirements for Clang, but even still SSE2 has been present for CPUs the past decade and a half. The proposal also laid out the idea in time to remove the MMX intrinsics entirely from the LLVM IR. Another possibility is defaulting to -mno-mmx when compiling for x86_64 to ensure MMX support isn't enabled. Developers still could make use of MMX instructions directly using inline Assembly code.
The details are still being discussed among upstream LLVM developers but most will agree there is little purpose in still catering to Pentium MMX / Pentium II / Pentium III and Athlon K6/K7 processors in 2020 and beyond by LLVM.
The discussion is ongoing in this kernel thread.
18 Comments