Bug 29860 - comment / code incosistency in cfgcleanup.c:flow_find_cross_jump
Summary: comment / code incosistency in cfgcleanup.c:flow_find_cross_jump
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.3.0
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks: 29842
  Show dependency treegraph
 
Reported: 2006-11-15 23:28 UTC by Jorn Wolfgang Rennecke
Modified: 2024-03-15 03:05 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2019-03-05 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2006-11-15 23:28:41 UTC
http://gcc.gnu.org/ml/gcc/2005-01/msg00700.html

onsideriing this code:

 if (onlyjump_p (i2)
     || (returnjump_p (i2) && !side_effects_p (PATTERN (i2))))
   {
     last2 = i2;
     /* Count everything except for unconditional jump as insn.  */
     if (!simplejump_p (i2) && !returnjump_p (i2) && last1)
       ninsns++;
     i2 = PREV_INSN (i2);
   }


you count unconditional jumps with a clobber, but you don't count
conditional returns (, or even an instruction that solves a travelling
salesman problem and returns if it finds a solution within a given cost bound).
Comment 1 Andrew Pinski 2024-03-15 03:05:30 UTC
r0-127486-ga0cbe71e87398b changed the code slightly .

It was originally added with r0-39385-g08f7f057cc4762 and then moved slightly by r0-39553-gd1ee6d9bb7d372.

I don't know if Honza would remember any of this code though since it was done over 20 years ago.