[Soot-list] registers in Jimple

Kihong Heo kheo at seas.upenn.edu
Mon Aug 21 11:06:19 EDT 2017


Hi Linghui,

Thanks for your suggestion.

Unfortunately, it does not work in my problem.
I used the following command:

$ java -cp soot-trunk.jar soot.Main -cp symjpack-t/classes -pp -f j -p jop enabled z12
$ java -cp soot-trunk.jar soot.Main -cp symjpack-t/classes -pp -f s -p jop enabled z12

The jimple outputs are the same as before. 

Best,
- Kihong Heo




> 2017. 8. 21. 오전 3:56, Linghui Luo <linghui.luo at uni-paderborn.de> 작성:
> 
> Hi Kihong,
>  
> I think you should take a look into the Jimple Optimization Pack
> https://soot-build.cs.uni-paderborn.de/doc/sootoptions/#phase_15 <https://soot-build.cs.uni-paderborn.de/doc/sootoptions/#phase_15>
>  
> best regards,
> Linghui
>   <>
> Von: Soot-list [mailto:soot-list-bounces at CS.McGill.CA] Im Auftrag von Kihong Heo
> Gesendet: Montag, 21. August 2017 04:15
> An: soot-list at CS.McGill.CA
> Betreff: [Soot-list] registers in Jimple
>  
> Hi Soot users,
>  
> Is there any way to optimize the number of registers when translating to Jimple?
> I run Soot on the Ashes(http://www.sable.mcgill.ca/ashes/ <http://www.sable.mcgill.ca/ashes/>) benchmarks. 
> One constructor of a class (symjpack-t/classes/z12.class, I attached) has thousands of registers
> in Jimple (actually bytecode -> Jimple is not a big problem, only 3 seconds).
> Consequently it takes very long time (5 minutes) when I transform the Jimple file into Shimple. 
> The bottle neck is the constructor of z12.
>  
> I disassembled the constructor (because I couldn’t find the java source file of the class), it looks like:
>  
> /* disassembled JAVA code */
> public z12() {
>     z7[] arrayOfz7 = new z7[1500];
>     arrayOfz7[0] = new z7("0", 14, null, null, this.z0);
>     arrayOfz7[1] = new z7(null, 9, arrayOfz7[0], arrayOfz7[0], this.z0);
>>     arrayOfz7[1499] = new z7(...);
> }
> 
> This code is translated to 
> /* Jimple  */
> public z12() {
>     r1 = newarray (z7)[1500];    //  z7[] arrayOfz7 = new z7[1500];
>     ….
>     specialinvoke $r6.<init>("0", 14, null, null, $r7);  //  new z7();
>     r1[0] = $r6;                                                          // arrayOfz7[0] = ...
>     $r8 = new z7;
>     $r10 = r1[0];
>     $r11 = r1[0];
>     $r9 = r0.z0;
>     specialinvoke $r8.<init>(null, 9, $r10, $r11, $r9);
>     r1[1] = $r8;                                                          // arrayOfz7[1] = ...
>     $r12 = new z7;
>     $r15 = r1[1];
>     $r13 = r1[0];
>     $r14 = r0.z0;
>     ….
>     r1[1499] = …
>     $r6919 = …
> }
> 
> As you can see, the Jimple file is almost in the form of SSA as it is,
> so it seems to take a long time because of the large number of registers.
>  
> I used the latest Soot with the following command:
> java -cp soot-trunk.jar soot.Main -cp symjpack-t/classes -pp -f j z12   #for jimple
> java -cp soot-trunk.jar soot.Main -cp symjpack-t/classes -pp -f j z12   #for shimple

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20170821/e912d337/attachment-0001.html>


More information about the Soot-list mailing list