topdir = ../..
subdir := ir/debug
+INSTALL_HEADERS = dbginfo.h
-SOURCES = Makefile.in dbginfo.c dbginfo.h debinfo.c debinfo.h
+SOURCES = $(INSTALL_HEADERS)
+
+SOURCES += Makefile.in dbginfo.c dbginfo.h
include $(topdir)/MakeRules
CPPFLAGS += -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/tv \
- -I$(top_srcdir)/ir/tr -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/st \
- -I$(top_srcdir)/ir/ana
+ -I$(top_srcdir)/ir/tr -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/ana \
+ -I$(top_srcdir)/ir/st
include $(top_srcdir)/MakeTargets
#endif
#include "dbginfo.h"
+#include "irnode_t.h"
inline void
-dbg_info_copy(ir_node *new, ir_node *old, ident *info) {
+set_irn_dbg_info(ir_node *n, struct dbg_info* db) {
+ n->dbi = db;
+}
+
+inline struct dbg_info *
+get_irn_dbg_info(ir_node *n) {
+ return n->dbi;
+}
+
+inline void
+dbg_info_copy(ir_node *nw, ir_node *old, ident *info) {
+ set_irn_dbg_info(new, get_irn_dbg_info(old));
}
inline void
#include "irnode.h"
#include "ident.h"
+#ifndef _IR_NODE_TYPEDEF_
+#define _IR_NODE_TYPEDEF_
+typedef struct ir_node ir_node;
+#endif
+
/* A datastructure containing information for debugging. */
typedef struct dbg_info dbg_info;
/* Every Firm node contains a reference to a dbg_info struct. This reference
void set_irn_dbg_info(irnode *n, dbg_info *d);.
The module may not touch or change anything else in the Firm data structure.
*/
+inline void set_irn_dbg_info(ir_node *n, dbg_info* db);
+inline dbg_info *get_irn_dbg_info(ir_node *n);
/** The following routines are called by firm optmizations. The optimization
passes an ident representing a string that describes the optimization
might be a recent allocated node not containing any debug information,
or just another node from somewhere in the graph with the same
semantics. */
-void dbg_info_copy(ir_node *new, ir_node *old, ident *info);
+void dbg_info_copy(ir_node *nw, ir_node *old, ident *info);
/* dbg_info_merge() is called in the following situation:
The optimization replaced a subgraph by another subgraph. There is no
void dbg_info_merge(ir_node **new_nodes, ir_node **old_nodes, ident *info);
+
+
#endif /* _DBGINFO_H_ */