libFirm
Loading...
Searching...
No Matches
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#include "firm_types.h"
17
18#include "begin.h"
19
74
80FIRM_API const char *dbg_action_2_str(dbg_action a);
81
91typedef void merge_pair_func(ir_node *new_node, ir_node *old_node, dbg_action action);
92
104typedef 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
132FIRM_API void dbg_init(merge_pair_func *dbg_info_merge_pair,
133 merge_sets_func *dbg_info_merge_sets);
134
136typedef struct src_loc_t {
137 char const *file;
138 unsigned line;
139 unsigned column;
140} src_loc_t;
141
149typedef src_loc_t (*retrieve_dbg_func)(dbg_info const *dbg);
150
157
163typedef void (*retrieve_type_dbg_func)(char *buffer, size_t buffer_size,
164 const type_dbg_info *tdbgi);
165
170
175
179FIRM_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 sourcecode location.
Definition dbginfo.h:136
unsigned column
column number (starting at 1; 0 if unknown)
Definition dbginfo.h:139
char const * file
the name of the source (usually a file)
Definition dbginfo.h:137
unsigned line
line number (starting at 1; 0 if unknown)
Definition dbginfo.h:138
dbg_action
An enumeration indicating the action performed by a transformation.
Definition dbginfo.h:45
src_loc_t(* retrieve_dbg_func)(dbg_info const *dbg)
The type of the debug info retriever function.
Definition dbginfo.h:149
void ir_set_type_debug_retrieve(retrieve_type_dbg_func func)
Sets global print_type_dbg_info function in firm.
src_loc_t ir_retrieve_dbg_info(dbg_info const *dbg)
Retrieve the debug info.
struct type_dbg_info type_dbg_info
Source Type Reference.
Definition firm_types.h:43
void dbg_init(merge_pair_func *dbg_info_merge_pair, merge_sets_func *dbg_info_merge_sets)
Initializes the debug support.
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
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
void ir_retrieve_type_dbg_info(char *buffer, size_t buffer_size, const type_dbg_info *tdbgi)
Retrieve type debug info.
const char * dbg_action_2_str(dbg_action a)
Converts a debug_action into a string.
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
struct dbg_info dbg_info
Source Reference.
Definition firm_types.h:40
@ dbg_backend
A Firm subgraph was replaced because of a Backend transformation.
Definition dbginfo.h:71
@ dbg_error
Definition dbginfo.h:46
@ dbg_max
Maximum value.
Definition dbginfo.h:72
@ dbg_algebraic_simplification
A Firm subgraph was replaced because of an algebraic simplification.
Definition dbginfo.h:54
@ dbg_opt_auxnode
Removal of unnecessary auxiliary nodes.
Definition dbginfo.h:48
@ dbg_read_after_write
A Firm subgraph was replaced because of a read after write optimization.
Definition dbginfo.h:60
@ dbg_read_a_const
A Firm subgraph was replaced because of a read a constant optimization.
Definition dbginfo.h:64
@ dbg_jumpthreading
A Firm node was replace because of the jumpthreading algorithm.
Definition dbginfo.h:70
@ dbg_read_after_read
A Firm subgraph was replaced because of a read after read optimization.
Definition dbginfo.h:62
@ dbg_write_after_write
A Firm subgraph was replaced because of a write after write optimization.
Definition dbginfo.h:56
@ dbg_straightening
A Firm subgraph was replaced by a single, existing block.
Definition dbginfo.h:51
@ dbg_gvn_pre
A Firm node was replace because of the GVN-PRE algorithm.
Definition dbginfo.h:68
@ dbg_const_eval
A Firm subgraph was evaluated to a single constant.
Definition dbginfo.h:49
@ dbg_opt_cse
A Firm node was replaced due to common subexpression elimination.
Definition dbginfo.h:50
@ dbg_dead_code
Removing unreachable code, i.e.
Definition dbginfo.h:66
@ dbg_if_simplification
The control flow of an if is changed as either the else, the then or both blocks are empty.
Definition dbginfo.h:52
@ dbg_opt_ssa
Optimization of the SSA representation, e.g.
Definition dbginfo.h:47
@ dbg_write_after_read
A Firm subgraph was replaced because of a write after read optimization.
Definition dbginfo.h:58
@ dbg_opt_confirm
A Firm subgraph was replace because of a Confirmation.
Definition dbginfo.h:67
@ dbg_combo
A Firm node was replace because of the combo algorithm.
Definition dbginfo.h:69
struct ir_node ir_node
Procedure Graph Node.
Definition firm_types.h:53