Re: give me some tips
- From: Michael Mair <Michael.Mair@xxxxxxxxxxxxxxx>
- Date: Sun, 12 Mar 2006 23:48:56 +0100
Rod Pemberton schrieb:
"Michael Mair" <Michael.Mair@xxxxxxxxxxxxxxx> wrote in message
news:47je5kFfm5kqU1@xxxxxxxxxxxxxxxxx
Rod Pemberton schrieb:"Michael Mair" <Michael.Mair@xxxxxxxxxxxxxxx> wrote in message
news:47j97dFf6t05U1@xxxxxxxxxxxxxxxxx
Rod Pemberton schrieb:"Michael Mair" <Michael.Mair@xxxxxxxxxxxxxxx> wrote in message
news:47iu7rFfqgv6U1@xxxxxxxxxxxxxxxxx
Apart from that: Have a look at graph theory; there is much nice
stuff on the web and, as discrete maths goes, it is a fun subject
as you can state really deep problems on a sheet of paper within
five minutes so that everyone understands the problem but the
proof took a hundred years to be found and conversely can prove
things in an easily understandable way. If you understand graph
theory and get an intermediate representation of some code, you
are ready to do general (not target specific) optimisations.
Hmm, graph theory. I'll _definately_ have a look at this. It'll
probably
be a big time saver for me since my spatial relationship abilities are
(supposedly) off the charts.
I am not quite sure whether I understand this remark.
We are both talking about
http://en.wikipedia.org/wiki/Graph_theory ,
aren't we?
You were. I wasn't... But, I just went through a number of graph theory
pages. I'm not sure exactly where I can use it in a compiler (yet). In
other words, binary trees, stacks, and reverse polish notation seem to do
everything I'm thinking of at the moment... Maybe I'll get it in the
future. Since I was just skimming, I didn't get to heavily into the
mathematics of graph theory.
Okay, let us keep this basic.
If you introduce an intermediate representation, it is often
advantageous to introduce a graph with certain properties,
e.g. a tree; if you compile on a translation unit by translation
unit base, then you could make an abstract translation unit
the base of your tree and everything stored in file scope the
first level nodes. Then you descend, into functions, declarations,
statements, operations...
For intraprocedural analysis, you can build a hypergraph on top
of this tree representing your control flow, e.g. you can use
an SSA form for constant propagation, constant folding,
control flow optimisation, copy propagation, scope reduction, ...
The tree gives you the chance to navigate scopes (just stay on
one level).
Recognition of certain patterns as detection of certain kinds
of induced subgraphs can be much easier.
One key to success is an appropriate intermediate representation;
here is one point where intellectual property can rest.
TenDRA's ANDF
This one's new to me.
Darn. I couldn't get a version for my OS, and was hoping someone had some
familiarity with ANDF...
http://www.info.uni-karlsruhe.de/~andf/index.htm
The TenDRA C and C++ compiler has two branches:
http://www.ten15.org/
http://www.tendra.org/
Anyway, thank you for the information :-)
LCC's DAGs
Necula's CIL
So far, the only "C" compiler I've found that uses both a yacc and lex
grammar is Lutz Hamel's "C Subset Compiler" WCC for VMS.
Hmmm, as resources go, you probably know
http://www.lysator.liu.se/c/ANSI-C-grammar-y.html
Yes, I've updated for myself, both his flex and bison grammar's to C99.
Would you put that up on the clc wiki?
BTW: We made it back on topic ;-)
Are you aware of Edward Willink's C++ grammars:
http://www.computing.surrey.ac.uk/research/dsrg/fog/
Unfortunately, some of his links are incorrect, extra /v/. These are
corrected:
CxxGrammar.y
http://www.computing.surrey.ac.uk/research/dsrg/fog/CxxGrammar.y
CxxTester.y http://www.computing.surrey.ac.uk/research/dsrg/fog/CxxTester.y
FogGrammar.y
http://www.computing.surrey.ac.uk/research/dsrg/fog/FogGrammar.y
FogTester.y http://www.computing.surrey.ac.uk/research/dsrg/fog/FogTester.y
I will check these out, too.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
.
- References:
- give me some tips
- From: Yuri CHUANG
- Re: give me some tips
- From: Rod Pemberton
- Re: give me some tips
- From: Michael Mair
- Re: give me some tips
- From: Rod Pemberton
- Re: give me some tips
- From: Michael Mair
- Re: give me some tips
- From: Rod Pemberton
- [OT] Re: give me some tips
- From: Michael Mair
- Re: [OT] Re: give me some tips
- From: Rod Pemberton
- Re: [OT] Re: give me some tips
- From: Michael Mair
- Re: [OT] Re: give me some tips
- From: Rod Pemberton
- give me some tips
- Prev by Date: Re: Memory leak problem
- Next by Date: Re: Memory leak problem
- Previous by thread: Re: [OT] Re: give me some tips
- Next by thread: Re: [OT] Re: give me some tips
- Index(es):
Relevant Pages
|