This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)
- From: "Seongbae Park (박성배, 朴成培)" <seongbae dot park at gmail dot com>
- To: bonzini at gnu dot org
- Cc: "Jakub Jelinek" <jakub at redhat dot com>, "Steven Bosscher" <stevenb dot gcc at gmail dot com>, "Richard Kenner" <kenner at vlsi1 dot ultra dot nyu dot edu>, Kenneth dot Zadeck at naturalbridge dot com, dberlin at dberlin dot org, ebotcazou at libertysurf dot fr, gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com, zadeck at naturalbridge dot com
- Date: Fri, 19 Oct 2007 09:55:42 -0700
- Subject: Re: [PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)
- References: <10710182033.AA16378@vlsi1.ultra.nyu.edu> <571f6b510710182229q54401eaby1ca945a556c9bf9c@mail.gmail.com> <10710191241.AA28222@vlsi1.ultra.nyu.edu> <571f6b510710190604y980dd40k2f6522e9c78e465e@mail.gmail.com> <20071019133543.GH5451@devserv.devel.redhat.com> <571f6b510710190701m6c9d9878t4d0b49ff9efb6fa7@mail.gmail.com> <4718BC60.3030506@gnu.org> <20071019155452.GI5451@devserv.devel.redhat.com> <20071019161442.GJ5451@devserv.devel.redhat.com> <4718E01F.1010708@lu.unisi.ch>
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