libFirm
dbginfo.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5 
12 #ifndef FIRM_DEBUG_DBGINFO_H
13 #define FIRM_DEBUG_DBGINFO_H
14 
15 #include <stddef.h>
16 
17 #include "firm_types.h"
18 #include "begin.h"
19 
45 typedef enum {
46  dbg_error = 0,
73 } dbg_action;
74 
80 FIRM_API const char *dbg_action_2_str(dbg_action a);
81 
91 typedef void merge_pair_func(ir_node *new_node, ir_node *old_node, dbg_action action);
92 
104 typedef void merge_sets_func(ir_node *const *new_node_array,
105  int new_num_entries,
106  ir_node *const *old_node_array,
107  int old_num_entries, dbg_action action);
108 
132 FIRM_API void dbg_init(merge_pair_func *dbg_info_merge_pair,
133  merge_sets_func *dbg_info_merge_sets);
134 
136 typedef struct src_loc_t {
137  char const *file;
138  unsigned line;
139  unsigned column;
140 } src_loc_t;
141 
149 typedef src_loc_t (*retrieve_dbg_func)(dbg_info const *dbg);
150 
156 FIRM_API void ir_set_debug_retrieve(retrieve_dbg_func func);
157 
163 typedef void (*retrieve_type_dbg_func)(char *buffer, size_t buffer_size,
164  const type_dbg_info *tdbgi);
165 
170 
174 FIRM_API src_loc_t ir_retrieve_dbg_info(dbg_info const *dbg);
175 
179 FIRM_API void ir_retrieve_type_dbg_info(char *buffer, size_t buffer_size,
180  const type_dbg_info *tdbgi);
181 
184 #include "end.h"
185 
186 #endif
A Firm subgraph was replaced because of a read a constant optimization.
Definition: dbginfo.h:64
void ir_retrieve_type_dbg_info(char *buffer, size_t buffer_size, const type_dbg_info *tdbgi)
Retrieve type debug info.
A Firm node was replaced due to common subexpression elimination.
Definition: dbginfo.h:50
unsigned line
line number (starting at 1; 0 if unknown)
Definition: dbginfo.h:138
void dbg_init(merge_pair_func *dbg_info_merge_pair, merge_sets_func *dbg_info_merge_sets)
Initializes the debug support.
struct type_dbg_info type_dbg_info
Source Type Reference.
Definition: firm_types.h:43
unsigned column
column number (starting at 1; 0 if unknown)
Definition: dbginfo.h:139
A Firm node was replace because of the jumpthreading algorithm.
Definition: dbginfo.h:70
void ir_set_type_debug_retrieve(retrieve_type_dbg_func func)
Sets global print_type_dbg_info function in firm.
A Firm node was replace because of the GVN-PRE algorithm.
Definition: dbginfo.h:68
A Firm subgraph was replaced because of a write after read optimization.
Definition: dbginfo.h:58
A Firm subgraph was replaced by a single, existing block.
Definition: dbginfo.h:51
A Firm node was replace because of the combo algorithm.
Definition: dbginfo.h:69
struct dbg_info dbg_info
Source Reference.
Definition: firm_types.h:40
void merge_pair_func(ir_node *new_node, ir_node *old_node, dbg_action action)
The type of the debug info merge function.
Definition: dbginfo.h:91
const char * dbg_action_2_str(dbg_action a)
Converts a debug_action into a string.
A Firm subgraph was replaced because of a write after write optimization.
Definition: dbginfo.h:56
void ir_set_debug_retrieve(retrieve_dbg_func func)
Sets a debug info retriever.
void merge_sets_func(ir_node *const *new_node_array, int new_num_entries, ir_node *const *old_node_array, int old_num_entries, dbg_action action)
The type of the debug info merge sets function.
Definition: dbginfo.h:104
Removal of unnecessary auxiliary nodes.
Definition: dbginfo.h:48
char const * file
the name of the source (usually a file)
Definition: dbginfo.h:137
src_loc_t(* retrieve_dbg_func)(dbg_info const *dbg)
The type of the debug info retriever function.
Definition: dbginfo.h:149
The control flow of an if is changed as either the else, the then or both blocks are empty...
Definition: dbginfo.h:52
A Firm subgraph was replace because of a Confirmation.
Definition: dbginfo.h:67
A sourcecode location.
Definition: dbginfo.h:136
A Firm subgraph was replaced because of a read after write optimization.
Definition: dbginfo.h:60
void(* retrieve_type_dbg_func)(char *buffer, size_t buffer_size, const type_dbg_info *tdbgi)
The type of the type debug info retrieve function.
Definition: dbginfo.h:163
A Firm subgraph was replaced because of an algebraic simplification.
Definition: dbginfo.h:54
Maximum value.
Definition: dbginfo.h:72
dbg_action
An enumeration indicating the action performed by a transformation.
Definition: dbginfo.h:45
A Firm subgraph was replaced because of a Backend transformation.
Definition: dbginfo.h:71
Removing unreachable code, i.e.
Definition: dbginfo.h:66
struct ir_node ir_node
Procedure Graph Node.
Definition: firm_types.h:53
src_loc_t ir_retrieve_dbg_info(dbg_info const *dbg)
Retrieve the debug info.
A Firm subgraph was evaluated to a single constant.
Definition: dbginfo.h:49
Optimization of the SSA representation, e.g.
Definition: dbginfo.h:47
A Firm subgraph was replaced because of a read after read optimization.
Definition: dbginfo.h:62