This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions about modifing AST.


On 27-Oct-2002, Eric Tang <tytang@cse.cuhk.edu.hk> wrote:
> 	i want to convert floating point to fixed point arithmetics
> 	in compiler level.

Why?

Are you talking about changing the language semantics?
Or are you just talking about a compiler optimization?

And for which language(s)?

> 	My approach (still thinking) is getting the AST from the gcc 
> 	frontend,and then anaylse the necessary fixed-point notations
> 	to remove floating point operations. I modify the AST node with 
> 	floating point to fixed-point and using gcc backend translate
> 	to binary.

If you want to do this, it's better to write a pass which operates
directly on GCC's AST representation, rather than trying to read
in the AST from the dump file (which won't work, IIUC, because the dump
file is deliberately incomplete).

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]