Looking forward to GCC 7
Looking forward to GCC 7
Posted Apr 7, 2017 21:37 UTC (Fri) by ncm (guest, #165)In reply to: Looking forward to GCC 7 by zlynx
Parent article: Looking forward to GCC 7
So, inserting instructions between the test and the branch pessimizes current hardware, by default, in exchange for possibly less-bad performance on very old, slow hardware that (manifestly) nobody cares about enough to upgrade. It seems more likely to me that nobody on the project has reviewed the particular choice to insert the instructions, in light of current developments. In fact, when I last checked (in 6.1, I think), telling gcc to tune for Haswell did not make it emit fusible test-and-branch sequences.
But I would be interested to learn about a change in the policy, if any, and what motivated it.
Posted Apr 7, 2017 22:30 UTC (Fri)
by excors (subscriber, #95769)
[Link] (1 responses)
Posted Apr 8, 2017 3:18 UTC (Sat)
by ncm (guest, #165)
[Link]
Posted Apr 10, 2017 11:39 UTC (Mon)
by joib (subscriber, #8541)
[Link] (1 responses)
One could argue that by default GCC should a) do some optimizations b) generate debug symbols, and though I agree with that sentiment, it's another topic.
If GCC missed the opportunity for macro-op fusion with -mtune=generic, that sounds like a missed optimization bug.
Posted Apr 10, 2017 12:55 UTC (Mon)
by pabs (subscriber, #43278)
[Link]
GCC does seem to have code for macro fusion like that, added in GCC 4.9.0, so it probably ought to work.
Looking forward to GCC 7
Looking forward to GCC 7
Looking forward to GCC 7
Looking forward to GCC 7
