3 ms·
That would 1. Put more onus for optimization on the converter 2. Mean you can't target as many platforms
by brundolf 3y ago
That would
1. Put more onus for optimization on the converter
2. Mean you can't target as many platforms
- connicpu 3y agoTo be fair for point 1, if you have LLVM IR you can just run the full LLVM optimizer suite over it. But overall LLVM IR is a poor target because it constantly changes with every LLVM release.
- brundolf 3y agoLLVM does some optimizations, but compilers that target it normally do their own optimizations before generating the IR, because they know more than LLVM does about the higher-level source language and what can be done with it So eg, you may generate LLVM IR directly and only get LLVM's optimizations, or you may generate C and compile it with Clang and get Clang's optimizations + LLVM's optimizations You could always implement your own pre-LLVM optimizations in your LLVM IR generator, but as I think we all know, that's a huge amount of extra work (which is the OP's point)