Reducing indirect function call overhead in C++ programs

作者: Brad Calder , Dirk Grunwald

DOI: 10.1145/174675.177973

关键词: CompilerControl flowSubroutineSpeculative executionBranch predictorObject-oriented programmingDistributed computingComputer sciencePersonalizationInstruction prefetch

摘要: Modern computer architectures increasingly depend on mechanisms that estimate future control flow decisions to increase performance. Mechanisms such as speculative execution and prefetching are becoming standard architectural rely prediction prefetch speculatively execute instructions. At the same time, programmers turning object-oriented languages their productivity. These commonly use run time dispatching implement object polymorphism. Dispatching is usually implemented using an indirect function call, which presents challenges existing techniques.We have measured occurrence of calls in a collection C++ programs. We show that, although it more important predict branches accurately, call also factor some programs will grow importance with growth programming. examine improvement offered by compile-time optimizations static dynamic techniques, demonstrate how compilers can branch improve performance Using these methods we examined, number instructions between mispredicted breaks be doubled computers.

参考文章(28)
Lee, Smith, Branch Prediction Strategies and Branch Target Buffer Design IEEE Computer. ,vol. 17, pp. 6- 22 ,(1984) , 10.1109/MC.1984.1658927
Hemant D. Pande, Barbara G. Ryder, Static type determination for C CTEC'94 Proceedings of the 6th conference on USENIX Sixth C++ Technical Conference - Volume 6. pp. 5- 5 ,(1994)
B.G. Ryder, Constructing the Call Graph of a Program IEEE Transactions on Software Engineering. ,vol. SE-5, pp. 216- 226 ,(1979) , 10.1109/TSE.1979.234183
Thomas Ball, James R. Larus, Branch prediction for free Proceedings of the ACM SIGPLAN 1993 conference on Programming language design and implementation - PLDI '93. ,vol. 28, pp. 300- 313 ,(1993) , 10.1145/155090.155119
Michael Burke, An interval-based approach to exhaustive and incremental interprocedural data-flow analysis ACM Transactions on Programming Languages and Systems. ,vol. 12, pp. 341- 395 ,(1990) , 10.1145/78969.78963
Thomas Ball, James R. Larus, Optimally profiling and tracing programs symposium on principles of programming languages. pp. 59- 70 ,(1992) , 10.1145/143165.143180
S. McFarling, J. Hennesey, Reducing the cost of branches international symposium on computer architecture. ,vol. 14, pp. 396- 403 ,(1986) , 10.1145/17356.17402
Craig Chambers, David Ungar, Iterative type analysis and extended message splitting; optimizing dynamically-typed object-oriented programs programming language design and implementation. ,vol. 25, pp. 150- 164 ,(1990) , 10.1145/93542.93562
Robert Alverson, David Callahan, Daniel Cummings, Brian Koblenz, Allan Porterfield, Burton Smith, The Tera computer system international conference on supercomputing. ,vol. 18, pp. 1- 6 ,(1990) , 10.1145/2591635.2667161
C. Chambers, D. Ungar, Customization: optimizing compiler technology for SELF, a dynamically-typed object-oriented programming language Proceedings of the ACM SIGPLAN 1989 Conference on Programming language design and implementation - PLDI '89. ,vol. 24, pp. 146- 160 ,(1989) , 10.1145/73141.74831