libFirm 1.20
libfirm/irdump.h File Reference

Write vcg representation of firm to file. More...

#include <stdio.h>
#include "firm_types.h"
#include "begin.h"
#include "end.h"

Go to the source code of this file.

Typedefs

typedef void(* ir_prog_dump_func )(FILE *out)
 type for dumpers that dump information about the whole program
typedef void(* ir_graph_dump_func )(FILE *out, ir_graph *graph)
 type for graph dumpers
typedef int(* dump_node_vcgattr_func )(FILE *out, const ir_node *node, const ir_node *local)
 This hook is called to dump the vcg attributes of a node to a file.
typedef int(* dump_edge_vcgattr_func )(FILE *out, const ir_node *node, int to)
 This hook is called to dump the vcg attributes of an edge to a file.
typedef void(* dump_node_edge_func )(FILE *out, const ir_node *node)
 This hook allows dumping of additional edges (it is called outside a node: {} environment)
typedef void( dump_node_info_cb_t )(void *data, FILE *out, const ir_node *n)
 A node info dumper callback.

Enumerations

enum  ir_dump_verbosity_t {
  dump_verbosity_onlynames = 0x00000001, dump_verbosity_fields = 0x00000002, dump_verbosity_methods = 0x00000004, dump_verbosity_nostatic = 0x00000040,
  dump_verbosity_typeattrs = 0x00000008, dump_verbosity_entattrs = 0x00000010, dump_verbosity_entconsts = 0x00000020, dump_verbosity_accessStats = 0x00000100,
  dump_verbosity_noClassTypes = 0x00001000, dump_verbosity_noStructTypes = 0x00002000, dump_verbosity_noUnionTypes = 0x00004000, dump_verbosity_noArrayTypes = 0x00008000,
  dump_verbosity_noPointerTypes = 0x00010000, dump_verbosity_noMethodTypes = 0x00020000, dump_verbosity_noPrimitiveTypes = 0x00040000, dump_verbosity_noEnumerationTypes = 0x00080000,
  dump_verbosity_onlyClassTypes = 0x000FE000, dump_verbosity_onlyStructTypes = 0x000FD000, dump_verbosity_onlyUnionTypes = 0x000FB000, dump_verbosity_onlyArrayTypes = 0x000F7000,
  dump_verbosity_onlyPointerTypes = 0x000EF000, dump_verbosity_onlyMethodTypes = 0x000DF000, dump_verbosity_onlyPrimitiveTypes = 0x000BF000, dump_verbosity_onlyEnumerationTypes = 0x0007F000,
  dump_verbosity_max = 0x4FF00FBE
}
 Verbosity for text dumpers. More...
enum  ir_dump_flags_t {
  ir_dump_flag_blocks_as_subgraphs = 1U << 0, ir_dump_flag_group_extbb = 1U << 1, ir_dump_flag_with_typegraph = 1U << 2, ir_dump_flag_disable_edge_labels = 1U << 3,
  ir_dump_flag_consts_local = 1U << 4, ir_dump_flag_idx_label = 1U << 5, ir_dump_flag_number_label = 1U << 6, ir_dump_flag_keepalive_edges = 1U << 7,
  ir_dump_flag_out_edges = 1U << 8, ir_dump_flag_dominance = 1U << 9, ir_dump_flag_loops = 1U << 10, ir_dump_flag_back_edges = 1U << 11,
  ir_dump_flag_analysed_types = 1U << 12, ir_dump_flag_iredges = 1U << 13, ir_dump_flag_node_addresses = 1U << 14, ir_dump_flag_all_anchors = 1U << 15,
  ir_dump_flag_show_marks = 1U << 16, ir_dump_flag_no_entity_values = 1U << 20, ir_dump_flag_ld_names = 1U << 21, ir_dump_flag_entities_in_hierarchy = 1U << 22
}
 A bitset indicating various options that affect what information is dumped and how exactly it is dumped. More...

Functions

void dump_ir_graph (ir_graph *graph, const char *suffix)
 Convenience interface for dumping a graph as vcg file.
void dump_ir_prog_ext (ir_prog_dump_func func, const char *suffix)
 Convenience interface for dumping the whole compilation-unit/program.
void dump_ir_graph_ext (ir_graph_dump_func func, ir_graph *graph, const char *suffix)
 Convenience interface for dumping graphs.
void dump_all_ir_graphs (const char *suffix)
 A walker that calls a dumper for each graph in the program.
void ir_set_dump_path (const char *path)
 Specifies output path for the dump_ir_graph function.
void ir_set_dump_filter (const char *name)
 Sets a prefix filter for output functions.
const char * ir_get_dump_filter (void)
 Returns the prefix filter set with ir_set_dump_filter.
int ir_should_dump (const char *name)
 Returns true if dump file filter is not set, or if it is a prefix of name.
ir_prog_pass_tdump_all_ir_graph_pass (const char *name, const char *suffix)
 Creates an ir_prog pass for dump_all_ir_graphs().
void dump_ir_graph_file (FILE *out, ir_graph *graph)
 Dumps all Firm nodes of a single graph for a single procedure in standard xvcg format.
void dump_cfg (FILE *out, ir_graph *graph)
 Dump the control flow graph of a procedure.
void dump_callgraph (FILE *out)
 Dump the call graph.
void dump_typegraph (FILE *out)
 Dumps all type information.
void dump_class_hierarchy (FILE *out)
 Dumps the class hierarchy with or without entities.
void dump_loop_tree (FILE *out, ir_graph *graph)
 Dump a standalone loop tree, which contains the loop nodes and the firm nodes belonging to one loop packed together in one subgraph.
void dump_callgraph_loop_tree (FILE *out)
 Dumps the loop tree over the call graph.
void dump_types_as_text (FILE *out)
 Dump type information as text.
void dump_globals_as_text (FILE *out)
 Dumps all global variables as text.
void dump_loop (FILE *out, ir_loop *loop)
 Dumps the firm nodes in the sub-loop-tree of loop to a vcg file.
void dump_graph_as_text (FILE *out, ir_graph *graph)
 Write the graph and all its attributes to the file passed.
void dump_entity_to_file (FILE *out, ir_entity *entity)
 Write the entity and all its attributes to the passed file.
void dump_type_to_file (FILE *out, ir_type *type)
 Write the type and all its attributes to the file passed.
void ir_set_dump_verbosity (ir_dump_verbosity_t verbosity)
 override currently set text dump flags with new ones
ir_dump_verbosity_t ir_get_dump_verbosity (void)
 return currently set text dump flags
void ir_set_dump_flags (ir_dump_flags_t flags)
 override currently set dump flags with new ones
void ir_add_dump_flags (ir_dump_flags_t flags)
 add flags to the currently set dump flags
void ir_remove_dump_flags (ir_dump_flags_t flags)
 disable certain dump flags
ir_dump_flags_t ir_get_dump_flags (void)
 return currently set dump flags
void set_dump_node_vcgattr_hook (dump_node_vcgattr_func hook)
 Sets the node_vcgattr hook.
void set_dump_edge_vcgattr_hook (dump_edge_vcgattr_func hook)
 Sets the edge_vcgattr hook.
void set_dump_node_edge_hook (dump_node_edge_func func)
 Sets the hook to be called to dump additional edges to a node.
dump_node_edge_func get_dump_node_edge_hook (void)
 Returns the additional edge dump hook.
void set_dump_block_edge_hook (dump_node_edge_func func)
 Sets the hook to be called to dump additional edges to a block.
dump_node_edge_func get_dump_block_edge_hook (void)
 Returns the additional block edge dump hook.
void * dump_add_node_info_callback (dump_node_info_cb_t *cb, void *data)
 Adds a new node info dumper callback.
void dump_remove_node_info_callback (void *handle)
 Remove a previously added info dumper callback.

Detailed Description

Write vcg representation of firm to file.

Author:
Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Hubert Schmidt Dump routines for the ir graph and all type information.

Definition in file irdump.h.