3 ms·
> Going to C-- and then from there going to LLVM loses a lot of the semantic information that one can provide to the LLVM optimiser. What semantic information?
by rwallace 9y ago
> Going to C-- and then from there going to LLVM loses a lot of the semantic information that one can provide to the LLVM optimiser.
What semantic information?
- codygman 9y agoTypes for instance.
- rwallace 9y agoWhat type information exactly are you thinking of, that the optimizer would be able to make use of, is lost?
- mhh__ 9y agoThe only type information I can think of is invariants from type definitions and their use (e.g. this ADT contains an Integer that is never less than 5). This information can be used to (say) constant fold branches. This information would have to be reinferred by the optimiser. However, I don't think this would do anything because AFAIK LLVM can already get infer this. This could give a speed boost: LLVM has llvm.assume with which one can annotate IR with, using this would mean that the optimizer doesn't have to infer this (and therefore save time).