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: [dataflow]: PATCH: incremental scanning, code cleanup, separate regs_ever_live computation


I've made some style fixes and added a few comments.
This is commited per Ken's approval.

Seongbae

On 11/10/06, Seongbae Park <seongbae.park@gmail.com> wrote:
This patch has:

1)
Removal of DF_REF_ARTIFICIAL flag. Instead, macro DF_REF_IS_ARTIFICIAL()
is used to tell whether a reference is artificial or not, based on
whether insn of a reference
is NULL or not.

2)
df_insn_rescan() now doesn't mark the block as dirty if there's no
change in its refs.

3)
regs_ever_live is not updated by individual reference scanning.
Instead, it is computed at the end based on reg chains.

4)
Verifier now asserts as soon as the verification fails at any
individual reference,
instead of aggregating all results and simply return false.
This makes it easier to find where the verification failed on the debugger.

5)
To speed up the verification of regchain,
we now cache a pointer to the regchain which points to
the first reference in each regchain that are not verified yet.
Combined with the verification order being exactly
the same order as the references in the reg chain,
this makes the regchain verification O(n) instead of O(n^2).

The patch has been bootstrapped on x86_64, ppc and arm,
and showed no extra regressions on them.

Seongbae


2006-11-10 Seongbae Park <seongbae.park@gmail.com>


        * fwprop.c (forward_propagate_into): Use DF_REF_IS_ARTIFICIAL()
        instead of DF_REF_ARTIFICIAL flag.
        * df-scan.c (df_ref_record, df_def_record_1): Remove record_live
        (df_get_exit_block_use_set, df_get_entry_block_def_set):
        Renamed from df_get_{exit_block_uses,entry_block_defs}.
        (df_compute_regs_ever_live, df_ref_chain_change_bb,
        df_ref_is_record_live, df_reg_chain_unmark, df_ref_chain_free):
        New functions.
        (df_reg_chains): New structure
        (df_ref_add_to_chains):
        (df_scan_blocks): Add call to df_compute_regs_ever_live().
        (df_ref_create): Remove record_live, and replace DF_REF_ARTIFICIAL
        flag use with DF_REF_IS_ARTIFICIAL () macro.
        (df_insn_rescan): Avoid marking blocks dirty if nothing changed.
        (df_insn_change_bb): Refactored to use df_ref_change_bb.
        (df_ref_is_equal): Now ignores DF_REF_MARKER flag.
        (df_ref_chain_find_ref, df_reg_chain_find_reg): Fix the order of
        parameters to the evaluation function.
        (df_ref_find_chains): Avoid early evaluation of certain fields.
        (df_ref_add_to_chains): Remove update to regs_ever_live.
        (df_refs_add_to_chains): Use DF_REF_NEXT_REF macro.
        (df_ref_record): Remove DF_REF_RECORD_LIVE.
        (df_insn_refs_record): Now takes the reference list to be added as
        an argument.
        (df_bb_refs_record): Handles entry and exit block cases.
        (df_bb_refs_collect): Removed DF_REF_ARTIFICIAL.
        (df_refs_record): Scan entry and exit blocks first.
        (df_ref_verify): Takes reg_chain cache as an argument,
        verifies hardreg chain.
        (df_exit_block_bitmap_verify): Renamed from df_exit_block_verify
        (df_entry-block_bitmap_verify): Renamed from df_entry_block_verify
        (df_verify_blocks): Implement regchain cache. Assert immediately
        when verification fails in any subfunctions.
        * df.h (enum df_ref_flags): Remove DF_REF_ARTIFICIAL and renumber the
        enum.
        (DF_REF_IS_ARTIFICIAL, DF_REF_MARK, DF_REF_UNMARK, DF_REF_IS_MARKED,
        DF_INSN_UID_SAFE_GET): New macros:





--
#pragma ident "Seongbae Park, compiler, http://seongbae.blogspot.com";

Attachment: df-regs-ever-live.commited.diff.txt
Description: Text document


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