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] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)


On Fri, Oct 19, 2007 at 04:17:04PM +0200, Paolo Bonzini wrote:
> 
> >
> >So that would mean that you don't even need libcall notes to CSE
> >_tls_get_addr calls?
> 
> CALL_INSNs are never DCE'd:
> 
> static bool
> deletable_insn_p (rtx insn, bool fast)
> {
>   rtx body, x;
>   int i;
> 
>   if (!NONJUMP_INSN_P (insn))
>     return false;

Why is that?  CONST_OR_PURE_CALL_P CALL_INSNs should be deletable...

Anyway, just tried (sorry for the delay) removing the libcall stuff, just
generate:
(call_insn/u 5 4 6 mm2.c:4 (parallel [
            (set (reg:DI 0 ax)
                (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1 A8])
                    (const_int 0 [0x0])))
            (unspec:DI [
                    (const_int 0 [0x0])
                ] 20)
        ]) -1 (nil)
    (nil))

(insn 6 5 7 mm2.c:4 (set (reg:DI 60)
        (reg:DI 0 ax)) -1 (nil))

but CSE isn't able to merge these.  Will still try to add REG_EQUAL note to
the pseudo = %rax insn if that helps.

	Jakub


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