This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: postreload-gcse.c: Obvious fix applied: don't emit jumps when we can't





gcc-patches-owner@gcc.gnu.org wrote on 31/03/2005 20:00:36:

> The redundancy elimination used by postreload-gcse can necessitate to
> split an edge,
> which is not possible when we can't emit new jumps.  I have therefore
> added the
> same check as we already had in  bb-reorder.c:reorder_basic_blocks as an
> obvious fix.
A more appropriate fix is to disable the gcse only for those cases that you
need an edge split; add the targetm.cannot_modify_jumps_p () condition to
eliminate_partially_redundant_load.  I had a patch to do a similar thing
when we don't have profiling information; in such a case we cannot be sure
that the split worth it (even when we remove redundant loads).  I have
update the patch to catch also cases where the machine doesn't support
adding jumps after reload.  here is the modified patch, didn't test it yet
let me know what do you think ?

Mostafa.

2005-03-31 Mostafa Hagog <mustafa@il.ibm.com>

      * postreload-gcse.c (eliminate_partially_redundant_load): Don't split
edge when it not
      profitable or not possible.


(See attached file: postreload_gcse_nopdf4.patch)

Attachment: postreload_gcse_nopdf4.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]