changed file names and name prefix
[libfirm] / ir / debug / dbginfo.h
1 /*
2 **  Copyright (C) 2001 by Universitaet Karlsruhe
3 **  All rights reserved.
4 **
5 **  Authors: Goetz Lindenmaier
6 **
7 **  dbginfo: This is the Firm interface to debugging support.  Firm requires
8 **  a debugging module fulfilling this interface.
9 **  The interface requires a datatype representing the debugging information.
10 **  Firm supports administrating a reference to the debug information
11 **  in every firm node.  Further Firm optimizations call routines to
12 **  propagate debug information from old nodes to new nodes if the optimization
13 **  replaces the old ones by the new ones.
14 **
15 **  This file does not belong to the interface of the firm library.
16 */
17
18 /* $Id$ */
19
20 # ifndef _DBGINFO_H_
21 # define _DBGINFO_H_
22
23 #include "irnode.h"
24 #include "ident.h"
25
26 /* A datastructure containing information for debugging.  */
27 typedef struct dbg_info dbg_info;
28 /* Every Firm node contains a reference to a dbg_info struct. This reference
29    can be accessed by the debug support module by
30    dbg_info *get_irn_dbg_info(irnode *n);
31    void      set_irn_dbg_info(irnode *n, dbg_info *d);.
32    The module may not touch or change anything else in the Firm data structure.
33 */
34
35 /** The following routines are called by firm optmizations.  The optimization
36     passes an ident representing a string that describes the optimization
37     performed.  **/
38 /* dbg_info_copy() is called in the following situation:
39    The optimization replaced the old node by the new one.  The new node
40    might be a recent allocated node not containing any debug information,
41    or just another node from somewhere in the graph with the same
42    semantics. */
43 void dbg_info_copy(ir_node *new, ir_node *old, ident *info);
44
45 /* dbg_info_merge() is called in the following situation:
46    The optimization replaced a subgraph by another subgraph.  There is no
47    obviouse mapping between single nodes in both subgraphs.  The optimization
48    simply passes two lists to the debug module, one containing the nodes in
49    the old subgraph, the other containing the nodes in the new subgraph.  */
50 void dbg_info_merge(ir_node **new_nodes, ir_node **old_nodes, ident *info);
51
52
53 #endif /* _DBGINFO_H_ */