Compiler into ideal machine code

283 viewsOther

I came across LLVM, and they are in a constant struggle to optimize IL into binary, and it seems they are always losing this battle in some way. Either by introducing weird bugs, or by finding themselves in checkmate position by not being able to apply some optimizations because it breaks invariants.
Why is it not possible? Is it just because CPUs are complex, or is there something fundamental going on? They have been trying to optimize C for x86 for quite a while now…

In: Other

3 Answers

Anonymous 0 Comments

Because you can’t define “ideal”. It’s always a compromise between multiple performance and cost aspects. The most balanced choice will always be the worst product in each specific benchmark category, not best.

You are viewing 1 out of 3 answers, click here to view all answers.