-#define arch_irn_has_reg_class(env, irn, pos, cls) \
- ((cls) == arch_get_irn_reg_class(env, irn, pos))
-
-/**
- * Somebody who can be asked about nodes.
- */
-struct _arch_irn_handler_t {
-
- /**
- * Get the operations of an irn.
- * @param self The handler from which the method is invoked.
- * @param irn Some node.
- * @return Operations for that irn.
- */
- const arch_irn_ops_t *(*get_irn_ops)(const arch_irn_handler_t *handler,
- const ir_node *irn);
-
-};
-
-/**
- * The code generator.
- */
-struct _arch_code_generator_if_t {
-
-
- /**
- * Initialzie the code generator.
- * @param file The file to dump to.
- * @param irg The fucntion to generate code for.
- * @param env The archicture environment.
- * @return A newly created code generator.
- */
- void *(*init)(FILE *file, ir_graph *irg, const arch_env_t *env);
-
- /**
- * Called, when the graph is being normalized.
- */
- void (*prepare_graph)(void *self);
-
- /**
- * Called before scheduling.
- */
- void (*before_sched)(void *self);
-
- /**
- * Called before register allocation.
- */
- void (*before_ra)(void *self);
-
- /**
- * Called after everything happened.
- * The code generator must also be de-allocated here.
- */
- void (*done)(void *self);
-
-};
-
-#define _arch_cg_call(cg, func) \
-do { \
- if((cg)->impl->func) \
- (cg)->impl->func(cg); \
-} while(0)
-
-#define arch_code_generator_prepare_graph(cg) _arch_cg_call(cg, prepare_graph)
-#define arch_code_generator_before_sched(cg) _arch_cg_call(cg, before_sched)
-#define arch_code_generator_before_ra(cg) _arch_cg_call(cg, before_ra)
-#define arch_code_generator_done(cg) _arch_cg_call(cg, done)
-
-/**
- * Code generator base class.
- */
-struct _arch_code_generator_t {
- const arch_code_generator_if_t *impl;
-};