little cleanup
[libfirm] / ir / opt / funccall.c
index 1002450..bc47dc8 100644 (file)
@@ -66,8 +66,12 @@ static void rem_mem_from_const_fkt_calls(ir_node *node, void *env)
         return;
       for (i = 0; i < n_callees; ++i) {
         ent = get_Call_callee(call, i);
+        if (ent == unknown_entity) {
+          /* we don't know which entity is called here */
+          return;
+        }
         if ((get_entity_additional_properties(ent) & mtp_property_const) == 0)
-               return;
+          return;
       }
       ++ctx->n_calls_removed_Sel;
     }
@@ -122,7 +126,7 @@ void optimize_funccalls(int force_run)
   int change;
   unsigned num_pure = 0;
 
-  if (! get_opt_real_func_call())
+  if (! get_opt_real_function_call())
     return;
 
   /* first step: detect, which functions are const, i.e. do NOT touch any memory */