4 ms·
I don’t buy it. There’s nothing preventing GCC from having different inlining/outlining heuristics as well as different cost models for versioning based on tar
by pizlonator 4y ago
I don’t buy it.
There’s nothing preventing GCC from having different inlining/outlining heuristics as well as different cost models for versioning based on target.
Unless you control for that, the results are meaningless.
My own tests say that x86 and arm thumb2 are about equally compact and everything else is fatter. But even those tests probably lacked all the controls you’d need to get it right.
- Joker_vD 4y ago> There’s nothing preventing GCC from having different inlining/outlining heuristics as well as different cost models for versioning based on target. Does it actually have that different logic? Because otherwise this sounds like that tired "nothing prevents the compiler to be arbitrarily smart" argument — sure, nothing prevents that except for the fact that someone has to actually implement this smartness.
- pizlonator 4y agoI know that llvm has different logic. I know that every compiler that I’ve ever written ends up having different logic for this based on target, for a myriad of complex reasons. So I would assume GCC landed in the same place as anyone writing a complex compiler.
- mbitsnbites 4y agoThe results mean what they mean: If you compile your software with GCC -O3 you will typically get smaller code and fewer instructions on average for modern fixed size RISC ISAs than for modern CISC ISAs. You would have to do further and other investigations to draw any other conclusions.