projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup space generation logic and make it more robust for union constructs
[libfirm]
/
ir
/
opt
/
gvn_pre.c
diff --git
a/ir/opt/gvn_pre.c
b/ir/opt/gvn_pre.c
index
927cc4b
..
87b0725
100644
(file)
--- a/
ir/opt/gvn_pre.c
+++ b/
ir/opt/gvn_pre.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1995-200
7
University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-200
8
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
*
* This file is part of libFirm.
*
@@
-25,13
+25,15
@@
* @version $Id$
* @summary
*
* @version $Id$
* @summary
*
- * Currently completely broken because our s
tes s
o NOT preserve
+ * Currently completely broken because our s
ets d
o NOT preserve
* the topological sort!
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
* the topological sort!
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#include "iroptimize.h"
+
#include <assert.h>
#include "irgraph_t.h"
#include <assert.h>
#include "irgraph_t.h"
@@
-47,7
+49,6
@@
#include "ircons.h"
#include "irgmod.h"
#include "debug.h"
#include "ircons.h"
#include "irgmod.h"
#include "debug.h"
-#include "gvn_pre.h"
#include "xmalloc.h"
/** The debug module handle. */
#include "xmalloc.h"
/** The debug module handle. */
@@
-180,6
+181,7
@@
static int value_cmp(const void *elt, const void *key, size_t size)
{
const value_entry *e1 = elt;
const value_entry *e2 = key;
{
const value_entry *e1 = elt;
const value_entry *e2 = key;
+ (void) size;
return identities_cmp(e1->value, e2->value);
}
return identities_cmp(e1->value, e2->value);
}
@@
-444,10
+446,12
@@
static ir_node *translate(ir_node *node, ir_node *block, int pos, pre_env *env)
node might depend on that. */
copy_node_attr(node, nn);
res = node_add(env->trans_set, nn);
node might depend on that. */
copy_node_attr(node, nn);
res = node_add(env->trans_set, nn);
- if (nn != res)
+ if (nn != res)
{
obstack_free(env->obst, nn);
obstack_free(env->obst, nn);
- else
+ } else {
DB((dbg, LEVEL_2, "--> Translate %+F in <%+F,%d> into %+F\n", node, block, pos, res));
DB((dbg, LEVEL_2, "--> Translate %+F in <%+F,%d> into %+F\n", node, block, pos, res));
+ }
+
return res;
}
return node;
return res;
}
return node;
@@
-791,8
+795,9
@@
static void insert_nodes(ir_node *block, void *ctx)
value_set_foreach(entry, idom_info->new_set) {
updated |= value_add_or_replace(curr_info->avail_out, entry->node, entry->value);
}
value_set_foreach(entry, idom_info->new_set) {
updated |= value_add_or_replace(curr_info->avail_out, entry->node, entry->value);
}
- if (updated)
+ if (updated)
{
dump_value_set(curr_info->avail_out, "Updated [Avail_out]", block);
dump_value_set(curr_info->avail_out, "Updated [Avail_out]", block);
+ }
if (arity <= 1)
return;
if (arity <= 1)
return;