This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] new post-reload compare elimination pass


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~

Attachment: 0001-New-fcompare-elim-pass.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]