From: Linus Torvalds <torvalds@osdl.org>
To: Christopher Li <sparse@chrisli.org>
Cc: linux-sparse@vger.kernel.org
Subject: Re: basic block output order?
Date: Tue, 12 Dec 2006 17:44:37 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0612121740420.3535@woody.osdl.org> (raw)
In-Reply-To: <20061213011549.GA12570@chrisli.org>
On Tue, 12 Dec 2006, Christopher Li wrote:
>
> Thanks for your explain. I see, you want to generate the dominator
> first.
Basically, yes. That way, when we start generating code in any basic
block, we usually either (a) have the outputs from the dominators or (b)
we're the top block in a loop and any freedom we can use to pick our
preferred registers is probably a good thing.
The current "example.c" was very much written with the intent that it
would not ever do any _smart_ register allocation, but just allocate
registers on-the-fly. But doing that requires that you set things up so
that the stupid approach can still get reasonable results.
The way the death-notes work etc was all designed exactly so that the
register "allocator" never really needed any global visibility at all, it
could just work on an instruction-per-instruction basis.
That said, the simplicity of it all in example.c still doesn't mean that
it _works_. It really doesn't, and isn't even really close. But it
occasionally results in code that looks _almost_ like it could be run ;)
Linus
prev parent reply other threads:[~2006-12-13 2:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-12 10:24 basic block output order? Christopher Li
2006-12-12 16:36 ` Linus Torvalds
2006-12-13 1:15 ` Christopher Li
2006-12-13 1:44 ` Linus Torvalds [this message]
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=Pine.LNX.4.64.0612121740420.3535@woody.osdl.org \
--to=torvalds@osdl.org \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.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).