public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [tree-ssa] Any good sources of documentation?
       [not found] <seca53da.044@its-mn-inet1.its.rmit.edu.au>
@ 2003-05-20 12:19 ` Diego Novillo
  0 siblings, 0 replies; 5+ messages in thread
From: Diego Novillo @ 2003-05-20 12:19 UTC (permalink / raw)
  To: Marty Hauff; +Cc: gcc

On Tue, 2003-05-20 at 02:12, Marty Hauff wrote:

>   From your response I am assuming that tree-ssa does not parse the
> _whole_ program into one huge tree but rather parses each function
> individually.
>
Mainline and tree-ssa are the same codebase (modulo the SSA bits).  You
could also use the call-graph in tree-ssa.  One thing we don't keep are
the SSA forms for each function separately.  That's a design limitation
that we would eventually need to overcome for whole program analysis.

>   I understand that this strategy uses far less memory but could
> tree-ssa be modified to parse the whole program into a single tree and
> if so would it break it?
> 
Sure.  It would need changing quite a few things, though.  You need to
support several flowgraphs at the same time, for instance.  Right now,
the flowgraph uses global data structures and variables.  There are some
efforts underway to build infrastructure to support whole program
analysis, so GCC will eventually grow enough brains to do this.

> Specifically I am trying to use the compiler to give me information
> about what hardware resources would be most useful for a given
> application.
>
Hardware resources?  I'm not sure I follow.  There is nothing
hardware-related in trees.


Diego.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [tree-ssa] Any good sources of documentation?
@ 2003-05-20 13:27 Marty Hauff
  0 siblings, 0 replies; 5+ messages in thread
From: Marty Hauff @ 2003-05-20 13:27 UTC (permalink / raw)
  To: dnovillo; +Cc: gcc

>Hardware resources?  I'm not sure I follow.  There is >nothing
>hardware-related in trees.

Just FYI...  When developing a new application, most programmers have a fair idea about what processor they are going to use.  In the high volume embedded world, however, it may not be clear which is the best cost/performance architecture to use.  What I am trying to research is a methodology that will specify the best hardware to use based on the functionality requested by the application code.  From what I understand of the compilation process in GCC, trees are the latest point during compilation prior to machine specific constructs being introduced.  Once the code is converted to RTL it begins to take on machine specific attributes - i.e. RTL is generated based on the templates provided in the machine description file.  In order to make a non-prejudicial assessment of the best architecture for a given application, I can't use RTL because machine specific mappings and optimisations have already taken place.  It may be that the point at which first RTL conversion takes place may be the point I need to focus on but I'm still nutting that one through.  I am hoping to first extract sufficient information from the trees to determine whether CISC or RISC is appropriate and then whether an 8/16/32/64 bit architecture is best, how many registers and what sort and how many ALUs and what functionality.
All very interesting but bloody hard!

Enjoy
Marty

If you find yourself going through hell ... keep going!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [tree-ssa] Any good sources of documentation?
@ 2003-05-20  6:40 Marty Hauff
  0 siblings, 0 replies; 5+ messages in thread
From: Marty Hauff @ 2003-05-20  6:40 UTC (permalink / raw)
  To: dnovillo; +Cc: gcc

Diego,

Thanks for your response.  There was an query posted by Matthieu Moy on 5/4 regarding "Where can I get the output of the front-end".  In this query he asked if there was a moment in the compilation at which we can see the whole program in one single tree?  The response suggested trying cgraph_finalize_compilation_unit ().  From your response I am assuming that tree-ssa does not parse the _whole_ program into one huge tree but rather parses each function individually.  I understand that this strategy uses far less memory but could tree-ssa be modified to parse the whole program into a single tree and if so would it break it?

Specifically I am trying to use the compiler to give me information about what hardware resources would be most useful for a given application.  I can't use the mainline code because it converts to RTL (which is machine dependent) very early on and does most of its optimisations in the RTL.  Ideally I would like to receive an already optimised tree that can be analysed to deduce an ideal hardware architecture.  Do you think that tree-ssa is the tool for this?????

Oh and by the way, I will be attempting to walk on water shortly after accomplishing all this.....

Marty

>>> Diego Novillo <dnovillo@redhat.com> 19/05/03 23:23:14 >>>
On Mon, 2003-05-19 at 04:22, Marty Hauff wrote:

> I'm trying to find out how the tree-ssa branch performs its
> compilation and optimisation.  I've found the doxygen stuff on the web
> but I need something a bit higher level at this stage.
>
Most documentation is in the source code itself.  There is a high-level
description of the optimization process in the project page
(http://gcc.gnu.org/projects/tree-ssa/).  After the GCC summit next
week, I will post the tree SSA paper and slides in my home page.

> Specifically I am looking to find a point during compilation where the
> most optimisation has been done PRIOR to target specific processing
> having been started.
>
tree-optimize.c:optimize_function_tree()

>   The main gcc branch is no good to me because it only does things on
> a function by function basis.  According to the docs, tree-ssa
> processes the whole source _before_ generating rtl etc. (or have I got
> this wrong?)
> 
Both mainline and tree-ssa operate in the same way.  If you use
-funit-at-a-time, then compilation proceeds in call graph order.


Diego.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [tree-ssa] Any good sources of documentation?
  2003-05-19  8:49 Marty Hauff
@ 2003-05-19 13:40 ` Diego Novillo
  0 siblings, 0 replies; 5+ messages in thread
From: Diego Novillo @ 2003-05-19 13:40 UTC (permalink / raw)
  To: Marty Hauff; +Cc: gcc

On Mon, 2003-05-19 at 04:22, Marty Hauff wrote:

> I'm trying to find out how the tree-ssa branch performs its
> compilation and optimisation.  I've found the doxygen stuff on the web
> but I need something a bit higher level at this stage.
>
Most documentation is in the source code itself.  There is a high-level
description of the optimization process in the project page
(http://gcc.gnu.org/projects/tree-ssa/).  After the GCC summit next
week, I will post the tree SSA paper and slides in my home page.

> Specifically I am looking to find a point during compilation where the
> most optimisation has been done PRIOR to target specific processing
> having been started.
>
tree-optimize.c:optimize_function_tree()

>   The main gcc branch is no good to me because it only does things on
> a function by function basis.  According to the docs, tree-ssa
> processes the whole source _before_ generating rtl etc. (or have I got
> this wrong?)
> 
Both mainline and tree-ssa operate in the same way.  If you use
-funit-at-a-time, then compilation proceeds in call graph order.


Diego.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tree-ssa] Any good sources of documentation?
@ 2003-05-19  8:49 Marty Hauff
  2003-05-19 13:40 ` Diego Novillo
  0 siblings, 1 reply; 5+ messages in thread
From: Marty Hauff @ 2003-05-19  8:49 UTC (permalink / raw)
  To: gcc

Dear all,

I'm trying to find out how the tree-ssa branch performs its compilation and optimisation.  I've found the doxygen stuff on the web but I need something a bit higher level at this stage.  For some reason I can't get anything to read or process the texi files properly.

Specifically I am looking to find a point during compilation where the most optimisation has been done PRIOR to target specific processing having been started.  The main gcc branch is no good to me because it only does things on a function by function basis.  According to the docs, tree-ssa processes the whole source _before_ generating rtl etc. (or have I got this wrong?)

Any help would be much appreciated
Marty Moose

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-05-20 12:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <seca53da.044@its-mn-inet1.its.rmit.edu.au>
2003-05-20 12:19 ` [tree-ssa] Any good sources of documentation? Diego Novillo
2003-05-20 13:27 Marty Hauff
  -- strict thread matches above, loose matches on Subject: below --
2003-05-20  6:40 Marty Hauff
2003-05-19  8:49 Marty Hauff
2003-05-19 13:40 ` Diego Novillo

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).