[PATCH] fold-const.c use of BRANCH_COST
David Edelsohn
dje@watson.ibm.com
Fri Apr 11 04:24:00 GMT 2003
>>>>> Richard Henderson writes:
>> Yes, BRANCH_COST=1 really does degrade 200.sixtrack that much -- it is
>> completely repeatable.
Richard> But why would you want to set BRANCH_COST that low?
Because one of the design points for the POWER/PowerPC
architecture was "branches are free" and good branch prediction makes the
cost very low. I do not want to set BRANCH_COST that low, but it is hard
to argue when setting BRANCH_COST=1 does improve performance of some
testcases.
The issue is what effect of BRANCH_COST=1 is actually improving
performance. My investigation lead me to fold_range_test.
I would like to change the heuristic used by fold_range_test for
PowerPC. Instead of arguing that the threshold should be some arbitrary
value greater than the setting of BRANCH_COST on PowerPC, it seems more
useful to add port-specific finer granularity of control.
Thanks, David
More information about the Gcc-patches
mailing list