public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kenneth Zadeck <zadeck@naturalbridge.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>,
	  Ian Lance Taylor <iant@google.com>,
	 "Park, Seongbae" <seongbae.park@gmail.com>,
	  "Bonzini, Paolo" <bonzini@gnu.org>,
	 Steven Bosscher <stevenb.gcc@gmail.com>,
	  Richard Sandiford <rsandifo@nildram.co.uk>
Subject: [trunk] first of three patches to get rid of no conflict blocks.
Date: Tue, 04 Mar 2008 20:53:00 -0000	[thread overview]
Message-ID: <47CDB6AF.9090707@naturalbridge.com> (raw)

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.
    

             reply	other threads:[~2008-03-04 20:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 20:53 Kenneth Zadeck [this message]
2008-03-04 20:57 ` Kenneth Zadeck
2008-03-05 21:24   ` Ian Lance Taylor
2008-03-06  0:31     ` Kenneth Zadeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47CDB6AF.9090707@naturalbridge.com \
    --to=zadeck@naturalbridge.com \
    --cc=bonzini@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iant@google.com \
    --cc=rsandifo@nildram.co.uk \
    --cc=seongbae.park@gmail.com \
    --cc=stevenb.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).