X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbearch.h;h=4b0d187e4559eeabfe96f86e37e11a5f9cbece87;hb=662fc44c951bdb45a9b7d9563e9ffbb87101b9e4;hp=b1db0286ab2f4a029875931f081777a7770b03ff;hpb=1ce363f80e6a204d4011f85813362d9bd1d0e7e4;p=libfirm diff --git a/ir/be/bearch.h b/ir/be/bearch.h index b1db0286a..4b0d187e4 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -29,6 +29,7 @@ #include "firm_types.h" #include "bitset.h" #include "be.h" +#include "obst.h" typedef struct arch_register_class_t arch_register_class_t; typedef struct arch_register_req_t arch_register_req_t; @@ -36,11 +37,7 @@ typedef struct arch_register_t arch_register_t; typedef struct arch_flag_t arch_flag_t; typedef struct arch_inverse_t arch_inverse_t; typedef struct arch_isa_if_t arch_isa_if_t; -typedef struct arch_isa_t arch_isa_t; typedef struct arch_env_t arch_env_t; -typedef struct arch_irn_ops_if_t arch_irn_ops_if_t; -typedef struct arch_irn_ops_t arch_irn_ops_t; -typedef struct arch_irn_handler_t arch_irn_handler_t; typedef struct arch_code_generator_t arch_code_generator_t; typedef struct arch_code_generator_if_t arch_code_generator_if_t; @@ -88,11 +85,11 @@ typedef enum arch_operand_type_t { * Different types of register allocation requirements. */ typedef enum arch_register_req_type_t { - arch_register_req_type_none = 0, /**< No register requirement. */ - arch_register_req_type_normal = 1, /**< All registers in the class are allowed. */ - arch_register_req_type_limited = 2, /**< Only a real subset of the class is allowed. */ - arch_register_req_type_should_be_same = 4, /**< The register should be equal to another one at the node. */ - arch_register_req_type_should_be_different = 8, /**< The register must be unequal from some other at the node. */ + arch_register_req_type_none = 0, /**< No register requirement. */ + arch_register_req_type_normal = 1, /**< All registers in the class are allowed. */ + arch_register_req_type_limited = 2, /**< Only a real subset of the class is allowed. */ + arch_register_req_type_should_be_same = 4, /**< The register should be equal to another one at the node. */ + arch_register_req_type_must_be_different = 8, /**< The register must be unequal from some other at the node. */ } arch_register_req_type_t; extern const arch_register_req_t *arch_no_register_req; @@ -160,12 +157,9 @@ extern void arch_perform_memory_operand(const arch_env_t *env, ir_node *irn, ir_ /** * Get the register requirements for a node. * @param env The architecture environment. - * @param req A pointer to a requirements structure, where the data can - * be put into. * @param irn The node. * @param pos The position of the operand you're interested in. - * @return A pointer to the register requirements which may not - * neccessarily be equal to @p req. If NULL is returned, the + * @return A pointer to the register requirements. If NULL is returned, the * operand was no register operand. */ extern const arch_register_req_t * @@ -240,7 +234,6 @@ arch_get_irn_register(const arch_env_t *env, const ir_node *irn); * Set the register for a certain output operand. * @param env The architecture environment. * @param irn The node. - * @param idx The index of the output operand. * @param reg The register. */ extern void arch_set_irn_register(const arch_env_t *env, ir_node *irn, @@ -272,30 +265,23 @@ extern arch_irn_flags_t arch_irn_get_flags(const arch_env_t *env, const ir_node #define arch_irn_consider_in_reg_alloc(env, cls, irn) \ (arch_irn_has_reg_class(env, irn, -1, cls) && !arch_irn_is(env, irn, ignore)) +/** + * 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. + */ +typedef const void *(arch_get_irn_ops_t)(const ir_node *irn); + /** * Initialize the architecture environment struct. * @param isa The isa which shall be put into the environment. * @param file_handle The file handle * @return The environment. */ -extern arch_env_t *arch_env_init(arch_env_t *env, const arch_isa_if_t *isa, +extern arch_env_t *arch_env_init(const arch_isa_if_t *isa, FILE *file_handle, be_main_env_t *main_env); -/** - * Add a node handler to the environment. - * @param env The environment. - * @param handler A node handler. - * @return The environment itself. - */ -extern arch_env_t *arch_env_push_irn_handler(arch_env_t *env, const arch_irn_handler_t *handler); - -/** - * Remove a node handler from the handler stack. - * @param env The architecture environment. - * @return The popped handler. - */ -extern const arch_irn_handler_t *arch_env_pop_irn_handler(arch_env_t *env); - /** * Register an instruction set architecture */