From: "Christopher Li" <sparse@chrisli.org>
To: linux-sparse@vger.kernel.org
Subject: Re: Writing compilers, and example.c vs compile-i386.c
Date: Tue, 17 Jun 2008 17:41:40 -0700 [thread overview]
Message-ID: <70318cbf0806171741g4d099e92vf0c0e9d7588fd7d6@mail.gmail.com> (raw)
In-Reply-To: <48584A33.7080602@cowlark.com>
On Tue, Jun 17, 2008 at 4:35 PM, David Given <dg@cowlark.com> wrote:
> Christopher Li wrote:
> However: I notice that the code seems to make use of OP_DEATHNOTE
> instructions to mark hardregs as being dead. However, these are only
> generated if track_pseudo_death(ep) is called --- and example.c never
> calls this. It *is*, however, called if -vdead is specified on the
> command line. Is this a bug in example.c or am I just misunderstanding
> things?
You understands it correctly. The example.c should call track_pseudo_death(ep).
It is a bug that I disable the dead node by default and forget to enable it for
example.c. For normal checking, death node is not needed, and if it is needed,
you can always generates it.
We should add the death node back for example.c. Patches are welcome
as well.
BTW, you shouldn't take example.c too seriously per Linus' suggestion.
> (Also, the OP_DEATHNOTE instructions appear to occur *before* the
> instruction that uses them last --- is this so that the instruction can
> reuse the register is the code generator sees fit to do so?)
I think so, it just let the code generator know that they don't need to preserve
that register any more for the next instruction they emit. It is a very naive
register allocations any way. Feel free to roll your own if you see fits.
> (In addition, I notice that once liveness tracking has been done phisrc
> nodes get annotated with the desired shared register that the phi should
> occupy; suddenly, the phi stuff all makes sense.)
Glad to hear that.
> (PS. Please don't cc me if you're also mailing the list --- I only need
> one copy!)
You mean your email client is not smart enough to realize that is the
same email :-) I prefer to get CC directly to get a sense of being part of
the discussion. My email will filter differently if I am directly addressed.
Chris
next prev parent reply other threads:[~2008-06-18 0:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-16 23:04 Writing compilers, and example.c vs compile-i386.c David Given
2008-06-16 23:50 ` Mike Frysinger
2008-06-17 0:49 ` Christopher Li
2008-06-17 23:35 ` David Given
2008-06-18 0:41 ` Christopher Li [this message]
2008-06-20 23:46 ` David Given
2008-06-21 1:40 ` Christopher Li
2008-06-24 13:29 ` David Given
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=70318cbf0806171741g4d099e92vf0c0e9d7588fd7d6@mail.gmail.com \
--to=sparse@chrisli.org \
--cc=linux-sparse@vger.kernel.org \
/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 NNTP newsgroup(s).