public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/16967] New: Iterating gcse.c CPROP and PRE does not reach a fixed point
@ 2004-08-10 15:10 steven at gcc dot gnu dot org
  2004-08-10 15:34 ` [Bug rtl-optimization/16967] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-08-10 15:10 UTC (permalink / raw)
  To: gcc-bugs

Consider the following test case on i686: 
 
struct hblk 
{ 
  struct hblk *hb_next; 
}; 
 
extern struct hblk *GC_hblkfreelist[]; 
 
void 
GC_print_hblkfreelist (void) 
{ 
  struct hblk *h; 
  struct hblk *hhdr; 
  int i; 
 
  for (i = 0; i < 3; ++i) 
    { 
      h = GC_hblkfreelist[i]; 
 
      while (h != 0) 
        h = hhdr->hb_next; 
    } 
} 
 
$ ./cc1 -O2 -dG --param max-gcse-passes=100 t.i 
$ grep "pass 100" t.i.*.gcse 
GCSE pass 100 
CPROP of GC_print_hblkfreelist, pass 100: 11472 bytes needed, 1 local const 
props, 0 local copy props, 1 global const props, 0 global copy props 
PRE GCSE of GC_print_hblkfreelist, pass 100: 13940 bytes needed, 1 substs, 1 
insns created 
 
What seems particularly dubious is that the SET hash table just 
keeps on growing: 
SET hash table (11 buckets, 2 entries) 
SET hash table (11 buckets, 3 entries) 
SET hash table (11 buckets, 4 entries) 
SET hash table (11 buckets, 5 entries) 
SET hash table (11 buckets, 6 entries) 
SET hash table (11 buckets, 7 entries) 
SET hash table (11 buckets, 8 entries) 
SET hash table (11 buckets, 9 entries) 
SET hash table (11 buckets, 10 entries) 
SET hash table (11 buckets, 11 entries) 
SET hash table (11 buckets, 12 entries) 
SET hash table (11 buckets, 13 entries) 
SET hash table (11 buckets, 14 entries) 
SET hash table (11 buckets, 15 entries) 
SET hash table (11 buckets, 16 entries) 
SET hash table (11 buckets, 17 entries) 
SET hash table (11 buckets, 18 entries) 
SET hash table (11 buckets, 19 entries) 
SET hash table (11 buckets, 20 entries) 
SET hash table (11 buckets, 21 entries) 
SET hash table (11 buckets, 22 entries) 
(etc...)

-- 
           Summary: Iterating gcse.c CPROP and PRE does not reach a fixed
                    point
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,law at redhat dot com


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
  2004-08-10 15:10 [Bug middle-end/16967] New: Iterating gcse.c CPROP and PRE does not reach a fixed point steven at gcc dot gnu dot org
@ 2004-08-10 15:34 ` pinskia at gcc dot gnu dot org
  2004-08-10 15:36 ` steven at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-10 15:34 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |rtl-optimization


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
  2004-08-10 15:10 [Bug middle-end/16967] New: Iterating gcse.c CPROP and PRE does not reach a fixed point steven at gcc dot gnu dot org
  2004-08-10 15:34 ` [Bug rtl-optimization/16967] " pinskia at gcc dot gnu dot org
@ 2004-08-10 15:36 ` steven at gcc dot gnu dot org
  2004-08-10 15:54 ` steven at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-08-10 15:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-08-10 15:36 -------
GCSE of GC_print_hblkfreelist: 5 basic blocks, 20 passes, 6144 bytes 
 
before store motion 
(note 2 0 6 NOTE_INSN_DELETED) 
 
(note 6 2 9 0 NOTE_INSN_EH_REGION_BEG) 
 
(note 9 6 10 0 [bb 0] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 10 9 45 0 (set (reg/v:SI 59 [ i ]) 
        (const_int 0 [0x0])) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 45 10 47 0 (set (reg:SI 64) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 47 45 49 0 (set (reg:SI 65) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 49 47 51 0 (set (reg:SI 66) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 51 49 53 0 (set (reg:SI 67) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 53 51 55 0 (set (reg:SI 68) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 55 53 57 0 (set (reg:SI 69) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 57 55 59 0 (set (reg:SI 70) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 59 57 61 0 (set (reg:SI 71) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 61 59 63 0 (set (reg:SI 72) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 63 61 65 0 (set (reg:SI 73) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 65 63 67 0 (set (reg:SI 74) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 67 65 69 0 (set (reg:SI 75) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 69 67 71 0 (set (reg:SI 76) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 71 69 73 0 (set (reg:SI 77) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 73 71 75 0 (set (reg:SI 78) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 75 73 77 0 (set (reg:SI 79) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 77 75 79 0 (set (reg:SI 80) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 79 77 81 0 (set (reg:SI 81) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 81 79 83 0 (set (reg:SI 82) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 83 81 41 0 (set (reg:SI 63) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (nil)) 
 
(note 41 83 11 1 NOTE_INSN_LOOP_BEG) 
 
(code_label 11 41 12 1 2 "" [1 uses]) 
 
(note 12 11 82 1 [bb 1] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 82 12 15 1 (set (reg/f:SI 61) 
        (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
    (expr_list:REG_EQUAL (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] 
<var_decl 0x401ce6cc GC_hblkfreelist>) 
        (nil))) 
 
(insn 15 82 16 1 (set (reg/f:SI 62) 
        (mem/s/f:SI (plus:SI (mult:SI (reg/v:SI 59 [ i ]) 
                    (const_int 4 [0x4])) 
                (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 
0x401ce6cc GC_hblkfreelist>)) [3 GC_hblkfreelist S4 A32])) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 16 15 17 1 (set (reg:CCZ 17 flags) 
        (compare:CCZ (reg/f:SI 62) 
            (const_int 0 [0x0]))) 0 {*cmpsi_ccno_1} (nil) 
    (nil)) 
 
(jump_insn 17 16 19 1 (set (pc) 
        (if_then_else (eq (reg:CCZ 17 flags) 
                (const_int 0 [0x0])) 
            (label_ref 27) 
            (pc))) 345 {*jcc_1} (nil) 
    (nil)) 
 
(note 19 17 21 2 [bb 2] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 21 19 39 2 (set (reg/v/f:SI 60 [ h.2 ]) 
        (mem/s/f:SI (reg/v/f:SI 58 [ hhdr ]) [3 <variable>.hb_next+0 S4 A32])) 
36 {*movsi_1} (nil) 
    (nil)) 
 
(note 39 21 22 3 NOTE_INSN_LOOP_BEG) 
 
(code_label 22 39 23 3 5 "" [1 uses]) 
 
(note 23 22 25 3 [bb 3] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 25 23 26 3 (set (reg:CCZ 17 flags) 
        (compare:CCZ (reg/v/f:SI 60 [ h.2 ]) 
            (const_int 0 [0x0]))) 0 {*cmpsi_ccno_1} (nil) 
    (nil)) 
 
(jump_insn 26 25 40 3 (set (pc) 
        (if_then_else (ne (reg:CCZ 17 flags) 
                (const_int 0 [0x0])) 
            (label_ref 22) 
            (pc))) 345 {*jcc_1} (nil) 
    (nil)) 
 
(note 40 26 27 3 NOTE_INSN_LOOP_END) 
 
(code_label 27 40 28 4 3 "" [1 uses]) 
 
(note 28 27 30 4 [bb 4] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 30 28 31 4 (parallel [ 
            (set (reg/v:SI 59 [ i ]) 
                (plus:SI (reg/v:SI 59 [ i ]) 
                    (const_int 1 [0x1]))) 
            (clobber (reg:CC 17 flags)) 
        ]) 141 {*addsi_1} (nil) 
    (nil)) 
 
(insn 31 30 32 4 (set (reg:CCGC 17 flags) 
        (compare:CCGC (reg/v:SI 59 [ i ]) 
            (const_int 2 [0x2]))) 2 {*cmpsi_1_insn} (nil) 
    (nil)) 
 
(jump_insn 32 31 42 4 (set (pc) 
        (if_then_else (le (reg:CCGC 17 flags) 
                (const_int 0 [0x0])) 
            (label_ref 11) 
            (pc))) 345 {*jcc_1} (nil) 
    (nil)) 
 
(note 42 32 35 4 NOTE_INSN_LOOP_END) 
 
(note 35 42 0 NOTE_INSN_PROLOGUE_END) 
ST_avail and ST_antic (shown under loads..) 
LDST list:  
 
Deleted 21 trivially dead insns; 2 iterations 
;; Processing block from 2 to 11, 1 sets. 
;; Processing block from 12 to 22, 4 sets. 
;; Processing block from 23 to 40, 2 sets. 
;; Processing block from 28 to 42, 4 sets. 
 
 
try_optimize_cfg iteration 1 
 
;; Processing block from 2 to 11, 1 sets. 
;; Processing block from 12 to 22, 4 sets. 
;; Processing block from 23 to 40, 2 sets. 
;; Processing block from 28 to 42, 4 sets. 
(note 2 0 6 NOTE_INSN_DELETED) 
 
(note 6 2 9 0 NOTE_INSN_EH_REGION_BEG) 
 
;; Start of basic block 0, registers live: (nil) 
(note 9 6 10 0 [bb 0] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 10 9 41 0 (set (reg/v:SI 59 [ i ]) 
        (const_int 0 [0x0])) 36 {*movsi_1} (nil) 
    (nil)) 
;; End of basic block 0, registers live: 
 (nil) 
 
(note 41 10 11 1 NOTE_INSN_LOOP_BEG) 
 
;; Start of basic block 1, registers live: (nil) 
(code_label 11 41 12 1 2 "" [1 uses]) 
 
(note 12 11 15 1 [bb 1] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 15 12 16 1 (set (reg/f:SI 62) 
        (mem/s/f:SI (plus:SI (mult:SI (reg/v:SI 59 [ i ]) 
                    (const_int 4 [0x4])) 
                (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 
0x401ce6cc GC_hblkfreelist>)) [3 GC_hblkfreelist S4 A32])) 36 {*movsi_1} (nil) 
    (nil)) 
 
(insn 16 15 17 1 (set (reg:CCZ 17 flags) 
        (compare:CCZ (reg/f:SI 62) 
            (const_int 0 [0x0]))) 0 {*cmpsi_ccno_1} (nil) 
    (nil)) 
 
(jump_insn 17 16 19 1 (set (pc) 
        (if_then_else (eq (reg:CCZ 17 flags) 
                (const_int 0 [0x0])) 
            (label_ref 27) 
            (pc))) 345 {*jcc_1} (nil) 
    (nil)) 
;; End of basic block 1, registers live: 
 (nil) 
 
;; Start of basic block 2, registers live: (nil) 
(note 19 17 21 2 [bb 2] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 21 19 39 2 (set (reg/v/f:SI 60 [ h.2 ]) 
        (mem/s/f:SI (reg/v/f:SI 58 [ hhdr ]) [3 <variable>.hb_next+0 S4 A32])) 
36 {*movsi_1} (nil) 
    (nil)) 
;; End of basic block 2, registers live: 
 (nil) 
 
(note 39 21 22 3 NOTE_INSN_LOOP_BEG) 
 
;; Start of basic block 3, registers live: (nil) 
(code_label 22 39 23 3 5 "" [1 uses]) 
 
(note 23 22 25 3 [bb 3] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 25 23 26 3 (set (reg:CCZ 17 flags) 
        (compare:CCZ (reg/v/f:SI 60 [ h.2 ]) 
            (const_int 0 [0x0]))) 0 {*cmpsi_ccno_1} (nil) 
    (nil)) 
 
(jump_insn 26 25 40 3 (set (pc) 
        (if_then_else (ne (reg:CCZ 17 flags) 
                (const_int 0 [0x0])) 
            (label_ref 22) 
            (pc))) 345 {*jcc_1} (nil) 
    (nil)) 
;; End of basic block 3, registers live: 
 (nil) 
 
(note 40 26 27 3 NOTE_INSN_LOOP_END) 
 
;; Start of basic block 4, registers live: (nil) 
(code_label 27 40 28 4 3 "" [1 uses]) 
 
(note 28 27 30 4 [bb 4] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 30 28 31 4 (parallel [ 
            (set (reg/v:SI 59 [ i ]) 
                (plus:SI (reg/v:SI 59 [ i ]) 
                    (const_int 1 [0x1]))) 
            (clobber (reg:CC 17 flags)) 
        ]) 141 {*addsi_1} (nil) 
    (nil)) 
 
(insn 31 30 32 4 (set (reg:CCGC 17 flags) 
        (compare:CCGC (reg/v:SI 59 [ i ]) 
            (const_int 2 [0x2]))) 2 {*cmpsi_1_insn} (nil) 
    (nil)) 
 
(jump_insn 32 31 42 4 (set (pc) 
        (if_then_else (le (reg:CCGC 17 flags) 
                (const_int 0 [0x0])) 
            (label_ref 11) 
            (pc))) 345 {*jcc_1} (nil) 
    (nil)) 
;; End of basic block 4, registers live: 
 (nil) 
 
(note 42 32 35 4 NOTE_INSN_LOOP_END) 
 
(note 35 42 0 NOTE_INSN_PROLOGUE_END) 
 
 

-- 


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
  2004-08-10 15:10 [Bug middle-end/16967] New: Iterating gcse.c CPROP and PRE does not reach a fixed point steven at gcc dot gnu dot org
  2004-08-10 15:34 ` [Bug rtl-optimization/16967] " pinskia at gcc dot gnu dot org
  2004-08-10 15:36 ` steven at gcc dot gnu dot org
@ 2004-08-10 15:54 ` steven at gcc dot gnu dot org
  2004-08-10 16:25 ` steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-08-10 15:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-08-10 15:54 -------
The most stupid thing of all is that it does not move the load 
out of the loop: 
 
(insn 83 81 41 0 (set (reg:SI 63) 
         (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc  
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
     (nil)) 
 
(note 41 83 11 1 NOTE_INSN_LOOP_BEG) 
 
(code_label 11 41 12 1 2 "" [1 uses]) 
 
(note 12 11 82 1 [bb 1] NOTE_INSN_EXPECTED_VALUE) 
 
(insn 82 12 15 1 (set (reg/f:SI 61) 
         (symbol_ref:SI ("GC_hblkfreelist") [flags 0x40] <var_decl 0x401ce6cc 
GC_hblkfreelist>)) 36 {*movsi_1} (nil) 
 
Why does PRE not delete insn 82 after making it fully redundant? 
 

-- 


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
  2004-08-10 15:10 [Bug middle-end/16967] New: Iterating gcse.c CPROP and PRE does not reach a fixed point steven at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-08-10 15:54 ` steven at gcc dot gnu dot org
@ 2004-08-10 16:25 ` steven at gcc dot gnu dot org
  2004-08-10 21:47 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-08-10 16:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-08-10 16:25 -------
Apparently we don't want to GCSE a SYMBOL_REF because we already treat 
them as constants for constant propagation. 
 
Index: gcse.c 
=================================================================== 
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v 
retrieving revision 1.309 
diff -c -3 -p -r1.309 gcse.c 
*** gcse.c      9 Aug 2004 16:58:42 -0000       1.309 
--- gcse.c      10 Aug 2004 16:24:33 -0000 
*************** want_to_gcse_p (rtx x) 
*** 1214,1219 **** 
--- 1214,1220 ---- 
      { 
      case REG: 
      case SUBREG: 
+     case SYMBOL_REF: 
      case CONST_INT: 
      case CONST_DOUBLE: 
      case CONST_VECTOR: 

-- 


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
  2004-08-10 15:10 [Bug middle-end/16967] New: Iterating gcse.c CPROP and PRE does not reach a fixed point steven at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-08-10 16:25 ` steven at gcc dot gnu dot org
@ 2004-08-10 21:47 ` pinskia at gcc dot gnu dot org
  2005-05-04  1:16 ` dberlin at gcc dot gnu dot org
  2005-05-04 23:03 ` steven at gcc dot gnu dot org
  6 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-10 21:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-10 21:47 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-10 21:47:56
               date|                            |


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
  2004-08-10 15:10 [Bug middle-end/16967] New: Iterating gcse.c CPROP and PRE does not reach a fixed point steven at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-08-10 21:47 ` pinskia at gcc dot gnu dot org
@ 2005-05-04  1:16 ` dberlin at gcc dot gnu dot org
  2005-05-04 23:03 ` steven at gcc dot gnu dot org
  6 siblings, 0 replies; 16+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-05-04  1:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dberlin at gcc dot gnu dot org  2005-05-04 01:16 -------
PRE should notice the value is AVAIL in the block it's placing it in, so it
shouldn't end up in the insert bitmap.


-- 


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
  2004-08-10 15:10 [Bug middle-end/16967] New: Iterating gcse.c CPROP and PRE does not reach a fixed point steven at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-05-04  1:16 ` dberlin at gcc dot gnu dot org
@ 2005-05-04 23:03 ` steven at gcc dot gnu dot org
  6 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-05-04 23:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-05-04 23:03 -------
I can't trigger this problem anymore with the test case from my 
original report.  I will try to come up with a new test case. 
 

-- 


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
       [not found] <bug-16967-280@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2008-05-24 15:38 ` steven at gcc dot gnu dot org
@ 2008-09-21 13:16 ` steven at gcc dot gnu dot org
  7 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2008-09-21 13:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from steven at gcc dot gnu dot org  2008-09-21 13:14 -------
I can reproduce this on-and-off, but never with a reasonable test case.

It's unlikely that anyone is interested in fixing this, esp. given that RTL
PRE/CPROP are doing less and less these days as the tree optimizers improve.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |WONTFIX


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
       [not found] <bug-16967-280@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2007-11-14 10:02 ` steven at gcc dot gnu dot org
@ 2008-05-24 15:38 ` steven at gcc dot gnu dot org
  2008-09-21 13:16 ` steven at gcc dot gnu dot org
  7 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2008-05-24 15:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from steven at gcc dot gnu dot org  2008-05-24 15:37 -------
This happens again on PPC.  No test case yet.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
       [not found] <bug-16967-280@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2006-04-20 21:16 ` steven at gcc dot gnu dot org
@ 2007-11-14 10:02 ` steven at gcc dot gnu dot org
  2008-05-24 15:38 ` steven at gcc dot gnu dot org
  2008-09-21 13:16 ` steven at gcc dot gnu dot org
  7 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-11-14 10:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from steven at gcc dot gnu dot org  2007-11-14 10:01 -------
I haven't been able to reproduce this for a while.  Probably got fixed
somewhere along the way.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
       [not found] <bug-16967-280@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2006-04-20 21:15 ` steven at gcc dot gnu dot org
@ 2006-04-20 21:16 ` steven at gcc dot gnu dot org
  2007-11-14 10:02 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-04-20 21:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from steven at gcc dot gnu dot org  2006-04-20 21:16 -------
One of these days someone should manually compute the LCM sets from attachments
1, 2, and 3 ...


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2006-02-11 00:37:04         |2006-04-20 21:16:35
               date|                            |


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
       [not found] <bug-16967-280@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-04-20 21:14 ` steven at gcc dot gnu dot org
@ 2006-04-20 21:15 ` steven at gcc dot gnu dot org
  2006-04-20 21:16 ` steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-04-20 21:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from steven at gcc dot gnu dot org  2006-04-20 21:15 -------
Created an attachment (id=11308)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11308&action=view)
LCM dataflow solution for the second gcse pass


-- 


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
       [not found] <bug-16967-280@http.gcc.gnu.org/bugzilla/>
  2006-04-20 20:53 ` steven at gcc dot gnu dot org
  2006-04-20 21:13 ` steven at gcc dot gnu dot org
@ 2006-04-20 21:14 ` steven at gcc dot gnu dot org
  2006-04-20 21:15 ` steven at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-04-20 21:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from steven at gcc dot gnu dot org  2006-04-20 21:14 -------
Created an attachment (id=11307)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11307&action=view)
LCM dataflow solution for the first gcse pass


-- 


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
       [not found] <bug-16967-280@http.gcc.gnu.org/bugzilla/>
  2006-04-20 20:53 ` steven at gcc dot gnu dot org
@ 2006-04-20 21:13 ` steven at gcc dot gnu dot org
  2006-04-20 21:14 ` steven at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-04-20 21:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from steven at gcc dot gnu dot org  2006-04-20 21:13 -------
Created an attachment (id=11306)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11306&action=view)
CFG at the start of gcse


-- 


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


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

* [Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
       [not found] <bug-16967-280@http.gcc.gnu.org/bugzilla/>
@ 2006-04-20 20:53 ` steven at gcc dot gnu dot org
  2006-04-20 21:13 ` steven at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-04-20 20:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from steven at gcc dot gnu dot org  2006-04-20 20:53 -------
I have tested this test case again with lcm.c patched with the patch below to
check for insertions on edges where an expression is already available. The
abort does not trigger.

The version of GCC that I patched and tested was extracted from SVN with the
following commands: svn co -r {"2004-08-10 15:10"} (etc.)

Index: lcm.c
===================================================================
--- lcm.c       (revision 85749)
+++ lcm.c       (working copy)
@@ -426,10 +426,6 @@ pre_edge_lcm (FILE *file ATTRIBUTE_UNUSE
     dump_sbitmap_vector (file, "earliest", "", earliest, num_edges);
 #endif

-  sbitmap_vector_free (antout);
-  sbitmap_vector_free (antin);
-  sbitmap_vector_free (avout);
-
   later = sbitmap_vector_alloc (num_edges, n_exprs);

   /* Allocate an extra element for the exit block in the laterin vector.  */
@@ -462,6 +458,32 @@ pre_edge_lcm (FILE *file ATTRIBUTE_UNUSE
     }
 #endif

+#if 1
+  {
+    sbitmap *avout_check;
+    sbitmap *insert_ = *insert;
+    int x;
+
+    avout_check = sbitmap_vector_alloc (num_edges, n_exprs);
+    sbitmap_vector_zero (avout_check, num_edges);
+
+    for (x = 0; x < num_edges; x++)
+      {
+       basic_block bb = INDEX_EDGE_PRED_BB (edge_list, x);
+       if (bb->index < 0)
+         continue;
+       sbitmap_copy (avout_check[x], avout[bb->index]);
+       sbitmap_a_and_b (avout_check[x], avout_check[x], insert_[x]);
+       if (sbitmap_first_set_bit (avout_check[x]) >= 0)
+         abort ();
+      }
+  }
+#endif
+
+  sbitmap_vector_free (antout);
+  sbitmap_vector_free (antin);
+  sbitmap_vector_free (avout);
+
   return edge_list;
 }


-- 


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


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

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

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-10 15:10 [Bug middle-end/16967] New: Iterating gcse.c CPROP and PRE does not reach a fixed point steven at gcc dot gnu dot org
2004-08-10 15:34 ` [Bug rtl-optimization/16967] " pinskia at gcc dot gnu dot org
2004-08-10 15:36 ` steven at gcc dot gnu dot org
2004-08-10 15:54 ` steven at gcc dot gnu dot org
2004-08-10 16:25 ` steven at gcc dot gnu dot org
2004-08-10 21:47 ` pinskia at gcc dot gnu dot org
2005-05-04  1:16 ` dberlin at gcc dot gnu dot org
2005-05-04 23:03 ` steven at gcc dot gnu dot org
     [not found] <bug-16967-280@http.gcc.gnu.org/bugzilla/>
2006-04-20 20:53 ` steven at gcc dot gnu dot org
2006-04-20 21:13 ` steven at gcc dot gnu dot org
2006-04-20 21:14 ` steven at gcc dot gnu dot org
2006-04-20 21:15 ` steven at gcc dot gnu dot org
2006-04-20 21:16 ` steven at gcc dot gnu dot org
2007-11-14 10:02 ` steven at gcc dot gnu dot org
2008-05-24 15:38 ` steven at gcc dot gnu dot org
2008-09-21 13:16 ` 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).