If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Among the reasons developers have been interested in using the Clang compiler on the Linux kernel comes down to possible performance gains, the diagnostics reporting offered by Clang compared to GCC, the very powerful static analysis support offered by Clang, and just freeing the dependence upon GCC.

All true... but possible performance gains? On ARM? With LLVM? AFAIK LLVM isn't very competitive on ARM, yet... Or did I miss something?

Comment

All true... but possible performance gains? On ARM? With LLVM? AFAIK LLVM isn't very competitive on ARM, yet... Or did I miss something?

The recentish benchmarks I've seen are a bit all over the map. Some tests are faster in GCC, some are faster with LLVM, and a small few that rely on OpenMP are significantly faster with GCC. OpenMP support is being worked on for Clang, of course.

Given that most of the major OS vendors in the ARM space have moved or are moving to Clang (e.g., Apple and Google), I'd expect LLVM to improve quite rapidly in this area.

Comment

Given that most of the major OS vendors in the ARM space have moved or are moving to Clang (e.g., Apple and Google), I'd expect LLVM to improve quite rapidly in this area.

LLVM/Clang ARM support has been developed aggressively for awhile now.

LLVMLinux is interested in supporting Linux kernel compilation in general. Different developers involved may work on a specific platform, but our general direction is widespread support for commonly used hardware architectures.

Well that benchmark test really is inconclusive, on the only test where optimization flags is specified, which is the C-Ray test (-O3) GCC beats Clang/LLVM by quite a margin, on the other tests no optimization setting is declared and I know that the p7zip package defaults to -O0 unless you actually specify a optimization level which makes that test totally pointless as -O0 is no optimization.

That leaves TSCP where GCC wins by some margin and which also hasn't got any optimization level declared, I don't know what if any level it defaults to. Again Phoronix benchmarks is a sad state of affairs.

Comment

All true... but possible performance gains? On ARM? With LLVM? AFAIK LLVM isn't very competitive on ARM, yet... Or did I miss something?

LLVM/Clang is used by Apple as the toolchain for iOS. Both the iPad and the iPhone are ARM SoC (system-on-chip) devices. LLVM/Clang have had strong support for a variety of platforms since the early days of the project. In fact, LLVM has always supported multiple target backends (you tell LLVM which backends to build when compiling).