aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-03-01 09:21:30 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-03-01 09:21:30 +0000
commitd7a700e0a701e5164b8c547f76a2d91f657eee97 (patch)
tree74c7336389d9d5c35c5e1c4f92b44b1e312310a2 /gcc/tree-cfgcleanup.c
parent743f0ba244af82c835f3377dfbf0f7061e26c41a (diff)
downloadgcc-d7a700e0a701e5164b8c547f76a2d91f657eee97.zip
gcc-d7a700e0a701e5164b8c547f76a2d91f657eee97.tar.gz
gcc-d7a700e0a701e5164b8c547f76a2d91f657eee97.tar.bz2
re PR middle-end/89497 (ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled)
2019-03-01 Richard Biener <rguenther@suse.de> PR middle-end/89497 * tree-cfgcleanup.h (cleanup_tree_cfg): Add SSA update flags argument, defaulted to zero. * passes.c (execute_function_todo): Pass down SSA update flags to cleanup_tree_cfg. * tree-cfgcleanup.c: Include tree-into-ssa.h and tree-cfgcleanup.h. (cleanup_tree_cfg_noloop): After cleanup_control_flow_pre update SSA form if requested. (cleanup_tree_cfg): Get and pass down SSA update flags. * gcc.dg/tree-ssa/reassoc-43.c: Avoid false match in regex. * g++.dg/tree-prof/devirt.C: Scan tracer dump for foldings that happen now earlier. From-SVN: r269302
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r--gcc/tree-cfgcleanup.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 63db330..f7bd565 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -44,6 +44,9 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-fold.h"
#include "tree-ssa-loop-niter.h"
#include "cgraph.h"
+#include "tree-into-ssa.h"
+#include "tree-cfgcleanup.h"
+
/* The set of blocks in that at least one of the following changes happened:
-- the statement at the end of the block was changed
@@ -943,7 +946,7 @@ mfb_keep_latches (edge e)
Return true if the flowgraph was modified, false otherwise. */
static bool
-cleanup_tree_cfg_noloop (void)
+cleanup_tree_cfg_noloop (unsigned ssa_update_flags)
{
timevar_push (TV_TREE_CLEANUP_CFG);
@@ -1023,6 +1026,8 @@ cleanup_tree_cfg_noloop (void)
/* After doing the above SSA form should be valid (or an update SSA
should be required). */
+ if (ssa_update_flags)
+ update_ssa (ssa_update_flags);
/* Compute dominator info which we need for the iterative process below. */
if (!dom_info_available_p (CDI_DOMINATORS))
@@ -1125,9 +1130,9 @@ repair_loop_structures (void)
/* Cleanup cfg and repair loop structures. */
bool
-cleanup_tree_cfg (void)
+cleanup_tree_cfg (unsigned ssa_update_flags)
{
- bool changed = cleanup_tree_cfg_noloop ();
+ bool changed = cleanup_tree_cfg_noloop (ssa_update_flags);
if (current_loops != NULL
&& loops_state_satisfies_p (LOOPS_NEED_FIXUP))