Commit 3e5387b3 authored by Matthias Braun's avatar Matthias Braun
Browse files

move all inline #defines to the begin of their headers

So all files in libFirm do this consistently
parent 7b0a6d0b
......@@ -17,6 +17,8 @@
#include "beutil.h"
#include "iredges_t.h"
#define value_dominates(a, b) _value_dominates(a, b)
/**
* Check dominance of two nodes in the same block.
* @param a The first node.
......@@ -160,6 +162,4 @@ end:
return res;
}
#define value_dominates(a, b) _value_dominates(a, b)
#endif
......@@ -32,6 +32,10 @@
#include "irlivechk.h"
#include "belive.h"
#define be_is_live_in(lv, bl, irn) _be_is_live_xxx(lv, bl, irn, be_lv_state_in)
#define be_is_live_end(lv, bl, irn) _be_is_live_xxx(lv, bl, irn, be_lv_state_end)
#define be_is_live_out(lv, bl, irn) _be_is_live_xxx(lv, bl, irn, be_lv_state_out)
struct be_lv_t {
ir_nodehashmap_t map;
struct obstack obst;
......@@ -109,8 +113,4 @@ static inline ir_node *be_lv_iteration_next(lv_iterator_t *iterator)
for (lv_iterator_t iter = be_lv_iteration_begin((lv), (block), (flags)); once; once = false) \
for (ir_node *node; (node = be_lv_iteration_next(&iter)) != NULL;)
#define be_is_live_in(lv, bl, irn) _be_is_live_xxx(lv, bl, irn, be_lv_state_in)
#define be_is_live_end(lv, bl, irn) _be_is_live_xxx(lv, bl, irn, be_lv_state_end)
#define be_is_live_out(lv, bl, irn) _be_is_live_xxx(lv, bl, irn, be_lv_state_out)
#endif
......@@ -556,11 +556,6 @@ int get_irg_n_locs(ir_graph *irg)
return irg->n_loc - 1;
}
struct obstack *(get_irg_obstack)(const ir_graph *irg)
{
return get_irg_obstack_(irg);
}
int node_is_in_irgs_storage(const ir_graph *irg, const ir_node *n)
{
struct _obstack_chunk *p;
......@@ -582,11 +577,6 @@ op_pin_state (get_irg_pinned)(const ir_graph *irg)
return get_irg_pinned_(irg);
}
void (set_irg_pinned)(ir_graph *irg, op_pin_state p)
{
set_irg_pinned_(irg, p);
}
irg_callee_info_state (get_irg_callee_info_state)(const ir_graph *irg)
{
return get_irg_callee_info_state_(irg);
......
......@@ -42,6 +42,49 @@
/** Suffix that is added to every frame type. */
#define FRAME_TP_SUFFIX "frame_tp"
#define is_ir_graph(thing) is_ir_graph_(thing)
#define get_irg_start_block(irg) get_irg_start_block_(irg)
#define set_irg_start_block(irg, node) set_irg_start_block_(irg, node)
#define get_irg_start(irg) get_irg_start_(irg)
#define set_irg_start(irg, node) set_irg_start_(irg, node)
#define get_irg_end_block(irg) get_irg_end_block_(irg)
#define set_irg_end_block(irg, node) set_irg_end_block_(irg, node)
#define get_irg_end(irg) get_irg_end_(irg)
#define set_irg_end(irg, node) set_irg_end_(irg, node)
#define get_irg_initial_exec(irg) get_irg_initial_exec_(irg)
#define set_irg_initial_exec(irg, node) set_irg_initial_exec_(irg, node)
#define get_irg_frame(irg) get_irg_frame_(irg)
#define set_irg_frame(irg, node) set_irg_frame_(irg, node)
#define get_irg_initial_mem(irg) get_irg_initial_mem_(irg)
#define set_irg_initial_mem(irg, node) set_irg_initial_mem_(irg, node)
#define get_irg_args(irg) get_irg_args_(irg)
#define set_irg_args(irg, node) set_irg_args_(irg, node)
#define get_irg_no_mem(irg) get_irg_no_mem_(irg)
#define set_irn_no_mem(irg, node) set_irn_no_mem_(irg, node)
#define get_irg_entity(irg) get_irg_entity_(irg)
#define set_irg_entity(irg, ent) set_irg_entity_(irg, ent)
#define get_irg_frame_type(irg) get_irg_frame_type_(irg)
#define set_irg_frame_type(irg, ftp) set_irg_frame_type_(irg, ftp)
#define get_irg_pinned(irg) get_irg_pinned_(irg)
#define get_irg_callee_info_state(irg) get_irg_callee_info_state_(irg)
#define set_irg_callee_info_state(irg, s) set_irg_callee_info_state_(irg, s)
#define get_irg_additional_properties(irg) get_irg_additional_properties_(irg)
#define set_irg_additional_properties(irg, m) set_irg_additional_properties_(irg, m)
#define set_irg_additional_property(irg, f) set_irg_additional_property_(irg, f)
#define set_irg_link(irg, thing) set_irg_link_(irg, thing)
#define get_irg_link(irg) get_irg_link_(irg)
#define get_irg_visited(irg) get_irg_visited_(irg)
#define get_irg_block_visited(irg) get_irg_block_visited_(irg)
#define set_irg_block_visited(irg, v) set_irg_block_visited_(irg, v)
#define inc_irg_block_visited(irg) inc_irg_block_visited_(irg)
#define dec_irg_block_visited(irg) dec_irg_block_visited_(irg)
#define get_irg_estimated_node_cnt(irg) get_irg_estimated_node_cnt_(irg)
#define get_irg_fp_model(irg) get_irg_fp_model_(irg)
#define get_idx_irn(irg, idx) get_idx_irn_(irg, idx)
#define irg_is_constrained(irg, constraints) irg_is_constrained_(irg, constraints)
#define add_irg_properties(irg, props) add_irg_properties_(irg, props)
#define clear_irg_properties(irg, props) clear_irg_properties_(irg, props)
#define irg_has_properties(irg, props) irg_has_properties_(irg, props)
/**
* Initializes the graph construction module.
......@@ -81,10 +124,18 @@ ir_graph *create_irg_copy(ir_graph *irg);
* @param irg the IR graph
* @param p new pin state
*/
void set_irg_pinned(ir_graph *irg, op_pin_state p);
static inline void set_irg_pinned(ir_graph *irg, op_pin_state p)
{
irg->irg_pinned_state = p;
}
/** Returns the obstack associated with the graph. */
struct obstack *get_irg_obstack(const ir_graph *irg);
static inline struct obstack *get_irg_obstack(const ir_graph *irg)
{
return irg->obst;
}
/**
* Returns true if the node n is allocated on the storage of graph irg.
......@@ -216,21 +267,11 @@ static inline void set_irg_frame_type_(ir_graph *irg, ir_type *ftp)
irg->frame_type = ftp;
}
static inline struct obstack *get_irg_obstack_(const ir_graph *irg)
{
return irg->obst;
}
static inline op_pin_state get_irg_pinned_(const ir_graph *irg)
{
return irg->irg_pinned_state;
}
static inline void set_irg_pinned_(ir_graph *irg, op_pin_state p)
{
irg->irg_pinned_state = p;
}
static inline irg_callee_info_state get_irg_callee_info_state_(const ir_graph *irg)
{
return irg->callee_info_state;
......@@ -386,51 +427,4 @@ static inline void set_irg_anchor(ir_graph *irg, int idx, ir_node *irn)
set_irn_n(irg->anchor, idx, irn);
}
#define is_ir_graph(thing) is_ir_graph_(thing)
#define get_irg_start_block(irg) get_irg_start_block_(irg)
#define set_irg_start_block(irg, node) set_irg_start_block_(irg, node)
#define get_irg_start(irg) get_irg_start_(irg)
#define set_irg_start(irg, node) set_irg_start_(irg, node)
#define get_irg_end_block(irg) get_irg_end_block_(irg)
#define set_irg_end_block(irg, node) set_irg_end_block_(irg, node)
#define get_irg_end(irg) get_irg_end_(irg)
#define set_irg_end(irg, node) set_irg_end_(irg, node)
#define get_irg_initial_exec(irg) get_irg_initial_exec_(irg)
#define set_irg_initial_exec(irg, node) set_irg_initial_exec_(irg, node)
#define get_irg_frame(irg) get_irg_frame_(irg)
#define set_irg_frame(irg, node) set_irg_frame_(irg, node)
#define get_irg_initial_mem(irg) get_irg_initial_mem_(irg)
#define set_irg_initial_mem(irg, node) set_irg_initial_mem_(irg, node)
#define get_irg_args(irg) get_irg_args_(irg)
#define set_irg_args(irg, node) set_irg_args_(irg, node)
#define get_irg_no_mem(irg) get_irg_no_mem_(irg)
#define set_irn_no_mem(irg, node) set_irn_no_mem_(irg, node)
#define get_irg_entity(irg) get_irg_entity_(irg)
#define set_irg_entity(irg, ent) set_irg_entity_(irg, ent)
#define get_irg_frame_type(irg) get_irg_frame_type_(irg)
#define set_irg_frame_type(irg, ftp) set_irg_frame_type_(irg, ftp)
#define get_irg_obstack(irg) get_irg_obstack_(irg)
#define get_irg_pinned(irg) get_irg_pinned_(irg)
#define set_irg_pinned(irg, p) set_irg_pinned_(irg, p)
#define get_irg_callee_info_state(irg) get_irg_callee_info_state_(irg)
#define set_irg_callee_info_state(irg, s) set_irg_callee_info_state_(irg, s)
#define get_irg_additional_properties(irg) get_irg_additional_properties_(irg)
#define set_irg_additional_properties(irg, m) set_irg_additional_properties_(irg, m)
#define set_irg_additional_property(irg, f) set_irg_additional_property_(irg, f)
#define set_irg_link(irg, thing) set_irg_link_(irg, thing)
#define get_irg_link(irg) get_irg_link_(irg)
#define get_irg_visited(irg) get_irg_visited_(irg)
#define get_irg_block_visited(irg) get_irg_block_visited_(irg)
#define set_irg_block_visited(irg, v) set_irg_block_visited_(irg, v)
#define inc_irg_block_visited(irg) inc_irg_block_visited_(irg)
#define dec_irg_block_visited(irg) dec_irg_block_visited_(irg)
#define get_irg_estimated_node_cnt(irg) get_irg_estimated_node_cnt_(irg)
#define get_irg_fp_model(irg) get_irg_fp_model_(irg)
#define get_idx_irn(irg, idx) get_idx_irn_(irg, idx)
#define irg_is_constrained(irg, constraints) irg_is_constrained_(irg, constraints)
#define add_irg_properties(irg, props) add_irg_properties_(irg, props)
#define clear_irg_properties(irg, props) clear_irg_properties_(irg, props)
#define irg_has_properties(irg, props) irg_has_properties_(irg, props)
#endif
......@@ -30,9 +30,29 @@
#include "irtypes.h"
#include "irmode.h"
/* ------------------------------- *
* inline functions *
* ------------------------------- */
#define get_modeP_code() get_modeP_code_()
#define get_modeP_data() get_modeP_data_()
#define get_mode_ident(mode) get_mode_ident_(mode)
#define get_mode_sort(mode) get_mode_sort_(mode)
#define get_mode_size_bits(mode) get_mode_size_bits_(mode)
#define get_mode_size_bytes(mode) get_mode_size_bytes_(mode)
#define get_mode_sign(mode) get_mode_sign_(mode)
#define get_mode_arithmetic(mode) get_mode_arithmetic_(mode)
#define get_mode_modulo_shift(mode) get_mode_modulo_shift_(mode)
#define get_mode_link(mode) get_mode_link_(mode)
#define set_mode_link(mode, l) set_mode_link_(mode, l)
#define mode_is_signed(mode) mode_is_signed_(mode)
#define mode_is_float(mode) mode_is_float_(mode)
#define mode_is_int(mode) mode_is_int_(mode)
#define mode_is_reference(mode) mode_is_reference_(mode)
#define mode_is_num(mode) mode_is_num_(mode)
#define mode_is_data(mode) mode_is_data_(mode)
#define mode_is_datab(mode) mode_is_datab_(mode)
#define mode_is_dataM(mode) mode_is_dataM_(mode)
#define get_type_for_mode(mode) get_type_for_mode_(mode)
#define get_mode_mantissa_size(mode) get_mode_mantissa_size_(mode)
#define get_mode_exponent_size(mode) get_mode_exponent_size_(mode)
static inline ir_mode *get_modeP_code_(void) { return mode_P_code; }
static inline ir_mode *get_modeP_data_(void) { return mode_P_data; }
......@@ -104,37 +124,37 @@ static inline int mode_is_signed_(const ir_mode *mode)
static inline int mode_is_float_(const ir_mode *mode)
{
return (get_mode_sort_(mode) == irms_float_number);
return (get_mode_sort(mode) == irms_float_number);
}
static inline int mode_is_int_(const ir_mode *mode)
{
return (get_mode_sort_(mode) == irms_int_number);
return (get_mode_sort(mode) == irms_int_number);
}
static inline int mode_is_reference_(const ir_mode *mode)
{
return (get_mode_sort_(mode) == irms_reference);
return (get_mode_sort(mode) == irms_reference);
}
static inline int mode_is_num_(const ir_mode *mode)
{
return (get_mode_sort_(mode) & irmsh_is_num);
return (get_mode_sort(mode) & irmsh_is_num);
}
static inline int mode_is_data_(const ir_mode *mode)
{
return (get_mode_sort_(mode) & irmsh_is_data);
return (get_mode_sort(mode) & irmsh_is_data);
}
static inline int mode_is_datab_(const ir_mode *mode)
{
return (get_mode_sort_(mode) & irmsh_is_datab);
return (get_mode_sort(mode) & irmsh_is_datab);
}
static inline int mode_is_dataM_(const ir_mode *mode)
{
return (get_mode_sort_(mode) & irmsh_is_dataM);
return (get_mode_sort(mode) & irmsh_is_dataM);
}
static inline ir_type *get_type_for_mode_(const ir_mode *mode)
......@@ -158,27 +178,4 @@ void init_mode(void);
/** mode module finalization. frees all memory. */
void finish_mode(void);
#define get_modeP_code() get_modeP_code_()
#define get_modeP_data() get_modeP_data_()
#define get_mode_ident(mode) get_mode_ident_(mode)
#define get_mode_sort(mode) get_mode_sort_(mode)
#define get_mode_size_bits(mode) get_mode_size_bits_(mode)
#define get_mode_size_bytes(mode) get_mode_size_bytes_(mode)
#define get_mode_sign(mode) get_mode_sign_(mode)
#define get_mode_arithmetic(mode) get_mode_arithmetic_(mode)
#define get_mode_modulo_shift(mode) get_mode_modulo_shift_(mode)
#define get_mode_link(mode) get_mode_link_(mode)
#define set_mode_link(mode, l) set_mode_link_(mode, l)
#define mode_is_signed(mode) mode_is_signed_(mode)
#define mode_is_float(mode) mode_is_float_(mode)
#define mode_is_int(mode) mode_is_int_(mode)
#define mode_is_reference(mode) mode_is_reference_(mode)
#define mode_is_num(mode) mode_is_num_(mode)
#define mode_is_data(mode) mode_is_data_(mode)
#define mode_is_datab(mode) mode_is_datab_(mode)
#define mode_is_dataM(mode) mode_is_dataM_(mode)
#define get_type_for_mode(mode) get_type_for_mode_(mode)
#define get_mode_mantissa_size(mode) get_mode_mantissa_size_(mode)
#define get_mode_exponent_size(mode) get_mode_exponent_size_(mode)
#endif
......@@ -32,6 +32,15 @@
#include "irtypes.h"
#include "tv.h"
#define get_op_code(op) get_op_code_(op)
#define get_op_ident(op) get_op_ident_(op)
#define get_op_pinned(op) get_op_pinned_(op)
#define get_op_ops(op) get_op_ops_(op)
#define set_op_tag(op, tag) set_op_tag_((op), (tag))
#define get_op_tag(op) get_op_tag_(op)
#define set_op_attr(op, attr) set_op_attr_((op), (attr))
#define get_op_attr(op) get_op_attr_(op)
/**
* Frees a newly created ir operation.
*/
......@@ -169,13 +178,4 @@ static inline void *get_op_attr_(const ir_op *op)
return op->attr;
}
#define get_op_code(op) get_op_code_(op)
#define get_op_ident(op) get_op_ident_(op)
#define get_op_pinned(op) get_op_pinned_(op)
#define get_op_ops(op) get_op_ops_(op)
#define set_op_tag(op, tag) set_op_tag_((op), (tag))
#define get_op_tag(op) get_op_tag_(op)
#define set_op_attr(op, attr) set_op_attr_((op), (attr))
#define get_op_attr(op) get_op_attr_(op)
#endif
......@@ -35,6 +35,17 @@
#include "array.h"
/* Inline functions. */
#define get_irp_n_irgs() get_irp_n_irgs_()
#define get_irp_irg(pos) get_irp_irg_(pos)
#define get_irp_n_types() get_irp_n_types_()
#define get_irp_type(pos) get_irp_type_(pos)
#define get_const_code_irg() get_const_code_irg_()
#define get_segment_type(s) get_segment_type_(s)
#define get_glob_type() get_glob_type_()
#define get_tls_type() get_tls_type_()
#define get_irp_next_label_nr() get_irp_next_label_nr_()
/* inline functions */
static inline ir_type *get_segment_type_(ir_segment_t segment)
{
......@@ -126,15 +137,4 @@ FIRM_API void add_irp_irg(ir_graph *irg);
shrinks the list by one. */
FIRM_API void remove_irp_irg(ir_graph *irg);
/* Inline functions. */
#define get_irp_n_irgs() get_irp_n_irgs_()
#define get_irp_irg(pos) get_irp_irg_(pos)
#define get_irp_n_types() get_irp_n_types_()
#define get_irp_type(pos) get_irp_type_(pos)
#define get_const_code_irg() get_const_code_irg_()
#define get_segment_type(s) get_segment_type_(s)
#define get_glob_type() get_glob_type_()
#define get_tls_type() get_tls_type_()
#define get_irp_next_label_nr() get_irp_next_label_nr_()
#endif
......@@ -32,6 +32,44 @@
#include "type_t.h"
#include "ident.h"
#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)
#define set_entity_ident(ent, id) _set_entity_ident(ent, id)
#define get_entity_owner(ent) _get_entity_owner(ent)
#define get_entity_ld_ident(ent) _get_entity_ld_ident(ent)
#define set_entity_ld_ident(ent, ld_ident) _set_entity_ld_ident(ent, ld_ident)
#define get_entity_ld_name(ent) _get_entity_ld_name(ent)
#define get_entity_type(ent) _get_entity_type(ent)
#define get_entity_linkage(ent) _get_entity_linkage(ent)
#define get_entity_volatility(ent) _get_entity_volatility(ent)
#define set_entity_volatility(ent, vol) _set_entity_volatility(ent, vol)
#define set_entity_alignment(ent, alignment) _set_entity_alignment(ent, alignment)
#define get_entity_alignment(ent) _get_entity_alignment(ent)
#define get_entity_align(ent) _get_entity_align(ent)
#define set_entity_align(ent, a) _set_entity_align(ent, a)
#define is_entity_compiler_generated(ent) _is_entity_compiler_generated(ent)
#define set_entity_compiler_generated(ent, flag) _set_entity_compiler_generated(ent, flag)
#define get_entity_usage(ent) _get_entity_usage(ent)
#define set_entity_usage(ent, flags) _set_entity_usage(ent, flags)
#define get_entity_offset(ent) _get_entity_offset(ent)
#define set_entity_offset(ent, offset) _set_entity_offset(ent, offset)
#define get_entity_offset_bits_remainder(ent) _get_entity_offset_bits_remainder(ent)
#define set_entity_offset_bits_remainder(ent, o) _set_entity_offset_bits_remainder(ent, o)
#define get_entity_link(ent) _get_entity_link(ent)
#define set_entity_link(ent, l) _set_entity_link(ent, l)
#define get_entity_irg(ent) _get_entity_irg(ent)
#define is_parameter_entity(ent) _is_parameter_entity(ent)
#define get_entity_parameter_number(ent) _get_entity_parameter_number(ent)
#define get_entity_visited(ent) _get_entity_visited(ent)
#define set_entity_visited(ent, num) _set_entity_visited(ent, num)
#define mark_entity_visited(ent) _mark_entity_visited(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)
typedef struct ir_initializer_base_t {
ir_initializer_kind_t kind;
} ir_initializer_base_t;
......@@ -191,16 +229,16 @@ static inline int _is_entity(const void *thing)
return get_kind(thing) == k_entity;
}
static inline const char *_get_entity_name(const ir_entity *ent)
static inline ident *_get_entity_ident(const ir_entity *ent)
{
assert(ent && ent->kind == k_entity);
return get_id_str(get_entity_ident(ent));
return ent->name;
}
static inline ident *_get_entity_ident(const ir_entity *ent)
static inline const char *_get_entity_name(const ir_entity *ent)
{
assert(ent && ent->kind == k_entity);
return ent->name;
return get_id_str(get_entity_ident(ent));
}
static inline void _set_entity_ident(ir_entity *ent, ident *id)
......@@ -408,42 +446,4 @@ 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)
#define set_entity_ident(ent, id) _set_entity_ident(ent, id)
#define get_entity_owner(ent) _get_entity_owner(ent)
#define get_entity_ld_ident(ent) _get_entity_ld_ident(ent)
#define set_entity_ld_ident(ent, ld_ident) _set_entity_ld_ident(ent, ld_ident)
#define get_entity_ld_name(ent) _get_entity_ld_name(ent)
#define get_entity_type(ent) _get_entity_type(ent)
#define get_entity_linkage(ent) _get_entity_linkage(ent)
#define get_entity_volatility(ent) _get_entity_volatility(ent)
#define set_entity_volatility(ent, vol) _set_entity_volatility(ent, vol)
#define set_entity_alignment(ent, alignment) _set_entity_alignment(ent, alignment)
#define get_entity_alignment(ent) _get_entity_alignment(ent)
#define get_entity_align(ent) _get_entity_align(ent)
#define set_entity_align(ent, a) _set_entity_align(ent, a)
#define is_entity_compiler_generated(ent) _is_entity_compiler_generated(ent)
#define set_entity_compiler_generated(ent, flag) _set_entity_compiler_generated(ent, flag)
#define get_entity_usage(ent) _get_entity_usage(ent)
#define set_entity_usage(ent, flags) _set_entity_usage(ent, flags)
#define get_entity_offset(ent) _get_entity_offset(ent)
#define set_entity_offset(ent, offset) _set_entity_offset(ent, offset)
#define get_entity_offset_bits_remainder(ent) _get_entity_offset_bits_remainder(ent)
#define set_entity_offset_bits_remainder(ent, o) _set_entity_offset_bits_remainder(ent, o)
#define get_entity_link(ent) _get_entity_link(ent)
#define set_entity_link(ent, l) _set_entity_link(ent, l)
#define get_entity_irg(ent) _get_entity_irg(ent)
#define is_parameter_entity(ent) _is_parameter_entity(ent)
#define get_entity_parameter_number(ent) _get_entity_parameter_number(ent)
#define get_entity_visited(ent) _get_entity_visited(ent)
#define set_entity_visited(ent, num) _set_entity_visited(ent, num)
#define mark_entity_visited(ent) _mark_entity_visited(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
......@@ -205,8 +205,3 @@ tp_opcode (get_tpop_code)(const tp_op *op)
{
return _get_tpop_code(op);
}
size_t (get_tpop_attr_size)(const tp_op *op)
{
return _get_tpop_attr_size(op);
}
......@@ -31,6 +31,9 @@
#include "typerep.h"
#include "irmode.h"
#define get_tpop_code(op) _get_tpop_code(op)
#define get_tpop_ident(op) _get_tpop_ident(op)
/** A function called to free attributes of a type. */
typedef void (*free_attrs_func)(ir_type *tp);
......@@ -134,8 +137,10 @@ void finish_tpop(void);
* @param op The type opcode to get the size for.
* @return The size of the attribute of types with this opcode.
*/
size_t get_tpop_attr_size(const tp_op *op);
static inline size_t get_tpop_attr_size(const tp_op *op)
{
return op->attr_size;
}
/* ---------------- *
* inline functions *
......@@ -151,13 +156,4 @@ static inline ident *_get_tpop_ident(const tp_op *op)
return op->name;
}
static inline size_t _get_tpop_attr_size(const tp_op *op)
{
return op->attr_size;
}
#define get_tpop_code(op) _get_tpop_code(op)
#define get_tpop_ident(op) _get_tpop_ident(op)
#define get_tpop_attr_size(op) _get_tpop_attr_size(op)
#endif /* FIRM_TR_TPOP_T_H */
......@@ -34,6 +34,52 @@
#include "array.h"
#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()
#define get_type_link(tp) _get_type_link(tp)
#define set_type_link(tp, l) _set_type_link(tp, l)
#define get_type_tpop(tp) _get_type_tpop(tp)
#define get_type_tpop_nameid(tp) _get_type_tpop_nameid(tp)
#define get_type_tpop_code(tp) _get_type_tpop_code(tp)
#define get_type_mode(tp) _get_type_mode(tp)
#define get_type_size_bytes(tp) _get_type_size_bytes(tp)
#define get_type_state(tp) _get_type_state(tp)
#define get_type_visited(tp) _get_type_visited(tp)
#define set_type_visited(tp, num) _set_type_visited(tp, num)
#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)
#define get_class_member(clss, pos) _get_class_member(clss, pos)
#define get_class_vtable_size(clss) _get_class_vtable_size(clss)
#define set_class_vtable_size(clss, size) _set_class_vtable_size(clss, size)
#define is_class_final(clss) _is_class_final(clss)
#define set_class_final(clss, flag) _set_class_final(clss, flag)
#define is_class_interface(clss) _is_class_interface(clss)
#define set_class_interface(clss, flag) _set_class_interface(clss, flag)
#define is_class_abstract(clss) _is_class_abstract(clss)
#define set_class_abstract(clss, flag) _set_class_abstract(clss, flag)
#define is_Struct_type(strct) _is_struct_type(strct)
#define is_Method_type(method) _is_method_type(method)
#define is_Union_type(uni) _is_union_type(uni)
#define is_Array_type(array) _is_array_type(array)
#define is_Enumeration_type(enumeration) _is_enumeration_type(enumeration)
#define is_Pointer_type(pointer) _is_pointer_type(pointer)
#define is_Primitive_type(primitive) _is_primitive_type(primitive)
#define is_atomic_type(tp) _is_atomic_type(tp)
#define get_method_n_params(method) _get_method_n_params(method)
#define get_method_n_ress(method) _get_method_n_ress(method)
#define get_method_additional_properties(method) _get_method_additional_properties(method)
#define set_method_additional_properties(method, mask) _set_method_additional_properties(method, mask)
#define add_method_additional_properties(method, flag) _add_method_additional_properties(method, flag)
#define get_method_calling_convention(method) _get_method_calling_convention(method)
#define set_method_calling_convention(method, cc_mask) _set_method_calling_convention(method, cc_mask)
/** Class flags. */
enum class_flags {
cf_none = 0, /**< No flags. */
......@@ -529,51 +575,4 @@ static inline void _set_method_calling_convention(ir_type *method, unsigned cc_m
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()
#define get_type_link(tp) _get_type_link(tp)
#define set_type_link(tp, l) _set_type_link(tp, l)
#define get_type_tpop(tp) _get_type_tpop(tp)
#define get_type_tpop_nameid(tp) _get_type_tpop_nameid(tp)
#define get_type_tpop_code(tp) _get_type_tpop_code(tp)
#define get_type_mode(tp) _get_type_mode(tp)
#define get_type_size_bytes(tp) _get_type_size_bytes(tp)
#define get_type_state(tp) _get_type_state(tp)
#define get_type_visited(tp) _get_type_visited(tp)
#define set_type_visited(tp, num) _set_type_visited(tp, num)
#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)
#define get_class_member(clss, pos) _get_class_member(clss, pos)
#define get_class_vtable_size(clss) _get_class_vtable_size(clss)
#define set_class_vtable_size(clss, size) _set_class_vtable_size(clss, size)
#define is_class_final(clss) _is_class_final(clss)
#define set_class_final(clss, flag) _set_class_final(clss, flag)
#define is_class_interface(clss) _is_class_interface(clss)
#define set_class_interface(clss, flag) _set_class_interface(clss, flag)
#define is_class_abstract(clss) _is_class_abstract(clss)
#define set_class_abstract(clss, flag) _set_class_abstract(clss, flag)
#define is_Struct_type(strct) _is_struct_type(strct)
#define is_Method_type(method) _is_method_type(method)
#define is_Union_type(uni) _is_union_type(uni)
#define is_Array_type(array) _is_array_type(array)
#define is_Enumeration_type(enumeration) _is_enumeration_type(enumeration)
#define is_Pointer_type(pointer) _is_pointer_type(pointer)
#define is_Primitive_type(primitive) _is_primitive_type(primitive)
#define is_atomic_type(tp) _is_atomic_type(tp)
#define get_method_n_params(method) _get_method_n_params(method)
#define get_method_n_ress(method) _get_method_n_ress(method)
#define get_method_additional_properties(method) _get_method_additional_properties(method)
#define set_method_additional_properties(method, mask) _set_method_additional_properties(method, mask)
#define add_method_additional_properties(method, flag) _add_method_additional_properties(method, flag)
#define get_method_calling_convention(method) _get_method_calling_convention(method)
#define set_method_calling_convention(method, cc_mask) _set_method_calling_convention(method, cc_mask)
#endif /* FIRM_TR_TYPE_T_H */
......@@ -359,17 +359,16 @@ ir_node *new_{{node.name}}(
irnode_h_template = env.from_string(
'''/* Warning: automatically generated code */
{% for node in nodes %}