* Handle bit fields by added And/Or calculations.
* Lowers all graphs.
*
- * @Note: There is NO lowering of objects oriented types. This is highly compiler
- * and ABI specific and should be placed directly in the compiler.
+ * @note There is NO lowering of objects oriented types. This is highly compiler
+ * and ABI specific and should be placed directly in the compiler.
*/
void lower_highlevel(int lower_bitfields);
ir_graph_pass_t *ir_lower_mode_b_pass(
const char *name, const lower_mode_b_config_t *config);
+/**
+ * Used as callback, whenever a lowerable mux is found. The return value
+ * indicates, whether the mux should be lowered. This may be used, to lower
+ * floating point muxes, while keeping mux nodes for integers, for example.
+ *
+ * @param mux The mux node that may be lowered.
+ * @return A non-zero value indicates that the mux should be lowered.
+ */
+typedef int lower_mux_callback(ir_node* mux);
+
+/**
+ * Lowers all mux nodes in the given graph. A callback function may be
+ * given, to select the mux nodes to lower.
+ *
+ * @param irg The graph to lower mux nodes in.
+ * @param cb_func The callback function for mux selection. Can be NULL,
+ * to lower all mux nodes.
+ */
+void lower_mux(ir_graph *irg, lower_mux_callback *cb_func);
+
+/**
+ * Creates an ir_graph pass for lower_mux().
+ *
+ * @param name the name of this pass or NULL
+ * @param cb_func The callback function for mux selection. Can be NULL,
+ * to lower all mux nodes.
+ *
+ * @return the newly created ir_graph pass
+ */
+ir_graph_pass_t *lower_mux_pass(const char *name, lower_mux_callback *cb_func);
+
/**
* An intrinsic mapper function.
*