This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
can't run combine after flow.
- To: gcc-bugs at gcc dot gnu dot org
- Subject: can't run combine after flow.
- From: Geoffrey Keating <geoffk at cygnus dot com>
- Date: Sat, 26 Feb 2000 13:36:41 -0800
gcc doesn't currently bootstrap because of this change:
* toplev.c (rest_of_compilation): Rebuild jump labels if
combine_instructions has created a new direct jump.
The problem is this:
after flow1, the code looks like this:
(jump_insn 65 64 173 (set (pc)
(if_then_else (eq (reg:CC 97)
(const_int 0 [0x0]))
(label_ref 81)
(pc))) 853 {jump-4} (insn_list 64 (nil))
(expr_list:REG_DEAD (reg:CC 97)
(nil)))
;; End of basic block 0
;; Start of basic block 1, registers live: 1 [1] 2 [2] 31 [31] 82 83 85
(note 173 65 67 [bb 1] NOTE_INSN_BASIC_BLOCK)
(insn 67 173 73 (set (reg:SI 98)
(mem/s:SI (plus:SI (reg/v:SI 82)
(const_int 36 [0x24])) 15)) 532 {movsi+1} (nil)
(nil))
...
combine determines that the condition is never false
(by noticing that the test is of a bitfield extract of a bitfield
that has previously been cleared). So it changes the jump
insn to be unconditional.
Then when jump labels are rebuilt, jump calls
delete_barrier_successors (f);
which naturally deletes all of basic block 1.
This is probably a sign that we need to fix delete_barrier_successors
etc. in jump to play nice with the flow information; we certainly want
to do the deletion at this point rather than after reload!
--
Geoff Keating <geoffk@cygnus.com>