Autonomic method and apparatus for local program code reorganization using branch count per instruction hardware
Abstract
A method, apparatus, and computer instructions for local program reorganization using branch count per instruction hardware. In a preferred embodiment, a hardware counter is used in the present invention to count the number of times a branch is taken when branch instructions are executed. Branch count statistics generated from the hardware counters are available to a program in order to analyze whether code reorganization is necessary. If reorganization is necessary, the program autonomically reorganizes instructions locally at run time to allow more instructions to be executed prior to taking a branch, so that the number of branches taken is minimized without modifying underlying program code.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 50 · Forward citations: 7.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A method of autonomically reorganizing code of a computer program, comprising the steps of: identifying a plurality of branch instructions for a computer program being compiled; monitoring branch count per instruction statistics, wherein the branch count per instruction statistics are generated from the results of a set of hardware counters associated with the branch instructions that autonomically count branches taken, that are executed in parallel, per instruction of the computer program; determining whether a block of code is to be reorganized based on a number of times a branch is taken pe
- Claim 2Depends on #1
The method of claim 1 , wherein prior to
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (7 of 7 total)
References Cited — Backward Prior Art (50)
Non-Patent Literature (5)
- A. Ramirez, J. L. Larriba-Pey, and M. Valero. The effect of code reordering on branch prediction. Proceedings of the Intl. Conference on Parallel Architectures and Compilation Techniques, pp. 189-198, Oct. 2000.
- Aho et al. "Compilers: Principles, Techniques, and Tools", 1988, Addison-Wesley, pp. 488-497.
- Chang, P. P., Mahlke, S. A., and Hwu, W. W. 1991. Using profile information to assist classic code optimizations, Softw. Pract. Exper. 21, 12 (Dec. 1991), 1301-1321.
- Cohen et al., "Hardware-Assisted Characterization of NAS Benchmarks", Cluster Computing, V I. 4, No. 3, Jul. 2001, pp. 189-196.
- Conte, T. M., Menezes, K. N., and Hirsch, M. A. 1996. Accurate and practical profile-driven compilation using the profile buffer. In Proceedings of the 29th Annual ACM/IEEE international Symposium on Microarchitecture (Paris, France, Dec. 2-4, 1996). International Symposium on Microarchitecture. IEE