[RFC] new post-reload compare elimination pass
Richard Henderson
rth@redhat.com
Tue Nov 30 03:23:00 GMT 2010
Since NickC is away for the next month or so, I spent some of the
long weekend trying to help him out with the mn10300 comparison
problem for which he's already sent two revisions. The patch is
along the lines I proposed here:
http://gcc.gnu.org/ml/gcc-patches/2010-11/msg01076.html
This adds a new post-reload pass, which is only enabled by backends
that require it, e.g.
> + /* Enable comparison elimination, unless explicitly disabled. */
> + if (optimize && !global_options_set.x_flag_compare_elim_after_reload)
> + flag_compare_elim_after_reload = 1;
as will be seen in the mn10300 backend patch that uses this.
I tried to use the df.h interfaces more, but I couldn't seem to find
any easy way to walk a def-def chain. I'd need that to easily notice
the LUID of the clobber of the flags register preceding a compare. In
the end it seemed easiest to simply walk the insn chain and keep track.
Comments wrt this specific patch?
r~
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-New-fcompare-elim-pass.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101130/1872cbae/attachment.ksh>
More information about the Gcc-patches
mailing list