[Soot-list] qustion about loop fusion

Jun Cao caoj at purdue.edu
Wed Mar 1 23:15:25 EST 2006


Hi John:

Thanks for your help.

What I do in the loop fusion is to delete some stmts between two adjacent 
loops. And I also relpace first gotostmt of first loop with first gotostmt 
of second loop. I am wondering where the error comes from. Do I need to do 
other work for this simple case?  Thanks.

> I don't think that the problem is in the jimple that you included
> in your question. Not only can I not see any obvious difficulty,
> but when I tried to create a file corresponding to your jimple
> (attached below) and ran that through "soot -src-prej jimple",
> soot generates an output class that runs correctly.
>
> Since the problem is a verification error, and the JVM's verifier
> performs its dataflow analysis on bytecode,
> you'll probably have more luck finding the problem by first
> examining the bytecode in the output class file to see exactly
> what bytecode instructions the verifier is complaining about, and
> then working backward to determine how the transformations you are
> performing might have generated the problematic bytecode.

How do I examine the the bytecode in the output class file? Thanks.

> More specifically, the VerifyError claims that local variable 2
> might be read before it is assigned any value. So look at the
> bytecode to see which instructions set and read local 2, then
> figure out which jimple variables correspond to that local.
>
> soot has options to dump its intermediate representations
> before and after each of its transformations, and
> the control flow graphs produced at intermediate points in its
> processing.  They may be of use in discovering where the
> unverifiable transformations occur, though interpreting them
> requires looking at the PackManager source to determine the order
> in which transformations occur.  See the documentation for the
> --dump-body and --dump-cfg options" for more information. 



More information about the Soot-list mailing list