invalidate analyse info if loop unrolling take place
[libfirm] / ir / opt / ldstopt.c
index cd2ba7b..d792260 100644 (file)
@@ -35,7 +35,7 @@
 # include "iropt_dbg.h"
 # include "irflag_t.h"
 # include "array.h"
-# include "firmstat.h"
+# include "irhooks.h"
 
 #undef IMAX
 #define IMAX(a,b)      ((a) > (b) ? (a) : (b))
@@ -248,7 +248,7 @@ static entity *find_constant_entity(ir_node *ptr)
       entity *ent = get_Sel_entity(ptr);
       type *tp    = get_entity_owner(ent);
 
-      if (is_array_type(tp)) {
+      if (is_Array_type(tp)) {
         /* check bounds */
         int i, n;
 
@@ -270,9 +270,9 @@ static entity *find_constant_entity(ir_node *ptr)
           if (tlower == tarval_bad || tupper == tarval_bad)
             return NULL;
 
-          if (tarval_cmp(tv, tlower) & Lt)
+          if (tarval_cmp(tv, tlower) & pn_Cmp_Lt)
             return NULL;
-          if (tarval_cmp(tupper, tv) & Lt)
+          if (tarval_cmp(tupper, tv) & pn_Cmp_Lt)
             return NULL;
 
           /* ok, bounds check finished */