projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clarify some node comments
[libfirm]
/
ir
/
opt
/
gvn_pre.c
diff --git
a/ir/opt/gvn_pre.c
b/ir/opt/gvn_pre.c
index
e6702a2
..
56229ef
100644
(file)
--- a/
ir/opt/gvn_pre.c
+++ b/
ir/opt/gvn_pre.c
@@
-22,7
+22,6
@@
* @brief Global Value Numbering Partial Redundancy Elimination
* (VanDrunen Hosking 2004)
* @author Michael Beck
* @brief Global Value Numbering Partial Redundancy Elimination
* (VanDrunen Hosking 2004)
* @author Michael Beck
- * @version $Id$
* @brief
*/
#include "config.h"
* @brief
*/
#include "config.h"
@@
-36,7
+35,7
@@
#include "ircons.h"
#include "irgmod.h"
#include "valueset.h"
#include "ircons.h"
#include "irgmod.h"
#include "valueset.h"
-#include "irnodemap.h"
+#include "irnode
hash
map.h"
#include "irnodeset.h"
#include "iredges.h"
#include "iropt_dbg.h"
#include "irnodeset.h"
#include "iredges.h"
#include "iropt_dbg.h"
@@
-83,7
+82,7
@@
typedef struct pre_env {
char first_iter; /**< non-zero for first iteration */
} pre_env;
char first_iter; /**< non-zero for first iteration */
} pre_env;
-static ir_nodemap_t value_map;
+static ir_node
hash
map_t value_map;
/** The debug module handle. */
DEBUG_ONLY(static firm_dbg_module_t *dbg;)
/** The debug module handle. */
DEBUG_ONLY(static firm_dbg_module_t *dbg;)
@@
-124,7
+123,7
@@
static ir_node *add(ir_node *e, ir_node *v)
}
}
v = identify_remember(v);
}
}
v = identify_remember(v);
- ir_nodemap_insert(&value_map, e, v);
+ ir_node
hash
map_insert(&value_map, e, v);
return v;
} /* add */
return v;
} /* add */
@@
-138,7
+137,7
@@
static ir_node *add(ir_node *e, ir_node *v)
*/
static ir_node *lookup(ir_node *e)
{
*/
static ir_node *lookup(ir_node *e)
{
- ir_node *value = (ir_node*)ir_nodemap_get(&value_map, e);
+ ir_node *value = (ir_node*)ir_node
hash
map_get(&value_map, e);
if (value != NULL)
return identify_remember(value);
return NULL;
if (value != NULL)
return identify_remember(value);
return NULL;
@@
-193,7
+192,7
@@
static int is_nice_value(ir_node *n)
if (!mode_is_data(mode)) {
if (! is_Div(n) && ! is_Mod(n))
return 0;
if (!mode_is_data(mode)) {
if (! is_Div(n) && ! is_Mod(n))
return 0;
- if (! is_NoMem(get_
fragile_
op_mem(n)))
+ if (! is_NoMem(get_
mem
op_mem(n)))
return 0;
}
return 1;
return 0;
}
return 1;
@@
-806,7
+805,7
@@
void do_gvn_pre(ir_graph *irg)
edges_deactivate(irg);
new_identities(irg);
edges_deactivate(irg);
new_identities(irg);
- ir_nodemap_init(&value_map);
+ ir_node
hash
map_init(&value_map);
obstack_init(&obst);
a_env.obst = &obst;
obstack_init(&obst);
a_env.obst = &obst;
@@
-885,7
+884,7
@@
void do_gvn_pre(ir_graph *irg)
if (bl_info->new_set)
ir_valueset_del(bl_info->new_set);
}
if (bl_info->new_set)
ir_valueset_del(bl_info->new_set);
}
- ir_nodemap_destroy(&value_map);
+ ir_node
hash
map_destroy(&value_map);
obstack_free(&obst, NULL);
/* pin the graph again: This is needed due to the use of set_opt_global_cse(1) */
obstack_free(&obst, NULL);
/* pin the graph again: This is needed due to the use of set_opt_global_cse(1) */