[Soot-list] How can i turn off forced optimization in soot

Patrick Lam prof.lam at gmail.com
Fri Oct 23 19:41:05 EDT 2020


Hi,

The basic issue is that because of the conversion from stack code to
three-address code and back, the original code doesn't exist anymore, and
if you don't optimize it, you get very verbose bytecode. JVMs might do OK
with it these days, I don't know. But it's going to be way larger than the
original code. You can look at the CC'00 paper for details about that
translation.

pat

On Sat, Oct 24, 2020 at 2:23 AM cl0und <cl0und at protonmail.com> wrote:

> Hi, I found when exec `PackManager.v().runPacks()`, the
> soot.PackManager#runBodyPacks(soot.SootClass) method will be called and the
> code in this method
> ```code
> CopyPropagator.v().transform(body);
> ConditionalBranchFolder.v().transform(body);
> UnreachableCodeEliminator.v().transform(body);
> DeadAssignmentEliminator.v().transform(body);
> UnusedLocalEliminator.v().transform(body);
> ```
> will be forced to optimize jimple body, and I cannot bypass it. So, how
> can I turn off the forced optimization in soot?
>
> By the way, the following configuration does not work when I set before
> exec `PackManager.v().runPacks()`
> Options.v().setPhaseOption("jj.cp", "enabled:false"); // Copy propagator
> Options.v().setPhaseOption("jj.cbf", "enabled:false"); // Conditional
> Branch Folder
> Options.v().setPhaseOption("jj.uce", "enabled:false"); // Unreachable Code
> Eliminator
> Options.v().setPhaseOption("jj.dae", "enabled:false"); // Dead Assignment
> Eliminator
> Options.v().setPhaseOption("jb.cp", "enabled:false"); // Copy propagator
> Options.v().setPhaseOption("jb.cbf", "enabled:false"); // Conditional
> Branch Folder
> Options.v().setPhaseOption("jb.uce", "enabled:false"); // Unreachable Code
> Eliminator
> Options.v().setPhaseOption("jb.dae", "enabled:false"); // Dead Assignment
> Eliminator
>
> Thank you for taking the time.
>
>
>
> Sent with ProtonMail <https://protonmail.com> Secure Email.
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20201024/bf5075cc/attachment.html>


More information about the Soot-list mailing list