Advertisement

Partial Redundancy Elimination on Predicated Code

  • Jens Knoop
  • Jean-François Collard
  • Roy Dz-ching Ju
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1824)

Abstract

Partial redundancy elimination (PRE) is one of the most important and widespread optimizations in compilers. However, current PRE-techniques are inadequate to handle predicated code, i.e., programs where instructions are guarded by a 1-bit register that dynamically controls whether the effect of an instruction should be committed or nullified. In fact, to exclude corrupting the semantics they must be overly conservative making them close to useless. Since predicated code will be more and more common with the advent of the IA-64 architecture, we present here a family of PRE-algorithms tailored for predicated code. Conceptually, the core element of this family can be considered the counterpart of busy code motion of [17]. It can easily be tuned by two orthogonal means. First, by adjusting the power of a preprocess feeding it by information on predication. Second, by relaxing or strengthening the constraints on synthesizing predicates controlling the movability of computations. Together with extensions towards lazy code motion, this results in a family of PRE-algorithms spanning a range from tamed to quite aggressive algorithms, which is illustrated by various meaningful examples.

Keywords

Partial redundancy elimination predicated code IA-64 busy code motion lazy code motion data-flow analysis optimization 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Allen, J.R., Kennedy, K., Porterfield, C., Warren, J.: Conversion of control dependence to data dependence. In: Conf. Rec. 10th Symp. on Principles of Prog. Lang (POPL 1983), pp. 177–189. ACM, NY (1983)Google Scholar
  2. 2.
    Bodík, R., Anik, S.: Path-sensitive value-flow analysis. In: Conf. Rec. 25th Symp. on Principles of Prog. Lang (POPL 1998), pp. 237–251. ACM, NY (1998)Google Scholar
  3. 3.
    Briggs, P., Cooper, K.D.: Effective partial redundancy elimination. In: Proc. ACM SIGPLAN Conf. Prog. Lang. Design and Impl (PLDI 1994). ACM SIGPLAN Not., vol. 29(6), pp. 159–170 (1994)Google Scholar
  4. 4.
    Intel Corp. IA-64 Application Developers Architecture Guide (May 1999)Google Scholar
  5. 5.
    Dhamdhere, D.M., Rosen, B.K., Zadeck, F.K.: How to analyze large programs efficiently and informatively. In: Proc. ACM SIGPLAN Conf. Prog. Lang. Design and Impl (PLDI 1992), ACM SIGPLAN Not., vol. 27, pp. 212–223 (1992)Google Scholar
  6. 6.
    Dulong, C.: The IA-64 architecture at work. IEEE Computer 31(7), 24–32 (1998)Google Scholar
  7. 7.
    Eichenberger, A.E., Davidson, E.S.: Register allocation for predicated code. In: Proc. 28th Int. Symp. on Microarchitecture (MICRO-28), vol. 26, pp. 180–191 (1995)Google Scholar
  8. 8.
    Fang, J.Z.: Compiler algorithms on If-conversion, speculative predicate assignment and predicated code optimizations. In: Sehr, D., Banerjee, U., Gelernter, D., Nicolau, A., Padua, D.A. (eds.) LCPC 1996. LNCS, vol. 1239, pp. 135–153. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  9. 9.
    Gillies, D.M., Ju, D.C.R., Johnson, R., Schlansker, M.: Global predicate analysis and its application to register allocation. In: Proc. 29th Int. Symp. on Microarchitecture (MICRO-29), vol. 27 (1996)Google Scholar
  10. 10.
    Gupta, R., Berson, D., Fang, J.Z.: Path profile guided partial dead code elimination using predication. In: Proc. 5th IEEE Int. Conf. on Parallel Arch. and Comp. Techniques (PACT 1997), pp. 102–115. IEEE Comp. Soc, CA (1997)CrossRefGoogle Scholar
  11. 11.
    Hecht, M.S.: Flow Analysis of Computer Programs. Elsevier, North-Holland (1977)zbMATHGoogle Scholar
  12. 12.
    Holley, L.H., Rosen, B.K.: Qualified data flow problems. IEEE Trans. Softw. Eng. 1(SE-7), 60–78 (1981)CrossRefMathSciNetGoogle Scholar
  13. 13.
    Johnson, R., Schlansker, M.: Analysis techniques for predicated code. In: Proc. 29th Int. Symp. on Microarchitecture (MICRO-29), vol. 27, pp. 100–113 (1996)Google Scholar
  14. 14.
    Knoop, J., Collard, J.-F., Ju, R.D.: Partial redundancy elimination on predicated code: Motivation and algorithm. Technical Report 731/2000, Fachbereich Informatik, Universität Dortmund, Germany (2000)Google Scholar
  15. 15.
    Knoop, J., Rüthing, O.: Optimization under the perspective of soundness, completeness, and reusability. In: Olderog, E.-R., Steffen, B. (eds.) Correct System Design. LNCS, vol. 1710, pp. 288–315. Springer, Heidelberg (1999) (invited contirbution)Google Scholar
  16. 16.
    Knoop, J., Rüthing, O., Steffen, B.: Lazy code motion. In: Proc. ACM SIGPLAN Conf. Prog. Lang. Design and Impl (PLDI 1992). ACM SIGPLAN Not., vol. 27(7), pp. 224–234 (1992)Google Scholar
  17. 17.
    Knoop, J., Rüthing, O., Steffen, B.: Optimal code motion: Theory and practice. ACM Trans. Prog. Lang. Syst. 16, 1117–1155 (1994)Google Scholar
  18. 18.
    Knoop, J., Rüthing, O., Steffen, B.: Partial dead code elimination. In: Proc. ACM SIGPLAN Conf. Prog. Lang. Design and Impl (PLDI 1994). ACM SIGPLAN Not., vol. 29(6), p. 147–158 (1994)Google Scholar
  19. 19.
    Knoop, J., Rüthing, O., Steffen, B.: The power of assignment motion. In: Proc. ACM SIGPLAN Conf. Prog. Lang. Design and Impl (PLDI 1995). ACM SIGPLAN Not., vol. 30(6), pp. 233–245 (1995)Google Scholar
  20. 20.
    Knoop, J., Rüthing, O., Steffen, B.: Code motion and code placement: Just synomyms? In: Hankin, C. (ed.) ESOP 1998. LNCS, vol. 1381, pp. 154–169. Springer, Heidelberg (1998)Google Scholar
  21. 21.
    Mahlke, S.A., Lin, D.C., Chen, W.Y., Hank, R.E., Bringmann, R.A.: Effective compiler support for predicated execution using the hyperblock. In: Proc. 25th Int. Symp. on Microarchitecture (MICRO-25), vol. 23(1&2), pp. 45–54 (1992)Google Scholar
  22. 22.
    Morel, E., Renvoise, C.: Global optimization by suppression of partial redundancies. Comm. ACM 22(2), 96–103 (1979)zbMATHCrossRefMathSciNetGoogle Scholar
  23. 23.
    Muchnick, S.S.: Advanced Compiler Design and Implementation. Morgan Kaufmann, San Francisco (1997)Google Scholar
  24. 24.
    Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Global value numbers and redundant computations. In: Conf. Rec. 15th Symp. Principles of Prog. Lang (POPL 1988), pp. 2–27. ACM, NY (1988)Google Scholar
  25. 25.
    Rüthing, O., Knoop, J., Steffen, B.: Sparse code motion. In: Conf. Rec. 27th Symp. Principles of Prog. Lang (POPL 2000), pp. 170–183. ACM, NY (2000)Google Scholar
  26. 26.
    Steffen, B., Knoop, J., Rüthing, O.: The value flow graph: A program representation for optimal program transformations. In: Jones, N.D. (ed.) ESOP 1990. LNCS, vol. 432, pp. 389–405. Springer, Heidelberg (1990)Google Scholar
  27. 27.
    Warter, N.J., Mahlke, S.A., Hwu, W.-M., Rau, B.R.: Reverse if-conversion. In: Proc. ACM SIGPLAN Conf. Prog. Lang. Design and Impl (PLDI 1993). ACM SIGPLAN Not., vol. 28(6), pp. 290–299 (1993)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Jens Knoop
    • 1
  • Jean-François Collard
    • 2
  • Roy Dz-ching Ju
    • 3
  1. 1.Universität DortmundDortmundGermany
  2. 2.Intel Corp. – Microcomputer Software Lab 
  3. 3.Intel Corp. – Microprocessor Research LabSanta ClaraUSA

Personalised recommendations