projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New still buggy version:
[libfirm]
/
ir
/
opt
/
gvn_pre.c
diff --git
a/ir/opt/gvn_pre.c
b/ir/opt/gvn_pre.c
index
5e35e27
..
798aa36
100644
(file)
--- a/
ir/opt/gvn_pre.c
+++ b/
ir/opt/gvn_pre.c
@@
-25,9
+25,7
@@
* @version $Id$
* @summary
*/
* @version $Id$
* @summary
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
#include "irflag.h"
#include "irdom.h"
#include "irflag.h"
#include "irdom.h"
@@
-829,7
+827,8
@@
void do_gvn_pre(ir_graph *irg)
/*
* Switch on GCSE. We need it to correctly compute
/*
* Switch on GCSE. We need it to correctly compute
- * the leader of a node by hashing.
+ * the value of a node, which is independent from
+ * its block.
*/
save_optimization_state(&state);
set_opt_global_cse(1);
*/
save_optimization_state(&state);
set_opt_global_cse(1);
@@
-837,7
+836,7
@@
void do_gvn_pre(ir_graph *irg)
DB((dbg, LEVEL_1, "Doing GVN-PRE for %+F\n", irg));
/* allocate block info for all blocks */
DB((dbg, LEVEL_1, "Doing GVN-PRE for %+F\n", irg));
/* allocate block info for all blocks */
- irg_walk_blkwise_
graph
(irg, NULL, topo_walker, &a_env);
+ irg_walk_blkwise_
dom_top_down
(irg, NULL, topo_walker, &a_env);
/* clean the exp_gen set. Doing this here saves the cleanup in the iteration. */
for (bl_info = a_env.list; bl_info != NULL; bl_info = bl_info->next) {
/* clean the exp_gen set. Doing this here saves the cleanup in the iteration. */
for (bl_info = a_env.list; bl_info != NULL; bl_info = bl_info->next) {
@@
-899,6
+898,5
@@
void do_gvn_pre(ir_graph *irg)
if (a_env.pairs) {
set_irg_outs_inconsistent(irg);
set_irg_loopinfo_inconsistent(irg);
if (a_env.pairs) {
set_irg_outs_inconsistent(irg);
set_irg_loopinfo_inconsistent(irg);
-
}
} /* do_gvn_pre */
}
} /* do_gvn_pre */