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]

[trunk] first of three patches to get rid of no conflict blocks.


This is the first of either two or three patches to get rid of no
conflict blocks. 
The problem with using the current implementation of df for this is that
the current implementation does not keep the parameters for ZERO_EXTRACT
or SIGN_EXTRACT if one of these wraps a subreg.  So in order to recover
this info, you would of had to rescan the insn.

Most of this patch deals with df-scan.  The idea here is there that if a
ZERO_EXTRACT or SIGN_EXTRACT wraps a subreg, then new flags are added to
the df_ref and two new fields are added to the df_ref to support the
width and the offset information in these wrappers. 

To do this without blowing a lot of space, i simply use an extension of
the df_ref called df_ref_extract to support the two fields when they are
necessary. 

I would like at least one of the rtl experts to review this patch more
carefully than a normal review.  Scanning rtl is not my forte, i fell
kind of like the person in those old airplane movies that is called to
cockpit after both pilots have been killed.   I know that pulling the
stick back makes the plane go up, but there sure are a lot of buttons
and switches there. 

The next patch will use the information in ra-conflict to properly
account for partial register use and hopefully make the noconflict
blocks unnecessary.   It will utilize the offset and width fields from
the extract wrappers.

I have tested this patch on several platforms and it causes no problems,
but since nothing is using this information, this is a pretty weak test.  

Thanks,

Kenny


2008-03-04  Kenneth Zadeck <zadeck@naturalbridge.com>

    * fwprop.c (update_df): Support width and offset parameters of
    df_ref_create.
    * ra-conflict.c (mark_reg_store, clear_reg_in_live,
    global_conflicts): Change DF_REF_EXTRACT to either
    DF_REF_ZERO_EXTRACT or DF_REF_SIGN_EXTRACT.  Change
    DF_REF_STRICT_LOWER_PART to DF_REF_STRICT_LOW_PART.
    * df-scan.c (df_ref_record, df_defs_record,
    df_ref_create_structure, df_def_record_1, df_uses_record,
    df_get_conditional_uses, df_get_call_refs, df_insn_refs_collect,
    df_bb_refs_collect, df_entry_block_defs_collect,
    df_exit_block_uses_collect): Support new width and offset fields.
    (ref_extract_pool): New storage pool.
    (df_free_ref): New function.
    (df_reg_chain_unlink, df_free_collection_rec,
    df_sort_and_compress_refs): Call df_free_ref.
    (df_ref_equal_p, df_ref_compare): Compare offset and width fields
    of df_ref_extract.
    (df_ref_create_structure): Allocate df_ref_extract if offset and
    width fields are used.
    (df_def_record_1): Get offset and width from ZERO_EXTRACT.
    (df_uses_record): Get offset and width from ZERO_EXTRACT
    and SIGN_EXTRACT.
    * global.c (build_insn_chain): Change DF_REF_EXTRACT to either
    DF_REF_ZERO_EXTRACT or DF_REF_SIGN_EXTRACT.  Change
    DF_REF_STRICT_LOWER_PART to DF_REF_STRICT_LOW_PART.
    * df.h (df_ref_flags): Change DF_REF_EXTRACT to either
    DF_REF_ZERO_EXTRACT or DF_REF_SIGN_EXTRACT.  Change
    DF_REF_STRICT_LOWER_PART to DF_REF_STRICT_LOW_PART.
    (df_ref_extract): New structure.
    (DF_REF_WIDTH, DF_REF_OFFSET): New macros.
    (df_ref_create): Add width and offset parameters.
    


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