- loops in the graph will be marked as such, not only realizeable
- loops and recursions in the program. E.g., if the same funcion is
- called twice, there is a loop between the first funcion return and
- the second call. */
-void construct_ip_backedges(void);
+ loops in the graph will be marked as such, not only realizeable
+ loops and recursions in the program. E.g., if the same funcion is
+ called twice, there is a loop between the first function return and
+ the second call.
+ * @returns Maximal depth of loop tree. */
+int construct_ip_backedges(void);
+
+/* Construct loop tree only for control flow.
+ * @returns Maximal depth of loop tree. */
+int construct_cf_backedges(ir_graph *irg);
+int construct_ip_cf_backedges (void);
+
+/** Removes all loop information.
+ Resets all backedges */
+void free_loop_information(ir_graph *irg);
+void free_all_loop_information (void);
+
+
+
+
+/* ------------------------------------------------------------------- */
+/* Simple analyses based on the loop information */
+/* ------------------------------------------------------------------- */
+
+/** Test whether a value is loop invariant.
+ *
+ * @param n The node to be tested.
+ * @param block A block node.
+ *
+ * Returns true, if the node n is not changed in the loop block
+ * belongs to or in inner loops of this block. */
+int is_loop_invariant(ir_node *n, ir_node *block);
+