After some experiments I found that there is practically no a generated code improvement of the current LRA caller saves subpass in comparison of the subpass implemented in this patch. The current subpass was based on iterated global forward/backward solution of the problem putting save/restore code in program excluding putting the code on CFG edges. I could write a several hypotheses for this but imho most probable explanation is that live range splitting (which can be seen as save/restore code around calls for some cases) is already done on the most important program points (loop borders).
  The proposed subpass is EBB based one.  It permits speed up LRA 
because the code is much simpler and faster and because there is no need 
to call DF analysis after the subpass (LRA itself can easily update 
DF-info).
  The patch also speeds LRA up be removing one lra-lives.c subpass run 
in some cases.
  The patch was successfully tested on bootstrap of x86_64 and ppc64 
and improved GCC compile speed (in release mode) by about 1%.
2011-08-23  Vladimir Makarov <vmaka...@redhat.com>

        * lra-int.h (lra_debug_save_data): Remove.
        (lra_save_restore): Change the prototype.

        * lra.c (lra): Don't call df_analyze after lra_save_restore.
        Don't call lra_create_live_ranges before the loop. Call
        lra_create_live_ranges before lra_spill if necessary.

        * lra-saves.c: Rewrite.

Attachment: caller-saves.patch.gz
Description: GNU Zip compressed data

Reply via email to