* A Callback for evaluating the costs of an instruction.
*
* @param kind the instruction
+ * @param mode the mode of the instruction
* @param tv for MUL instruction, the multiplication constant
*
* @return the costs of this instruction
*/
-typedef int (*evaluate_costs_func)(insn_kind kind, ir_tarval *tv);
+typedef int (*evaluate_costs_func)(insn_kind kind, const ir_mode *mode, ir_tarval *tv);
/**
* A parameter structure that drives the machine dependent Firm
arch_dep_div_by_const = 2, /**< optimize Div into Shift/Add/Mulh */
arch_dep_mod_by_const = 4 /**< optimize Mod into Shift/Add/Mulh */
} arch_dep_opts_t;
+ENUM_BITSET(arch_dep_opts_t)
/**
* Set the optimizations that shall be applied.
*/
FIRM_API ir_node *arch_dep_replace_mod_by_const(ir_node *irn);
-/**
- * Replace DivMods with Shifts and Add/Subs and Mulh.
- * This function is driven by the 3 parameters:
- * - allow_mulhu
- * - allow_mulhs
- * - max_bits_for_mulh
- *
- * If irn is a DivMod with a Const, the constant is inspected if it meets the
- * requirements of the variables stated above. If a Shl/Add/Sub/Mulh
- * sequence can be generated that meets these requirements, this expression
- * is returned. In each other case irn is returned unmodified.
- *
- * @param div After call contains the Firm node div result or NULL.
- * @param mod After call contains the Firm node mod result or NULL.
- * @param irn The Firm node to inspect.
- */
-FIRM_API void arch_dep_replace_divmod_by_const(ir_node **div, ir_node **mod,
- ir_node *irn);
-
#include "end.h"
#endif