[patch] fold-const.c: Don't handle ASSERT_EXPR.
Andrew Pinski
pinskia@physics.uc.edu
Mon Apr 18 17:46:00 GMT 2005
On Apr 18, 2005, at 1:42 PM, Kazu Hirata wrote:
> Hi Roger,
>
>>> PR tree-optimization/21047
>>> * fold-const.c (fold): Don't handle ASSERT_EXPR.
>>
>> You're right that this code in fold is dead and should be removed,
>> but wouldn't it be better to also move it to fold_binary, so that
>> it will be triggered if VRP (or anyone) else calls fold with an
>> ASSERT_EXPR. For many tree codes, the transformations in "fold"
>> serve as a form of documentation of their semantics.
>
> Err, ASSERT_EXPR lives only during VRP. Plus (quote from my original
> message),
>
> Second, AFAICT, VRP never calls fold on ASSERT_EXPR. It does call
> on ASSERT_EXPR_COND, but that's just a tcc_comparison, which fold
> handles fine via fold_binary.
>
> So I don't think it's a good idea to just move the dead code.
Could the code become alive any time soon, if so I would move the code.
-- Pinski
More information about the Gcc-patches
mailing list