public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton
@ 2008-10-13 0:11 hp at gcc dot gnu dot org
2008-10-13 0:17 ` [Bug middle-end/37813] " hp at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: hp at gcc dot gnu dot org @ 2008-10-13 0:11 UTC (permalink / raw)
To: gcc-bugs
With the IRA_COVER_CLASSES in cris.h changed as follows (exposing one of the
GENERAL_REGS that has special properties as a singleton class), build fails
compiling libgcc:
/home/hp/combw/crisv32-obj/./gcc/xgcc -B/home/hp/combw/crisv32-obj/./gcc/
-nostdinc -B/home/hp/combw/crisv32-obj/crisv32-elf/newlib/ -isystem
/home/hp/combw/crisv32-obj/crisv32-elf/newlib/targ-include -isystem
/home/hp/combw/combined/newlib/libc/include
-B/home/hp/combw/crisv32-obj/crisv32-elf/libgloss/cris
-L/home/hp/combw/crisv32-obj/crisv32-elf/libgloss/libnosys
-L/home/hp/combw/combined/libgloss/cris -B/tmp/reg-crisv32/crisv32-elf/bin/
-B/tmp/reg-crisv32/crisv32-elf/lib/ -isystem
/tmp/reg-crisv32/crisv32-elf/include -isystem
/tmp/reg-crisv32/crisv32-elf/sys-include -L/home/hp/combw/crisv32-obj/./ld -g
-O2 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition
-isystem ./include -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc
-I. -I. -I../.././gcc -I/home/hp/combw/combined/libgcc
-I/home/hp/combw/combined/libgcc/. -I/home/hp/combw/combined/libgcc/../gcc
-I/home/hp/combw/combined/libgcc/../include -DHAVE_CC_TLS -o _muldi3.o -MT
_muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c
/home/hp/combw/combined/libgcc/../gcc/libgcc2.c \
/home/hp/combw/combined/libgcc/../gcc/libgcc2.c: In function '__muldi3':
/home/hp/combw/combined/libgcc/../gcc/libgcc2.c:566: internal compiler error:
in process_bb_node_lives, at ira-lives.c:677
Index: gcc/config/cris/cris.h
===================================================================
--- gcc/config/cris/cris.h (revision 141074)
+++ gcc/config/cris/cris.h (working copy)
@@ -597,7 +597,7 @@
#define INDEX_REG_CLASS GENERAL_REGS
-#define IRA_COVER_CLASSES { GENERAL_REGS, SPECIAL_REGS, LIM_REG_CLASSES }
+#define IRA_COVER_CLASSES { ACR_REGS, GENNONACR_REGS, SPECIAL_REGS,
LIM_REG_CLASSES }
#define REG_CLASS_FROM_LETTER(C) \
( \
Preprocessed libgcc2.i to be attached.
--
Summary: assert with IRA_COVER_CLASSES with singleton
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hp at gcc dot gnu dot org
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: crisv32-axis-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/37813] assert with IRA_COVER_CLASSES with singleton
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
@ 2008-10-13 0:17 ` hp at gcc dot gnu dot org
2008-10-22 13:52 ` vmakarov at redhat dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hp at gcc dot gnu dot org @ 2008-10-13 0:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from hp at gcc dot gnu dot org 2008-10-13 00:16 -------
Created an attachment (id=16487)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16487&action=view)
Preprocessed and reduced test-case
- Configure with --target=crisv32-axis-elf --enable-languages=c (the latter
optional.)
- Build with "make all-gcc"
- Run as gcc/cc1 -O2 -S g.i
- Observe:
/home/hp/g.i: In function '__muldi3':
/home/hp/g.i:22: internal compiler error: in process_bb_node_lives, at
ira-lives.c:677
NB: If you configure using --target=cris-axis-elf, you need to add -march=v32
to the cc1 options.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/37813] assert with IRA_COVER_CLASSES with singleton
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
2008-10-13 0:17 ` [Bug middle-end/37813] " hp at gcc dot gnu dot org
@ 2008-10-22 13:52 ` vmakarov at redhat dot com
2008-10-22 18:04 ` hp at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vmakarov at redhat dot com @ 2008-10-22 13:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from vmakarov at redhat dot com 2008-10-22 13:51 -------
The problem is in that hard regs (like r10) which have class GENERAL_REGS (from
REGNO_REG_CLASS) are translated into ACR_REGS. Such translation results in
wrong register pressure calculation for ACR_REGS and failed assert. IRA
translates classes which are not inside a cover class into the first
intersected cover class and that is ACR_REGS for GENERAL_REGS. We could
translate to the biggest cover class but I am afraid it would be wrong for
other targets, e.g. INT_FLOAT_REGS for x86 would be translated into FLOAT_REGS
which is more costly than GENERAL_REGS.
So the right solution would be correct finding cover class of specific hard
register. I hope I'll make a patch today and submit it for approval.
Thanks for reporting the problem and reducing the test.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/37813] assert with IRA_COVER_CLASSES with singleton
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
2008-10-13 0:17 ` [Bug middle-end/37813] " hp at gcc dot gnu dot org
2008-10-22 13:52 ` vmakarov at redhat dot com
@ 2008-10-22 18:04 ` hp at gcc dot gnu dot org
2008-10-22 22:07 ` hp at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hp at gcc dot gnu dot org @ 2008-10-22 18:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hp at gcc dot gnu dot org 2008-10-22 18:02 -------
(In reply to comment #2)
> The problem is in that hard regs (like r10) which have class GENERAL_REGS (from
> REGNO_REG_CLASS) are translated into ACR_REGS.
Oops, I guess I should make that NONACR_REGS; the documentation says the class
should be minimal. I'll report back on this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/37813] assert with IRA_COVER_CLASSES with singleton
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-10-22 18:04 ` hp at gcc dot gnu dot org
@ 2008-10-22 22:07 ` hp at gcc dot gnu dot org
2008-10-22 22:18 ` hp at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hp at gcc dot gnu dot org @ 2008-10-22 22:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from hp at gcc dot gnu dot org 2008-10-22 22:05 -------
Created an attachment (id=16530)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16530&action=view)
Updated cris.h patch, reflecting corrected REGNO_REG_CLASS together with the
IRA_COVER_CLASSES.
I tried this updated cris.h patch as per previous comment together with
r141228, but it ICE's compiling newlib's ldtoa.c. See next attachment.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/37813] assert with IRA_COVER_CLASSES with singleton
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-10-22 22:07 ` hp at gcc dot gnu dot org
@ 2008-10-22 22:18 ` hp at gcc dot gnu dot org
2008-10-26 7:17 ` hjl at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hp at gcc dot gnu dot org @ 2008-10-22 22:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hp at gcc dot gnu dot org 2008-10-22 22:17 -------
Created an attachment (id=16531)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16531&action=view)
Reduced test-case for updated cris.h at r141228. Compile with -O2.
After fixing REGNO_REG_CLASS (but still with the singleton version of
IRA_COVER_CLASSES), see the cris.h patch, I still get an ICE in IRA, during
build, compiling ldtoa.c from newlib:
dtoa2.c: In function 'emovo':
ldtoa2.c:24: error: unrecognizable insn:
(insn 144 57 140 4 ldtoa2.c:12 (set (reg:HI 13 r13)
(mem:HI (post_inc:SI (reg/v/f:SI 15 acr [orig:63 p.37 ] [63])) [2 S2
A8])) -1 (expr_list:REG_INC (reg/v/f:SI 15\
acr [orig:63 p.37 ] [63])
(nil)))
ldtoa2.c:24: internal compiler error: in extract_insn, at recog.c:2027
The last dump file is from IRA. It appears IRA (or reload) allocates ACR (reg
15) for an address with post-increment. It's just that this register can't be
used for that addressing mode - which is one of the reasons it's in a separate
class. This doesn't happen with the non-singleton IRA_COVER_CLASSES.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/37813] assert with IRA_COVER_CLASSES with singleton
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-10-22 22:18 ` hp at gcc dot gnu dot org
@ 2008-10-26 7:17 ` hjl at gcc dot gnu dot org
2008-10-27 16:27 ` vmakarov at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hjl at gcc dot gnu dot org @ 2008-10-26 7:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hjl at gcc dot gnu dot org 2008-10-26 07:16 -------
Subject: Bug 37813
Author: hjl
Date: Sun Oct 26 07:14:49 2008
New Revision: 141372
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141372
Log:
2008-10-25 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/37813
* ira-conflicts.c (process_regs_for_copy): Remove class subset
check.
* ira-int.h (ira_hard_regno_cover_class): New.
* ira-lives.c (mark_reg_live, mark_reg_dead,
process_bb_node_lives): Use ira_hard_regno_cover_class.
* ira.c (reg_class ira_hard_regno_cover_class): New global
variable.
(setup_hard_regno_cover_class): New function.
(ira_init): Call setup_hard_regno_cover_class.
* ira-costs.c (cost_class_nums): Add comment.
(find_allocno_class_costs): Initiate cost_class_nums.
(setup_allocno_cover_class_and_costs): Check cost_class_nums.
Modified:
branches/ira-merge/gcc/ChangeLog.ira
branches/ira-merge/gcc/ira-conflicts.c
branches/ira-merge/gcc/ira-costs.c
branches/ira-merge/gcc/ira-int.h
branches/ira-merge/gcc/ira-lives.c
branches/ira-merge/gcc/ira.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/37813] assert with IRA_COVER_CLASSES with singleton
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-10-26 7:17 ` hjl at gcc dot gnu dot org
@ 2008-10-27 16:27 ` vmakarov at gcc dot gnu dot org
2009-01-02 17:17 ` andreasmeier80 at gmx dot de
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vmakarov at gcc dot gnu dot org @ 2008-10-27 16:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from vmakarov at gcc dot gnu dot org 2008-10-27 16:25 -------
Subject: Bug 37813
Author: vmakarov
Date: Mon Oct 27 16:24:19 2008
New Revision: 141384
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141384
Log:
2008-10-27 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/37813
* ira-conflicts.c (process_regs_for_copy): Remove class subset
check.
* ira-int.h (ira_hard_regno_cover_class): New.
* ira-lives.c (mark_reg_live, mark_reg_dead,
process_bb_node_lives): Use ira_hard_regno_cover_class.
* ira.c (reg_class ira_hard_regno_cover_class): New global
variable.
(setup_hard_regno_cover_class): New function.
(ira_init): Call setup_hard_regno_cover_class.
* ira-costs.c (cost_class_nums): Add comment.
(find_allocno_class_costs): Initiate cost_class_nums.
(setup_allocno_cover_class_and_costs): Check cost_class_nums.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ira-conflicts.c
trunk/gcc/ira-costs.c
trunk/gcc/ira-int.h
trunk/gcc/ira-lives.c
trunk/gcc/ira.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/37813] assert with IRA_COVER_CLASSES with singleton
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-10-27 16:27 ` vmakarov at gcc dot gnu dot org
@ 2009-01-02 17:17 ` andreasmeier80 at gmx dot de
2009-01-02 18:46 ` hp at gcc dot gnu dot org
2009-01-02 18:58 ` hp at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: andreasmeier80 at gmx dot de @ 2009-01-02 17:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from andreasmeier80 at gmx dot de 2009-01-02 17:08 -------
What is the status of this bug?
--
andreasmeier80 at gmx dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andreasmeier80 at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/37813] assert with IRA_COVER_CLASSES with singleton
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
` (7 preceding siblings ...)
2009-01-02 17:17 ` andreasmeier80 at gmx dot de
@ 2009-01-02 18:46 ` hp at gcc dot gnu dot org
2009-01-02 18:58 ` hp at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: hp at gcc dot gnu dot org @ 2009-01-02 18:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from hp at gcc dot gnu dot org 2009-01-02 18:44 -------
See comment #5. The subsequent commits were AFAIK not addressing it. I don't
have time to experiment right now, and as the bug only appeared (at the time)
with separate patches, I'm making it SUSPENDED. CC:ers, feel free to upgrade.
--
hp at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-01-02 18:44:36
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/37813] assert with IRA_COVER_CLASSES with singleton
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
` (8 preceding siblings ...)
2009-01-02 18:46 ` hp at gcc dot gnu dot org
@ 2009-01-02 18:58 ` hp at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: hp at gcc dot gnu dot org @ 2009-01-02 18:58 UTC (permalink / raw)
To: gcc-bugs
--
hp at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |SUSPENDED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37813
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-01-02 18:58 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-13 0:11 [Bug middle-end/37813] New: assert with IRA_COVER_CLASSES with singleton hp at gcc dot gnu dot org
2008-10-13 0:17 ` [Bug middle-end/37813] " hp at gcc dot gnu dot org
2008-10-22 13:52 ` vmakarov at redhat dot com
2008-10-22 18:04 ` hp at gcc dot gnu dot org
2008-10-22 22:07 ` hp at gcc dot gnu dot org
2008-10-22 22:18 ` hp at gcc dot gnu dot org
2008-10-26 7:17 ` hjl at gcc dot gnu dot org
2008-10-27 16:27 ` vmakarov at gcc dot gnu dot org
2009-01-02 17:17 ` andreasmeier80 at gmx dot de
2009-01-02 18:46 ` hp at gcc dot gnu dot org
2009-01-02 18:58 ` hp 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).