aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-predcom.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-predcom.c')
-rw-r--r--gcc/tree-predcom.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 2cb47db..a9a004e 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -2565,9 +2565,9 @@ tree_predictive_commoning (void)
/* Predictive commoning Pass. */
static unsigned
-run_tree_predictive_commoning (void)
+run_tree_predictive_commoning (struct function *fun)
{
- if (!current_loops)
+ if (number_of_loops (fun) <= 1)
return 0;
return tree_predictive_commoning ();
@@ -2598,9 +2598,9 @@ public:
/* opt_pass methods: */
virtual bool gate (function *) { return flag_predictive_commoning != 0; }
- virtual unsigned int execute (function *)
+ virtual unsigned int execute (function *fun)
{
- return run_tree_predictive_commoning ();
+ return run_tree_predictive_commoning (fun);
}
}; // class pass_predcom