On Tue, Jan 8, 2013 at 5:16 PM, Jeff Law <l...@redhat.com> wrote:
> On 01/08/2013 04:26 AM, Richard Biener wrote:
>
>>
>> The issue is VRP - when you remove unreachable blocks you lose the
>> conditional statement as it is no longer necessary and thus the predicate
>> you can derive value-ranges from.
>
> Understood.  Perhaps we could eliminate them after the first VRP pass, but
> before the second.  That ought to give us the majority of the benefit of
> seeing the conditional and propagating based on the conditional, but also
> give us the benefit of eliminating the branch generating straight-line code.
>
> Clearly it needs more investigation, but I think it's worth exploring.

Sure - especially if we eventually move to preserve value-range information
across passes.  __builtin_constant_p is a similar thing - it guards one
reachable and one unreachable path but we forcefully remove it only
during the late fold-all-builtins pass.

Richard.

> Jeff

Reply via email to