public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: daniel tian <daniel.xntian@gmail.com>
Cc: gcc@gcc.gnu.org, peng.zheng@mavrixtech.com, yan.hu@mavrixtech.com.cn
Subject: Re: Insn missing in Size optimization(-Os)
Date: Tue, 08 Dec 2009 04:04:00 -0000	[thread overview]
Message-ID: <4B1DD056.8020906@redhat.com> (raw)
In-Reply-To: <121fadb80912061910j59436c4en546e6eda7ee614fe@mail.gmail.com>

On 12/06/09 20:10, daniel tian wrote:
>> You might start by monitoring emit_reload_insns's behavior when it handles
>> your insn.
>>      
> I just debug the source code with your advice. Check the function
> emit_reload_insns.
>
> That insn was deleted before entering funcion emit_reload_insns. It
> was deleted in reload(...) in reload1.c file just before calling
> function reload_as_needed(this function will call emit_reload_insns).
> It is sure that the insn is generated, but deleted after reload.
>
> insn was deleted in following code.
> /* If a pseudo has no hard reg, delete the insns that made the equivalence.
>       If that insn didn't set the register (i.e., it copied the register to
>       memory), just delete that insn instead of the equivalencing insn plus
>       anything now dead.  If we call delete_dead_insn on that insn, we may
>       delete the insn that actually sets the register if the register dies
>       there and that is incorrect.  */
>    
No.  I'm not referring to why the original insn was deleted.  I'm 
referring to why the reload insn was deleted (or never emitted in the 
first place).

Start by looking at the insns created by emit_reload_insns for the insn 
with the call.  One of those should be loading a hard register with the 
function address.


jeff

  reply	other threads:[~2009-12-08  4:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02 10:18 daniel tian
2009-12-02 12:29 ` daniel tian
2009-12-02 16:21   ` Ian Lance Taylor
2009-12-02 17:35   ` Jeff Law
2009-12-04  7:01     ` daniel tian
2009-12-05  8:01       ` daniel tian
2009-12-05 16:18         ` Jeff Law
2009-12-07  3:10           ` daniel tian
2009-12-08  4:04             ` Jeff Law [this message]
2009-12-08  6:11               ` daniel tian

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=4B1DD056.8020906@redhat.com \
    --to=law@redhat.com \
    --cc=daniel.xntian@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=peng.zheng@mavrixtech.com \
    --cc=yan.hu@mavrixtech.com.cn \
    /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).