This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Fix tree-optimization/20139.
> FWIW, we might consider just folding any expression that is subject
> to TER. I've got a patch somewhere around here which does that.
> Mostly it seems to eliminate casts, but from time to time it finds
> something it can zap in complex expressions.
That would work, too. Could you dig up your patch please?
The only thing I am worried about is its effect on compile-time
performance. Have you had a chance to take a look at that? I suppose
calling fold once for every statement or so shouldn't hurt too much.
Otherwise, it may be simply fun to look at what fold folds as TER
builds complex expressions. I love instrumentations. :-)