Register allocation using an improved register candidate usage matrix
Abstract
An improved register allocator is provided to the code generator of a compiler. The improved register allocator allocates registers using an improved register candidate usage matrix. The improved register candidate usage matrix comprises row entries, one for each register candidate. Each row entry comprises usage bits indicating at least whether its register candidate is live at the entries, in the bodies, and at the exits of the various basic blocks. The improved register allocator allocates registers by block, deriving interference information from the improved usage matrix. It then merges the register allocation introducing spill code at points where register candidates are split. As a result, a register can be allocated to two register candidates that are live in the same basic block as long as they are not both live at some point in the basic block, and at the same time, a register candidate can be spilled in one basic block and allocated a register in another basic block.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 2 · Forward citations: 29.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
In a computer system comprising a plurality of instructions and registers, a computer implemented method for a register allocator of a code generator of a compiler of said computer system to allocate said registers to instructions being generated for a program being compiled by said compiler, said method comprising the steps of: a) said register allocator building a collection of register candidate usage indication vectors for register candidates of said instructions being generated for said program being compiled, said instructions being divided in a plurality of basic blocks, each of said ba
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 29 total)
References Cited — Backward Prior Art (2)
Non-Patent Literature (5)
- D. Callahan & B. Koblenz, Register Allocation via Hierarchical Graph Coloring, ACM SIGPLAN 1991 Conference on Programming Language Design & Implementation (ACM 0 89791 428 7/91/0005 0192), pp. 192 203.
- D. Callahan & B. Koblenz, Register Allocation via Hierarchical Graph Coloring, ACM SIGPLAN 1991 Conference on Programming Language Design & Implementation (ACM 0-89791-428-7/91/0005-0192), pp. 192-203.
- F. C. Chow & J. L. Hennessy, The Priority Based Coloring Approach to Register Allocation, ACM Transaction on Programming Languages & Systems, vol. 12, No. 4, Oct. 1990, (ACM 0164 0925/1000 0501) pp. 501 536.
- F. C. Chow & J. L. Hennessy, The Priority-Based Coloring Approach to Register Allocation, ACM Transaction on Programming Languages & Systems, vol. 12, No. 4, Oct. 1990, (ACM 0164-0925/1000-0501) pp. 501-536.
- P. Briggs, Register Allocation via Graph Coloring, A. Ph.D. Thesis, Rice University, Houston, Tex., Apr. 1992.