-extern bool simple_iv (struct loop *, tree, tree, affine_iv *, bool);
+/* Returns the basic block preceding LOOP or ENTRY_BLOCK_PTR when the
+ loop is function's body. */
+
+static inline basic_block
+block_before_loop (loop_p loop)
+{
+ edge preheader = loop_preheader_edge (loop);
+ return (preheader ? preheader->src : ENTRY_BLOCK_PTR);
+}
+
+/* Analyze all the parameters of the chrec that were left under a
+ symbolic form. LOOP is the loop in which symbolic names have to
+ be analyzed and instantiated. */
+
+static inline tree
+instantiate_parameters (struct loop *loop, tree chrec)
+{
+ return instantiate_scev (block_before_loop (loop), loop, chrec);
+}