Commit 7813122b authored by Götz Lindenmaier's avatar Götz Lindenmaier
Browse files

firmstat added

[r3376]
parent 32a44b62
......@@ -47,7 +47,7 @@ CPPFLAGS += -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/common \
-I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/tr \
-I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/debug \
-I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/opt \
-I$(top_srcdir)/ir/st
-I$(top_srcdir)/ir/st -I$(top_srcdir)/ir/stat
LDFLAGS += -I$(topdir)
......@@ -68,7 +68,7 @@ FIRM_PATH_HEADERS=common/firm.h common/firm_common.h \
ir/ircons.h ir/ircgcons.h ir/irflag.h ir/irvrfy.h ir/irdump.h \
ir/iropt.h ir/irgopt.h ir/ircgopt.h \
ana/irouts.h ana/irdom.h ana/irloop.h ana/cgana.h \
ir/irgmod.h tr/typegmod.h opt/tailrec.h
ir/irgmod.h tr/typegmod.h opt/tailrec.h stat/firmstat.h
FIRM_SOURCE_DIR_HEADERS=$(addprefix $(SOURCE_DIR)/,$(FIRM_HEADERS))
......
......@@ -24,21 +24,19 @@
#include "cgana.h"
#include "rta.h"
#include "eset.h"
#include "pmap.h"
#include "array.h"
#include "irprog.h"
#include "irnode_t.h"
#include "irmode_t.h"
#include "irprog_t.h"
#include "irgwalk.h"
#include "ircons.h"
#include "irgmod.h"
#include "irnode_t.h"
#include "irflag_t.h"
#include "irmode_t.h"
#include "irflag_t.h"
#include "dbginfo_t.h"
#include "irdump.h"
#include "eset.h"
#include "pmap.h"
#include "array.h"
/* Eindeutige Adresse zur Markierung von besuchten Knoten und zur
* Darstellung der unbekannten Methode. */
......
......@@ -958,45 +958,6 @@ static void scc (ir_node *n) {
if (!is_outermost_Start(n)) {
int arity = get_irn_arity(n);
#if EXPERIMENTAL_LOOP_TREE
/* This is meant to be used with the experimenatl code above.
If the above code is not used any more, this can be deleted, too.... */
if(interprocedural_view &&
is_Block(n) &&
get_irn_op(get_irn_n(n, 0)) == op_Proj &&
get_irn_op(get_irn_n(get_irn_n(n, 0), 0)) == op_CallBegin)
{
/* We are at the start node of a function:
Walk to the callers in the correct order! */
DDMN(n);
DDMN(get_irn_n(get_irn_n(n, 0), 0));
for(i = 0; i < arity; i++)
{
int pred_nr;
ir_node *m;
pred_nr = search_endproj_in_stack(n);
assert(pred_nr >= 0);
if(is_backedge(n, pred_nr))
continue;
m = get_irn_n(n, pred_nr);
scc(m);
if (irn_is_in_stack(m)) {
/* Uplink of m is smaller if n->m is a backedge.
Propagate the uplink to mark the loop. */
if (get_irn_uplink(m) < get_irn_uplink(n))
set_irn_uplink(n, get_irn_uplink(m));
}
}
}
else
#endif
{
for (i = get_start_index(n); i < arity; i++) {
ir_node *m;
if (is_backedge(n, i)) continue;
......@@ -1011,7 +972,6 @@ static void scc (ir_node *n) {
}
}
}
}
if (get_irn_dfn(n) == get_irn_uplink(n)) {
/* This condition holds for
......@@ -1032,10 +992,8 @@ static void scc (ir_node *n) {
Next actions: Open a new loop on the loop tree and
try to find inner loops */
#define NO_LOOPS_WITHOUT_HEAD 1
#if NO_LOOPS_WITHOUT_HEAD
/* This is an adaption of the algorithm from fiasco / optscc to
* avoid loops without Block or Phi as first node. This should
* severely reduce the number of evaluations of nodes to detect
......@@ -1052,27 +1010,19 @@ static void scc (ir_node *n) {
l = current_loop;
close = 0;
}
#else
ir_loop *l = new_loop();
#endif
/* Remove the loop from the stack ... */
pop_scc_unmark_visit (n);
/* GL @@@ remove experimental stuff rem = find_irg_on_stack(tail); */
/* The current backedge has been marked, that is temporarily eliminated,
by find tail. Start the scc algorithm
anew on the subgraph thats left (the current loop without the backedge)
in order to find more inner loops. */
scc (tail);
/* GL @@@ remove experimental stuff current_ir_graph = rem; */
assert (irn_visited(n));
#if NO_LOOPS_WITHOUT_HEAD
if (close)
......@@ -1081,7 +1031,7 @@ static void scc (ir_node *n) {
}
else
{
/* AS: No loop head was found, that is we have straightline code.
/* No loop head was found, that is we have straightline code.
Pop all nodes from the stack to the current loop. */
pop_scc_to_loop(n);
}
......
......@@ -25,7 +25,7 @@
# include "irsimpletype.h"
# include "irnode_t.h"
# include "irprog.h"
# include "irprog_t.h"
# include "irgwalk.h"
# include "ident.h"
......
......@@ -34,7 +34,7 @@
#include <stddef.h>
#include "irgraph_t.h" /* for setting the state flag. */
#include "irprog.h"
#include "irprog_t.h"
#include "pmap.h"
/* ------------ The map. ---------------------------------------------- */
......
......@@ -27,7 +27,7 @@
#include <stdlib.h>
#include "irnode_t.h"
#include "irprog.h"
#include "irprog_t.h"
#include "eset.h"
#include "irgwalk.h"
......@@ -544,6 +544,9 @@ void rta_report (void)
/*
* $Log$
* Revision 1.21 2004/07/08 15:50:56 goetz
* firmstat added
*
* Revision 1.20 2004/07/08 11:17:40 goetz
* *** empty log message ***
*
......
......@@ -14,15 +14,18 @@
# include <config.h>
#endif
#include <string.h>
#include "firmwalk.h"
#include "pmap.h"
#include "entity.h"
#include "entity_t.h"
#include "irnode_t.h"
#include "irprog.h"
#include "irprog_t.h"
#include "irgwalk.h"
#include "array.h"
#include "obst.h"
#include <string.h>
#include "pmap.h"
/** obstack for firm walker */
static struct obstack fw_obst;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment