3 ms·
We just found a opportunity for improving compile times for the Linux kernel when built with LLVM targeting x86 by 13% (slowdowns due to inline asm and sillynes
by ndesaulniers 6y ago
We just found a opportunity for improving compile times for the Linux kernel when built with LLVM targeting x86 by 13% (slowdowns due to inline asm and sillyness in LLVM). Appearantly you can `perf record` the invocation of `make` for an entire kernel build, and get a 5GB trace of mostly llvm (well, mostly clang). When you start measuring and profiling, easy wins pop up everywhere. WIP
I was just today discussing with clang's code owner the idea of lazy parsing for static inline functions.
- mhaberl 6y agoThat sounds great! >slowdowns due to inline asm and sillyness in LLVM I just hope that isn't a Chesterton's fence
- ndesaulniers 6y agoIt wasn't. For a given architecture you can enable/disable extensions via +sse,-mmx,+avx,-avx512 etc. Certain enables or disables imply enabling/disabling others. How that was being computed was accidentally quadratic, and further could be memoized.
- db48x 6y agoYou should send that to Accidentally Quadratic (https://accidentallyquadratic.tumblr.com/ https://accidentallyquadratic.tumblr.com/). There have been no new stories there in a year, but perhaps they just need submissions.