| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi all, I am new to compiler writing and need some help in implementing some of the classical algorithms for data flow analysis given in the Dragon book. I am trying to come up with a method to synthesize pointers in the C program to VHDL or Verilog so that it can be translated into hardware circuits. For this I should be able to first identify pointers in the C program. I read the chapter 10.8 in dragon book "Dealing with aliases" which vaguely gives a method to determine pointers in each basic block of the program. It looks to me like it can be implemented only by multiple parses of the source to achieve the desired convergence. I have written a parser to parse the CFG version of the C code dumped by the gcc option "gcc -fdump-tree-cfg <filename.c>". Its a single pass parser. I am stuck at this point of how to implement the pointer identification further. I previously implemented algorithm for finding the reaching definitions (algorithm 10.2) as a post parse one and it was a success. Can someone look into the compiler book and let me know if I can implement this using a single parse or do I need to change the implementation method ?. Thanks a lot! K7... |
|
#2
| |||
| |||
| There are several papers on synthesizing C pointers to hardware including the following one: http://citeseer.ist.psu.edu/237630.html I have only read the introduction and abstract but it seems to be suggesting a way of analyzing which variables a pointer might be pointing to in order to synthesize it into hardware. Most compilers, including gcc, already have an alias analysis pass, so it might save you time if you can find a way to use the existing code. I think tree-ssa-alias.c of gcc-4.3.1 is the pass you might be interested in. |
|
#3
| |||
| |||
| On Jul 28, 2:23 am, johnhull2008 <johnhull2...@gmail.com> wrote: > There are several papers on synthesizing C pointers to hardware > including the following one:http://citeseer.ist.psu.edu/237630.html > > I have only read the introduction and abstract but it seems to be > suggesting a way of analyzing which variables a pointer might be > pointing to in order to synthesize it into hardware. > > Most compilers, including gcc, already have an alias analysis pass, so > it might save you time if you can find a way to use the existing code. > I think tree-ssa-alias.c of gcc-4.3.1 is the pass you might be > interested in. Hey John, Thanks for your reply. That was the first paper that I read on pointer synthesis. Its a pretty good idea. Thanks for your suggestions. Regards, Madhu... |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.