public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/21705] New: FRE does not catch eliminate a redundant pute call.
@ 2005-05-22  2:35 kazu at cs dot umass dot edu
  2005-05-22  5:27 ` [Bug tree-optimization/21705] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-05-22  2:35 UTC (permalink / raw)
  To: gcc-bugs

Consider:

extern unsigned int strlen (const char *) __attribute__ ((__pure__));

void
foo (const char *str)
{
  unsigned int a = strlen (str);
  unsigned int b = strlen (str);
  if (a != b)
    link_error ();
}

FRE does not eliminate the second call to strlen.

-- 
           Summary: FRE does not catch eliminate a redundant pute call.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kazu at cs dot umass dot edu
                CC: dberlin at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
                    dot org


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


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

* [Bug tree-optimization/21705] FRE does not catch eliminate a redundant pute call.
  2005-05-22  2:35 [Bug tree-optimization/21705] New: FRE does not catch eliminate a redundant pute call kazu at cs dot umass dot edu
@ 2005-05-22  5:27 ` pinskia at gcc dot gnu dot org
  2005-05-22 18:55 ` [Bug tree-optimization/21705] FRE does not eliminate a redundant pure call dberlin at dberlin dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-22  5:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-22 05:27 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-22 05:27:18
               date|                            |


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


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

* [Bug tree-optimization/21705] FRE does not eliminate a redundant pure call.
  2005-05-22  2:35 [Bug tree-optimization/21705] New: FRE does not catch eliminate a redundant pute call kazu at cs dot umass dot edu
  2005-05-22  5:27 ` [Bug tree-optimization/21705] " pinskia at gcc dot gnu dot org
@ 2005-05-22 18:55 ` dberlin at dberlin dot org
  2005-05-22 20:01 ` kazu at cs dot umass dot edu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dberlin at dberlin dot org @ 2005-05-22 18:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dberlin at gcc dot gnu dot org  2005-05-22 18:55 -------
Subject: Re:  FRE does not eliminate a
	redundant pure call.

On Sun, 2005-05-22 at 13:42 +0000, kazu at cs dot umass dot edu wrote:
> 
A patch was sent to kazu privately that bootstrapped and regtested okay,
and fixses this bug.
i'll commit it after the slush.




-- 


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


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

* [Bug tree-optimization/21705] FRE does not eliminate a redundant pure call.
  2005-05-22  2:35 [Bug tree-optimization/21705] New: FRE does not catch eliminate a redundant pute call kazu at cs dot umass dot edu
  2005-05-22  5:27 ` [Bug tree-optimization/21705] " pinskia at gcc dot gnu dot org
  2005-05-22 18:55 ` [Bug tree-optimization/21705] FRE does not eliminate a redundant pure call dberlin at dberlin dot org
@ 2005-05-22 20:01 ` kazu at cs dot umass dot edu
  2005-05-25 18:55 ` dberlin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-05-22 20:01 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dberlin at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug tree-optimization/21705] FRE does not eliminate a redundant pure call.
  2005-05-22  2:35 [Bug tree-optimization/21705] New: FRE does not catch eliminate a redundant pute call kazu at cs dot umass dot edu
                   ` (3 preceding siblings ...)
  2005-05-25 18:55 ` dberlin at gcc dot gnu dot org
@ 2005-05-25 18:55 ` cvs-commit at gcc dot gnu dot org
  2005-05-25 19:26 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-25 18:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-25 18:53 -------
Subject: Bug 21705

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	dberlin@gcc.gnu.org	2005-05-25 18:53:25

Modified files:
	gcc            : ChangeLog tree-ssa-pre.c 
Added files:
	gcc/testsuite/gcc.dg/tree-ssa: ssa-pre-14.c 

Log message:
	2005-05-25  Daniel Berlin  <dberlin@dberlin.org>
	
	Fix PR tree-optimization/21705
	
	* tree-ssa-pre.c (in_fre): New static variable.
	(create_value_expr_from): Recursively value number reference ops
	in argument lists.
	(can_value_number_call): Temporary restrict only exists for
	PRE, not FRE.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8896&r2=2.8897
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&r1=2.90&r2=2.91
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-14.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug tree-optimization/21705] FRE does not eliminate a redundant pure call.
  2005-05-22  2:35 [Bug tree-optimization/21705] New: FRE does not catch eliminate a redundant pute call kazu at cs dot umass dot edu
                   ` (2 preceding siblings ...)
  2005-05-22 20:01 ` kazu at cs dot umass dot edu
@ 2005-05-25 18:55 ` dberlin at gcc dot gnu dot org
  2005-05-25 18:55 ` cvs-commit at gcc dot gnu dot org
  2005-05-25 19:26 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-05-25 18:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dberlin at gcc dot gnu dot org  2005-05-25 18:55 -------
Fixed

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


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


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

* [Bug tree-optimization/21705] FRE does not eliminate a redundant pure call.
  2005-05-22  2:35 [Bug tree-optimization/21705] New: FRE does not catch eliminate a redundant pute call kazu at cs dot umass dot edu
                   ` (4 preceding siblings ...)
  2005-05-25 18:55 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-25 19:26 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-25 19:26 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


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


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

end of thread, other threads:[~2005-05-25 18:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-22  2:35 [Bug tree-optimization/21705] New: FRE does not catch eliminate a redundant pute call kazu at cs dot umass dot edu
2005-05-22  5:27 ` [Bug tree-optimization/21705] " pinskia at gcc dot gnu dot org
2005-05-22 18:55 ` [Bug tree-optimization/21705] FRE does not eliminate a redundant pure call dberlin at dberlin dot org
2005-05-22 20:01 ` kazu at cs dot umass dot edu
2005-05-25 18:55 ` dberlin at gcc dot gnu dot org
2005-05-25 18:55 ` cvs-commit at gcc dot gnu dot org
2005-05-25 19:26 ` pinskia 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).