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 10/19/07, Paolo Bonzini <paolo.bonzini@lu.unisi.ch> wrote:
> > Adding REG_EQUAL note was all that was needed for CSEing it, but dce.c still
> > won't delete it, because it punts on all UNSPECs.  The UNSPECs are really
> > necessary for the __tls_get_addr call, as the call_insn has mandatory insn
> > sequence that needs to be output there (to make TLS transitions possible).
> >
> > Say speculative moves use UNSPEC_LDS{,A}, but they certainly should be dced.
>
> I would say that all non-trapping UNSPECs (not UNSPEC_VOLATILEs) should
> be DCEd.  Maxim Kuvyrkov recently added a target hook to mark some
> unspecs as non-trapping, and speculative moves are exactly the once he
> needed the hook for.
>
> Paolo

This was discussed before, and after some discussion,
we've agreed to the following semantic as described in rtl.def:

    215    UNSPEC can occur all by itself in a PATTERN, as a component
of a PARALLEL,
    216    or inside an expression.
    217    UNSPEC by itself or as a component of a PARALLEL
    218    is currently considered not deletable.
    219
    220    FIXME: Replace all uses of UNSPEC that appears by itself or
as a component
    221    of a PARALLEL with USE.
    222    */

    284    USE can not appear as an operand of other rtx except for PARALLEL.
    285    USE is not deletable, as it indicates that the operand
    286    is used in some unknown way.  */
    287 DEF_RTL_EXPR(USE, "use", "e", RTX_EXTRA)

    293    CLOBBER can not appear as an operand of other rtx except
for PARALLEL.
    294    CLOBBER of a hard register appearing by itself (not within PARALLEL)
    295    is considered undeletable before reload.  */
    296 DEF_RTL_EXPR(CLOBBER, "clobber", "e", RTX_EXTRA)


If we want to change the meaning or the interpretation to clean this up,
I'm all for it, but I think it's too late to do that for 4.3.

Seongbae


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