Abstract
This paper presents an efficient and effective code optimization algorithm for eliminating partially dead assignments, which become redundant on execution of specific program paths. It is one of the most aggressive compiling techniques, including invariant code motion from loop bodies. Since the traditional techniques proposed to this optimization would produce the second-order effects such as sinking-sinking effects, they should be repeatedly applied to eliminate dead code completely, paying higher computation cost. Furthermore, there is a restriction that assignments sunk to a join point on ow of control must be lexically identical.
Our technique proposed here can eliminate possibly more dead assignments without the restriction at join points, using an explicit representation of data dependence relations within a program in a form of SSA (Static Single Assignment). Such representation called Extended Value Graph (EVG), shows the computationally equivalent structure among assignments before and after moving them on the control ow graph. We can get the final result directly by once application of this technique, because it can capture the second-order effects as the main effects, based on EVG.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Aho, A. V., Sethi, R. and Ullman, J. D.: Compilers: Principles, Techniques, and Tools, Addison Wesley, Reading, Mass. (1986).
Alpern, B., Wegman, M. N. and Zadeck, F. K.: Detecting Equality of Variables in Programs, POPL, ACM, (1988) 1–11.
Appel, A. W.: Modern Compiler Implementation in ML, Cambridge University Press (1998).
Briggs, P. and Cooper, K. D.: Effective Partial Redundancy Elimination, PLDI, ACM, (1994) 159–170.
Clock, C.: Global Code Motion Global Value Numbering, PLDI, ACM, (1995) 246–257.
Cytron, R., Ferrante, J., Rosen, B. K. and Wegman, M. N.: Efficiently Computing Static Single Assignment Form and Control Dependence Graph, ACM TOPLAS, Vol. 13,No. 4, (1991) 451–490.
Dhamdhere, D. M., Rose, B. K. and Zadeck, F. K.: How to Analyze Large Programs Efficiently and Informatively, PLDI, ACM, (1992) 212–223.
Feigen, L., Klappholz, D., Casazza, R. and Xue, X.: The Revival Transformation, POPL, ACM, (1994) 421–434.
Khedker, U. P. and Dhamdhere, D. M.: A Generalized Theory of Bit Bector Data Flow Analysis, ACM TOPLAS, Vol. 16,No. 5, (1994) 1472–1511.
Knoop, J., Rüthing, O. and Steffen, B.: Lazy Code Motion, PLDI, ACM, (1992) 224–234.
Knoop, J., Rüthing, O. and Steffen, B.: Partial Dead Code Elimination, PLDI, ACM, (1994) 147–158.
Muchnick, S. S.: Advanced Compiler Design Implementation, Morgan Kaufmann, Reading, Mass. (1997).
R. Gupta, D. B. and Fang, J.: Path Profile Guided Partial Dead Code Elimination Using Predication, PACT, IEEE, (1997) 102–115.
Bodik, R. and Gupta, R.: Partial Dead Code Elimination Using Slicing Transformations, PLDI, ACM, (1997) 159–170.
Sreedhar, V. C. and Gao, G. R.: A Linear Time Algorithm for Placing φ-Nodes, POPL, ACM, (1995) 62–73.
Steffen, B., Knoop, J. and O. Rüthing: The Value Flow Graph: A rogram representation for optimal program transformations, Proc. 3rd ESOP, Copenhagen, Denmark, Springer-Verlag, (1990) 389–405.
Takimkoto, M. and Harada, K.: Effective Partial Redundancy Elimination based on Extended Value Graph, Information Processing Society of Japan, Vol. 38,No. 11, (1997) 2237–2250.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Takimoto, M., Harada, K. (1999). Partial Dead Code Elimination Using Extended Value Graph. In: Cortesi, A., Filé, G. (eds) Static Analysis. SAS 1999. Lecture Notes in Computer Science, vol 1694. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48294-6_12
Download citation
DOI: https://doi.org/10.1007/3-540-48294-6_12
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66459-8
Online ISBN: 978-3-540-48294-9
eBook Packages: Springer Book Archive