projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed some obviously wrong conditions.
[libfirm]
/
ir
/
opt
/
return.c
diff --git
a/ir/opt/return.c
b/ir/opt/return.c
index
796baeb
..
55bde8a
100644
(file)
--- a/
ir/opt/return.c
+++ b/
ir/opt/return.c
@@
-30,6
+30,7
@@
#include "ircons_t.h"
#include "irnode_t.h"
#include "irgmod.h"
#include "ircons_t.h"
#include "irnode_t.h"
#include "irgmod.h"
+#include "irpass.h"
#define set_bit(n) (returns[(n) >> 3] |= 1 << ((n) & 7))
#define get_bit(n) (returns[(n) >> 3] & (1 << ((n) & 7)))
#define set_bit(n) (returns[(n) >> 3] |= 1 << ((n) & 7))
#define get_bit(n) (returns[(n) >> 3] & (1 << ((n) & 7)))
@@
-166,6
+167,12
@@
void normalize_one_return(ir_graph *irg) {
set_irg_loopinfo_inconsistent(irg);
}
set_irg_loopinfo_inconsistent(irg);
}
+/* Create a graph pass. */
+ir_graph_pass_t *normalize_one_return_pass(const char *name)
+{
+ return def_graph_pass(name ? name : "one_ret", normalize_one_return);
+}
+
/**
* Check, whether a Return can be moved on block upwards.
*
/**
* Check, whether a Return can be moved on block upwards.
*
@@
-373,3
+380,9
@@
void normalize_n_returns(ir_graph *irg) {
set_irg_outs_inconsistent(irg);
set_irg_loopinfo_inconsistent(current_ir_graph);
}
set_irg_outs_inconsistent(irg);
set_irg_loopinfo_inconsistent(current_ir_graph);
}
+
+/* Create a graph pass. */
+ir_graph_pass_t *normalize_n_returns_pass(const char *name)
+{
+ return def_graph_pass(name ? name : "n_rets", normalize_n_returns);
+}