Re:What Challenges and Trade-Offs Do Optimising Compilers Face?
by DerSaidin on Thursday June 22, 2017 @06:40PM
(#14615869)
For a human reading LLVM IR, it hasn't changed much between versions since at least 2.6.
I could give it a few hints about what order might work, and it could show me what the intermediate representations are so that I can keep them in mind while writing code. There are patterns in C/C++ that trip up compilers, like unintentional aliasing or out params, and I could try to avoid them to help the optimizer. On the other hand, if the optimizer doesn't are, I will use them for my own convenience.
I suppose Clang has a pretty well-defined interface between passes, in the LLVM IR, so you can do this to some degree now. But it is a little obscure and probably version-dependent.