libFirm
Convenience Interface

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

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().

Detailed Description

Typedef Documentation

typedef void(* ir_graph_dump_func)(FILE *out, ir_graph *graph)

type for graph dumpers

Definition at line 84 of file irdump.h.

typedef void(* ir_prog_dump_func)(FILE *out)

type for dumpers that dump information about the whole program

Definition at line 64 of file irdump.h.

Function Documentation

ir_prog_pass_t* dump_all_ir_graph_pass ( const char *  name,
const char *  suffix 
)

Creates an ir_prog pass for dump_all_ir_graphs().

Parameters
namethe name of this pass or NULL
suffixA suffix for the file name.
Returns
the newly created ir_prog pass
void dump_all_ir_graphs ( const char *  suffix)

A walker that calls a dumper for each graph in the program.

Parameters
suffixA suffix for the file name.
void dump_ir_graph ( ir_graph graph,
const char *  suffix 
)

Convenience interface for dumping a graph as vcg file.

For details on how the filename is constructed see dump_ir_graph_ext

void dump_ir_graph_ext ( ir_graph_dump_func  func,
ir_graph graph,
const char *  suffix 
)

Convenience interface for dumping graphs.

The filename is constructed by combining a counter, the name of the graphs entity and the given suffix. The file-extensions is determined by looking at mime_type. The file is stored into the directory specified by ir_set_dump_path

Parameters
funcDumper. Usually one of dump_cfg, dump_loop_tree, dump_ir_graph_file
graphthe graph to dump
suffixsuffix
void dump_ir_prog_ext ( ir_prog_dump_func  func,
const char *  suffix 
)

Convenience interface for dumping the whole compilation-unit/program.

The filename is constructed by combining a counter, the name of the current ir_prog and the given suffix. The file-extensions is determined by looking at mime_type. The file is stored into the directory specified by ir_set_dump_path

Parameters
funcDumper. Usually one of dump_callgraph, dump_typegraph, dump_class_hierarchy, dump_types_as_text, dump_globals_as_text
suffixSuffix to append to the name
const char* ir_get_dump_filter ( void  )

Returns the prefix filter set with ir_set_dump_filter.

void ir_set_dump_filter ( const char *  name)

Sets a prefix filter for output functions.

All graph dumpers check this name. If the name is != "" and not a prefix of the graph to be dumped, the dumper does not dump the graph.

Parameters
nameThe prefix of the name of the method entity to be dumped.
void ir_set_dump_path ( const char *  path)

Specifies output path for the dump_ir_graph function.

int ir_should_dump ( const char *  name)

Returns true if dump file filter is not set, or if it is a prefix of name.