<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Soot users,<div class=""><br class=""></div><div class="">Is there any way to optimize the number of registers when translating to Jimple?</div><div class="">I run Soot on the Ashes(<a href="http://www.sable.mcgill.ca/ashes/" class="">http://www.sable.mcgill.ca/ashes/</a>) benchmarks. </div><div class="">One constructor of a class (symjpack-t/classes/z12.class, I attached) has thousands of registers</div><div class="">in Jimple (actually bytecode -> Jimple is not a big problem, only 3 seconds).</div><div class="">Consequently it takes very long time (5 minutes) when I transform the Jimple file into Shimple. </div><div class="">The bottle neck is the constructor of z12.</div><div class=""><br class=""></div><div class="">I disassembled the constructor (because I couldn’t find the java source file of the class), it looks like:</div><div class=""><br class=""></div><div class="">/* disassembled JAVA code */<br class="">public z12() {<br class=""> z7[] arrayOfz7 = new z7[1500];<br class=""> arrayOfz7[0] = new z7("0", 14, null, null, this.z0);<br class=""> arrayOfz7[1] = new z7(null, 9, arrayOfz7[0], arrayOfz7[0], this.z0);<br class=""> …<br class=""> arrayOfz7[1499] = new z7(...);<br class="">}<br class=""><br class=""></div><div class="">This code is translated to </div><div class="">/* Jimple */<br class="">public z12() {<br class=""> r1 = newarray (z7)[1500]; // z7[] arrayOfz7 = new z7[1500];<br class=""> ….<br class=""> specialinvoke $r6.<init>("0", 14, null, null, $r7); // new z7();<br class=""> r1[0] = $r6; // arrayOfz7[0] = ...<br class=""> $r8 = new z7;<br class=""> $r10 = r1[0];<br class=""> $r11 = r1[0];<br class=""> $r9 = r0.z0;<br class=""> specialinvoke $r8.<init>(null, 9, $r10, $r11, $r9);<br class=""> r1[1] = $r8; // arrayOfz7[1] = ...<br class=""> $r12 = new z7;<br class=""> $r15 = r1[1];<br class=""> $r13 = r1[0];<br class=""> $r14 = r0.z0;<br class=""> ….<br class=""> r1[1499] = …<br class=""> $r6919 = …<br class="">}<br class=""><br class=""></div><div class="">As you can see, the Jimple file is almost in the form of SSA as it is,</div><div class="">so it seems to take a long time because of the large number of registers.</div><div class=""><br class=""></div><div class="">I used the latest Soot with the following command:</div><div class="">java -cp soot-trunk.jar soot.Main -cp symjpack-t/classes -pp -f j z12 #for jimple</div><div class="">java -cp soot-trunk.jar soot.Main -cp symjpack-t/classes -pp -f j z12 #for shimple</div><div class=""><br class=""></div><div class=""></div></body></html>