little cleanup
[libfirm] / ir / opt / ldstopt.c
index 5733efe..5e3fa51 100644 (file)
@@ -289,7 +289,7 @@ static entity *find_constant_entity(ir_node *ptr)
       entity *ent = get_Sel_entity(ptr);
       type *tp    = get_entity_owner(ent);
 
-      /* Do not fiddle about polymorphy. */
+      /* Do not fiddle with polymorphism. */
       if (is_Class_type(get_entity_owner(ent)) &&
           ((get_entity_n_overwrites(ent)    != 0) ||
            (get_entity_n_overwrittenby(ent) != 0)   ) )
@@ -430,7 +430,7 @@ static unsigned optimize_load(ir_node *load)
         type *s_type = get_entity_type(ent);
         type *a_type = get_Alloc_type(mem);
 
-        if (is_subclass_of(s_type, a_type)) {
+        if (is_SubClass_of(s_type, a_type)) {
           /* ok, condition met: there can't be an exception because
            * Alloc guarantees that enough memory was allocated */
 
@@ -464,7 +464,7 @@ static unsigned optimize_load(ir_node *load)
   }
 
   /* Load from a constant polymorphic field, where we can resolve
-     polymorphy. */
+     polymorphism. */
   new_node = transform_node_Load(load);
   if (new_node != load) {
     if (info->projs[pn_Load_M]) {
@@ -514,7 +514,7 @@ static unsigned optimize_load(ir_node *load)
         /* no result :-) */
         if (info->projs[pn_Load_res]) {
           if (is_atomic_entity(ent)) {
-            ir_node *c = copy_const_value(get_atomic_ent_value(ent));
+            ir_node *c = copy_const_value(get_irn_dbg_info(load), get_atomic_ent_value(ent));
 
             DBG_OPT_RC(load, c);
             exchange(info->projs[pn_Load_res], c);
@@ -552,7 +552,7 @@ static unsigned optimize_load(ir_node *load)
             res |= DF_CHANGED;
           }
           if (info->projs[pn_Load_res]) {
-            exchange(info->projs[pn_Load_res], copy_const_value(c));
+            exchange(info->projs[pn_Load_res], copy_const_value(get_irn_dbg_info(load), c));
             return res | DF_CHANGED;
           }
         }
@@ -920,7 +920,7 @@ static unsigned optimize_phi(ir_node *phi, void *env)
 }
 
 /**
- * walker, do the optiimizations
+ * walker, do the optimizations
  */
 static void do_load_store_optimize(ir_node *n, void *env)
 {
@@ -955,7 +955,7 @@ void optimize_load_store(ir_graph *irg)
   assert(get_irg_pinned(irg) != op_pin_state_floats &&
     "LoadStore optimization needs pinned graph");
 
-  if (!get_opt_redundant_LoadStore())
+  if (! get_opt_redundant_loadstore())
     return;
 
   obstack_init(&env.obst);