public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* dead label use?
@ 2005-06-22 23:40 Mike Stump
  2005-06-23  2:43 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Stump @ 2005-06-22 23:40 UTC (permalink / raw)
  To: gcc

Forgive me ignorance, is there is use for the use of the label below?

 From rs6000, though, certainly there are other examples of this sort of 
thing in the md files:

(define_insn ""
   [(set (pc)
         (match_operand:P 0 "register_operand" "c,*l"))
    (use (label_ref (match_operand 1 "" "")))]
   ""
   "@
    bctr
    {br|blr}"
   [(set_attr "type" "jmpreg")])

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dead label use?
  2005-06-22 23:40 dead label use? Mike Stump
@ 2005-06-23  2:43 ` Ian Lance Taylor
  2005-06-24  2:07   ` Geoffrey Keating
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2005-06-23  2:43 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc

Mike Stump <mrs@apple.com> writes:

> Forgive me ignorance, is there is use for the use of the label below?
> 
>  From rs6000, though, certainly there are other examples of this sort
> of thing in the md files:
> 
> (define_insn ""
>    [(set (pc)
>          (match_operand:P 0 "register_operand" "c,*l"))
>     (use (label_ref (match_operand 1 "" "")))]
>    ""
>    "@
>     bctr
>     {br|blr}"
>    [(set_attr "type" "jmpreg")])

This is an instantiation of a tablejump created via define_expand.
Operand 1 is the jump table.  The insn needs to refer to it, or the
table will be deleted as unreferenced.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dead label use?
  2005-06-23  2:43 ` Ian Lance Taylor
@ 2005-06-24  2:07   ` Geoffrey Keating
  0 siblings, 0 replies; 3+ messages in thread
From: Geoffrey Keating @ 2005-06-24  2:07 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

Ian Lance Taylor <ian@airs.com> writes:

> Mike Stump <mrs@apple.com> writes:
> 
> > Forgive me ignorance, is there is use for the use of the label below?
> > 
> >  From rs6000, though, certainly there are other examples of this sort
> > of thing in the md files:
> > 
> > (define_insn ""
> >    [(set (pc)
> >          (match_operand:P 0 "register_operand" "c,*l"))
> >     (use (label_ref (match_operand 1 "" "")))]
> >    ""
> >    "@
> >     bctr
> >     {br|blr}"
> >    [(set_attr "type" "jmpreg")])
> 
> This is an instantiation of a tablejump created via define_expand.
> Operand 1 is the jump table.  The insn needs to refer to it, or the
> table will be deleted as unreferenced.

The problem is that the table has to be referenced *from a jump_insn*,
I think.  Obviously if the table is really unreferenced it could be deleted.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-24  2:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-22 23:40 dead label use? Mike Stump
2005-06-23  2:43 ` Ian Lance Taylor
2005-06-24  2:07   ` Geoffrey Keating

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).