This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Check precision in STRIP_NOPS when possible (take 2)
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.
Thanks,
Richard.
> Adam
>