Fix PR43984, PRE misses full redundancies

H.J. Lu hjl.tools@gmail.com
Fri May 7 05:22:00 GMT 2010


On Thu, May 6, 2010 at 6:56 AM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> On Wed, 5 May 2010, Richard Guenther wrote:
>
>> > Hence, I'd go with the below patch in the end.  Nevertheless okay if
>> > regstrapping still passes?
>>
>> Ok.
>
> I've checked it in as r159106 with this additional hook to have saner
> statistics (and not have to change some PRE testcases):
>
>          /* Queue the copy for eventual removal.  */
>          VEC_safe_push (gimple, heap, to_remove, stmt);
> -         pre_stats.eliminations++;
> +         /* If we inserted this PHI node ourself, it's not an elimination.  */
> +         if (bitmap_bit_p (inserted_exprs, SSA_NAME_VERSION (res)))
> +           pre_stats.phis--;
> +         else
> +           pre_stats.eliminations++;
>        }
>     }
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44020


-- 
H.J.



More information about the Gcc-patches mailing list