* Generation of GENERIC tree
@ 2009-04-28 12:53 Renuka Selvaraj
2009-04-28 14:59 ` Ian Lance Taylor
0 siblings, 1 reply; 6+ messages in thread
From: Renuka Selvaraj @ 2009-04-28 12:53 UTC (permalink / raw)
To: gcc-help
Please let me know how to generate GENERIC tree from parse tree and relative
documents if any.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Generation of GENERIC tree
2009-04-28 12:53 Generation of GENERIC tree Renuka Selvaraj
@ 2009-04-28 14:59 ` Ian Lance Taylor
2009-06-24 9:45 ` Re : " charfi asma
0 siblings, 1 reply; 6+ messages in thread
From: Ian Lance Taylor @ 2009-04-28 14:59 UTC (permalink / raw)
To: Renuka Selvaraj; +Cc: gcc-help
"Renuka Selvaraj" <renukaselvaraj@acmet.com> writes:
> Please let me know how to generate GENERIC tree from parse tree and relative
> documents if any.
To generate GENERIC you call a bunch of buildN functions. I recommend
looking at any gcc frontend other than the C/C++ frontends to see how it
is done (the C/C++ frontends are not great examples for this because
they actually use GENERIC as the parse tree, so they don't do any
conversion).
I unfortunately don't know of any serious documentation for this. In
general the interface between the frontend and the middleend is not
really documented.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re : Generation of GENERIC tree
2009-04-28 14:59 ` Ian Lance Taylor
@ 2009-06-24 9:45 ` charfi asma
2009-06-24 9:56 ` Andrew Haley
0 siblings, 1 reply; 6+ messages in thread
From: charfi asma @ 2009-06-24 9:45 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-help
Hello
I am interested too in the GENERIC
tree
I compile hello.cpp using g++
-fdump-tree-all, I do not get a generic intermediate representation,
there was (.tu, .class, .original, .gimple, .vcg ...)
To look at the GENERIC tree, I
compile hello.java using gcj (as mentioned in the answer bellow: "I
recommend looking at any gcc frontend other than the C/C++ frontends
to see how it is done....")
But when I compile java file using
the same option (fdump-tree-all) I do not get .generic as I expect..
Before .gimple, gcj generate only .original
is the GENERIC is represented by .original ?
compiling a java file, .original looks like this:
@1 function_decl name: @2 type: @3 scpe: @4
srcp: Hello.java:0 args: @5
extern inline body: @6
@2 identifier_node strg: <init> lngt: 6
@3 method_type size: @7 algn: 8 clas: @4
retn: @8 prms: @9
@4 record_type name: @10 size: @11 algn: 32
tag : struct flds: @12 fncs: @1
binf: @13
@5 parm_decl type: @14 scpe: @1 srcp: Hello.java:1
argt: @14 size: @11 algn: 32
..
compiling a c++ file, .original looks like this:
;; Function wchar_t* std::wcschr(wchar_t*, wchar_t) (_ZSt6wcschrPww)
;; enabled by -tree-original
return <retval> = wcschr ((const wchar_t *) __p, __c);
;; Function wchar_t* std::wcspbrk(wchar_t*, const wchar_t*) (_ZSt7wcspbrkPwPKw)
;; enabled by -tree-original
return <retval> = wcspbrk ((const wchar_t *) __s1, __s2);
...
When I red the gcc internals, TREE and GENERIC representations, I expect that I will find a code like c and c++ or a tree structure with TREE_LIST, TREE_CHAIN, ...
I have to study the GENERIC form, building a metamodel for this presentation, etc.
Can some one help me please, I am so confused.
Thank you very much.
Asma
----- Message d'origine ----
De : Ian Lance Taylor <iant@google.com>
À : Renuka Selvaraj <renukaselvaraj@acmet.com>
Cc : gcc-help@gcc.gnu.org
Envoyé le : Mardi, 28 Avril 2009, 16h59mn 02s
Objet : Re: Generation of GENERIC tree
"Renuka Selvaraj" <renukaselvaraj@acmet.com> writes:
> Please let me know how to generate GENERIC tree from parse tree and relative
> documents if any.
To generate GENERIC you call a bunch of buildN functions. I recommend
looking at any gcc frontend other than the C/C++ frontends to see how it
is done (the C/C++ frontends are not great examples for this because
they actually use GENERIC as the parse tree, so they don't do any
conversion).
I unfortunately don't know of any serious documentation for this. In
general the interface between the frontend and the middleend is not
really documented.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re : Generation of GENERIC tree
2009-06-24 9:45 ` Re : " charfi asma
@ 2009-06-24 9:56 ` Andrew Haley
2009-06-24 11:48 ` Re : " charfi asma
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Haley @ 2009-06-24 9:56 UTC (permalink / raw)
To: charfi asma; +Cc: Ian Lance Taylor, gcc-help
charfi asma wrote:
>
> I am interested too in the GENERIC
> tree
> I compile hello.cpp using g++
> -fdump-tree-all, I do not get a generic intermediate representation,
> there was (.tu, .class, .original, .gimple, .vcg ...)
> To look at the GENERIC tree, I
> compile hello.java using gcj (as mentioned in the answer bellow: "I
> recommend looking at any gcc frontend other than the C/C++ frontends
> to see how it is done....")
> But when I compile java file using
> the same option (fdump-tree-all) I do not get .generic as I expect..
> Before .gimple, gcj generate only .original
That's right. gcj transforms its front-end trees straight into GIMPLE. I
can't see any purpose to going via GENERIC.
Andrew.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re : Re : Generation of GENERIC tree
2009-06-24 9:56 ` Andrew Haley
@ 2009-06-24 11:48 ` charfi asma
2009-06-24 12:41 ` Andrew Haley
0 siblings, 1 reply; 6+ messages in thread
From: charfi asma @ 2009-06-24 11:48 UTC (permalink / raw)
To: gcc-help
but gcc manual 2008, gcc internals 2008, many articles and figures in GCC summit 2006, 2007 and 2008 talk about GENERIC ?
did C front end call the function c_genericize or not ?
thank you
Asma
----- Message d'origine ----
De : Andrew Haley <aph@redhat.com>
À : charfi asma <charfiasma@yahoo.fr>
Cc : Ian Lance Taylor <iant@google.com>; gcc-help@gcc.gnu.org
Envoyé le : Mercredi, 24 Juin 2009, 11h56mn 33s
Objet : Re: Re : Generation of GENERIC tree
charfi asma wrote:
>
> I am interested too in the GENERIC
> tree
> I compile hello.cpp using g++
> -fdump-tree-all, I do not get a generic intermediate representation,
> there was (.tu, .class, .original, .gimple, .vcg ...)
> To look at the GENERIC tree, I
> compile hello.java using gcj (as mentioned in the answer bellow: "I
> recommend looking at any gcc frontend other than the C/C++ frontends
> to see how it is done....")
> But when I compile java file using
> the same option (fdump-tree-all) I do not get .generic as I expect..
> Before .gimple, gcj generate only .original
That's right. gcj transforms its front-end trees straight into GIMPLE. I
can't see any purpose to going via GENERIC.
Andrew.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re : Re : Generation of GENERIC tree
2009-06-24 11:48 ` Re : " charfi asma
@ 2009-06-24 12:41 ` Andrew Haley
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Haley @ 2009-06-24 12:41 UTC (permalink / raw)
To: charfi asma; +Cc: gcc-help
charfi asma wrote:
I wrote:
> charfi asma wrote:
>>
>
>> I am interested too in the GENERIC tree
>> I compile hello.cpp using g++
>> -fdump-tree-all, I do not get a generic intermediate representation,
>> there was (.tu, .class, .original, .gimple, .vcg ...)
>> To look at the GENERIC tree, I
>> compile hello.java using gcj (as mentioned in the answer bellow: "I
>> recommend looking at any gcc frontend other than the C/C++ frontends
>> to see how it is done....")
>> But when I compile java file using
>> the same option (fdump-tree-all) I do not get .generic as I expect..
>> Before .gimple, gcj generate only .original
>
> That's right. gcj transforms its front-end trees straight into GIMPLE. I
> can't see any purpose to going via GENERIC.
>
> but gcc manual 2008, gcc internals 2008, many articles and figures in GCC summit 2006, 2007 and 2008 talk about GENERIC ?
They do.
> did C front end call the function c_genericize or not ?
It does. However, as far as I can tell it converts to GIMPLE, not
GENERIC. I can't see the point of GENERIC.
Andrew.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-06-24 12:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-28 12:53 Generation of GENERIC tree Renuka Selvaraj
2009-04-28 14:59 ` Ian Lance Taylor
2009-06-24 9:45 ` Re : " charfi asma
2009-06-24 9:56 ` Andrew Haley
2009-06-24 11:48 ` Re : " charfi asma
2009-06-24 12:41 ` Andrew Haley
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).