Commit 9c37629f by Tom de Vries Committed by Tom de Vries

Allow pass_lim to run outside pass_tree_loop

2015-11-24  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-loop-im.c (tree_ssa_lim): Make static.
	(pass_lim::execute): Allow to run outside pass_tree_loop.

From-SVN: r230815
parent 4e55c7c3
2015-11-24 Tom de Vries <tom@codesourcery.com>
* tree-ssa-loop-im.c (tree_ssa_lim): Make static.
(pass_lim::execute): Allow to run outside pass_tree_loop.
2015-11-24 Wilco Dijkstra <wdijkstr@arm.com> 2015-11-24 Wilco Dijkstra <wdijkstr@arm.com>
* gcc/config/aarch64/aarch64.md (add<mode>3): * gcc/config/aarch64/aarch64.md (add<mode>3):
...@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssa-propagate.h" #include "tree-ssa-propagate.h"
#include "trans-mem.h" #include "trans-mem.h"
#include "gimple-fold.h" #include "gimple-fold.h"
#include "tree-scalar-evolution.h"
/* TODO: Support for predicated code motion. I.e. /* TODO: Support for predicated code motion. I.e.
...@@ -2496,7 +2497,7 @@ tree_ssa_lim_finalize (void) ...@@ -2496,7 +2497,7 @@ tree_ssa_lim_finalize (void)
/* Moves invariants from loops. Only "expensive" invariants are moved out -- /* Moves invariants from loops. Only "expensive" invariants are moved out --
i.e. those that are likely to be win regardless of the register pressure. */ i.e. those that are likely to be win regardless of the register pressure. */
unsigned int static unsigned int
tree_ssa_lim (void) tree_ssa_lim (void)
{ {
unsigned int todo; unsigned int todo;
...@@ -2560,10 +2561,17 @@ public: ...@@ -2560,10 +2561,17 @@ public:
unsigned int unsigned int
pass_lim::execute (function *fun) pass_lim::execute (function *fun)
{ {
bool in_loop_pipeline = scev_initialized_p ();
if (!in_loop_pipeline)
loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS);
if (number_of_loops (fun) <= 1) if (number_of_loops (fun) <= 1)
return 0; return 0;
unsigned int todo = tree_ssa_lim ();
return tree_ssa_lim (); if (!in_loop_pipeline)
loop_optimizer_finalize ();
return todo;
} }
} // anon namespace } // anon namespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment