* [Bug debug/61923] [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel.
2014-07-26 20:03 [Bug debug/61923] New: [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel trippels at gcc dot gnu.org
@ 2014-07-28 8:16 ` rguenth at gcc dot gnu.org
2014-07-28 8:18 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-07-28 8:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.4
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Looks like a spurious diff though.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/61923] [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel.
2014-07-26 20:03 [Bug debug/61923] New: [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel trippels at gcc dot gnu.org
2014-07-28 8:16 ` [Bug debug/61923] " rguenth at gcc dot gnu.org
@ 2014-07-28 8:18 ` pinskia at gcc dot gnu.org
2014-07-29 6:54 ` trippels at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-07-28 8:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Looks like a spurious diff though.
Not fully because TImode on an instruction means it was issued with a different
one.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/61923] [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel.
2014-07-26 20:03 [Bug debug/61923] New: [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel trippels at gcc dot gnu.org
2014-07-28 8:16 ` [Bug debug/61923] " rguenth at gcc dot gnu.org
2014-07-28 8:18 ` pinskia at gcc dot gnu.org
@ 2014-07-29 6:54 ` trippels at gcc dot gnu.org
2014-08-01 11:44 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-07-29 6:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923
--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Created attachment 33200
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33200&action=edit
original testcase
The issue is more visible with the original attached testcase:
markus@x4 linux % diff -u inode.gkd inode.gk.gkd
--- inode.gkd 2014-07-29 08:52:00.453657959 +0200
+++ inode.gk.gkd 2014-07-29 08:52:01.636965368 +0200
@@ -4270,15 +4270,6 @@
(nil))))
(code_label 158 0 0 16 158 "" [1 uses])
(note# 0 0 [bb 16] NOTE_INSN_BASIC_BLOCK)
-(insn:TI# 0 0 16 (set (reg:SI 37 r8)
- (const_int 2 [0x2])) fs/ext4/inode.c:1632# {*movsi_internal}
- (nil))
-(insn# 0 0 16 (set (reg:DI 2 cx)
- (const_int -1 [0xffffffffffffffff])) fs/ext4/inode.c:1632#
{*movdi_internal}
- (nil))
-(insn# 0 0 16 (set (reg:DI 5 di)
- (reg/v/f:DI 44 r15 [orig:208 inode ] [208])) fs/ext4/inode.c:1632#
{*movdi_internal}
- (nil))
(insn:TI# 0 0 16 (set (reg:SI 1 dx)
(mem/c:SI (plus:DI (reg/f:DI 7 sp)
(const_int 28 [0x1c])) [ map.m_len+0 S4 A32]))
fs/ext4/inode.c:1632# {*movsi_internal}
@@ -4287,6 +4278,15 @@
(mem/c:SI (plus:DI (reg/f:DI 7 sp)
(const_int 24 [0x18])) [ map.m_lblk+0 S4 A64]))
fs/ext4/inode.c:1632# {*movsi_internal}
(nil))
+(insn# 0 0 16 (set (reg:SI 37 r8)
+ (const_int 2 [0x2])) fs/ext4/inode.c:1632# {*movsi_internal}
+ (nil))
+(insn:TI# 0 0 16 (set (reg:DI 2 cx)
+ (const_int -1 [0xffffffffffffffff])) fs/ext4/inode.c:1632#
{*movdi_internal}
+ (nil))
+(insn# 0 0 16 (set (reg:DI 5 di)
+ (reg/v/f:DI 44 r15 [orig:208 inode ] [208])) fs/ext4/inode.c:1632#
{*movdi_internal}
+ (nil))
(call_insn:TI# 0 0 16 (set (reg:SI 0 ax)
(call (mem:QI (symbol_ref:DI ("ext4_es_insert_extent") [flags 0x41]
<function_decl # ext4_es_insert_extent>) [ ext4_es_insert_extent S1 A8])
(const_int 0 [0]))) fs/ext4/inode.c:1632# {*call_value}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/61923] [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel.
2014-07-26 20:03 [Bug debug/61923] New: [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel trippels at gcc dot gnu.org
` (2 preceding siblings ...)
2014-07-29 6:54 ` trippels at gcc dot gnu.org
@ 2014-08-01 11:44 ` jakub at gcc dot gnu.org
2014-08-06 2:00 ` vmakarov at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-08-01 11:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-08-01
CC| |aoliva at gcc dot gnu.org,
| |bernds at gcc dot gnu.org,
| |jakub at gcc dot gnu.org,
| |vmakarov at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Both the short #c0 and large #c3 testcases broke with r192203, the
http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00752.html patch to remember DFA
state in between basic blocks.
In the short testcase I see that in bb3 with -g there is an extra tick at the
end of the bb added for the debug insn, which in itself is not a bug IMHO, it
is preceeded by asm which probably doesn't want to coexist in the same cycle
with anything else. Normally, if the debug insn was followed by any normal
insns, those would be scheduled in the same tick as the debug insn, but now
with this DFA state save/restore it apparently is an issue (I see the first
insn in the bb4 is scheduled in the first tick for that bb, but the second insn
differs between -g and -g0 - for -g it is scheduled in tick 1, for -g0 still in
tick 0, due to DFA state differences.
Not familiar with the scheduler enough to propose a fix, either it could be to
change handling of debug insns so that they never themselves start a new
scheduling tick, even if it would mean putting them after insns that want to be
last in the cycle, or do some changes in the DFA state saving/restoring.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/61923] [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel.
2014-07-26 20:03 [Bug debug/61923] New: [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel trippels at gcc dot gnu.org
` (3 preceding siblings ...)
2014-08-01 11:44 ` jakub at gcc dot gnu.org
@ 2014-08-06 2:00 ` vmakarov at gcc dot gnu.org
2014-08-06 15:36 ` vmakarov at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-08-06 2:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923
--- Comment #5 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
The difference after scheduling a block is in DFA state because of additional
advance_one_cycle call when debug_insns are present.
The situation looks like
-g
last bb insn last real bb insn
-> advance_one_cycle ->advance_one_cycle
debug_insn
->advance_one_cycle
Last advance cycle is done at the end of processing all bb insns.
I'll try to produce a patch tomorrow to fix it which is not easy as
schedule_block is now very complicated function working in many modes and
containing a lot of gotos.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/61923] [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel.
2014-07-26 20:03 [Bug debug/61923] New: [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel trippels at gcc dot gnu.org
` (4 preceding siblings ...)
2014-08-06 2:00 ` vmakarov at gcc dot gnu.org
@ 2014-08-06 15:36 ` vmakarov at gcc dot gnu.org
2014-08-06 15:41 ` vmakarov at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-08-06 15:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923
--- Comment #6 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Wed Aug 6 15:35:49 2014
New Revision: 213674
URL: https://gcc.gnu.org/viewcvs?rev=213674&root=gcc&view=rev
Log:
2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
PR debug/61923
* haifa-sched.c (advance_one_cycle): Fix dump.
(schedule_block): Don't advance cycle if we are already at the
beginning of the cycle.
2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
PR debug/61923
* gcc.target/i386/pr61923.c: New test.
Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/pr61923.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/haifa-sched.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/61923] [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel.
2014-07-26 20:03 [Bug debug/61923] New: [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel trippels at gcc dot gnu.org
` (5 preceding siblings ...)
2014-08-06 15:36 ` vmakarov at gcc dot gnu.org
@ 2014-08-06 15:41 ` vmakarov at gcc dot gnu.org
2014-08-06 16:00 ` trippels at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-08-06 15:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923
--- Comment #7 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Wed Aug 6 15:40:26 2014
New Revision: 213675
URL: https://gcc.gnu.org/viewcvs?rev=213675&root=gcc&view=rev
Log:
2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
PR debug/61923
* haifa-sched.c (advance_one_cycle): Fix dump.
(schedule_block): Don't advance cycle if we are already at the
beginning of the cycle.
2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
PR debug/61923
* gcc.target/i386/pr61923.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr61923.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/haifa-sched.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/61923] [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel.
2014-07-26 20:03 [Bug debug/61923] New: [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel trippels at gcc dot gnu.org
` (6 preceding siblings ...)
2014-08-06 15:41 ` vmakarov at gcc dot gnu.org
@ 2014-08-06 16:00 ` trippels at gcc dot gnu.org
2014-09-08 19:07 ` [Bug debug/61923] [4.8 " jakub at gcc dot gnu.org
2014-09-08 19:17 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-08-06 16:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923
--- Comment #8 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Thanks Vladimir.
I can now build my kernel with GCC_COMPARE_DEBUG=1 without any issues.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/61923] [4.8 Regression] -fcompare-debug errors while building Linux kernel.
2014-07-26 20:03 [Bug debug/61923] New: [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel trippels at gcc dot gnu.org
` (7 preceding siblings ...)
2014-08-06 16:00 ` trippels at gcc dot gnu.org
@ 2014-09-08 19:07 ` jakub at gcc dot gnu.org
2014-09-08 19:17 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-08 19:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Sep 8 19:07:00 2014
New Revision: 215020
URL: https://gcc.gnu.org/viewcvs?rev=215020&root=gcc&view=rev
Log:
Backported from mainline
2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
PR debug/61923
* haifa-sched.c (advance_one_cycle): Fix dump.
(schedule_block): Don't advance cycle if we are already at the
beginning of the cycle.
* gcc.target/i386/pr61923.c: New test.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr61923.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/haifa-sched.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/61923] [4.8 Regression] -fcompare-debug errors while building Linux kernel.
2014-07-26 20:03 [Bug debug/61923] New: [4.8/4.9/4.10 Regression] -fcompare-debug errors while building Linux kernel trippels at gcc dot gnu.org
` (8 preceding siblings ...)
2014-09-08 19:07 ` [Bug debug/61923] [4.8 " jakub at gcc dot gnu.org
@ 2014-09-08 19:17 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-08 19:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed, thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread