/**
* Get the register allocated at a certain output operand of a node.
- * @param env The arch nvironment.
+ * @param env The arch environment.
* @param irn The node.
* @return The register allocated for this operand
*/
*/
struct _arch_code_generator_if_t {
+
+ /**
+ * Initialize the code generator.
+ * @param file The file to dump to.
+ * @param irg The function to generate code for.
+ * @param env The architecture 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.
*/
/**
* Initialize the isa interface.
*/
- void *(*init)(FILE *file_handle);
+ void *(*init)(void);
/**
* Free the isa instance.
const arch_irn_handler_t *(*get_irn_handler)(const void *self);
/**
- * Produce a new code generator.
+ * Get the code generator interface.
* @param self The this pointer.
- * @param irg The graph for which code shall be generated.
- * @return A code generator.
+ * @return Some code generator interface.
*/
- arch_code_generator_t *(*make_code_generator)(void *self, ir_graph *irg);
+ const arch_code_generator_if_t *(*get_code_generator)(void *self);
/**
* Get the list scheduler to use.
* @param isa The isa which shall be put into the environment.
* @return The environment.
*/
-extern arch_env_t *arch_env_init(arch_env_t *env, const arch_isa_if_t *isa, FILE *file_handle);
+extern arch_env_t *arch_env_init(arch_env_t *env, const arch_isa_if_t *isa);
/**
* Add a node handler to the environment.