[Soot-list] unrolling loops

Greg Dennis gdennis at mit.edu
Wed Oct 19 11:46:45 EDT 2005


thanks, Pat.

I've considered looking at the Dava code for detecting loops, but I
want to be able to handle arbitrary backedges in control flow beyond
just a standard for or while loops, like continues, breaks, and gotos.
So I was hoping to develop a general algorithm on a CFG, but I'll give
the Dava code a look and see if I get any insights.

Greg


On 10/18/05, Patrick LAM <plam at sable.mcgill.ca> wrote:
> Greg Dennis wrote:
> > I'm in the process of building a static analysis based on the Jimple
> > IR. My analysis presumes all loops in the CFG have been unwound for a
> > finite number of iterations, with an "assume" statement at the end of
> > the iterations that assumes the loop condition to be false. I have
> > implemented a new type of Stmt called AssumeStmt for this purpose.  At
> > the end of the unrolling transformation, there should be no backedges
> > in the CFG. Do you know of anyone who has successfully implemented
> > this type of loop unrolling Jimple? I'm having difficulty figuring out
> > a simple algorithm for it.
>
> Hi Greg,
>
> Well, I'd assume that you want to first figure out what the loops are, so
> you might want to start with the Dava code, either by looking at the
> output and working from that (so convert the While or For statements into
> unrolled statements) or just see how that code works to find the loops.
>
> pat


More information about the Soot-list mailing list