diff options
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
-rw-r--r-- | gcc/tree-ssa-loop-unswitch.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index 90bb205..a9a27d7 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -402,15 +402,6 @@ tree_unswitch_loop (struct loop *loop, /* Loop unswitching pass. */ -static unsigned int -tree_ssa_loop_unswitch (void) -{ - if (number_of_loops (cfun) <= 1) - return 0; - - return tree_ssa_unswitch_loops (); -} - namespace { const pass_data pass_data_tree_unswitch = @@ -436,10 +427,19 @@ public: /* opt_pass methods: */ virtual bool gate (function *) { return flag_unswitch_loops != 0; } - unsigned int execute () { return tree_ssa_loop_unswitch (); } + virtual unsigned int execute (function *); }; // class pass_tree_unswitch +unsigned int +pass_tree_unswitch::execute (function *fun) +{ + if (number_of_loops (fun) <= 1) + return 0; + + return tree_ssa_unswitch_loops (); +} + } // anon namespace gimple_opt_pass * |