* [PATCH] Fix the bug of comparing goto_locus to UNKNOWN_LOCATION
@ 2012-11-26 22:47 Dehao Chen
2012-11-27 9:21 ` Eric Botcazou
0 siblings, 1 reply; 2+ messages in thread
From: Dehao Chen @ 2012-11-26 22:47 UTC (permalink / raw)
To: GCC Patches; +Cc: Richard Guenther
Hi,
This patch fixes a bug of comparing goto_locus to UNKNOWN_LOCATION
when combining basic blocks.
Bootstrapped and and passed gcc regression tests.
Is it okay for trunk?
Thanks,
Dehao
gcc/ChangeLog:
2012-11-26 Dehao Chen <dehao@google.com>
* cfgrtl.c (rtl_merge_blocks): Check with UNKNOWN_LOCATION correctly.
(cfg_layout_merge_blocks): Likewise.
Index: gcc/cfgrtl.c
===================================================================
--- gcc/cfgrtl.c (revision 193828)
+++ gcc/cfgrtl.c (working copy)
@@ -890,7 +890,8 @@ rtl_merge_blocks (basic_block a, basic_block b)
df_bb_delete (b->index);
/* If B was a forwarder block, propagate the locus on the edge. */
- if (forwarder_p && !EDGE_SUCC (b, 0)->goto_locus)
+ if (forwarder_p
+ && LOCATION_LOCUS (EDGE_SUCC (b, 0)->goto_locus) == UNKNOWN_LOCATION)
EDGE_SUCC (b, 0)->goto_locus = EDGE_SUCC (a, 0)->goto_locus;
if (dump_file)
@@ -4149,7 +4150,7 @@ cfg_layout_merge_blocks (basic_block a, basic_bloc
/* If B was a forwarder block, propagate the locus on the edge. */
if (forwarder_p
- && LOCATION_LOCUS (EDGE_SUCC (b, 0)->goto_locus) != UNKNOWN_LOCATION)
+ && LOCATION_LOCUS (EDGE_SUCC (b, 0)->goto_locus) == UNKNOWN_LOCATION)
EDGE_SUCC (b, 0)->goto_locus = EDGE_SUCC (a, 0)->goto_locus;
if (dump_file)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix the bug of comparing goto_locus to UNKNOWN_LOCATION
2012-11-26 22:47 [PATCH] Fix the bug of comparing goto_locus to UNKNOWN_LOCATION Dehao Chen
@ 2012-11-27 9:21 ` Eric Botcazou
0 siblings, 0 replies; 2+ messages in thread
From: Eric Botcazou @ 2012-11-27 9:21 UTC (permalink / raw)
To: Dehao Chen; +Cc: gcc-patches, Richard Guenther
> gcc/ChangeLog:
> 2012-11-26 Dehao Chen <dehao@google.com>
>
> * cfgrtl.c (rtl_merge_blocks): Check with UNKNOWN_LOCATION correctly.
> (cfg_layout_merge_blocks): Likewise.
OK, thanks.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-27 9:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-26 22:47 [PATCH] Fix the bug of comparing goto_locus to UNKNOWN_LOCATION Dehao Chen
2012-11-27 9:21 ` Eric Botcazou
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).