skip to main content
article

Dynamic dead-instruction detection and elimination

Published:01 October 2002Publication History
Skip Abstract Section

Abstract

We observe a non-negligible fraction--3 to 16% in our benchmarks--of dynamically dead instructions, dynamic instruction instances that generate unused results. The majority of these instructions arise from static instructions that also produce useful results. We find that compiler optimization (specifically instruction scheduling) creates a significant portion of these partially dead static instructions. We show that most of the dynamically instructions arise from a small set of static instructions that produce dead values most of the time.We leverage this locality by proposing a dead instruction predictor and presenting a scheme to avoid the execution of predicted-dead instructions. Our predictor achieves an accuracy of 93% while identifying over 91% of the dead instructions using less than 5 KB of state. We achieve such high accuracies by leveraging future control flow information (i.e., branch predictions) to distinguish between useless and useful instances of the same static instruction.We then present a mechanism to avoid the register allocation, instruction scheduling, and execution of predicted dead instructions. We measure reductions in resource utilization averaging over 5% and sometimes exceeding 10%, covering physical register management (allocation and freeing), register file read and write traffic, and data cache accesses. Performance improves by an average of 3.6% on an architecture exhibiting resource contention. Additionally, our scheme frees future compilers from the need to consider the costs of dead instructions, enabling more aggressive code motion and optimization. Simultaneously, it mitigates the need for good path profiling information in making inter-block code motion decisions.

References

  1. D. Burger and T. Austin. The SimpleScalar tool set, version 2.0. Technical Report CS-TR-97-1342, University of Wisconsin-Madison, June 1997.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. P. Chang, N. Warter, S. Mahlke, W. Chen, and W. Hwu. Three architectural models for compiler-controlled speculative execution. IEEE Trans. on Computers, 44(3), March 1995. pp. 481-94. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. W. Chen, S. Mahlke, N. Warter, S. Anik, and W. Hwu. Profile-assisted instruction scheduling. Intl. Journal for Parallel Programming, 22(2), April 1994. pp. 151-81. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. K. Cooper, M. Hall, and K. Kennedy. Procedure cloning. In Proceedings of the IEEE 1992 Intl. Conference on Computer Languages, April 1992. pp. 96-105.Google ScholarGoogle ScholarCross RefCross Ref
  5. R. Gupta, D. Berson, and J. Fang. Resource-sensitive profile-directed data flow analysis for code optimization. In Proceedings of the 30th Annual Intl. Symp. on Microarchitecture, December 1997. pp. 358-68. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. Jacobsen, E. Rotenberg, and J. E. Smith. Assigning confidence to conditional branch predictions. In Proceedings of the 29th Intl. Symp. on Microarchitecture, December 1996. pp. 142-52. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Klaiber. The technology behind Crusoe™ processors. Transmeta Corporation White Paper, January 2000.Google ScholarGoogle Scholar
  8. J. Knoop, O. Ruthing, and B. Steffen. Partial dead code elimination. In Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, June 1994. pp. 147-58. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. K. Lepak and M. Lipasti. On the value locality of store instructions. In Proceedings of the 27th Annual Intl. Symp. on Computer Architecture, June 2000. pp. 182-91. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Martin, A. Roth, and C. Fischer. Exploiting dead value information. In Proceedings of the 30th Annual Intl. Symp. on Microarchitecture, December 1997. pp. 125-35. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. Rotenberg. Exploiting large ineffectual instruction sequences. Technical Report, North Carolina State University, November 1999.Google ScholarGoogle Scholar
  12. K. C. Yeager. The MIPS R10000 superscalar microprocessor. IEEE Micro, 16(2), April 1996. pp. 28-41. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Yoaz, R. Ronen, R. Chappell, and Y. Almog. Silence is golden? Presented at the 7th Annual Symp. on High Performance Computer Architecture, January 2001.Google ScholarGoogle Scholar

Index Terms

  1. Dynamic dead-instruction detection and elimination
    Index terms have been assigned to the content through auto-classification.

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGOPS Operating Systems Review
      ACM SIGOPS Operating Systems Review  Volume 36, Issue 5
      December 2002
      296 pages
      ISSN:0163-5980
      DOI:10.1145/635508
      Issue’s Table of Contents
      • cover image ACM Conferences
        ASPLOS X: Proceedings of the 10th international conference on Architectural support for programming languages and operating systems
        October 2002
        318 pages
        ISBN:1581135742
        DOI:10.1145/605397

      Copyright © 2002 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 October 2002

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader