On 06/10/2015 07:36 AM, Kyrill Tkachov wrote:
Thanks, I've made some progress towards making it more aggressive.
A question since I'm in the area...
noce_try_cmove_arith that I've been messing around with has this code:
/* A conditional move from two memory sources is equivalent to a
conditional on their addresses followed by a load. Don't do this
early because it'll screw alias analysis. Note that we've
already checked for no side effects. */
/* ??? FIXME: Magic number 5. */
if (cse_not_expected
&& MEM_P (a) && MEM_P (b)
&& MEM_ADDR_SPACE (a) == MEM_ADDR_SPACE (b)
&& if_info->branch_cost >= 5)
Any ideas on where the rationale for that 5 came from?
I see it's been there since the very introduction of ifcvt.c
I'd like to replace it with something more sane, maybe even remove it?
Richard was working on Itanic at the time. So I can speculate that the
transformation wasn't generally profitable on other targets, so he
picked a value that was high enough for the code to only trigger on
Itanic (and perhaps Alphas since he was still doing a lot of work on
them and knew their properties quite well).
Richard is currently on PTO, so I don't think you're likely to get a
quick response from him with further details.
jeff