public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/33356]  New: Incomplete documentation of REG_RETVAL and REG_LIBCALL notes
@ 2007-09-08 19:15 steven at gcc dot gnu dot org
  2007-12-17  8:04 ` [Bug rtl-optimization/33356] " steven at gcc dot gnu dot org
  2008-09-21 13:14 ` steven at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-09-08 19:15 UTC (permalink / raw)
  To: gcc-bugs

The documentation of REG_RETVAL and REG_LIBCALL notes is incomplete.  The
following additional information should be added to doc/rtl.texi:

1. LIBCALL and RETVAL notes always appear in pairs.
2. Operand 0 the libcall reg note always points to the other note of the pair.
3. Nested pairs of libcall notes are not allowed.

Nested libcalls are not allowed, but there is one pass that is prepared to
handle them anyway, and that is the local const/copy propagation pass in
gcse.c.  A patch for that is attached to Bug 33029
(http://gcc.gnu.org/bugzilla/attachment.cgi?id=14064).

A patch for the documentation is pasted below:

Index: doc/rtl.texi
===================================================================
--- doc/rtl.texi        (revision 128277)
+++ doc/rtl.texi        (working copy)
@@ -3640,13 +3640,16 @@ library call), and @var{op} is the first
 library call, the first insn that was generated to set up the arguments
 for the library call).

-Loop optimization uses this note to treat such a sequence as a single
-operation for code motion purposes and flow analysis uses this note to
-delete such sequences whose results are dead.
+The RTL dead code elimination pass uses this note to delete such
+sequences whose results are dead.

 A @code{REG_EQUAL} note will also usually be attached to this insn to
 provide the expression being computed by the sequence.

+A @code{REG_RETVAL} note always appears in pair with a @code{REG_LIBCALL}
+note.  The first operand of the @code{REG_RETVAL} note is a pointer to
+the @code{REG_LIBCALL} note of the pair.
+
 These notes will be deleted after reload, since they are no longer
 accurate or useful.

@@ -3655,6 +3658,10 @@ accurate or useful.
 This is the inverse of @code{REG_RETVAL}: it is placed on the first
 insn of a multi-insn sequence, and it points to the last one.

+A @code{REG_LIBCALL} note always appears in pair with a @code{REG_LIBCALL}
+note.  The first operand of the @code{REG_LIBCALL} note is a pointer to
+the @code{REG_RETVAL} note of the pair.
+
 These notes are deleted after reload, since they are no longer useful or
 accurate.


-- 
           Summary: Incomplete documentation of REG_RETVAL and REG_LIBCALL
                    notes
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
 BugsThisDependsOn: 33029


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33356


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

* [Bug rtl-optimization/33356] Incomplete documentation of REG_RETVAL and REG_LIBCALL notes
  2007-09-08 19:15 [Bug rtl-optimization/33356] New: Incomplete documentation of REG_RETVAL and REG_LIBCALL notes steven at gcc dot gnu dot org
@ 2007-12-17  8:04 ` steven at gcc dot gnu dot org
  2008-09-21 13:14 ` steven at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-12-17  8:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from steven at gcc dot gnu dot org  2007-12-17 08:04 -------
Ian, could you review/commit the patch of comment #0, please.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33356


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

* [Bug rtl-optimization/33356] Incomplete documentation of REG_RETVAL and REG_LIBCALL notes
  2007-09-08 19:15 [Bug rtl-optimization/33356] New: Incomplete documentation of REG_RETVAL and REG_LIBCALL notes steven at gcc dot gnu dot org
  2007-12-17  8:04 ` [Bug rtl-optimization/33356] " steven at gcc dot gnu dot org
@ 2008-09-21 13:14 ` steven at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: steven at gcc dot gnu dot org @ 2008-09-21 13:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from steven at gcc dot gnu dot org  2008-09-21 13:13 -------
libcall notes are no more...


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33356


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

end of thread, other threads:[~2008-09-21 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-08 19:15 [Bug rtl-optimization/33356] New: Incomplete documentation of REG_RETVAL and REG_LIBCALL notes steven at gcc dot gnu dot org
2007-12-17  8:04 ` [Bug rtl-optimization/33356] " steven at gcc dot gnu dot org
2008-09-21 13:14 ` steven at gcc dot gnu dot org

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).