* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
+#endif
+
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
#endif
#include <assert.h>
#include "irflag.h"
#include "firmstat.h"
+static int n_opt_applications = 0;
+
/**
* the environment for colelcting data
*/
if (! n_tail_calls)
return;
+ if (get_opt_tail_recursion_verbose() && get_firm_verbosity() > 1)
+ printf(" Performing tail recursion for graph %s and %d Calls\n",
+ get_entity_ld_name(get_irg_entity(irg)), n_tail_calls);
+ n_opt_applications++;
+
do_opt_tail_rec(irg, rets, n_tail_calls);
}
if (! get_opt_tail_recursion() || ! get_opt_optimize())
return;
+ n_opt_applications = 0;
+
for (i = 0; i < get_irp_n_irgs(); i++) {
current_ir_graph = get_irp_irg(i);
opt_tail_rec_irg(current_ir_graph);
}
+
+ if (get_opt_tail_recursion_verbose())
+ printf("Performed tail recursion for %d of %d graphs\n", n_opt_applications, get_irp_n_irgs());
}