On 10/22/15 08:59, Jakub Jelinek wrote:
On Thu, Oct 22, 2015 at 08:50:23AM -0400, Nathan Sidwell wrote:
+ expr = build2 (TRUNC_MOD_EXPR, ivar_type, ivar,
+ fold_convert (ivar_type, collapse->iters));
+ expr = build2 (MULT_EXPR, diff_type, fold_convert (diff_type, expr),
+ collapse->step);
+ expr = build2 (plus_code, iter_type, collapse->base,
+ fold_convert (plus_type, expr));
Shouldn't these be fold_build2 instead?
I don't think fold_build2 makes a difference here, as (at least) one operand
is a variable?
Fold does tons of optimizations, some could be relevant even for this case.
But if you think build2 is fine, I can live with it.
I don;t mind. I just thought it would do a lot of checking and no actual
transformation.
I think an enum in internal-fn.h is better, the IFN_UNIQUE comment can just
say that it uses this and this enum from internal-fn.h and the description
go there. Being able to just p (enum ifn_unique_kind) gimple_call_arg (call, 0)
is valuable (though, perhaps you could even tweak the gimple-pretty-print.c
dumper to dump the first argument to IFN_UNIQUE symbolically instead of
numerically.
ok
nathan