|Recovering control flow information firstname.lastname@example.org (Andrew Sao-Chun Huang) (1992-04-13)|
|Re: Recovering control flow information email@example.com (1992-04-14)|
|Re: Recovering control flow information bwilson@shasta.Stanford.EDU (1992-04-14)|
|Re: Recovering control flow information lins@Apple.COM (1992-04-16)|
|From:||Andrew Sao-Chun Huang <firstname.lastname@example.org>|
|Keywords:||optimize, parallel, question|
|Date:||Mon, 13 Apr 1992 21:00:32 GMT|
I'm working on a code scheduler that produces scheduled code for a
parallel architecture. The scheduler takes as its input the assembly
listing produced by a modified, sparc GCC frontend. I would like to do
some global dataflow analysis on the input file before scheduling it. But
I run into the following 2 problems when I try to reconstruct the control
Note: The architechture has no call instruction. Function calls are
performed by storing the return address in the register (rp) and then
branching to the function. So the first thing I do is to distinguish
branchs from calls by detecting modifications to rp. Predecessor/succ-
essor relationships are due to branches, not calls.
1) Identifying the first basic block of each function. The input file
consists of many basic blocks. I would like to partition them into
different groups such that each group contains basic blocks from one
function. I can say that any basic block without a predecessor is the
first basic block of some function. But this would be wrong since it may
be the target of a compute branch. Actually, this problem is solved once
problem 2 is resolved.
2) Computed branches. Sometimes 'switch' statements get compiled into a
computed branch where the targets are store in a table in data memory. I
need to add control flow arcs from the basic block that contains the
computed branch to each of the target basic blocks.
Has anyone worked on a similar problem? I would appreciate any advice or
pointers to books/articles that discuss this problem.
Andrew Huang email@example.com
Electrical & Computer Engineering (412) 268-7101
Carnegie Mellon University
[This information is clearly available to the compiler, so I'd take the
direct approach and have the compiler put some comments into the file that
identify entry points, function boundaries, and branch tables. -John]
Return to the
Search the comp.compilers archives again.