On 11/30/18 9:14 AM, Jakub Jelinek wrote:
> On Fri, Nov 30, 2018 at 09:08:34AM -0700, Jeff Law wrote:
>>> Sth I don't like very much...  maybe we can revisit removing
>>> the few cases in fold-const.c (thus GENERIC folding) and rely
>>> on later GIMPLE passes instead plus on RTL expansion to
>>> do the reverse transform.
>>>
>>> Not for GCC 9 of course.
>> Agreed, 100%.  That was supposed to be where Kai's work was headed, but
>> we never seemed to make significant headway.   Getting BRANCH_COST out
>> of the tree generation/folding would be a good thing at many levels.
>>
>> There'll be fallout, of course.
> 
> Note, for the GCC 9 timeframe, for PR85368 I wrote today
> --param logical-op-non-short-circuit={0,1} support that allows
> to override LOGICAL_OP_NON_SHORT_CIRCUIT, because clearly it is impossible
> to handle it in testcases otherwise, just -mbranch-cost= and the defaults
> aren't good enough, as some targets override LOGICAL_OP_NON_SHORT_CIRCUIT
> and figuring out all the details is too hard in tcl.
Yea, that sounds quite reasonable.  The target conditions in those tests
are just insane and obviously unmaintainable.  A param to control
behavior seems like a good idea.

The param also makes it easier to experiment with this stuff as we try
to kill the BRANCH_COST and LOGICAL_OP_NON_SHORT_CIRCUIT bits early.
jeff

Reply via email to