# 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;
else
{
/* add this node to block's node list */
- ir_node *block = get_nodes_Block(irn);
+ ir_node *block = get_nodes_block(irn);
data = fw_get_data(block);
ARR_APP1(ir_node *, FW_GET_DATA_LIST(data), irn);
}
/* call block as prefix ir node */
if ((wif->do_node) &&
- (wif->flags & FW_DUMP_BLOCK_AS_IRN & !FW_DUMP_IRN_IN_PREFIX))
+ (wif->flags & (FW_DUMP_BLOCK_AS_IRN | FW_DUMP_IRN_IN_PREFIX)))
wif->do_node(block, wif->env);
/* do ir nodes in prefix or postfix order? */
}
/* call block as postfix ir node */
if ((wif->do_node) &&
- (wif->flags & (FW_DUMP_BLOCK_AS_IRN | FW_DUMP_IRN_IN_PREFIX)))
+ ((wif->flags & (FW_DUMP_BLOCK_AS_IRN | FW_DUMP_IRN_IN_PREFIX))
+ == FW_DUMP_BLOCK_AS_IRN))
wif->do_node(block, wif->env);
/* wall over all block's ir nodes nested end =============== */
- if (wif->do_block_finalize) wif->do_block_finalize(current_ir_graph, wif->env);
+ if(wif->do_block_post)
+ wif->do_block_post(block, wif->env);
+
} /* for each block */
+ if (wif->do_block_finalize)
+ wif->do_block_finalize(current_ir_graph, wif->env);
+
/* walk over all irg's block nested end ====================== */
+ if(wif->do_graph_post)
+ wif->do_graph_post(current_ir_graph, wif->env);
} /* for each ir graph irg */
- if (wif->do_graph_finalize) wif->do_graph_finalize(wif->env);
+
+ if(wif->do_graph_finalize)
+ wif->do_graph_finalize(wif->env);
/** ### ToDo: Dump const_code_irg ?? No! Dump const code with entities, types etc. */