Using SSA optimization algorithm in virtual machine environments

Szczepan Kras, Adam Piórkowski

Abstract


This article focuses on some ways to optimize the code, carried out using the technique of static single assignment (SSA) with particular emphasis on the context of today's most popular virtual machine environments. The basic methods of code optimization, which are based on the technique of recasting the code to that form are presented. Also a method of design control flow graphs and focused on the possibility of its use to reduce the calculations is shown. Based on the example code, the possibility of optimizing the SSA in leading systems, virtual machines Java VM, the .NET Framework and Mono was considered. Experimentally the impact of manual performance optimization by the programmer in relation to the optimization performed automatically by the JIT compiler was carried out.

Keywords


code optimization; SSA; Static Single Assignment; virtual machines

Full Text:

PDF (Polski)

References


Piórkowski A., Żupnik M.: Loop Optimization in Managed Code Environments with Expressions Evaluated Only Once. TASK Quarterly, Vol. 14(4), 2010, s. 397÷404.

Einarsson, A., Nielsen J.D.: A survivor’s guide to Java program analysis with soot. BRICS, Department of Computer Science, University of Aarhus, Denmark 2008.

Gal A., Probst Ch.W., Franz M.: Java Bytecode Verification via Static Single Assignment Form. ACM Transactions on Programming Languages and Systems (TOPLAS), Vol. 30(4), 2008, s. 21.

Park, J-S., Lee J-J.: A Practical Improvement to the Partial Redundancy Elimination in SSA Form. Journal of Computing Science and Engineering, Vol. 2(3), 2008, s. 301÷320.

Rosen B., Wegman M.N., Zaddeck F.K.: Global Value Numbers and Redundant Computations. 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, ACM, 1988, s. 12÷27.

Montione M.: The Mono JIT optimization and revolution. 2006.

Öqvist J.: Introduction to the SSAPRE Compiler Optimization. Blog, Sweden 2009, http://llbit.se/?p=369 [dostęp 01.02.2016].

Bodden E.: First steps using Soot 2.3.0 as a command-line tool. 2008, http://www.bodden.de/2008/08/21/soot-command-line/ [dostęp 01.02.2016].

Singer J. et al.: Static Single Assignment Books. Springer, (w opracowaniu, ver. 2014).

Umanee N.: A Brief Overview of Shimple, 2003, www.sable.mcgill.ca/soot/tutorial /shimple/shimple.ps [dostęp 01.02.2016].

Aho A., Sethi R., Ullman J.: Kompilatory, reguły, metody i narzędzia. Wydawnictwa Naukowo-Techniczne, Warszawa 2002.

Appel A.: Modern compiler implementation in Java. Cambridge University Press, 2004, s. 399÷430.

http://blogs.msdn.com/b/jmstall/archive/2006/03/13/dead-code-elimination.aspx, [dostęp 27.11.2014].

http://www.mono-project.com/docs/advanced/runtime/docs/linear-ir/,

[dostęp 16.01.2015].

http://msdn.microsoft.com/pl-pl/library/t0hfscdc.aspx, [dostęp 26.12.2014].

http://stackoverflow.com/questions/22256013/does-suns-hotspot-jit-compiler-automatically-apply-final-to-java-local-variab, [dostęp 25.12.2014].

http://tirania.org/blog/archive/2012/Apr-04.html, [dostęp 20.12.2014].

http://www.compileroptimizations.com/category/constant_propagation.htm.

http://www.mono-project.com/docs/advanced/runtime/, [dostęp 03.10.2014].

http://www.oracle.com/technetwork/java/whitepaper-135217.html,

[dostęp 13.11.2014].

http://www.techpowerup.com/downloads/2089/real-temp-3-70/, [dostęp 3.01.2015].




DOI: http://dx.doi.org/10.21936/si2016_v37.n1.750