Commit 7b2eca00 by Richard Biener Committed by Richard Biener

tree.h (tree_invariant_p): Declare.

2015-12-02  Richard Biener  <rguenther@suse.de>

	* tree.h (tree_invariant_p): Declare.
	* tree.c (tree_invariant_p): Export.
	* genmatch.c (dt_simplify::gen_1): For GENERIC code-gen never
	create SAVE_EXPRs but reject patterns if we would need to.

From-SVN: r231178
parent 694e5e4b
2015-12-02 Richard Biener <rguenther@suse.de>
* tree.h (tree_invariant_p): Declare.
* tree.c (tree_invariant_p): Export.
* genmatch.c (dt_simplify::gen_1): For GENERIC code-gen never
create SAVE_EXPRs but reject patterns if we would need to.
2015-12-02 Tom de Vries <tom@codesourcery.com> 2015-12-02 Tom de Vries <tom@codesourcery.com>
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call) * tree-ssa-structalias.c (find_func_aliases_for_builtin_call)
...@@ -3119,8 +3119,8 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) ...@@ -3119,8 +3119,8 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result)
if (cinfo.info[i].result_use_count if (cinfo.info[i].result_use_count
> cinfo.info[i].match_use_count) > cinfo.info[i].match_use_count)
fprintf_indent (f, indent, fprintf_indent (f, indent,
"captures[%d] = save_expr (captures[%d]);\n", "if (! tree_invariant_p (captures[%d])) "
i, i); "return NULL_TREE;\n", i);
} }
for (unsigned j = 0; j < e->ops.length (); ++j) for (unsigned j = 0; j < e->ops.length (); ++j)
{ {
......
...@@ -3231,8 +3231,6 @@ decl_address_ip_invariant_p (const_tree op) ...@@ -3231,8 +3231,6 @@ decl_address_ip_invariant_p (const_tree op)
not handle arithmetic; that's handled in skip_simple_arithmetic and not handle arithmetic; that's handled in skip_simple_arithmetic and
tree_invariant_p). */ tree_invariant_p). */
static bool tree_invariant_p (tree t);
static bool static bool
tree_invariant_p_1 (tree t) tree_invariant_p_1 (tree t)
{ {
...@@ -3282,7 +3280,7 @@ tree_invariant_p_1 (tree t) ...@@ -3282,7 +3280,7 @@ tree_invariant_p_1 (tree t)
/* Return true if T is function-invariant. */ /* Return true if T is function-invariant. */
static bool bool
tree_invariant_p (tree t) tree_invariant_p (tree t)
{ {
tree inner = skip_simple_arithmetic (t); tree inner = skip_simple_arithmetic (t);
......
...@@ -4320,6 +4320,10 @@ extern tree staticp (tree); ...@@ -4320,6 +4320,10 @@ extern tree staticp (tree);
extern tree save_expr (tree); extern tree save_expr (tree);
/* Return true if T is function-invariant. */
extern bool tree_invariant_p (tree);
/* Look inside EXPR into any simple arithmetic operations. Return the /* Look inside EXPR into any simple arithmetic operations. Return the
outermost non-arithmetic or non-invariant node. */ outermost non-arithmetic or non-invariant node. */
......
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