O'Reilly logo

Engineering a Compiler by Linda Torczon, Keith Cooper

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Register Allocation
The code generated by a compiler must make effective use of the limited resources of the target processor. Among the most constrained resources is the set of hardware registers. Thus, most compilers include a pass that both allocates and assigns hardware registers to program values.
This chapter focuses on global register allocation and assignment via graph coloring; it describes the problems that occur at smaller scopes as a means of motivating a global allocator.
Keywords: Register Allocation, Register Spilling, Copy Coalescing, Graph-Coloring Allocators

13.1. Introduction

Registers are the fastest locations in the memory hierarchy. Often, they are the only memory locations that most operations can access directly. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required