PRE (sometimes) confuses ivopts/scev?

Daniel Berlin dberlin@dberlin.org
Wed Jan 26 16:02:00 GMT 2005



On Wed, 26 Jan 2005, Richard Guenther wrote:

> On Wed, 26 Jan 2005, Richard Guenther wrote:
>
>> and the code produced is even better than before with -fno-tree-pre!
>>
>> For a runtime test of the tramp3d testcase we gain about 2% in
>> runtime compared to -fno-tree-pre and about 5% compared to -ftree-pre
>> without your patch.
>
> Btw., we take a compile-time hit of ~0.5% for the tramp3d testcase,
> but this could well be noise.
>
> Richard.


Note that the patch causes two testsuite failures, both tree 
if-conversion, due to inserting a bit of dead code in the loop exit block.

However, if i attempt to fix this by adding a DCE pass after PRE, 
tree if-convert screws up the cfg completely, and fails its tests anyway 
(verify_ssa failure)

DCE calls cleanup_tree_cfg, which ends up remerging all the critical 
edges, which is why the cfg is different enough to trigger that bug.

I'm not sure whether to just xfail the two ifc tests (since if-conversion 
has known cfg problems at this point), or try to make PRE do a little DCE 
on the expressions it inserts on it's own.



More information about the Gcc mailing list