/*
- * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
#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;
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;
* 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 another one at the node. */
- arch_register_req_type_should_be_different = 8, /**< The register must be unequal to some other at the node. */
- arch_register_req_type_should_be_different_from_all = 16, /**< The register must be different from all in's 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_should_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;
#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
*/