From: charfi asma <charfiasma@yahoo.fr>
To: Andi Hellmund <mail@andihellmund.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re : [GCC front end] add new TREE CODE
Date: Mon, 21 Feb 2011 11:26:00 -0000 [thread overview]
Message-ID: <741091.71307.qm@web28516.mail.ukl.yahoo.com> (raw)
In-Reply-To: <4D596AEA.7030705@andihellmund.com>
----- Message d'origine ----
De : Andi Hellmund <mail@andihellmund.com>
À : charfi asma <charfiasma@yahoo.fr>
Cc : gcc-help@gcc.gnu.org
Envoyé le : Lun 14 février 2011, 18h 48min 26s
Objet : Re: [GCC front end] add new TREE CODE
Hey Asma,
> my question is : should I also care about how to translate those tree code al
> over the compiler chain: gimple --> ssa --> unssa --> rtl --> ass ...
>
The idea of GCC's modularization is that a front-end should maximally care about
GIMPLE. All the other transformations are done by the middle-end.
> did you suggest to follow an example of an existing front end that adds some
> tree code cause the C++ one seems to be mature and complete.
>
Yes, the C++ front-end uses quite a lot of own TREE codes, but I would then
start with a very simple one and check how it "translates" the TREE codes into a
GIMPLE sequence, e.g. by looking at the 'gimplify_expr' language hook which is
'cp_gimplify_expr' for C++.
I hope that helps. If you have any further question about the specific
transformation from TREE codes to GIMPLE, just let us know ...
Andi
Hello,
thank you Andi and Ian for your help ;)
In fact, my language is moslty like C (var, function, call exp, if else, ...)
but there is some difference, for example, I have State and transitions concepts
which I can translate in C (set of states presented as enumerations and
transitions as array of a defined type Transition which is a struct with source
state, target state, guard, ...)
what I want to try, is to add a new tree codes to directly translate State,
transtion, event, ... and do not use Array, enumeration of C language.
Ian said in his response that if my language is very different than C I should
not use trees. Have you any idea of what I can use instead ?
I look at the ghdl front end and I did not find vhdl-tree.def to see if they
defined a new tree code for this fe.
I asked the question in their mailing list but I did not get an answer :(
I will probably (as you suggested before) look at the cp front end and may be
the java one also.
thank you again for your help
Asma
next prev parent reply other threads:[~2011-02-21 11:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-14 17:44 charfi asma
2011-02-14 17:48 ` Ian Lance Taylor
2011-02-14 23:59 ` Andi Hellmund
2011-02-21 11:26 ` charfi asma [this message]
2011-02-21 14:27 ` Re : " Andi Hellmund
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=741091.71307.qm@web28516.mail.ukl.yahoo.com \
--to=charfiasma@yahoo.fr \
--cc=gcc-help@gcc.gnu.org \
--cc=mail@andihellmund.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).