postreload-gcse heuristics broken?

Mostafa Hagog MUSTAFA@il.ibm.com
Wed Jan 26 16:29:00 GMT 2005





Ulrich Weigand/Germany/IBM wrote on 26/01/2005 17:47:22:

> Mostafa Hagog/Haifa/IBM wrote on 01/25/2005 11:10:50 PM:
>
> > Here is an updated patch, can you please test it?
>
> It does work.  But are you sure you wanted to keep this hunk:

No, this hunk shouldn't be kept.

>
> *************** eliminate_partially_redundant_load (basi
> *** 1030,1035 ****
> --- 1031,1040 ----
>     if (reg_set_or_used_since_bb_start (dest, bb, insn))
>       return;
>
> +     FOR_EACH_EDGE (pred, ei, bb->preds)
> +       if (EDGE_CRITICAL_P (pred))
> +       return;
> +
>     /* Check potential for replacing load with copy for predecessors.  */
>     FOR_EACH_EDGE (pred, ei, bb->preds)
>       {
>
> It would appear the later tests for EDGE_CRITICAL_P are quite
> pointless after this ...

Yes you are right.  This means that we didn't test the new change,
just the old one again.

Attached the new patch.

Thanks,
Mostafa.

(See attached file: postreload_gcse_nopdf3.patch)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postreload_gcse_nopdf3.patch
Type: application/octet-stream
Size: 3467 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20050126/53b808f6/attachment.obj>


More information about the Gcc mailing list