On Tue, Apr 15, 2014 at 7:55 PM, Eric Botcazou <[email protected]> wrote:
>> ISTR some more ???/FIXMEs and/or special-casings we could remove with
>> that. As followup, of course.
>
> It would be better to remove them all at once, so if you have specifics...
grepping for '[ \t!(]optimize[ )\$]' I find in tree-ssa-ter.c:
/* Without alias info we can't move around loads. */
if (!optimize && gimple_assign_single_p (stmt)
&& !is_gimple_val (gimple_assign_rhs1 (stmt)))
return false;
I think that's all I found, the above check can be safely removed after
the patch (TER is disabled by default at -O0 thus this was a guard
for a miscompile with -O0 -ftree-ter IIRC).
>> The single reason why we don't have virtual operands at -O0 is compile-time
>> btw - SSA rewrite doesn't come for free. But I don't mind - still maybe
>> a quick comparison of stage1-gcc compile-time with/without that patch
>> would be interesting?
>
> 3m3.306s vs 3m3.041s for the 64-bit build of an earlier compiler version. The
> difference doesn't seem to be much more noticeable on big preprocessed files,
> e.g. combine.i or pt.i, but I'm not sure this means anything.
In theory we have much more convoluted CFGs at -O0 and more
memory vars (we don't prune TREE_ADDRESSABLE at -O0) and thus PHI
insertion and vop renaming will be comparably more expensive at -O0
than with optimization.
But given that virtual operands are pretty much an important correctness
factor of GIMPLE omitting them constrains what utility functions and passes
we can run at -O0. Thus removing that -O0 difference was always on my
list ...
Which means - ok for trunk (with the above check in TER removed).
Thanks,
Richard.