Hello,

This patch makes lra_constraint_insn_stack_bitmap an sbitmap. This
reduces compile time by another minute or so on gcc17 for the test
case of PR54146, and I think it's a general improvement also for less
extreme code. For cc1-i files the compile time change tends to be a
little less but that may just be noise.

Bootstrapped&tested on x86_64-unknown-linux-gnu. OK for lra-branch?

(This is the combined patch of all changes in my check-out of the
lra-branch. The lra.c and lra-constraints.c bits are new, the rest was
posted previously and is awaiting review also.)

Ciao!
Steven

        * lra-int.h (lra_constraint_insn_stack_bitmap,
        lra_constraint_insn_stack): Remove.
        (lra_pop_insn, lra_insn_stack_length): New prototypes.
        * lra.c (lra_constraint_insn_stack_bitmap): Make static sbitmap.
        (lra_constraint_insn_stack): Make static.
        (lra_push_insn_1): New function.
        (lra_push_insn): Rewrite using lra_push_insn_1.
        (lra_push_insn_and_update_insn_regno_info): Likewise.
        (lra_pop_insn, lra_insn_stack_length): New functions.
        * lra_constraints.c (lra_constraints): Use new interface to
        insns stack instead of manipulating in-place.
        * lra-eliminations.c (add_insn_bitmap_to_set): New function.
        (update_reg_eliminate): Make argument an sbitmap.  Return a bool
        telling whether the input sbitmap has changed.
        (lra_eliminate): Allocate and free the worklist set as an sbitmap.

        * lra-lives.c (curr_point): Make non-static in lra_create_live_ranges.
        (mark_pseudo_live): Take POINT argument.
        (mark_pseudo_dead): Likewise.
        (mark_regno_live): Likewise, and return a bool to indicate that
        someting changed in the dataflow sets.
        (mark_regno_dead): Likewise.
        (next_program_point): Renamed from incr_curr_point, and take the
        current program point as a by-reference argument.
        (process_bb_lives): Take the current program point as by-ref argument.
        Try to only do a program point increment if this is necessary.
        (remove_some_program_points_and_update_live_ranges): If no compression
        can be done, don't update the live ranges.
        (lra_create_live_ranges): Make curr_point local, and pass it around.
        Visit blocks in topological order of the reverse CFG.

        * lra-int.h (lra_assert): Define as duplicate of gcc_checking_assert.

Attachment: lra-patch3.diff
Description: Binary data

Reply via email to