On Mon, Sep 30, 2019 at 7:51 PM Alexander Monakov wrote:
>
> On Mon, 30 Sep 2019, Alexander Monakov wrote:
>
> > +static unsigned
> > +average_cost (unsigned then_cost, unsigned else_cost, edge e)
> > +{
> > + return else_cost + e->probability.apply ((int) then_cost - else_cost);
>
> Ugh, I made
On Mon, 30 Sep 2019, Alexander Monakov wrote:
> +static unsigned
> +average_cost (unsigned then_cost, unsigned else_cost, edge e)
> +{
> + return else_cost + e->probability.apply ((int) then_cost - else_cost);
Ugh, I made a wrong last-minute edit here, we want signed cost difference so
the argum
Hi,
this patch corrects a problem where our cost estimation in if-conversion is
broken when the 'else' block is missing: we then take the cost of 'then' block,
which leads gcc willing to replace a conditionally-executed block with cost 80
with an unconditionally-executed block with cost 72.
Exist