This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66584] gcc differs in static, branch-prediction cost from icc in switch.
- From: "jmcguiness at liquidcapital dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Jun 2015 16:27:49 +0000
- Subject: [Bug c++/66584] gcc differs in static, branch-prediction cost from icc in switch.
- Auto-submitted: auto-generated
- References: <bug-66584-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66584
--- Comment #8 from Jason McG <jmcguiness at liquidcapital dot com> ---
(In reply to Andrew Pinski from comment #6)
...
> compiler developer. This is the first time I have seen a non-compiler
> developer care about documenting gcc heuristics. Note there is no one paper.
...
See comment 5. The documentation I am proposing is pretty trivial, I repeat:
"code generation for switch statements may not follow a top-down approach nor
prefer the default case (if it exists) in terms of static branch-prediction.
The __builtin_expected() intrinsic has no effect". I find it had to understand
how that documentation could be considered contentious.