4 ms·
> and clang's previous performance advantages were actually due to the lack of various optimization techniques and other features? Not lack of optimization tec
by ndesaulniers 6y ago
> and clang's previous performance advantages were actually due to the lack of various optimization techniques and other features?
Not lack of optimization techniques; LLVM is relatively fast compared to Clang for builds of the Linux kernel. Is it all of the compiler diagnostics and semantic analysis, or just unoptimized code? WIP to find out.
(I literally just went over a perf record of a linux kernel build with a teammate that's going to look into this more; I organized the LLVM miniconf at plumbers which is the video linked in the phoronix article in the grand parent post; my summer intern did the initial profiling work).
ToT LLVM, linux-next x86_64 defconfig: https://photos.app.goo.gl/hNwwy2K1Gh7Uc2D67 https://photos.app.goo.gl/hNwwy2K1Gh7Uc2D67 (yes, I know about disabling kptr_restrict)
Our next big project is to look into lazy parsing.
- hamandcheese 6y agoI’m confused, I thought clang was a frontend for LLVM so how does it make sense to compare clang with LLVM? From the clang Wikipedia: > It uses the LLVM compiler infrastructure as its back end and has been part of the LLVM release cycle since LLVM 2.6.
- ndesaulniers 6y agoIt's a pipeline; clang starts, hands off to LLVM. For a compilation to object file from source code, the vast majority of time for most translation units when building the Linux kernel is spent in the front end of the pipeline, not the middle, or backend. See also my first plot: https://github.com/ClangBuiltLinux/linux/issues/1086#issuecomment-670685565 https://github.com/ClangBuiltLinux/linux/issues/1086#issueco...
- deleted 6y ago[deleted]