+/* Sets the default reassociation operation for an ir_op_ops. */
+ir_op_ops *firm_set_default_reassoc(opcode code, ir_op_ops *ops)
+{
+#define CASE(a) case iro_##a: ops->reassociate = reassoc_##a; break
+
+ switch (code) {
+ CASE(Mul);
+ CASE(Add);
+ CASE(Sub);
+ CASE(And);
+ CASE(Or);
+ CASE(Eor);
+ default:
+ /* leave NULL */;
+ }
+
+ return ops;
+#undef CASE
+}
+