This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: AIX regression due to DFA scheduler merge
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: law at redhat dot com
- Cc: Vladimir Makarov <vmakarov at redhat dot com>, gcc-patches at gcc dot gnu dot org, Mark Mitchell <mark at codesourcery dot com>
- Date: Sat, 01 Jun 2002 00:30:24 -0400
- Subject: Re: AIX regression due to DFA scheduler merge
Our intuitions were right: rs6000_emit_prologue is being
miscompiled ... somehow. I still do not know how. The control flow is
the same for both the good and bad version. My hypothesis is some NOTE /
reg-alloc problem. I am starting by looking at the LIBCALL sequences.
Could there be a problem with haifa-sched.c:reemit_notes?
One thing I have noticed in my investigation so far is that the
version of the compiler *with* the libcall patch creates fewer
REG_DEP_OUTPUT notes.
An RTL fragment after the first scheduler pass in the compiler
without the libcall patch looks like
(insn 853 840 843 (clobber (reg:DI 325)) -1 (insn_list:REG_DEP_ANTI 840 (nil))
(insn_list:REG_LIBCALL 855 (nil)))
...
(insn 845 843 846 (set (reg:SI 326)
(mem/f:SI (reg/f:SI 324) [3 rs6000_sr_alias_set+0 S4 A32])) 296 {*movsi_internal1} (insn_list 843 (insn_list:REG_DEP_ANTI 840 (nil)))
(expr_list:REG_DEAD (reg/f:SI 324)
(nil)))
(insn 846 845 852 (set (subreg:SI (reg:DI 325) 4)
(reg:SI 326)) 296 {*movsi_internal1} (insn_list:REG_DEP_OUTPUT 853 (insn_list 845 (insn_list:REG_DEP_ANTI 840 (nil))))
(nil))
*With* the libcall patch the RTL fragment looks like
(insn 845 843 853 (set (reg:SI 326)
(mem/f:SI (reg/f:SI 324) [3 rs6000_sr_alias_set+0 S4 A32])) 305 {*movsi_internal1} (insn_list 843 (insn_list:REG_DEP_ANTI 840 (nil)))
(expr_list:REG_DEAD (reg/f:SI 324)
(nil)))
(insn 853 845 846 (clobber (reg:DI 325)) -1 (insn_list:REG_DEP_ANTI 840 (nil))
(insn_list:REG_LIBCALL 855 (nil)))
(insn 846 853 852 (set (subreg:SI (reg:DI 325) 4)
(reg:SI 326)) 305 {*movsi_internal1} (insn_list 845 (insn_list:REG_DEP_ANTI 840 (nil)))
(nil))
When the clobber is not scheduled ahead, the first SUBREG set has a
REG_DEP_OUTPUT dependence on its input; with the clobber intervening, the
REG_DEP_OUTPUT dependence is absent. Could this cause problems later on?
David