Commit 21d91009 by Sebastian Pop Committed by Sebastian Pop

A function is affine when CHREC_RIGHT is invariant.

2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-chrec.h (evolution_function_is_affine_p): Do not check
	whether CHREC_LEFT is invariant.  A function is affine when
	CHREC_RIGHT is invariant.

From-SVN: r164788
parent c2bc669e
2010-09-30 Sebastian Pop <sebastian.pop@amd.com>
* tree-chrec.h (evolution_function_is_affine_p): Do not check
whether CHREC_LEFT is invariant. A function is affine when
CHREC_RIGHT is invariant.
2010-09-30 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (reduction_phi_p): Remove check for
is_gimple_reg.
(rewrite_degenerate_phi): Same.
2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
* tree-chrec.h (evolution_function_is_affine_p): Do not check
whether CHREC_LEFT is invariant. A function is affine when
CHREC_RIGHT is invariant.
2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (reduction_phi_p): Remove check for
is_gimple_reg.
(rewrite_degenerate_phi): Same.
......
......@@ -202,23 +202,10 @@ evolution_function_is_affine_in_loop (const_tree chrec, int loopnum)
static inline bool
evolution_function_is_affine_p (const_tree chrec)
{
if (chrec == NULL_TREE)
return false;
switch (TREE_CODE (chrec))
{
case POLYNOMIAL_CHREC:
if (evolution_function_is_invariant_p (CHREC_LEFT (chrec),
CHREC_VARIABLE (chrec))
&& evolution_function_is_invariant_p (CHREC_RIGHT (chrec),
CHREC_VARIABLE (chrec)))
return true;
else
return false;
default:
return false;
}
return chrec
&& TREE_CODE (chrec) == POLYNOMIAL_CHREC
&& evolution_function_is_invariant_p (CHREC_RIGHT (chrec),
CHREC_VARIABLE (chrec));
}
/* Determines whether EXPR does not contains chrec expressions. */
......
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