public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <jh@suse.cz>
To: law@redhat.com
Cc: Jan Hubicka <jh@suse.cz>, gcc@gcc.gnu.org
Subject: Re: Higher level RTL issues
Date: Sun, 21 Oct 2001 10:40:00 -0000	[thread overview]
Message-ID: <20011021194030.G12034@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <2702.1003518831@localhost.localdomain>

> The details of the proof of concept are pretty simple.  Remember, we don't
> have the automatic lowering code, just proof of concepts at this point.
> 
> For the embedded target I have a series of state variables which indicate
> whether or not we're working with generic RTL, lowering from generic to
> target RTL or working with target RTL only.
> 
> The backend has a set of generic patterns which are only available when the
> state variable indicates that we are working with generic RTL.

I've imaginated that w/o patterns at all - just have some easy enought
definition of "correct RTL", to get rid of the optimizer trying to hit into
existing pattern, but this sounds sane too.
> 
> The backend has a set of splitters which are only available when lowering
> from generic to target RTL.
> 
> The original backend's patterns (target specific) are basically unchanged.
Good.
> 
[snip]
>   > If I think about the concept, there are some parts that appears dificult
>   > to me, such as how are the calls represented, or the string operations...
> Calls are one of the interesting issues.  There's a whole rats nest of things
> that need to be improved, but none which are strictly required at this point.
> ie, we can tackle how calls are represented independently of the rest of the
> lowering work.
> 
> First, there should be a phase which unnests calls at the tree level.  Nested
Actually the current calls.c code can do unnesting, but only for "real calls" it
can see in the tree, not libcalls that can happend suddenly during tree generation.

But for unnesting you don't need to modify the tree structure, just always generate
in a way to compute operands first and set to proper places later.
This unfortunately won't work well for structures that are better returned from
nested calls directly where they should resist when calling the outer functions.

This works on targets w/o fixed stack pointer, as i386 is very well.
> calls make the code in calls.c a freaking nightmare (all the stack slot
> saving crap).
> 
> Second, we want a model where arguments are attached to the call and eventually
> lowered to assignments to stack slots and argument registers.  I'm not sure
> where it makes sense to lower these assignments yet.  The same applies for
> the return value.
> 
> Third, we want to delay exposure and lowering of libcalls.  libcalls sequences
> are a disgusting hack and cause as many problems as they solve.  The tricky
> part is that we need to unnest potential libcalls at the tree level so that
> we avoid all the stack slot saving BS when we lower from a simple "div"
> instruction to a __divsi3 libcall (as an example).
Agreed, but we need to track the nesting of libcalls inside calls somehow.
> 
> I haven't tacked string operations.  But my gut feeling is that we leave them
> as simple string operations at the generic RTL stage, then either lower them
> to the target specific string op, a series of simple insns, or a libcall
> as part of the overall lowering process.
Sounds easy - it is not that dificult to represent them just approximately
in the RTL.  With generic patterns and splitters it can be easy to write
the pattern and splitter calling the expand_builtin beast.

Honza
> 
> jeff

  reply	other threads:[~2001-10-21 10:40 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-09 19:46 law
2001-10-09 20:54 ` Diego Novillo
2001-10-09 21:27   ` Daniel Berlin
2001-10-09 21:49     ` Diego Novillo
2001-10-09 22:23       ` Daniel Berlin
2001-10-19 14:39     ` law
2001-10-19 12:19   ` law
2001-10-09 21:18 ` Daniel Berlin
2001-10-09 21:33   ` Diego Novillo
2001-10-19 14:37   ` law
2001-10-19 15:53     ` Daniel Berlin
2001-10-22  9:31       ` law
2001-10-22 11:49         ` Daniel Berlin
2001-10-13  2:27 ` Jan Hubicka
2001-10-19 12:03   ` law
2001-10-21 10:40     ` Jan Hubicka [this message]
2001-10-22  8:28       ` law
2001-10-22  8:36         ` Daniel Berlin
2001-10-22  8:56           ` law
2001-10-22  9:07           ` Jan Hubicka
2001-10-22 11:32             ` law
2001-10-22 15:07               ` Richard Henderson
2001-10-23 15:16               ` Joern Rennecke
2001-10-22 16:22     ` Joern Rennecke
2001-10-23  3:02       ` Jan Hubicka
2001-10-23 15:28         ` law
2001-10-24  7:59           ` Jan Hubicka
2001-10-22 11:30 law
2001-10-22 13:10 ` Daniel Berlin
2001-10-22 14:02   ` law
2001-10-22 14:25     ` Daniel Berlin
2001-10-22 14:28       ` Daniel Berlin
2001-10-22 14:48         ` law
2001-11-13 13:41 ` Diego Novillo

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=20011021194030.G12034@atrey.karlin.mff.cuni.cz \
    --to=jh@suse.cz \
    --cc=gcc@gcc.gnu.org \
    --cc=law@redhat.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).