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)


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?

Adam


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