Commit 7ce7896c by Sebastian Pop Committed by Sebastian Pop

tree-chrec.c (evolution_function_is_invariant_rec_p): Use CHREC_LEFT and…

tree-chrec.c (evolution_function_is_invariant_rec_p): Use CHREC_LEFT and CHREC_RIGHT for accessing chrec components instead of...

	* tree-chrec.c (evolution_function_is_invariant_rec_p): Use
	CHREC_LEFT and CHREC_RIGHT for accessing chrec components instead
	of wrongly accessing operands.

From-SVN: r104093
parent 18aed06a
2005-09-09 Sebastian Pop <pop@cri.ensmp.fr>
* tree-chrec.c (evolution_function_is_invariant_rec_p): Use
CHREC_LEFT and CHREC_RIGHT for accessing chrec components instead
of wrongly accessing operands.
2005-09-09 Sebastian Pop <pop@cri.ensmp.fr>
* Makefile.in (tree-chrec.o): Depends on SCEV_H.
* tree-chrec.c: Include tree-scalar-evolution.h.
(chrec_convert): Instantiate the base and step before calling
......
......@@ -935,9 +935,16 @@ evolution_function_is_invariant_rec_p (tree chrec, int loopnum)
chrec))
return true;
if (TREE_CODE (chrec) == POLYNOMIAL_CHREC
&& CHREC_VARIABLE (chrec) == (unsigned) loopnum)
return false;
if (TREE_CODE (chrec) == POLYNOMIAL_CHREC)
{
if (CHREC_VARIABLE (chrec) == (unsigned) loopnum
|| !evolution_function_is_invariant_rec_p (CHREC_RIGHT (chrec),
loopnum)
|| !evolution_function_is_invariant_rec_p (CHREC_LEFT (chrec),
loopnum))
return false;
return true;
}
switch (TREE_CODE_LENGTH (TREE_CODE (chrec)))
{
......
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