[Soot-list] unrolling loops

Patrick LAM plam at sable.mcgill.ca
Tue Oct 18 18:36:28 EDT 2005


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