public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges
@ 2004-07-16  6:50 zlomek at gcc dot gnu dot org
  2004-07-16  7:10 ` [Bug middle-end/16585] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: zlomek at gcc dot gnu dot org @ 2004-07-16  6:50 UTC (permalink / raw)
  To: gcc-bugs

make_edges() clears current_function_has_computed_jump flag in its beginning
and set it only if it finds a computed jump in a *range* of basic blocks which
is passed in its arguments.

So the result is that the flag is incorrectly cleared when a range of blocks
which does not contain the computed jump although the current function contains
the computed jump is passed to make_edges().

This behaviour occurs when compiling the testcase "ef.i" from PR/15242 with "-O2".

-- 
           Summary: current_function_has_computed_jump incorrectly changed
                    in make_edges
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zlomek at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-linux
  GCC host triplet: i386-unknown-linux
GCC target triplet: i386-unknown-linux
OtherBugsDependingO 15242
             nThis:


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


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

* [Bug middle-end/16585] current_function_has_computed_jump incorrectly changed in make_edges
  2004-07-16  6:50 [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges zlomek at gcc dot gnu dot org
@ 2004-07-16  7:10 ` pinskia at gcc dot gnu dot org
  2004-10-15  2:12 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-16  7:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-16 07:10 -------
The only function which calls make_edges which should not is find_many_sub_basic_blocks which gets 
called from cfgexpand with all ones which is fine and commit_edge_insertions and 
commit_edge_insertions_watch_calls (and maybe split_all_insns) which is where the problem comes 
into play I think.  The only functions besides your patch which uses this flag is is_cfg_nonregular which 
is used for scheduling.

-- 


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


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

* [Bug middle-end/16585] current_function_has_computed_jump incorrectly changed in make_edges
  2004-07-16  6:50 [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges zlomek at gcc dot gnu dot org
  2004-07-16  7:10 ` [Bug middle-end/16585] " pinskia at gcc dot gnu dot org
@ 2004-10-15  2:12 ` pinskia at gcc dot gnu dot org
  2004-10-25 16:31 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-15  2:12 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization


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


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

* [Bug middle-end/16585] current_function_has_computed_jump incorrectly changed in make_edges
  2004-07-16  6:50 [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges zlomek at gcc dot gnu dot org
  2004-07-16  7:10 ` [Bug middle-end/16585] " pinskia at gcc dot gnu dot org
  2004-10-15  2:12 ` pinskia at gcc dot gnu dot org
@ 2004-10-25 16:31 ` pinskia at gcc dot gnu dot org
  2004-10-25 16:32 ` steven at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-25 16:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-25 16:31 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-25 16:31:39
               date|                            |


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


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

* [Bug middle-end/16585] current_function_has_computed_jump incorrectly changed in make_edges
  2004-07-16  6:50 [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges zlomek at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-10-25 16:31 ` pinskia at gcc dot gnu dot org
@ 2004-10-25 16:32 ` steven at gcc dot gnu dot org
  2004-10-25 16:34 ` steven at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-10-25 16:32 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2004-10-25 16:31:39         |2004-10-25 16:32:16
               date|                            |


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


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

* [Bug middle-end/16585] current_function_has_computed_jump incorrectly changed in make_edges
  2004-07-16  6:50 [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges zlomek at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-10-25 16:32 ` steven at gcc dot gnu dot org
@ 2004-10-25 16:34 ` steven at gcc dot gnu dot org
  2005-01-24  0:56 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-10-25 16:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-10-25 16:34 -------
I think the brute-force approach of just updating 
current_function_has_computed_jump in a FOR_EACH_BB loop 
after calling make_edges is a "good enough" fix for this 
problem.  We can figure out if we have computed jumps at 
the tree level and keep it updated from there on. 
 
I'm testing a patch to do exactly this. 
 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2004-10-25 16:32:16         |2004-10-25 16:34:05
               date|                            |


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


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

* [Bug middle-end/16585] current_function_has_computed_jump incorrectly changed in make_edges
  2004-07-16  6:50 [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges zlomek at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-10-25 16:34 ` steven at gcc dot gnu dot org
@ 2005-01-24  0:56 ` pinskia at gcc dot gnu dot org
  2005-01-26 15:16 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-24  0:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-24 00:56 -------
Assigning to Steven since he had accepted it before (just unassign if you don't want this bug anymore).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |steven at gcc dot gnu dot
                   |dot org                     |org


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


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

* [Bug middle-end/16585] current_function_has_computed_jump incorrectly changed in make_edges
  2004-07-16  6:50 [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges zlomek at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-01-24  0:56 ` pinskia at gcc dot gnu dot org
@ 2005-01-26 15:16 ` steven at gcc dot gnu dot org
  2005-01-26 17:27 ` cvs-commit at gcc dot gnu dot org
  2005-01-26 17:28 ` steven at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-26 15:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-26 15:16 -------
We can just zap it completely, of course: 
http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01892.html 

-- 


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


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

* [Bug middle-end/16585] current_function_has_computed_jump incorrectly changed in make_edges
  2004-07-16  6:50 [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges zlomek at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-01-26 15:16 ` steven at gcc dot gnu dot org
@ 2005-01-26 17:27 ` cvs-commit at gcc dot gnu dot org
  2005-01-26 17:28 ` steven at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-26 17:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-01-26 17:26 -------
Subject: Bug 16585

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	steven@gcc.gnu.org	2005-01-26 17:26:36

Modified files:
	gcc            : ChangeLog cfgbuild.c function.h sched-rgn.c 

Log message:
	PR middle-end/16585
	* cfgbuild.c (make_edges): Do not clear or set
	current_function_has_computed_jump.
	* function.h (struct function): Remove the has_computed_jump field.
	(current_function_has_computed_jump): Do not define.
	* sched-rgn.c (is_cfg_nonregular): Return true if a basic block ends
	in a computed jump.  Ignore current_function_has_computed_jump.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7286&r2=2.7287
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfgbuild.c.diff?cvsroot=gcc&r1=1.59&r2=1.60
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.h.diff?cvsroot=gcc&r1=1.137&r2=1.138
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/sched-rgn.c.diff?cvsroot=gcc&r1=1.91&r2=1.92



-- 


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


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

* [Bug middle-end/16585] current_function_has_computed_jump incorrectly changed in make_edges
  2004-07-16  6:50 [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges zlomek at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-01-26 17:27 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-26 17:28 ` steven at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-26 17:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-26 17:27 -------
zap. 

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


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


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

end of thread, other threads:[~2005-01-26 17:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-16  6:50 [Bug middle-end/16585] New: current_function_has_computed_jump incorrectly changed in make_edges zlomek at gcc dot gnu dot org
2004-07-16  7:10 ` [Bug middle-end/16585] " pinskia at gcc dot gnu dot org
2004-10-15  2:12 ` pinskia at gcc dot gnu dot org
2004-10-25 16:31 ` pinskia at gcc dot gnu dot org
2004-10-25 16:32 ` steven at gcc dot gnu dot org
2004-10-25 16:34 ` steven at gcc dot gnu dot org
2005-01-24  0:56 ` pinskia at gcc dot gnu dot org
2005-01-26 15:16 ` steven at gcc dot gnu dot org
2005-01-26 17:27 ` cvs-commit at gcc dot gnu dot org
2005-01-26 17:28 ` 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).