OSDN Git Service

Remove executable bit.
[pf3gnuchains/gcc-fork.git] / gcc / tree-chrec.h
index 683eade..c22867b 100644 (file)
@@ -1,6 +1,6 @@
 /* Chains of recurrences.
-   Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
-   Contributed by Sebastian Pop <s.pop@laposte.net>
+   Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+   Contributed by Sebastian Pop <pop@cri.ensmp.fr>
 
 This file is part of GCC.
 
@@ -22,14 +22,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
 #ifndef GCC_TREE_CHREC_H
 #define GCC_TREE_CHREC_H
 
-/* Accessors for the chains of recurrences.  */
-#define CHREC_VAR(NODE)           TREE_OPERAND (NODE, 0)
-#define CHREC_LEFT(NODE)          TREE_OPERAND (NODE, 1)
-#define CHREC_RIGHT(NODE)         TREE_OPERAND (NODE, 2)
-#define CHREC_VARIABLE(NODE)      TREE_INT_CST_LOW (CHREC_VAR (NODE))
-
-\f
-
 /* The following trees are unique elements.  Thus the comparison of another 
    element to these elements should be done on the pointer to these trees, 
    and not on their value.  */
@@ -69,7 +61,6 @@ extern tree chrec_fold_minus (tree, tree, tree);
 extern tree chrec_fold_multiply (tree, tree, tree);
 extern tree chrec_convert (tree, tree, tree);
 extern tree chrec_convert_aggressive (tree, tree);
-extern tree chrec_type (tree);
 
 /* Operations.  */
 extern tree chrec_apply (unsigned, tree, tree);
@@ -82,6 +73,7 @@ extern tree reset_evolution_in_loop (unsigned, tree, tree);
 extern tree chrec_merge (tree, tree);
 
 /* Observers.  */
+extern bool eq_evolutions_p (tree, tree);
 extern bool is_multivariate_chrec (tree);
 extern bool chrec_is_positive (tree, bool *);
 extern bool chrec_contains_symbols (tree);
@@ -105,6 +97,8 @@ build_polynomial_chrec (unsigned loop_num,
       || right == chrec_dont_know)
     return chrec_dont_know;
 
+  gcc_assert (TREE_TYPE (left) == TREE_TYPE (right));
+
   return build3 (POLYNOMIAL_CHREC, TREE_TYPE (left), 
                 build_int_cst (NULL_TREE, loop_num), left, right);
 }
@@ -207,4 +201,16 @@ no_evolution_in_loop_p (tree chrec, unsigned loop_num, bool *res)
   return true;
 }
 
+/* Returns the type of the chrec.  */
+
+static inline tree
+chrec_type (tree chrec)
+{
+  if (automatically_generated_chrec_p (chrec))
+    return NULL_TREE;
+
+  return TREE_TYPE (chrec);
+}
+
+
 #endif  /* GCC_TREE_CHREC_H  */