* [Bug tree-optimization/42889] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
@ 2010-01-28 0:26 ` zsojka at seznam dot cz
2010-01-28 6:56 ` steven at gcc dot gnu dot org
` (22 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: zsojka at seznam dot cz @ 2010-01-28 0:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from zsojka at seznam dot cz 2010-01-28 00:26 -------
Created an attachment (id=19733)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19733&action=view)
reduced testcase
Reduced from gcc/builtins.c
Command line:
gcc -O1 -fgcse -fcompare-debug -c pr42889.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug tree-optimization/42889] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
2010-01-28 0:26 ` [Bug tree-optimization/42889] " zsojka at seznam dot cz
@ 2010-01-28 6:56 ` steven at gcc dot gnu dot org
2010-01-28 9:07 ` steven at gcc dot gnu dot org
` (21 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 6:56 UTC (permalink / raw)
To: gcc-bugs
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |steven at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-01-28 06:56:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug tree-optimization/42889] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
2010-01-28 0:26 ` [Bug tree-optimization/42889] " zsojka at seznam dot cz
2010-01-28 6:56 ` steven at gcc dot gnu dot org
@ 2010-01-28 9:07 ` steven at gcc dot gnu dot org
2010-01-28 9:41 ` steven at gcc dot gnu dot org
` (20 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 9:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from steven at gcc dot gnu dot org 2010-01-28 09:07 -------
Caused by an RTL PRE transformation.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug tree-optimization/42889] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (2 preceding siblings ...)
2010-01-28 9:07 ` steven at gcc dot gnu dot org
@ 2010-01-28 9:41 ` steven at gcc dot gnu dot org
2010-01-28 10:11 ` [Bug rtl-optimization/42889] [4.5 Regression] " rguenth at gcc dot gnu dot org
` (19 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 9:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from steven at gcc dot gnu dot org 2010-01-28 09:40 -------
combine fails to combine the following insns.
Before combine (.init_regs dump):
(insn 20 19 21 4 PR42889.c:7 (parallel [
(set (reg:SI 70)
(and:SI (reg/v:SI 64 [ c ])
(const_int 4 [0x4])))
(clobber (reg:CC 17 flags))
]) 375 {*andsi_1} (expr_list:REG_DEAD (reg/v:SI 64 [ c ])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil))))
(insn 21 20 48 4 PR42889.c:7 (set (reg:CCZ 17 flags)
(compare:CCZ (reg:SI 70)
(const_int 0 [0x0]))) 2 {*cmpsi_ccno_1} (expr_list:REG_UNUSED
(reg:CCZ 17 flags)
(nil)))
After combine (.combine dump):
(note 20 19 21 4 NOTE_INSN_DELETED)
(insn 21 20 48 4 PR42889.c:7 (parallel [
(set (reg:CCZ 17 flags)
(compare:CCZ (and:SI (reg/v:SI 64 [ c ])
(const_int 4 [0x4]))
(const_int 0 [0x0])))
(set (reg:SI 70)
(and:SI (reg/v:SI 64 [ c ])
(const_int 4 [0x4])))
]) 384 {*andsi_2} (expr_list:REG_DEAD (reg/v:SI 64 [ c ])
(expr_list:REG_UNUSED (reg:CCZ 17 flags)
(nil))))
When compiled with -g that combine doesn't happen because the compare insn has
been changed somewhere before combine.
Before combine:
(insn 20 19 50 4 PR42889.c:7 (parallel [
(set (reg:SI 70)
(and:SI (reg/v:SI 64 [ c ])
(const_int 4 [0x4])))
(clobber (reg:CC 17 flags))
]) 375 {*andsi_1} (expr_list:REG_DEAD (reg/v:SI 64 [ c ])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil))))
(insn 50 20 51 4 PR42889.c:7 (set (reg:CC 17 flags)
(compare:CC (reg:SI 70)
(const_int 1 [0x1]))) 6 {*cmpsi_1} (expr_list:REG_DEAD (reg:SI 70)
(nil)))
The difference starts in the cprop3 pass:
+ DCE: Deleting insn 21
+ deleting insn with uid = 21.
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil))))
-(insn# # # 4 PR42889.c:7 (set (reg:CCZ 17 flags)
- (compare:CCZ (reg:SI 70)
- (const_int 0 [0x0])))# {*cmpsi_ccno_1} (expr_list:REG_DEAD (reg:SI
70)
- (nil)))
-
(insn# # # 4 PR42889.c:7 (set (reg:CC 17 flags)
(compare:CC (reg:SI 70)
(const_int 1 [0x1])))# {*cmpsi_1} (nil))
Interestingly: with -g0 "df_analyze called" happens, but there is no DF output
and it almost looks as if DF simply doesn't run (and therefore also DCE does
not run).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (3 preceding siblings ...)
2010-01-28 9:41 ` steven at gcc dot gnu dot org
@ 2010-01-28 10:11 ` rguenth at gcc dot gnu dot org
2010-01-28 10:14 ` steven at gcc dot gnu dot org
` (18 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-28 10:11 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |rtl-optimization
Priority|P3 |P1
Summary|"-fcompare-debug failure |[4.5 Regression] "-fcompare-
|(length)" with "-O1 -fgcse" |debug failure (length)" with
| |"-O1 -fgcse"
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (4 preceding siblings ...)
2010-01-28 10:11 ` [Bug rtl-optimization/42889] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2010-01-28 10:14 ` steven at gcc dot gnu dot org
2010-01-28 10:17 ` steven at gcc dot gnu dot org
` (17 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 10:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from steven at gcc dot gnu dot org 2010-01-28 10:14 -------
The fast DCE is not called because df_lr_finalize is never called with -g0 --
nothing has changed so there is nothing to finalize.
Unassigning. Aleksandre's problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (5 preceding siblings ...)
2010-01-28 10:14 ` steven at gcc dot gnu dot org
@ 2010-01-28 10:17 ` steven at gcc dot gnu dot org
2010-01-28 11:05 ` rguenth at gcc dot gnu dot org
` (16 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 10:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from steven at gcc dot gnu dot org 2010-01-28 10:17 -------
FWIW, DF rescanning runs with -g1 and not with -g0 because copy propagation
updates a debug_insn:
LOCAL COPY-PROP: Replacing reg 63 in insn 28 with reg 72
(insn 27 26 28 4 PR42889.c:7 (set (reg/v:SI 63 [ x ])
(reg:SI 72)) 47 {*movsi_1} (expr_list:REG_DEAD (reg:SI 72)
(nil)))
(debug_insn 28 27 29 4 PR42889.c:7 (var_location:SI x (reg:SI 72)) -1 (nil))
This clobbers the DF solution and triggers a re-run of all the DF problems. And
that, in turn, causes the extra DCE run.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (6 preceding siblings ...)
2010-01-28 10:17 ` steven at gcc dot gnu dot org
@ 2010-01-28 11:05 ` rguenth at gcc dot gnu dot org
2010-01-28 12:06 ` steven at gcc dot gnu dot org
` (15 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-28 11:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2010-01-28 11:05 -------
(In reply to comment #5)
> FWIW, DF rescanning runs with -g1 and not with -g0 because copy propagation
> updates a debug_insn:
>
> LOCAL COPY-PROP: Replacing reg 63 in insn 28 with reg 72
>
> (insn 27 26 28 4 PR42889.c:7 (set (reg/v:SI 63 [ x ])
> (reg:SI 72)) 47 {*movsi_1} (expr_list:REG_DEAD (reg:SI 72)
> (nil)))
>
> (debug_insn 28 27 29 4 PR42889.c:7 (var_location:SI x (reg:SI 72)) -1 (nil))
>
>
> This clobbers the DF solution and triggers a re-run of all the DF problems. And
> that, in turn, causes the extra DCE run.
Ugh. It shouldn't trigger a DCE run at least. I guess it has to trigger
a re-run of the DF problems though.
I guess similar things could happen on the tree-level with scheduling
of cleanup_cfg after something changed. Double-ugh.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (7 preceding siblings ...)
2010-01-28 11:05 ` rguenth at gcc dot gnu dot org
@ 2010-01-28 12:06 ` steven at gcc dot gnu dot org
2010-01-28 12:07 ` steven at gcc dot gnu dot org
` (14 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 12:06 UTC (permalink / raw)
To: gcc-bugs
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|steven at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (8 preceding siblings ...)
2010-01-28 12:06 ` steven at gcc dot gnu dot org
@ 2010-01-28 12:07 ` steven at gcc dot gnu dot org
2010-01-28 12:09 ` rguenther at suse dot de
` (13 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 12:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from steven at gcc dot gnu dot org 2010-01-28 12:07 -------
Well let's face it: All this happening because of DEBUG_INSN/DEBUG_STMT is deep
in "hate to say I told you so" teritory...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (9 preceding siblings ...)
2010-01-28 12:07 ` steven at gcc dot gnu dot org
@ 2010-01-28 12:09 ` rguenther at suse dot de
2010-01-28 13:40 ` jakub at gcc dot gnu dot org
` (12 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: rguenther at suse dot de @ 2010-01-28 12:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenther at suse dot de 2010-01-28 12:09 -------
Subject: Re: [4.5 Regression] "-fcompare-debug
failure (length)" with "-O1 -fgcse"
On Thu, 28 Jan 2010, steven at gcc dot gnu dot org wrote:
> ------- Comment #7 from steven at gcc dot gnu dot org 2010-01-28 12:07 -------
> Well let's face it: All this happening because of DEBUG_INSN/DEBUG_STMT is deep
> in "hate to say I told you so" teritory...
True - this happens when all concerns get overturned by
"let's make progress with debuginfo" ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (10 preceding siblings ...)
2010-01-28 12:09 ` rguenther at suse dot de
@ 2010-01-28 13:40 ` jakub at gcc dot gnu dot org
2010-01-28 13:53 ` steven at gcc dot gnu dot org
` (11 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-28 13:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jakub at gcc dot gnu dot org 2010-01-28 13:39 -------
Created an attachment (id=19739)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19739&action=view)
gcc45-pr42889.patch
Patch that cures this by not running DCE if only DEBUG_INSNs changed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (11 preceding siblings ...)
2010-01-28 13:40 ` jakub at gcc dot gnu dot org
@ 2010-01-28 13:53 ` steven at gcc dot gnu dot org
2010-01-28 14:59 ` dominiq at lps dot ens dot fr
` (10 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 13:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from steven at gcc dot gnu dot org 2010-01-28 13:53 -------
The patch of comment #9 is a hack that doesn't solve anything. There are loads
of other passes that may inadvertedly trigger a fast DCE if only a DEBUG_INSN
is modified and needs to be rescanned.
IMHO the only "proper" fix would be to teach DF not to run DCE (and any other
DF-problem other than scan) if only DEBUG_INSNs are modified.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (12 preceding siblings ...)
2010-01-28 13:53 ` steven at gcc dot gnu dot org
@ 2010-01-28 14:59 ` dominiq at lps dot ens dot fr
2010-01-28 15:11 ` jakub at gcc dot gnu dot org
` (9 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-01-28 14:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from dominiq at lps dot ens dot fr 2010-01-28 14:59 -------
Created an attachment (id=19741)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19741&action=view)
Code giving a suspicious error with the patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (13 preceding siblings ...)
2010-01-28 14:59 ` dominiq at lps dot ens dot fr
@ 2010-01-28 15:11 ` jakub at gcc dot gnu dot org
2010-01-28 15:37 ` dominiq at lps dot ens dot fr
` (8 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-28 15:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jakub at gcc dot gnu dot org 2010-01-28 15:11 -------
So not call df_set_bb_dirty in df_insn_rescan if DEBUG_INSN_P (insn), or not
mark dirty only certain problems?
I believe DEBUG_INSNs aren't meant to extend lifetime of pseudos, so perhaps
lr/live problems don't need to be marked dirty, what about others?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (14 preceding siblings ...)
2010-01-28 15:11 ` jakub at gcc dot gnu dot org
@ 2010-01-28 15:37 ` dominiq at lps dot ens dot fr
2010-01-28 16:28 ` steven at gcc dot gnu dot org
` (7 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-01-28 15:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from dominiq at lps dot ens dot fr 2010-01-28 15:37 -------
Wrong pr!-(sorry for the noise).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (15 preceding siblings ...)
2010-01-28 15:37 ` dominiq at lps dot ens dot fr
@ 2010-01-28 16:28 ` steven at gcc dot gnu dot org
2010-01-28 17:08 ` jakub at gcc dot gnu dot org
` (6 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 16:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from steven at gcc dot gnu dot org 2010-01-28 16:28 -------
Re. comment #12: I think both: Do not call df_set_bb_dirty in df_insn_rescan
rescans a DEBUG_INSN, *and* mark dirty only certain problems. The last part is
probably the most tricky bit: which problems to mark. I think the RD and CHAINS
problems, at least, still need updating.
Updating a DF problem doesn't have to be a problem if the update doesn't result
in any code changes. The fact that we run DCE in an LR update is a Bad Thing
that was an unfortunate but necessary hack to fix some PR or another. But in
general the DF problems shouldn't do any code modifications.
I guess it should be documented somewhere that all DF problems except LR should
not even think about modifying any insns...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (16 preceding siblings ...)
2010-01-28 16:28 ` steven at gcc dot gnu dot org
@ 2010-01-28 17:08 ` jakub at gcc dot gnu dot org
2010-01-28 17:23 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-28 17:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jakub at gcc dot gnu dot org 2010-01-28 17:08 -------
If only LR can make code changes, perhaps we should just avoid marking LR dirty
and make all other problems dirty. Add df_set_bb_dirty_nonlr and
df_mark_solutions_dirty_nonlr or something like that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (17 preceding siblings ...)
2010-01-28 17:08 ` jakub at gcc dot gnu dot org
@ 2010-01-28 17:23 ` jakub at gcc dot gnu dot org
2010-01-28 18:05 ` steven at gcc dot gnu dot org
` (4 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-28 17:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from jakub at gcc dot gnu dot org 2010-01-28 17:23 -------
Created an attachment (id=19743)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19743&action=view)
gcc45-pr42889.patch
Patch that does that.
BTW, df_ref_create and df_ref_remove guard the df_set_bb_dirty calls with
!DEBUG_INSN_P tests, so perhaps we could just avoid calling df_set_bb_dirty
instead of calling df_set_bb_dirty_nonlr, or on the other side we could call
this new function even in df_ref_create/df_ref_remove.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #19739|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (18 preceding siblings ...)
2010-01-28 17:23 ` jakub at gcc dot gnu dot org
@ 2010-01-28 18:05 ` steven at gcc dot gnu dot org
2010-01-28 22:09 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from steven at gcc dot gnu dot org 2010-01-28 18:05 -------
How does this address the 30ish calls to df_set_bb_dirty from the rest of the
compiler? See cfgcleanup, cfgrtl, emit-rtl, ifcvt, and modulo-sched. Each of
them could result in a DCE run if someone adds DF_LR_RUN_DCE. At least in ifcvt
we already have this problem even now (i.e. directly from ifcvt.c). The others
could trigger a DCE run via one of the CFG manipulation functions in cfg* and
emit-rtl.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (19 preceding siblings ...)
2010-01-28 18:05 ` steven at gcc dot gnu dot org
@ 2010-01-28 22:09 ` jakub at gcc dot gnu dot org
2010-01-28 22:24 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
23 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-28 22:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from jakub at gcc dot gnu dot org 2010-01-28 22:09 -------
Those need to be analyzed, perhaps some will need a similar change, many others
don't need any change, as they can't be called for DEBUG_INSNs. E.g.
DEBUG_INSN isn't changing control flow, so any changes to it won't add/remove
basic blocks, etc.
But I fail to see why we'd need to solve all at once.
This patch has been successfully bootstrapped/regtested on x86_64-linux and
i686-linux BTW.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (20 preceding siblings ...)
2010-01-28 22:09 ` jakub at gcc dot gnu dot org
@ 2010-01-28 22:24 ` steven at gcc dot gnu dot org
2010-01-29 12:15 ` jakub at gcc dot gnu dot org
2010-01-29 17:27 ` jakub at gcc dot gnu dot org
23 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-28 22:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from steven at gcc dot gnu dot org 2010-01-28 22:23 -------
I don't think there's a need to solve all at once, but it's only good practice
to look ahead for more bears on the road :-P
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (21 preceding siblings ...)
2010-01-28 22:24 ` steven at gcc dot gnu dot org
@ 2010-01-29 12:15 ` jakub at gcc dot gnu dot org
2010-01-29 17:27 ` jakub at gcc dot gnu dot org
23 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-29 12:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from jakub at gcc dot gnu dot org 2010-01-29 12:15 -------
Subject: Bug 42889
Author: jakub
Date: Fri Jan 29 12:14:47 2010
New Revision: 156344
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156344
Log:
PR rtl-optimization/42889
* df.h (df_set_bb_dirty_nonlr): New prototype.
* df-core.c (df_set_bb_dirty_nonlr): New function.
* df-scan.c (df_insn_rescan): Call it instead of
df_set_bb_dirty for DEBUG_INSNs.
* gcc.dg/pr42889.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr42889.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/df-core.c
trunk/gcc/df-scan.c
trunk/gcc/df.h
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug rtl-optimization/42889] [4.5 Regression] "-fcompare-debug failure (length)" with "-O1 -fgcse"
2010-01-28 0:25 [Bug tree-optimization/42889] New: "-fcompare-debug failure (length)" with "-O1 -fgcse" zsojka at seznam dot cz
` (22 preceding siblings ...)
2010-01-29 12:15 ` jakub at gcc dot gnu dot org
@ 2010-01-29 17:27 ` jakub at gcc dot gnu dot org
23 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-29 17:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from jakub at gcc dot gnu dot org 2010-01-29 17:26 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42889
^ permalink raw reply [flat|nested] 26+ messages in thread