This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: vax optimization breakage?
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: vax optimization breakage?
- From: Brandon Creighton <bjc at pobox dot com>
- Date: Sun, 23 Jul 2000 17:23:24 -0500
- Cc: gcc at gcc dot gnu dot org
- References: <20000719004847.A12@pobox.com> <13750.964380532@upchuck>
On Sun, Jul 23, 2000 at 01:28:52PM -0600, Jeffrey A Law wrote:
> What we really need to see are the .gcse and .loop dump files so that we
> can determine if things look OK before the loop optimizer or after the
> loop optimizer. One we have that information we can guide you towards
> the offending code.
Sorry, I should have included them in my first message. Attached are .gcse,
.loop, and .cse2.
;; Function func
0 registers.
3 basic blocks, 5 edges.
Basic block 0: first insn 42, last 11, loop_depth 0, count 0.
Predecessors: ENTRY (fallthru)
Successors: 1 (fallthru)
Registers live at start: (nil)
Registers live at end: (nil)
Basic block 1: first insn 18, last 15, loop_depth 0, count 0.
Predecessors: 1 (crit) 0 (fallthru)
Successors: 2 (fallthru) 1 (crit)
Registers live at start: (nil)
Registers live at end: (nil)
Basic block 2: first insn 45, last 16, loop_depth 0, count 0.
Predecessors: 1 (fallthru)
Successors: EXIT
Registers live at start: (nil)
Registers live at end: (nil)
GCSE pass 1
SET hash table (11 buckets, 1 entries)
Index 0 (hash value 10)
(set (reg/v:SI 21)
(const_int 0 [0x0]))
CPROP of func, pass 1: 1039 bytes needed, 0 const props, 0 copy props
Expression hash table (11 buckets, 2 entries)
Index 0 (hash value 3)
(mem/f:SI (symbol_ref:SI ("cnt")) 4)
Index 1 (hash value 8)
(plus:SI (reg/v:SI 21)
(const_int 1 [0x1]))
PRE GCSE of func, pass 1: 1339 bytes needed, 0 substs, 0 insns created
SET hash table (11 buckets, 1 entries)
Index 0 (hash value 10)
(set (reg/v:SI 21)
(const_int 0 [0x0]))
CPROP of func, pass 2: 2378 bytes needed, 0 const props, 0 copy props
GCSE of func: 3 basic blocks, 1 pass, 1855 bytes
(note 2 0 3 NOTE_INSN_DELETED -1347440721)
(note 3 2 6 NOTE_INSN_FUNCTION_BEG -1347440721)
(note 6 3 42 0x4027d580 NOTE_INSN_BLOCK_BEG -1347440721)
(note 42 6 9 [bb 0] NOTE_INSN_BASIC_BLOCK -1347440721)
(insn 9 42 11 (set (mem/f:SI (symbol_ref:SI ("cnt")) 4)
(const_int 0 [0x0])) 18 {movsi} (nil)
(nil))
(insn 11 9 12 (set (reg/v:SI 21)
(const_int 0 [0x0])) 18 {movsi} (nil)
(expr_list:REG_EQUAL (const_int 0 [0x0])
(nil)))
(note 12 11 18 NOTE_INSN_LOOP_BEG -1347440721)
(code_label 18 12 43 5 "" "" [1 uses])
(note 43 18 22 [bb 1] NOTE_INSN_BASIC_BLOCK -1347440721)
(insn 22 43 23 (set (reg:SI 22)
(mem/f:SI (symbol_ref:SI ("cnt")) 4)) 18 {movsi} (nil)
(nil))
(insn 23 22 26 (set (mem/f:SI (symbol_ref:SI ("cnt")) 4)
(plus:SI (reg:SI 22)
(const_int 1 [0x1]))) 49 {addsi3} (nil)
(nil))
(note 26 23 28 NOTE_INSN_LOOP_CONT -1347440721)
(insn 28 26 50 (set (reg/v:SI 21)
(plus:SI (reg/v:SI 21)
(const_int 1 [0x1]))) 49 {addsi3} (nil)
(nil))
(note 50 28 14 NOTE_INSN_LOOP_VTOP -1347440721)
(insn 14 50 15 (set (cc0)
(compare (reg/v:SI 21)
(const_int 4 [0x4]))) 5 {cmpsi} (nil)
(nil))
(jump_insn 15 14 45 (set (pc)
(if_then_else (le (cc0)
(const_int 0 [0x0]))
(label_ref 18)
(pc))) 122 {ble} (nil)
(nil))
(note 45 15 16 [bb 2] NOTE_INSN_BASIC_BLOCK -1347440721)
(jump_insn 16 45 17 (return) 141 {return} (nil)
(nil))
(barrier 17 16 34)
(note 34 17 37 NOTE_INSN_LOOP_END -1347440721)
(note 37 34 0 0x4027d580 NOTE_INSN_BLOCK_END -1347440721)
;; Function func
Loop from 12 to 34: 6 real insns.
Continue at insn 26.
Hoisted regno 23 r/w from (mem/f:SI (symbol_ref:SI ("cnt")) 4)
Replaced reg 22, deleting init_insn (22).
Insn 28: possible biv, reg 21, const =1
Reg 21: biv verified
Biv 21 initialized at insn 11: initial value 0
Loop iterations: No final conditional branch found.
Cannot eliminate biv 21: biv used in insn 14.
Sorted combine statistics:
Loop from 12 to 34: 5 real insns.
Continue at insn 26.
Insn 23: possible biv, reg 23, const =1
Insn 28: possible biv, reg 21, const =1
Reg 21: biv verified
Reg 23: biv verified
Biv 21 initialized at insn 11: initial value 0
Biv 23 initialized at insn 55: initial value 0
Loop iterations: No final conditional branch found.
Cannot eliminate biv 21: biv used in insn 14.
Sorted combine statistics:
Cannot eliminate biv 23.
First use: insn 55, last use: insn 58.
Sorted combine statistics:
(note 2 0 3 NOTE_INSN_DELETED -1347440721)
(note 3 2 6 NOTE_INSN_FUNCTION_BEG -1347440721)
(note 6 3 42 0x4027d580 NOTE_INSN_BLOCK_BEG -1347440721)
(note 42 6 9 [bb 0] NOTE_INSN_BASIC_BLOCK -1347440721)
(insn 9 42 11 (set (mem/f:SI (symbol_ref:SI ("cnt")) 4)
(const_int 0 [0x0])) 18 {movsi} (nil)
(nil))
(insn 11 9 55 (set (reg/v:SI 21)
(const_int 0 [0x0])) 18 {movsi} (nil)
(expr_list:REG_EQUAL (const_int 0 [0x0])
(nil)))
(insn 55 11 12 (set (reg/v:SI 23)
(const_int 0 [0x0])) -1 (nil)
(nil))
(note 12 55 18 NOTE_INSN_LOOP_BEG -1347440721)
(code_label 18 12 43 5 "" "" [1 uses])
(note 43 18 22 [bb 1] NOTE_INSN_BASIC_BLOCK -1347440721)
(note 22 43 23 NOTE_INSN_DELETED 0)
(insn 23 22 26 (set (reg/v:SI 23)
(plus:SI (reg/v:SI 23)
(const_int 1 [0x1]))) -1 (nil)
(nil))
(note 26 23 28 NOTE_INSN_LOOP_CONT -1347440721)
(insn 28 26 50 (set (reg/v:SI 21)
(plus:SI (reg/v:SI 21)
(const_int 1 [0x1]))) -1 (nil)
(nil))
(note 50 28 14 NOTE_INSN_LOOP_VTOP -1347440721)
(insn 14 50 15 (set (cc0)
(compare (reg/v:SI 21)
(const_int 4 [0x4]))) -1 (nil)
(nil))
(jump_insn 15 14 45 (set (pc)
(if_then_else (le (cc0)
(const_int 0 [0x0]))
(label_ref 18)
(pc))) -1 (nil)
(nil))
(note 45 15 16 [bb 2] NOTE_INSN_BASIC_BLOCK -1347440721)
(jump_insn 16 45 17 (return) -1 (nil)
(nil))
(barrier 17 16 34)
(note 34 17 56 NOTE_INSN_LOOP_END -1347440721)
(code_label 56 34 58 7 "" "" [0 uses])
(insn 58 56 37 (set (mem/f:SI (symbol_ref:SI ("cnt")) 4)
(reg/v:SI 23)) -1 (nil)
(nil))
(note 37 58 0 0x4027d580 NOTE_INSN_BLOCK_END -1347440721)
;; Function func
;; Processing block from 2 to 18, 3 sets.
;; Processing block from 43 to 0, 6 sets.
(note 2 0 3 NOTE_INSN_DELETED -1347440721)
(note 3 2 6 NOTE_INSN_FUNCTION_BEG -1347440721)
(note 6 3 42 0x4027d580 NOTE_INSN_BLOCK_BEG -1347440721)
(note 42 6 9 [bb 0] NOTE_INSN_BASIC_BLOCK -1347440721)
(insn 9 42 11 (set (mem/f:SI (symbol_ref:SI ("cnt")) 4)
(const_int 0 [0x0])) 18 {movsi} (nil)
(nil))
(insn 11 9 55 (set (reg/v:SI 21)
(const_int 0 [0x0])) 18 {movsi} (nil)
(expr_list:REG_EQUAL (const_int 0 [0x0])
(nil)))
(insn 55 11 12 (set (reg/v:SI 23)
(const_int 0 [0x0])) 18 {movsi} (nil)
(expr_list:REG_EQUAL (const_int 0 [0x0])
(nil)))
(note 12 55 18 NOTE_INSN_LOOP_BEG -1347440721)
(code_label 18 12 43 5 "" "" [1 uses])
(note 43 18 22 [bb 1] NOTE_INSN_BASIC_BLOCK -1347440721)
(note 22 43 23 NOTE_INSN_DELETED 0)
(insn 23 22 26 (set (reg/v:SI 23)
(plus:SI (reg/v:SI 23)
(const_int 1 [0x1]))) 49 {addsi3} (nil)
(nil))
(note 26 23 28 NOTE_INSN_LOOP_CONT -1347440721)
(insn 28 26 50 (set (reg/v:SI 21)
(plus:SI (reg/v:SI 21)
(const_int 1 [0x1]))) 49 {addsi3} (nil)
(nil))
(note 50 28 14 NOTE_INSN_LOOP_VTOP -1347440721)
(insn 14 50 15 (set (cc0)
(compare (reg/v:SI 21)
(const_int 4 [0x4]))) 5 {cmpsi} (nil)
(nil))
(jump_insn 15 14 45 (set (pc)
(if_then_else (le (cc0)
(const_int 0 [0x0]))
(label_ref 18)
(pc))) 122 {ble} (nil)
(nil))
(note 45 15 16 [bb 2] NOTE_INSN_BASIC_BLOCK -1347440721)
(jump_insn 16 45 17 (return) -1 (nil)
(nil))
(barrier 17 16 34)
(note 34 17 37 NOTE_INSN_LOOP_END -1347440721)
(note 37 34 0 0x4027d580 NOTE_INSN_BLOCK_END -1347440721)