Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/178243.178256acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free access

Partial dead code elimination

Published: 01 June 1994 Publication History

Abstract

A new aggressive algorithm for the elimination of partially dead code is presented, i.e., of code which is only dead on some program paths. Besides being more powerful than the usual approaches to dead code elimination, this algorithm is optimal in the following sense: partially dead code remaining in the resulting program cannot be eliminated without changing the branching structure or the semantics of the program, or without impairing some program executions.
Our approach is based on techniques for partial redundancy elimination. Besides some new technical problems there is a significant difference here: partial dead code elimination introduces second order effects, which we overcome by means of exhaustive motion and elimination steps. The optimality and the uniqueness of the program obtained is proved by means of a new technique which is universally applicable and particularly useful in the case of mutually interdependent program optimizations.

References

[1]
A. V. Aho, S. C. Johnson, and J. D. UUman. Code generation for expressions with common subexpressionso Journal of the ACM, 24(1):146- 160~ 1977.
[2]
A. Vo Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques and Tools. Addison- Wesley, 1985o
[3]
D. Bernstein and Mo Rodeh. Global instruction scheduling for superscalar machines. In Proc. A CM SIGPLAN Conference on Programming Language Design and ImplementationS91, volume 26,6 of A CM SIGPLAN Notices, pages 241-255, Toronto, Ontario, June 1991.
[4]
P. Briggs and K. D. Cooper. Effective partial redundancy elimination. In Proc. A CM SIGPLAN Conference on Programming Language Design and Implementation'94, 1994.
[5]
R. Cytron, J. Ferrante, B. Rosen, M. Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependency graph. A CM Transactions on Programming Languages and Systems, 13(4):451- 490, 1991.
[6]
D. M. Dhamdhere. A fast algorithm for code movement optimization. A CM SIGPLAN Notices, 23(10):172- 180, 1988.
[7]
D. M. Dhamdhere. Register assignment using code placement techniques. Journal of Computer Languages, 13(2):75- 93, 1988.
[8]
D. M. Dhamdhere. A usually linear algorithm for register assignment using edge placement of load and store instructions. Journal of Computer Languages, 15(2):83- 94, 1990.
[9]
D. M. Dhamdhere. Practical adaptation of the global optimization algorithm of Morel and Renvoise. A CM Transactions on Programming Languages and Systems, 13(2):291- 294, 1991. Technical Correspondence.
[10]
D.M. Dhamdhere, B. K. Rosen, and F. K. Zadeck. How to analyze large programs efficiently and informatively. In Proc. A CM SIGPLAN Conference on Programming Language Design and Implementation'92, volume 27,7 of A CM SIGPLAN Notices, pages 212- 223, San Francisco, CA, June 1992.
[11]
K.-H. Drechsler and M. P. Stadel. A solution to a problem with Morel and Renvoise's "Global optimization by suppression of partial redundancies''. A CM Transactions on Programming Languages and Systems, 10(4):635- 640, 1988. Technical Correspondence.
[12]
K.-H. Drechsler and M. Po Stadel. A variation of Knoop, Riithing and Steffen's lazy code motion. A CM SIGPLAN Notices, 28(5):29 - 38, 1993.
[13]
L. Feigen, D. Klappholz, R. Casazza, and X. Xue. The revival transformation~ In Conf. Record of the 21"d A CM Symposium on the Principles of Programming Languages, Portland, Oregon, 1994o
[14]
A. Geser, J~ Knoop, G. L/ittgen, O. Riithing, and B. Steffeno Chaotic fixed point iterations. MiP- Bericht 9403, Fakultiit flit Mathematik und Informatik, Universitiit Passau, Germany, 1994.
[15]
P. B. Gibbons and S. S. Muchnik. Efficient instruction scheduling for a pipline architecture. In Proc. A CM SIGPLAN Symposium on Compiler Construction'86, volume 21, 7 of A CM SIGPLAN Notices, pages 11-16, June 1986.
[16]
R. Giegerich, U. M5ncke, and R. Wilhelm. Invariance of approximative semantics with respect to program transformations. In Proc. of the third Conference of the European Co-operation in In/ormatics, Informatik-Fachberichte 50, pages 1-10. Springer, 1981.
[17]
M. S. Hecht. Flow Analysis of Computer Programs. Elsevier, North-Holland, 1977.
[18]
S. Horwitz, A. Demers, and T. Teitelbaum. An efficient general iterative algorithm for data flow analysis. Acta Informatica, 24:679- 694, 1987.
[19]
J. B. Kam and J. D. Ullman. Global data flow analysis and iterative algorithms. Journal of the ~4cM, ~2(1).l~S- 171, 107~.
[20]
K. Kennedy. Node listings applied to data flow analysis. In Conf. Record of the 2~a AGM Symposium on the Principles o/Programming Languages, pages 10- 21, Palo Alto, CA, 1975.
[21]
K. Kennedy. A survey of data flow analysis techniques. In S. S. Muchnick and N. D. Jones, editors, Program Flow Analysis: Theory and Applications, chapter 1, pages 5- 54. Prentice Hall, Englewood Cliffs, NJ, 1981.
[22]
J. Knoop, O. Riithing, and B. Steffen. Optimal code motion: Theory and practice. To appear in ACM Transactions on Programming Languages and Systems. Available as MIP-Bericht 9310, Fakult/it fiir Mathematik und Informatik, Universit/it Passau, Germany, 1993.35 pages.
[23]
J. Knoop, O. Riithing, and B. Steffen. Lazy code motion. In Proc. A CM SIGPLAN Conference on Programming Language Design and Implementation'92, volume 27,7 of A CM $IGPLAN Notices, pages 224- 234, San Francisco, CA, June 1992.
[24]
L. T. Kou. On live-dead analysis for global data flow problems. Journal of the A CM, 24(3):473- 483, July 1977.
[25]
R. J. Mintz, G. A. Fisher, and M. Sharir. The design of a global optimizer. In Proc. ACM SIC- PLAN Symposium on Compiler Construction'79, volume 1,/, 8 of A CM SIGPLAN Notices, pages 226- 234, Denver, Col., 1979.
[26]
E. Morel and C. Renvoise. Global optimization by suppression of partial redundancies. Communications of the A CM, 22(2):96- 103, 1979.
[27]
B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Global value numbers and redundant computations. In Conf. Record of the 15th A CM Symposium on the Principles of Programming Languages, pages 12- 27, San Diego, CA, 1988.
[28]
R. Sethi and J. D. Ullman. The generation of optimal code for arithmetic expressions. Journal of the A CM, 17(4):715-728, 1970.
[29]
R. E. Tarjan. Applications of path compression on balanced trees. Journal of the A CM, 26(4):690 - 715, 1979.
[30]
M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. A CM Transactions on Programming Languages and Systems, 13(2), April 1991.

Cited By

View all
  • (2024)Merlin: Multi-tier Optimization of eBPF Code for Performance and CompactnessProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 310.1145/3620666.3651387(639-653)Online publication date: 27-Apr-2024
  • (2022)Automated kernel fusion for GPU based on code motionProceedings of the 23rd ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems10.1145/3519941.3535078(151-161)Online publication date: 14-Jun-2022
  • (2022)RollBin: reducing code-size via loop rerolling at binary levelProceedings of the 23rd ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems10.1145/3519941.3535072(99-110)Online publication date: 14-Jun-2022
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '94: Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation
August 1994
360 pages
ISBN:089791662X
DOI:10.1145/178243
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1994

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. assignment motion
  2. bit-vector data flow analyses
  3. code motion
  4. data flow analysis
  5. dead code elimination
  6. partial redundancy elimination
  7. program optimization

Qualifiers

  • Article

Conference

PLDI94
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)318
  • Downloads (Last 6 weeks)58
Reflects downloads up to 20 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Merlin: Multi-tier Optimization of eBPF Code for Performance and CompactnessProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 310.1145/3620666.3651387(639-653)Online publication date: 27-Apr-2024
  • (2022)Automated kernel fusion for GPU based on code motionProceedings of the 23rd ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems10.1145/3519941.3535078(151-161)Online publication date: 14-Jun-2022
  • (2022)RollBin: reducing code-size via loop rerolling at binary levelProceedings of the 23rd ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems10.1145/3519941.3535072(99-110)Online publication date: 14-Jun-2022
  • (2022)F3MProceedings of the 20th IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO53902.2022.9741269(242-253)Online publication date: 2-Apr-2022
  • (2021)Comparative analysis of software optimization methods in context of branch predication on GPUsRussian Technological Journal10.32362/2500-316X-2021-9-6-7-159:6(7-15)Online publication date: 2-Dec-2021
  • (2021)Detecting oxbow code in Erlang codebases with the highest degree of certaintyProceedings of the 20th ACM SIGPLAN International Workshop on Erlang10.1145/3471871.3472961(28-40)Online publication date: 18-Aug-2021
  • (2021)The RERS challenge: towards controllable and scalable benchmark synthesisInternational Journal on Software Tools for Technology Transfer10.1007/s10009-021-00617-zOnline publication date: 24-Jun-2021
  • (2020)CivetProceedings of the 29th USENIX Conference on Security Symposium10.5555/3489212.3489241(505-522)Online publication date: 12-Aug-2020
  • (2020)Effective function merging in the SSA formProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3386030(854-868)Online publication date: 11-Jun-2020
  • (2020)On the recall of static call graph construction in practiceProceedings of the ACM/IEEE 42nd International Conference on Software Engineering10.1145/3377811.3380441(1049-1060)Online publication date: 27-Jun-2020
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media