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]

[PATCH, SMS 1/4] Fix calculation of row_rest_count


Hello,

The calculation of the number of instructions in a row is currently
done by updating row_rest_count field in struct ps_insn on the fly
while creating a new instruction.  It is used to make sure we do not
exceed
the issue_rate.
This calculation assumes the instruction is inserted in the beginning of a
row thus does not take into account the cases where it must follow other
instructions.  Also, it's not been property updated when an instruction
is removed.
To avoid the overhead of maintaining this row_rest_count count in every
instruction in each row as is currently done; this patch maintains one
count per row which holds the number of instructions in the row.

The patch was tested together with the rest of the patches in this series.
On ppc64-redhat-linux regtest as well as bootstrap with SMS flags
enabling SMS also on loops with stage count 1.  Regtested on SPU.
On arm-linux-gnueabi regtseted on c,c++. Bootstrap c language with SMS
flags enabling SMS also on loops with stage count 1.

OK for mainline?

Thanks,
Revital

        * modulo-sched.c (struct ps_insn): Remove row_rest_count field.
        (struct partial_schedule): Add rows_length field.
        (ps_insert_empty_row): Handle rows_length.
        (create_partial_schedule): Likewise.
        (free_partial_schedule): Likewise.
        (reset_partial_schedule): Likewise.
        (create_ps_insn): Remove rest_count argument.
        (remove_node_from_ps): Update rows_length.
        (add_node_to_ps): Update rows_length and call create_ps_insn
        without passing row_rest_count.

Attachment: patch_row_rest_count_17_5.txt
Description: Text document


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