public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/52340] New: autopar (at least) corrupts dominance info
@ 2012-02-22 15:04 rguenth at gcc dot gnu.org
2015-03-31 15:58 ` [Bug tree-optimization/52340] " vries at gcc dot gnu.org
2015-07-12 22:31 ` vries at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-22 15:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52340
Bug #: 52340
Summary: autopar (at least) corrupts dominance info
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
Adding sanity-checking to calculate_dominance_info trips over autopar at least:
Index: gcc/dominance.c
===================================================================
--- gcc/dominance.c (revision 184460)
+++ gcc/dominance.c (working copy)
@@ -639,7 +639,12 @@ calculate_dominance_info (enum cdi_direc
bool reverse = (dir == CDI_POST_DOMINATORS) ? true : false;
if (dom_computed[dir_index] == DOM_OK)
- return;
+ {
+#ifdef ENABLE_CHECKING
+ verify_dominators (dir);
+#endif
+ return;
+ }
timevar_push (TV_DOMINANCE);
if (!dom_info_available_p (dir))
@@ -667,6 +672,10 @@ calculate_dominance_info (enum cdi_direc
free_dom_info (&di);
dom_computed[dir_index] = DOM_NO_FAST_QUERY;
}
+#ifdef ENABLE_CHECKING
+ else
+ verify_dominators (dir);
+#endif
compute_dom_fast_query (dir);
We notice this in the update_ssa call that computes dominance info
(which is already there, so the verification happens and fails).
A workaround (or fix) for pieces is
Index: gcc/tree-parloops.c
===================================================================
--- gcc/tree-parloops.c (revision 184460)
+++ gcc/tree-parloops.c (working copy)
@@ -1740,6 +1740,10 @@ create_parallel_loop (struct loop *loop,
gimple_set_location (stmt, loc);
gsi_insert_after (&gsi, stmt, GSI_NEW_STMT);
+ /* After the above dom info is hosed. Re-compute it. */
+ free_dominance_info (CDI_DOMINATORS);
+ calculate_dominance_info (CDI_DOMINATORS);
+
return paral_bb;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/52340] autopar (at least) corrupts dominance info
2012-02-22 15:04 [Bug tree-optimization/52340] New: autopar (at least) corrupts dominance info rguenth at gcc dot gnu.org
@ 2015-03-31 15:58 ` vries at gcc dot gnu.org
2015-07-12 22:31 ` vries at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: vries at gcc dot gnu.org @ 2015-03-31 15:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52340
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vries at gcc dot gnu.org
--- Comment #1 from vries at gcc dot gnu.org ---
https://gcc.gnu.org/ml/gcc-cvs/2012-03/msg00260.html :
Author: rguenth
Date: Mon Mar 5 14:36:18 2012
New Revision: 184933
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184933
Log:
2012-03-05 Richard Guenther <rguenther@suse.de>
* cfgexpand.c (gimple_expand_cfg): Free dominator info.
* tree-if-conv.c (combine_blocks): Free post-dominator info
after breaking it.
* tree-parloops.c (create_parallel_loop): Free and re-compute
dominator info after breaking it.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgexpand.c
trunk/gcc/tree-if-conv.c
trunk/gcc/tree-parloops.c
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/52340] autopar (at least) corrupts dominance info
2012-02-22 15:04 [Bug tree-optimization/52340] New: autopar (at least) corrupts dominance info rguenth at gcc dot gnu.org
2015-03-31 15:58 ` [Bug tree-optimization/52340] " vries at gcc dot gnu.org
@ 2015-07-12 22:31 ` vries at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: vries at gcc dot gnu.org @ 2015-07-12 22:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52340
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #2 from vries at gcc dot gnu.org ---
patch committed long ago, marking resolved-fixed
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-12 22:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-22 15:04 [Bug tree-optimization/52340] New: autopar (at least) corrupts dominance info rguenth at gcc dot gnu.org
2015-03-31 15:58 ` [Bug tree-optimization/52340] " vries at gcc dot gnu.org
2015-07-12 22:31 ` vries at gcc dot gnu.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).