Remove the unused parameter const arch_env_t *env from arch_get_irn_register().
[libfirm] / ir / be / bearch.h
index d82889d..7ef5f3d 100644 (file)
@@ -133,46 +133,38 @@ typedef enum arch_irn_flags_t {
  */
 extern const char *arch_irn_flag_str(arch_irn_flags_t flag);
 
-extern const arch_irn_ops_t *arch_get_irn_ops(const arch_env_t *env,
-                                              const ir_node *irn);
+void arch_set_frame_offset(ir_node *irn, int bias);
 
-extern void arch_set_frame_offset(const arch_env_t *env, ir_node *irn, int bias);
+ir_entity *arch_get_frame_entity(const ir_node *irn);
+void       arch_set_frame_entity(ir_node *irn, ir_entity *ent);
+int        arch_get_sp_bias(ir_node *irn);
 
-extern ir_entity *arch_get_frame_entity(const arch_env_t *env, const ir_node *irn);
-extern void arch_set_frame_entity(const arch_env_t *env, ir_node *irn, ir_entity *ent);
-extern int arch_get_sp_bias(const arch_env_t *env, ir_node *irn);
-
-extern int arch_get_op_estimated_cost(const arch_env_t *env, const ir_node *irn);
-extern arch_inverse_t *arch_get_inverse(const arch_env_t *env, const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obstack);
-extern int arch_possible_memory_operand(const arch_env_t *env, const ir_node *irn, unsigned int i);
-extern void arch_perform_memory_operand(const arch_env_t *env, ir_node *irn, ir_node *spill, unsigned int i);
+int             arch_get_op_estimated_cost(const ir_node *irn);
+arch_inverse_t *arch_get_inverse(const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obstack);
+int             arch_possible_memory_operand(const ir_node *irn, unsigned int i);
+void            arch_perform_memory_operand(ir_node *irn, ir_node *spill, unsigned int i);
 
 /**
  * Get the register requirements for a node.
- * @param env The architecture environment.
  * @param irn The node.
  * @param pos The position of the operand you're interested in.
  * @return    A pointer to the register requirements.  If NULL is returned, the
  *            operand was no register operand.
  */
-extern const arch_register_req_t *
-arch_get_register_req(const arch_env_t *env, const ir_node *irn, int pos);
+const arch_register_req_t *arch_get_register_req(const ir_node *irn, int pos);
 
 /**
  * Check if an operand is a register operand.
- * @param env The environment.
  * @param irn The node.
  * @param pos The position of the operand.
  * @return 1, if the operand is significant for register allocation, 0
  * if not.
  */
-extern int arch_is_register_operand(const arch_env_t *env,
-    const ir_node *irn, int pos);
+int arch_is_register_operand(const ir_node *irn, int pos);
 
 /**
  * Get the number of allocatable registers concerning
  * a register class for an operand of a node.
- * @param env The environment.
  * @param irn The node.
  * @param pos The position of the node's operand.
  * @param bs  The bitset all allocatable registers shall be put into.
@@ -181,47 +173,40 @@ extern int arch_is_register_operand(const arch_env_t *env,
  *            has registers.
  * @return    The amount of registers allocatable for that operand.
  */
-extern int arch_get_allocatable_regs(const arch_env_t *env, const ir_node *irn, int pos, bitset_t *bs);
+int arch_get_allocatable_regs(const ir_node *irn, int pos, bitset_t *bs);
 
 /**
  * Put all registers which shall not be ignored by the register
  * allocator in a bit set.
- * @param env The arch env.
  * @param cls The register class to consider.
  * @param bs  The bit set to put the registers to.
  */
-extern void arch_put_non_ignore_regs(const arch_env_t *env, const arch_register_class_t *cls, bitset_t *bs);
+extern void arch_put_non_ignore_regs(const arch_register_class_t *cls, bitset_t *bs);
 
 /**
  * Check, if a register is assignable to an operand of a node.
- * @param env The architecture environment.
  * @param irn The node.
  * @param pos The position of the operand.
  * @param reg The register.
  * @return    1, if the register might be allocated to the operand 0 if not.
  */
-extern int arch_reg_is_allocatable(const arch_env_t *env,
-    const ir_node *irn, int pos, const arch_register_t *reg);
+int arch_reg_is_allocatable(const ir_node *irn, int pos, const arch_register_t *reg);
 
 /**
  * Get the register class of an operand of a node.
- * @param env The architecture environment.
  * @param irn The node.
  * @param pos The position of the operand, -1 for the output.
  * @return    The register class of the operand or NULL, if
  *            operand is a non-register operand.
  */
-extern const arch_register_class_t *
-arch_get_irn_reg_class(const arch_env_t *env, const ir_node *irn, int pos);
+const arch_register_class_t *arch_get_irn_reg_class(const ir_node *irn, int pos);
 
 /**
  * Get the register allocated at a certain output operand of a node.
- * @param env The arch environment.
  * @param irn The node.
  * @return    The register allocated for this operand
  */
-extern const arch_register_t *
-arch_get_irn_register(const arch_env_t *env, const ir_node *irn);
+const arch_register_t *arch_get_irn_register(const ir_node *irn);
 
 /**
  * Set the register for a certain output operand.
@@ -252,11 +237,11 @@ extern arch_irn_flags_t arch_irn_get_flags(const arch_env_t *env, const ir_node
 
 #define arch_irn_is(env, irn, flag) ((arch_irn_get_flags(env, irn) & arch_irn_flags_ ## flag) != 0)
 
-#define arch_irn_has_reg_class(env, irn, pos, cls) \
-       ((cls) == arch_get_irn_reg_class(env, irn, pos))
+#define arch_irn_has_reg_class(irn, pos, cls) \
+       ((cls) == arch_get_irn_reg_class(irn, pos))
 
 #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))
+       (arch_irn_has_reg_class(irn, -1, cls) && !arch_irn_is(env, irn, ignore))
 
 /**
  * Get the operations of an irn.