+/** calculates how many arguments of the call are const */
+static int cnt_const_args(ir_node *call)
+{
+ int i, res = 0;
+ int n = get_Call_n_params(call);
+
+ for (i = 0; i < n; ++i) {
+ ir_node *param = get_Call_param(call, i);
+ ir_op *op = get_irn_op(param);
+
+ if (op == op_Const || op == op_SymConst)
+ ++res;
+ }
+ return res;
+}
+