Get the latest tech news
Optimisation-dependent IR decisions in Clang
I used to naively assume that Clang always handed off the same IR to the LLVM optimisation pipeline regardless of optimisation level. In an attempt to gain a bit more understanding into exactly what kinds of decisions depend on optimisation level in Clang, I surveyed the IR emission code paths.
I was at least aware of the optnone attribute set on functions when compiling at-O0, but I’ve slowly started to notice there are more divergences than just that. In an attempt to gain a bit more understanding into exactly what kinds of decisions depend on optimisation level in Clang, I surveyed the IR emission code paths. I ignored decisions related to specialised language specifics (Objective-C, ARC, HLSL, OpenMP) and ABI details.
Or read this on Hacker News