- more irp_resource_reserved()
[libfirm] / ir / ana / rta.c
index d323592..7964fa8 100644 (file)
@@ -24,9 +24,7 @@
  * @version  09.06.2002
  * @version  $Id$
  */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
 
 #include "rta.h"
 
@@ -353,7 +351,7 @@ static void force_description (ir_entity *ent, ir_entity *addr)
       ir_node *f_addr = get_atomic_ent_value (over);
       ir_entity *impl_ent = get_SymConst_entity (f_addr);
 
-      assert ((get_irn_op(f_addr) == op_SymConst) && "can't do complex addrs");
+      assert(is_SymConst(f_addr) && "can't do complex addrs");
       if (impl_ent == addr) {
         assert (0 && "gibt's denn sowas");
         force_description (over, addr);
@@ -451,10 +449,10 @@ void rta_init (int do_verbose)
  * Changes the peculiarity of entities that represents
  * dead graphs to peculiarity_description.
  */
-static void make_entity_to_description(type_or_ent *tore, void *env) {
+static void make_entity_to_description(type_or_ent tore, void *env) {
   (void) env;
-  if (get_kind(tore) == k_entity) {
-    ir_entity *ent = (ir_entity *)tore;
+  if (is_entity(tore.ent)) {
+    ir_entity *ent = tore.ent;
 
     if ((is_Method_type(get_entity_type(ent)))                        &&
         (get_entity_peculiarity(ent) != peculiarity_description)      &&
@@ -482,7 +480,7 @@ void rta_delete_dead_graphs (void)
   int rem_vpi = get_visit_pseudo_irgs();
   set_visit_pseudo_irgs(1);
 
-  dead_graphs = xmalloc(sizeof(*dead_graphs) * get_irp_n_irgs());
+  dead_graphs = XMALLOCN(ir_graph*, get_irp_n_irgs());
 
   for (i = 0; i < n_graphs; i++) {
     graph = get_irp_irg(i);