Re: Data flow analysis and constant propagation

Matt <>
6 May 2003 01:27:02 -0400

          From comp.compilers

Related articles
Data flow analysis and constant propagation (Matt) (2003-04-20)
Re: Data flow analysis and constant propagation (Diego Novillo) (2003-04-27)
Re: Data flow analysis and constant propagation (Ben L. Titzer) (2003-04-27)
Re: Data flow analysis and constant propagation (Matt) (2003-05-06)
| List of all articles for this month |

From: Matt <>
Newsgroups: comp.compilers
Date: 6 May 2003 01:27:02 -0400
Organization: AT&T Broadband
References: 03-04-069 03-04-096
Keywords: analysis
Posted-Date: 06 May 2003 01:27:02 EDT

This is what I have: Fortran90 is translated into a data/control flow
graph. I'm not interested in mutually recursive functions and I'm
treating inter procedural analysis as orthogonal to this. The graph
is translated into a control tree using interval analysis. This tree
contains basic blocks, while loops, do loops, if, if-else, and generic
loops. On this tree in 2 passes I can do a lot of things like
reaching definitions and live variables. This is all done using
something called structural analysis. I can't do constant propagation
using structural analysis but I've done all this work building this
control tree so I was wondering if I could somehow use it for doing
constant propagation and what I really want for now, which is to find
out if a value is a loop index plus a constant. If there were a way
to do simple attribution on the tree that would deterimine the value
of each expression that would be great.

Hope this clears a few things up.

What I have found that looks good is a demand driven approach. The tree
is used to determine def-use info. Then the compiler uses a recursive
approach based on the def-use info to determine the rest.

"Ben L. Titzer" wrote:

> If your module is powerful enough to dataflow analysis, then it should
> be possible to perform constant propagation with it. Constant
> propagation is just a special case of dataflow analysis where a
> program point only has a single constant flow into it.
> Are you using a context-sensitive or insensitive analysis? ...

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.