projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more debug info
[libfirm]
/
ir
/
opt
/
tailrec.c
diff --git
a/ir/opt/tailrec.c
b/ir/opt/tailrec.c
index
55ea68a
..
32f7e3e
100644
(file)
--- a/
ir/opt/tailrec.c
+++ b/
ir/opt/tailrec.c
@@
-34,7
+34,7
@@
#include "debug.h"
#include "iroptimize.h"
#include "scalar_replace.h"
#include "debug.h"
#include "iroptimize.h"
#include "scalar_replace.h"
-#include "array.h"
+#include "array
_t
.h"
#include "irprog_t.h"
#include "irgwalk.h"
#include "irgmod.h"
#include "irprog_t.h"
#include "irgwalk.h"
#include "irgmod.h"
@@
-47,7
+47,6
@@
#include "irouts.h"
#include "irhooks.h"
#include "ircons_t.h"
#include "irouts.h"
#include "irhooks.h"
#include "ircons_t.h"
-#include "xmalloc.h"
DEBUG_ONLY(static firm_dbg_module_t *dbg);
DEBUG_ONLY(static firm_dbg_module_t *dbg);
@@
-78,7
+77,7
@@
static void collect_data(ir_node *node, void *env) {
if (op == op_Proj) {
ir_node *start = get_Proj_pred(pred);
if (op == op_Proj) {
ir_node *start = get_Proj_pred(pred);
- if (
get_irn_op(start) == op_Start
) {
+ if (
is_Start(start)
) {
if (get_Proj_proj(pred) == pn_Start_T_args) {
/* found Proj(ProjT(Start)) */
set_irn_link(node, data->proj_data);
if (get_Proj_proj(pred) == pn_Start_T_args) {
/* found Proj(ProjT(Start)) */
set_irn_link(node, data->proj_data);
@@
-719,10
+718,11
@@
void opt_tail_recursion(void) {
current_ir_graph = irg;
current_ir_graph = irg;
-
set_using_irn_link(irg
);
+
ir_reserve_resources(irg, IR_RESOURCE_IRN_LINK
);
if (opt_tail_rec_irg(irg))
++n_opt_applications;
if (opt_tail_rec_irg(irg))
++n_opt_applications;
- clear_using_irn_link(irg);
+
+ ir_free_resources(irg, IR_RESOURCE_IRN_LINK);
}
DB((dbg, LEVEL_1, "Performed tail recursion for %d of %d graphs\n",
}
DB((dbg, LEVEL_1, "Performed tail recursion for %d of %d graphs\n",