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]

[lra] patch to speed more compilation of PR54146


The following patch speeds LRA up more on PR54146. Below times for compilation of the test on gcc17.fsffrance.org (an AMD machine):

Before:
real=1214.71 user=1192.05 system=22.48
After:
real=1144.37 user=1124.31 system=20.11

The patch should not change the generated code. About 2/3 of speed up is achieved by insertion of live ranges of pseudos only interesting for assignment in the start point chains.
1/3 is achieved by switching iterations through a bitmap instead of sparseset at the end of function process_bb_lives.


The patch was successfully bootstrapped on x86/x86-64.

Committed as rev. 192183.

2012-10-07 Vladimir Makarov <vmakarov@redhat.com>

        * lra-int.h (struct lra_live_range): Remove finish_next.
        (lra_start_point_ranges, lra_finish_point_ranges): Remove.
        * lra-lives.c (lra_start_point_ranges, lra_finish_point_ranges):
        Remove.
        (process_bb_lives): Change start regno in
        EXECUTE_IF_SET_IN_BITMAP.  Iterate on DF_LR_IN (bb) instead of
        pseudos_live_through_calls.
        (create_start_finish_chains, rebuild_start_finish_chains): Remove.
        (compress_live_ranges): Don't call rebuild_start_finish_chains.
        (lra_create_live_ranges): Don't call create_start_finish_chains.
        (lra_clear_live_ranges): Remove code freeing
        lra_start_point_ranges and lra_finish_point_ranges.
        * lra-assigns.c (start_point_ranges, not_in_chain_mark): New.
        (create_live_range_start_chains): Ditto.
        (insert_in_live_range_start_chain): Ditto.
        (finish_live_range_start_chains): Ditto.
        (update_lives, assign_temporarily): Call
        insert_in_live_range_start_chain.
        (find_hard_regno_for, spill_for): Rename lra_start_point_ranges to
        start_point_ranges.
        (setup_live_pseudos_and_spill_after_risky): Ditto.
        (lra_assign): Call create_live_range_start_chains and
        finish_live_range_start_chains.




Attachment: speed1.patch
Description: Text document


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