This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
regclass change causing Sparc problems
- To: gcc-bugs at gcc dot gnu dot org
- Subject: regclass change causing Sparc problems
- From: "David S. Miller" <davem at redhat dot com>
- Date: Fri, 17 Dec 1999 04:41:00 -0800
- CC: gcc-patches at gcc dot gnu dot org, hubicka at freesoft dot cz
The following recent change:
Thu Dec 16 11:33:57 MET 1999 Jan Hubicka <hubicka@freesoft.cz>
* regclass.c (loop_depth): Remove
(scan_one_insn): Do not handle LOOP_NOTE insns.
(regclass): Go through basic blocks and set loop_cost
What basic blocks? Basic block information is always available
right? Currently this is wrong...
This breaks Sparc (and probably many other platforms) because now if
"n_basic_blocks" is zero then none of the insns get scanned to
determine class preferencing!
(Easily seen by gcc.c-torture compile/980504-1.c on Sparc with -O0,
the example causes stupid register allocation to create something
like "(set (reg) (mem (reg %f7)))" because the regclass information
is hosed and stupid believes it can use FPU registers for address
computations :-)
find_basic_blocks does not run if obey_regdecls (ie. non-optimized
compiles) so depending upon basic block information for correct
operation in regclass is incorrect.
Later,
David S. Miller
davem@redhat.com