[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A weird NopStmt



On Sun, 19 Sep 1999, Liang Guo wrote:

>         specialinvoke $r5.<ComputerJob: void <init>(java.lang.String,int)>("Comp Sci", 66000);
>         r2 = $r5;
>         $r6 = virtualinvoke r2.<Job: java.lang.String Name()>();
>    -->  nop;
>         $i2 = virtualinvoke r2.<Job: int PayLevel()>();
>    -->  nop;

This looks like naive Jimple code.  The nops are, I think, caused by the
redundant pop instructions (of the return values of the virtualinvokes).
I think they're eliminated by one of the optimizations; in particular, the
DeadAssignmentEliminator should get them.  However, these scalar
optimizations are disabled by default in the beta release, because they
have not yet been fully tested.

You can change the soot.jimple.JimpleOptimizationPack and uncomment the
DAE.  This should make the NopStmt's go away.  It might be worthwhile,
though, to make your PDG code handle NopStmt's.

pat