+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.
+
2019-03-01 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/89539
/* Always cleanup the CFG before trying to update SSA. */
if (flags & TODO_cleanup_cfg)
{
- cleanup_tree_cfg ();
+ cleanup_tree_cfg (flags & TODO_update_ssa_any);
/* When cleanup_tree_cfg merges consecutive blocks, it may
perform some simplistic propagation when removing single
+2019-03-01 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/89497
+ * 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.
+
2019-02-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c-torture/execute/20190228-1.c: New test.
/* PR ipa/88561 */
-/* { dg-options "-O3 -fdump-tree-dom3-details" } */
+/* { dg-options "-O3 -fdump-tree-tracer-details -fdump-tree-dom3-details" } */
struct nsISupports
{
__builtin_abort ();
}
-/* { dg-final-use-not-autofdo { scan-tree-dump-times "folding virtual function call to virtual unsigned int mozPersonalDictionary::_ZThn16" 1 "dom3" { target { lp64 || llp64 } } } } */
+/* { dg-final-use-not-autofdo { scan-tree-dump-times "folding virtual function call to virtual unsigned int mozPersonalDictionary::_ZThn16" 1 "tracer" { target { lp64 || llp64 } } } } */
/* { dg-final-use-not-autofdo { scan-tree-dump-times "folding virtual function call to virtual unsigned int mozPersonalDictionary::_ZThn8" 1 "dom3" { target ilp32 } } } */
-/* { dg-final-use-not-autofdo { scan-tree-dump-times "folding virtual function call to virtual unsigned int mozPersonalDictionary::AddRef" 1 "dom3" } } */
+/* { dg-final-use-not-autofdo { scan-tree-dump-times "folding virtual function call to virtual unsigned int mozPersonalDictionary::AddRef" 1 "tracer" } } */
}
}
}
-/* { dg-final { scan-tree-dump-not "0 != 0" "reassoc2"} } */
+/* { dg-final { scan-tree-dump-not "\[ (\]0 != 0" "reassoc2"} } */
#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
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);
/* 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))
/* 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))
/* In tree-cfgcleanup.c */
extern bitmap cfgcleanup_altered_bbs;
-extern bool cleanup_tree_cfg (void);
+extern bool cleanup_tree_cfg (unsigned = 0);
extern bool fixup_noreturn_call (gimple *stmt);
extern bool delete_unreachable_blocks_update_callgraph (cgraph_node *dst_node,
bool update_clones);