Commit 5f4a7559 authored by Michael Beck's avatar Michael Beck
Browse files

moved get_*_dbg_info() and set_*_dbg_info() to logical places

removed unnecesary includes

[r14979]
parent 8d8024e0
......@@ -19,27 +19,26 @@
/**
* @file
* @brief Architecture dependand IR operations
* @brief Architecture depended IR operations
* @version $Id$
*/
#ifndef FIRM_ARCH_ARCHOP_H
#define FIRM_ARCH_ARCHOP_H
#include "firm_types.h"
#include "dbginfo.h"
/**
* Mask defining which architecture depend
* operations are supported.
*/
typedef enum _arch_ops_mask {
ARCH_OPS_NONE = 0, /**< no additional Operations */
ARCH_OPS_MINMAX = 1 /**< use the Min/Max Operation */
ARCH_OPS_NONE = 0, /**< no additional Operations */
ARCH_OPS_MINMAX = 1 /**< use the Min/Max Operation */
} arch_ops_mask;
typedef struct _arch_ops_info {
arch_ops_mask enabled_ops; /**< a mask of enabled IR-opcodes */
unsigned minmax_handle_NaN:1; /**< if set, Min(a,a) == a, else unknown */
arch_ops_mask enabled_ops; /**< a mask of enabled IR-opcodes */
unsigned minmax_handle_NaN:1; /**< if set, Min(a,a) == a, else unknown */
} arch_ops_info;
extern ir_op *op_Min, *op_Max;
......
......@@ -30,7 +30,6 @@
#include "irarch.h"
#include "archop.h"
#include "lowering.h"
#include "dbginfo.h"
#include "iroptimize.h"
#include <libcore/lc_timing.h>
......
......@@ -1120,7 +1120,6 @@
#include "firm_common.h"
#include "irnode.h"
#include "irgraph.h"
#include "dbginfo.h"
/*-------------------------------------------------------------------------*/
/* The raw interface */
......
......@@ -32,7 +32,6 @@
#include "typerep.h"
#include "irop.h"
#include "irmode.h"
#include "dbginfo.h"
/**
* @file irnode.h
......@@ -1379,6 +1378,21 @@ const void *get_irn_generic_attr_const(const ir_node *node);
*/
unsigned get_irn_idx(const ir_node *node);
/**
* Sets the debug information of a node.
*
* @param n The node.
* @param db The debug info.
*/
void set_irn_dbg_info(ir_node *n, dbg_info *db);
/**
* Returns the debug information of an node.
*
* @param n The node.
*/
dbg_info *get_irn_dbg_info(const ir_node *n);
/*-----------------------------------------------------------------*/
/** Debug aides **/
/*-----------------------------------------------------------------*/
......
......@@ -398,6 +398,21 @@ void set_entity_address_taken(ir_entity *ent, ir_address_taken_state flag);
/** Return the name of the address_taken state. */
const char *get_address_taken_state_name(ir_address_taken_state state);
/**
* Returns the debug information of an entity.
*
* @param ent The entity.
*/
dbg_info *get_entity_dbg_info(const ir_entity *ent);
/**
* Sets the debug information of an entity.
*
* @param ent The entity.
* @param db The debug info.
*/
void set_entity_dbg_info(ir_entity *ent, dbg_info *db);
/* -- Representation of constant values of entities -- */
/**
* Returns true if the the node is representable as code on
......@@ -1383,6 +1398,21 @@ void set_master_type_visited(unsigned long val);
unsigned long get_master_type_visited(void);
void inc_master_type_visited(void);
/**
* Sets the debug information of a type.
*
* @param tp The type.
* @param db The debug info.
*/
void set_type_dbg_info(ir_type *tp, dbg_info *db);
/**
* Returns the debug information of a type.
*
* @param tp The type.
*/
dbg_info *get_type_dbg_info(const ir_type *tp);
/**
* Checks whether a pointer points to a type.
*
......
......@@ -33,7 +33,6 @@
#include "iredges.h"
#include "irvrfy.h"
#include "ircons.h"
#include "dbginfo.h"
#include "iropt_t.h"
#include "debug.h"
......
......@@ -41,7 +41,6 @@
#include "irvrfy.h"
#include "ircons.h"
#include "irgwalk.h"
#include "dbginfo.h"
#include "irprintf.h"
#include "debug.h"
#include "irdom.h"
......
......@@ -38,7 +38,6 @@
#include "ircons.h"
#include "irprintf.h"
#include "irop.h"
#include "dbginfo.h"
#include "iropt_t.h"
#include "debug.h"
#include "error.h"
......
......@@ -35,7 +35,6 @@
#include "iredges_t.h"
#include "irvrfy.h"
#include "ircons.h"
#include "dbginfo.h"
#include "iropt_t.h"
#include "irprintf.h"
#include "debug.h"
......
......@@ -35,7 +35,6 @@
#include "iredges_t.h"
#include "irvrfy.h"
#include "ircons.h"
#include "dbginfo.h"
#include "iropt_t.h"
#include "debug.h"
......
......@@ -46,36 +46,6 @@ void dbg_init( merge_pair_func *mpf, merge_sets_func *msf, snprint_dbg_func *snp
__dbg_info_snprint = snprint_dbg;
} /* dbg_init */
void set_irn_dbg_info(ir_node *n, dbg_info *db) {
n->dbi = db;
} /* set_irn_dbg_info */
struct dbg_info *get_irn_dbg_info(const ir_node *n) {
return n->dbi;
} /* get_irn_dbg_info */
/* Routines to access the field of an entity containing the
debugging information. */
void set_entity_dbg_info(ir_entity *ent, dbg_info *db) {
ent->dbi = db;
} /* set_entity_dbg_info */
dbg_info *get_entity_dbg_info(const ir_entity *ent) {
return ent->dbi;
} /* get_entity_dbg_info */
/* Routines to access the field of a type containing the
debugging information. */
void set_type_dbg_info(ir_type *tp, dbg_info *db) {
tp->dbi = db;
} /* set_type_dbg_info */
dbg_info *get_type_dbg_info(const ir_type *tp) {
return tp->dbi;
} /* get_type_dbg_info */
/*
* Converts a debug_action into a string.
*/
......
......@@ -2963,6 +2963,22 @@ ir_op_ops *firm_set_default_get_entity_attr(ir_opcode code, ir_op_ops *ops) {
return ops;
}
/* Sets the debug information of a node. */
void (set_irn_dbg_info)(ir_node *n, dbg_info *db) {
_set_irn_dbg_info(n, db);
}
/**
* Returns the debug information of an node.
*
* @param n The node.
*/
dbg_info *(get_irn_dbg_info)(const ir_node *n) {
return _get_irn_dbg_info(n);
}
#ifdef DEBUG_libfirm
void dump_irn(ir_node *n) {
int i, arity = get_irn_arity(n);
......
......@@ -33,18 +33,11 @@
#include "irflag_t.h"
#include "firm_common_t.h"
#include "irdom_t.h" /* For size of struct dom_info. */
#include "dbginfo.h"
#include "irloop.h"
#include "iredgekinds.h"
#include "array.h"
#include "set.h"
#include "list.h"
#include "entity_t.h"
#include "type_t.h"
#include "tv_t.h"
#include "irextbb_t.h"
/** ir node attributes **/
......@@ -1059,6 +1052,14 @@ static INLINE unsigned _get_irn_idx(const ir_node *node) {
return node->node_idx;
}
static INLINE dbg_info *_get_irn_dbg_info(const ir_node *n) {
return n->dbi;
} /* get_irn_dbg_info */
static INLINE void _set_irn_dbg_info(ir_node *n, dbg_info *db) {
n->dbi = db;
}
/* this section MUST contain all inline functions */
#define is_ir_node(thing) _is_ir_node(thing)
#define get_irn_intra_arity(node) _get_irn_intra_arity(node)
......@@ -1157,4 +1158,7 @@ static INLINE unsigned _get_irn_idx(const ir_node *node) {
#define get_irn_ins_or_deps(node) _get_irn_ins_or_deps(node)
#define get_irn_in_or_dep(node, pos) _get_irn_in_or_dep(node, pos)
#define get_irn_dbg_info(node) _get_irn_dbg_info(node)
#define set_irn_dbg_info(node, db) _set_irn_dbg_info(node, db)
#endif
......@@ -29,7 +29,6 @@
#endif
#include <assert.h>
#include "dbginfo.h"
#include "iroptimize.h"
#include "obst.h"
#include "irnode_t.h"
......
......@@ -33,7 +33,6 @@
#include "irmode_t.h"
#include "ircons_t.h"
#include "irgmod.h"
#include "dbginfo.h"
#include "iropt_dbg.h"
#include "irflag_t.h"
#include "irgwalk.h"
......
......@@ -1281,6 +1281,14 @@ ir_type *(get_entity_repr_class)(const ir_entity *ent) {
return _get_entity_repr_class(ent);
} /* get_entity_repr_class */
dbg_info *(get_entity_dbg_info)(const ir_entity *ent) {
return _get_entity_dbg_info(ent);
} /* get_entity_dbg_info */
void (set_entity_dbg_info)(ir_entity *ent, dbg_info *db) {
_set_entity_dbg_info(ent, db);
} /* set_entity_dbg_info */
/* Initialize entity module. */
void firm_init_entity(void)
{
......
......@@ -412,6 +412,17 @@ _get_entity_repr_class(const ir_entity *ent) {
return ent->repr_class;
}
static INLINE dbg_info *
_get_entity_dbg_info(const ir_entity *ent) {
return ent->dbi;
}
static INLINE void
_set_entity_dbg_info(ir_entity *ent, dbg_info *db) {
ent->dbi = db;
}
#define is_entity(thing) _is_entity(thing)
#define get_entity_name(ent) _get_entity_name(ent)
#define get_entity_ident(ent) _get_entity_ident(ent)
......@@ -453,6 +464,8 @@ _get_entity_repr_class(const ir_entity *ent) {
#define entity_visited(ent) _entity_visited(ent)
#define entity_not_visited(ent) _entity_not_visited(ent)
#define get_entity_repr_class(ent) _get_entity_repr_class(ent)
#define get_entity_dbg_info(ent) _get_entity_dbg_info(ent)
#define set_entity_dbg_info(ent, db) _set_entity_dbg_info(ent, db)
#endif /* FIRM_TR_ENTITY_T_H */
......@@ -472,6 +472,14 @@ int (type_not_visited)(const ir_type *tp) {
return _type_not_visited(tp);
}
dbg_info *(get_type_dbg_info)(const ir_type *tp) {
return _get_type_dbg_info(tp);
}
void (set_type_dbg_info)(ir_type *tp, dbg_info *db) {
_set_type_dbg_info(tp, db);
}
int (is_type)(const void *thing) {
return _is_type(thing);
}
......
......@@ -405,6 +405,16 @@ _type_not_visited(const ir_type *tp) {
return tp->visit < firm_type_visited;
}
static INLINE dbg_info *
_get_type_dbg_info(const ir_type *tp) {
return tp->dbi;
}
static INLINE void
_set_type_dbg_info(ir_type *tp, dbg_info *db) {
tp->dbi = db;
}
static INLINE int
_is_type(const void *thing) {
return (get_kind(thing) == k_type);
......@@ -584,6 +594,7 @@ _set_method_calling_convention(ir_type *method, unsigned cc_mask) {
method->attr.ma.irg_calling_conv = cc_mask;
}
#define set_master_type_visited(val) _set_master_type_visited(val)
#define get_master_type_visited() _get_master_type_visited()
#define inc_master_type_visited() _inc_master_type_visited()
......@@ -603,6 +614,8 @@ _set_method_calling_convention(ir_type *method, unsigned cc_mask) {
#define mark_type_visited(tp) _mark_type_visited(tp)
#define type_visited(tp) _type_visited(tp)
#define type_not_visited(tp) _type_not_visited(tp)
#define get_type_dbg_info(tp) _get_type_dbg_info(tp)
#define set_type_dbg_info(tp, db) _set_type_dbg_info(tp, db)
#define is_type(thing) _is_type(thing)
#define is_Class_type(clss) _is_class_type(clss)
#define get_class_n_members(clss) _get_class_n_members(clss)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment