libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
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,
74 } dbg_action;
75 
81 FIRM_API const char *dbg_action_2_str(dbg_action a);
82 
92 typedef void merge_pair_func(ir_node *new_node, ir_node *old_node, dbg_action action);
93 
105 typedef void merge_sets_func(ir_node *const *new_node_array,
106  int new_num_entries,
107  ir_node *const *old_node_array,
108  int old_num_entries, dbg_action action);
109 
133 FIRM_API void dbg_init(merge_pair_func *dbg_info_merge_pair,
134  merge_sets_func *dbg_info_merge_sets);
135 
137 typedef struct src_loc_t {
138  char const *file;
139  unsigned line;
140  unsigned column;
141 } src_loc_t;
142 
150 typedef src_loc_t (*retrieve_dbg_func)(dbg_info const *dbg);
151 
157 FIRM_API void ir_set_debug_retrieve(retrieve_dbg_func func);
158 
164 typedef void (*retrieve_type_dbg_func)(char *buffer, size_t buffer_size,
165  const type_dbg_info *tdbgi);
166 
171 
175 FIRM_API src_loc_t ir_retrieve_dbg_info(dbg_info const *dbg);
176 
180 FIRM_API void ir_retrieve_type_dbg_info(char *buffer, size_t buffer_size,
181  const type_dbg_info *tdbgi);
182 
185 #include "end.h"
186 
187 #endif
void ir_set_debug_retrieve(retrieve_dbg_func func)
Sets a debug info retriever.
A Firm subgraph was replaced because of a Backend transformation.
Definition: dbginfo.h:72
struct dbg_info dbg_info
Source Reference.
Definition: firm_types.h:40
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 evaluated to a single constant.
Definition: dbginfo.h:49
A Firm subgraph was replaced because of an algebraic simplification.
Definition: dbginfo.h:54
A Firm subgraph was replaced because of a write after write optimization.
Definition: dbginfo.h:56
Removal of unnecessary auxiliary nodes.
Definition: dbginfo.h:48
A Firm node was replace because of the combo algorithm.
Definition: dbginfo.h:70
unsigned line
line number (starting at 1; 0 if unknown)
Definition: dbginfo.h:139
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:105
A Firm subgraph was replaced because of a read after write optimization.
Definition: dbginfo.h:60
char const * file
the name of the source (usually a file)
Definition: dbginfo.h:138
struct type_dbg_info type_dbg_info
Source Type Reference.
Definition: firm_types.h:43
void ir_retrieve_type_dbg_info(char *buffer, size_t buffer_size, const type_dbg_info *tdbgi)
Retrieve type debug info.
A Firm subgraph was replaced by a single, existing block.
Definition: dbginfo.h:51
A Firm subgraph was replaced because of a read a constant optimization.
Definition: dbginfo.h:64
Removing unreachable code, i.e.
Definition: dbginfo.h:67
A Firm subgraph was replaced because of a read after read optimization.
Definition: dbginfo.h:62
Remove polymorphic call.
Definition: dbginfo.h:66
src_loc_t(* retrieve_dbg_func)(dbg_info const *dbg)
The type of the debug info retriever function.
Definition: dbginfo.h:150
const char * dbg_action_2_str(dbg_action a)
Converts a debug_action into a string.
void dbg_init(merge_pair_func *dbg_info_merge_pair, merge_sets_func *dbg_info_merge_sets)
Initializes the debug support.
A Firm subgraph was replace because of a Confirmation.
Definition: dbginfo.h:68
void ir_set_type_debug_retrieve(retrieve_type_dbg_func func)
Sets global print_type_dbg_info function in firm.
A Firm node was replaced due to common subexpression elimination.
Definition: dbginfo.h:50
src_loc_t ir_retrieve_dbg_info(dbg_info const *dbg)
Retrieve the debug info.
Maximum value.
Definition: dbginfo.h:73
unsigned column
column number (starting at 1; 0 if unknown)
Definition: dbginfo.h:140
Optimization of the SSA representation, e.g.
Definition: dbginfo.h:47
A Firm node was replace because of the GVN-PRE algorithm.
Definition: dbginfo.h:69
A Firm node was replace because of the jumpthreading algorithm.
Definition: dbginfo.h:71
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:164
dbg_action
An enumeration indicating the action performed by a transformation.
Definition: dbginfo.h:45
struct ir_node ir_node
Procedure Graph Node.
Definition: firm_types.h:53
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:92
A sourcecode location.
Definition: dbginfo.h:137
A Firm subgraph was replaced because of a write after read optimization.
Definition: dbginfo.h:58