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]

Re: [PATCH] Check precision in STRIP_NOPS when possible (take 2)


Richard Guenther writes:
> On Thu, Jun 11, 2009 at 5:32 PM, Adam Nemet<anemet@caviumnetworks.com> wrote:
> > Jakub Jelinek writes:
> >> This doesn't look very efficient.  When you already call an external
> >> function, can't you do everything STRIP_NOPS resp. STRIP_SIGN_NOPS does
> >> in it?  Otherwise you need to call that function potentially many times
> >> and it unnecessarily occupies space in .text section in the caller.
> >
> > Well, this is how STRIP_USELESS_TYPE_CONVERSION works, so then I guess that
> > should be changed as well.  No?
> >
> >> Just move the while loop into tree_nop_conversion resp.
> >> tree_sign_nop_conversion, change return value to tree, replace current
> >> return false with return exp; and return true with continue
> >> in for (; ; exp = TREE_OPERAND (exp, 0)).
> >
> > I'd probably still keep the stripping and the predicate about its uselessness
> > in separate function and let the compiler combine them.
> >
> > So I'll go and prepare a separate patch on top of the previous to move the
> > while loops inside this stripping macros (including
> > STRIP_USELESS_TYPE_CONVERSION).
> >
> > While I am there do you want me to actually replace the call sites to use the
> > functions instead of the macros?
> 
> Not as part of the same patch please.

The patch is already posted for this.  It's a separate patch and it does not
fold the macros into call sites:

  http://gcc.gnu.org/ml/gcc-patches/2009-06/msg00949.html

Please let me know if the patch in this thread is OK assuming the patch from
the link to address Jakub's efficiency concerns.

Adam


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