/** * Returns an equivalent unbacked JimpleBody of the current Body by eliminating the Phi nodes. * * <p> * Currently available option is "naive-phi-elimination", typically specified in the "shimple" phase (eg, -p shimple * naive-phi-elimination) which skips the dead code elimination and register allocation phase before eliminating Phi nodes. * This can be useful for understanding the effect of analyses. * * <p> * Remember to setActiveBody() if necessary in your SootMethod. * * @see #eliminatePhiNodes() **/ public JimpleBody toJimpleBody() { ShimpleBody sBody = (ShimpleBody) this.clone(); sBody.eliminateNodes(); JimpleBody jBody = Jimple.v().newBody(sBody.getMethod()); jBody.importBodyContentsFrom(sBody); return jBody; }