X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fdata_flow_scalar_replace.c;h=7ee61be6fcc831812ca0df979f85b73ffc81c597;hb=8d256d64559a5ee81a207046862ef8b284590f1c;hp=a26c5eb5147a290a5402592649e7b81067b8be46;hpb=eb08138c6b80c169945568e4414f491a9bc20388;p=libfirm diff --git a/ir/opt/data_flow_scalar_replace.c b/ir/opt/data_flow_scalar_replace.c index a26c5eb51..7ee61be6f 100644 --- a/ir/opt/data_flow_scalar_replace.c +++ b/ir/opt/data_flow_scalar_replace.c @@ -17,25 +17,20 @@ * PURPOSE. */ -/* - * Project: libFIRM - * File name: ir/opt/data_flow_scalar_replace.c - * Purpose: scalar replacement of arrays and compounds - * Author: Beyhan Veliev - * Modified by: Michael Beck - * Created: - * CVS-ID: $Id$ - * Copyright: (c) 1998-2005 Universität Karlsruhe +/** + * @file + * @brief scalar replacement of arrays and compounds + * @author Beyhan Veliev, Michael Beck + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#ifdef HAVE_STRING_H +#include "iroptimize.h" + #include -#endif -#include "data_flow_scalar_replace.h" #include "irflag_t.h" #include "irouts.h" #include "pset.h" @@ -140,6 +135,7 @@ static int ent_leaves_t_cmp(const void *elt, const void *key, size_t size) { const ent_leaves_t *c1 = elt; const ent_leaves_t *c2 = key; + (void) size; return c1->ent != c2->ent; } @@ -166,6 +162,7 @@ static int sels_cmp(const void *elt, const void *key, size_t size) { const sels_t *c1 = elt; const sels_t *c2 = key; + (void) size; return c1->sel != c2->sel; } @@ -192,6 +189,7 @@ static int call_cmp(const void *elt, const void *key, size_t size) { const call_access_t *c1 = elt; const call_access_t *c2 = key; + (void) size; return c1->call != c2->call; } @@ -205,6 +203,7 @@ static int path_cmp(const void *elt, const void *key, size_t size) { const path_t *p1 = elt; const path_t *p2 = key; + (void) size; /* we can use memcmp here, because identical tarvals should have identical addresses */ return memcmp(p1->path, p2->path, p1->path_len * sizeof(p1->path[0])); @@ -245,7 +244,7 @@ static int is_const_sel(ir_node *sel) { * Returns non-zero, if the address of an entity * represented by a Sel node (or it's successor Sels) is taken. */ -static int is_address_taken(ir_node *sel) +static int is_address_taken_2(ir_node *sel) { int i; @@ -268,7 +267,7 @@ static int is_address_taken(ir_node *sel) case iro_Sel: { /* Check the Sel successor of Sel */ - int res = is_address_taken(succ); + int res = is_address_taken_2(succ); if (res) return 1; @@ -399,7 +398,7 @@ static int find_possible_replacements(ir_graph *irg) /* we can handle arrays, structs and atomic types yet */ if (is_Array_type(ent_type) || is_Struct_type(ent_type) || is_atomic_type(ent_type)) { - if (is_address_taken(succ)) { + if (is_address_taken_2(succ)) { if (get_entity_link(ent)) /* killing one */ --res; set_entity_link(ent, ADDRESS_TAKEN);