X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firdump.h;h=40a767fd37c5dc077e2ed0fca0e5aa10b514ff3a;hb=870b9f8c03b8103fd633346317a77b410ef69207;hp=e1c111753978b124061060815d86971f9073594d;hpb=d382d46d40faa79f071cf3eebd74fc47ad22b196;p=libfirm diff --git a/ir/ir/irdump.h b/ir/ir/irdump.h index e1c111753..40a767fd3 100644 --- a/ir/ir/irdump.h +++ b/ir/ir/irdump.h @@ -10,7 +10,6 @@ * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. */ - /** * @file irdump.h * @@ -28,14 +27,12 @@ * Most routines use the name of the passed entity as the name of the * file dumped to. */ +#ifndef _FIRM_IR_IRDUMP_H_ +#define _FIRM_IR_IRDUMP_H_ - -# ifndef _IRDUMP_H_ -# define _IRDUMP_H_ - -# include "irnode.h" -# include "irgraph.h" -# include "irloop.h" +#include "irnode.h" +#include "irgraph.h" +#include "irloop.h" /** * Names of the 32 supported colors @@ -151,6 +148,18 @@ void set_dump_node_edge_hook(DUMP_NODE_EDGE_FUNC func); */ DUMP_NODE_EDGE_FUNC get_dump_node_edge_hook(void); +/** + * Set the hook to be called to dump additional edges to a block. + * @param func The hook to be called. + */ +void set_dump_block_edge_hook(DUMP_NODE_EDGE_FUNC func); + +/** + * Get the additional block edge dump hook. + * @return The current additional block edge dump hook. + */ +DUMP_NODE_EDGE_FUNC get_dump_block_edge_hook(void); + /** Dump a firm graph. * * @param irg The firm graph to be dumped. @@ -510,11 +519,11 @@ void dump_entity (entity *ent); /** Write the type and all its attributes to the file passed. * */ -void dump_type_to_file (FILE *f, type *tp, dump_verbosity verbosity); +void dump_type_to_file (FILE *f, ir_type *tp, dump_verbosity verbosity); /** Write the type and all its attributes to stdout. * */ -void dump_type (type *tp); +void dump_type (ir_type *tp); /** Dump type information as text. @@ -644,4 +653,35 @@ void dump_pointer_values_to_info(int flag); */ void dump_ld_names(int flag); -# endif /* _IRDUMP_H_ */ +/** Dumps all graph anchor nodes, even if they + * are dead. + * + * This option is off per default. + */ +void dump_all_anchors(int flag); + +/** A node info dumper callback. */ +typedef void (dump_node_info_cb_t)(void *data, FILE *f, const ir_node *n); + +/** + * Adds a new node info dumper callback. It is possible to add an unlimited + * number of callbacks. The callbacks are called at the end of the default + * info dumper. + * + * @param cb the callback function to be called + * @param data a context parameter + * + * @return A callback handle. + * + * @note This functionality is only available, if Firm hooks are enabled (default). + */ +void *dump_add_node_info_callback(dump_node_info_cb_t *cb, void *data); + +/** + * Remove a previously added info dumper callback. + * + * @param handle the callback handle returned from dump_add_node_info_callback() + */ +void dump_remv_node_info_callback(void *handle); + +#endif /* _FIRM_IR_IRDUMP_H_ */