/** This hook is called after a new mode was registered. */
void (*_hook_new_mode)(void *context, const ir_mode *tmpl, ir_mode *mode);
+
+ /** This hook is called after a new entity was created. */
+ void (*_hook_new_entity)(void *context, entity *ent);
+
+ /** This hook is called after a new type was created. */
+ void (*_hook_new_type)(void *context, type *tp);
} hook;
/** the context for every hook */
hook_arch_dep_replace_mul_with_shifts,
hook_arch_dep_replace_division_by_const,
hook_new_mode,
+ hook_new_entity,
+ hook_new_type,
hook_last
} hook_type_t;
#define hook_arch_dep_replace_division_by_const(irn) \
hook_exec(hook_arch_dep_replace_division_by_const, (ctx, irn))
#define hook_new_mode(tmpl, mode) hook_exec(hook_new_mode, (ctx, tmpl, mode))
+#define hook_new_entity(ent) hook_exec(hook_new_entity, (ctx, ent))
+#define hook_new_type(tp) hook_exec(hook_new_type, (ctx, tp))
/* the initializer, move to hooks_t.h some day */
int init_hooks(void);