Formal verification of coalescing graph-coloring register allocation

  • Authors:
  • Sandrine Blazy;Benoît Robillard;Andrew W. Appel

  • Affiliations:
  • IRISA - Université Rennes 1;CEDRIC - ENSIIE;Princeton University

  • Venue:
  • ESOP'10 Proceedings of the 19th European conference on Programming Languages and Systems
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Iterated Register Coalescing (IRC) is a widely used heuristic for performing register allocation via graph coloring. Many implementations in existing compilers follow (more or less faithfully) the imperative algorithm published in 1996. Several mistakes have been found in some of these implementations. In this paper, we present a formal verification (in Coq) of the whole IRC algorithm. We detail a specification that can be used as a reference for IRC. We also define the theory of register-interference graphs; we implement a purely functional version of the IRC algorithm, and we prove the total correctness of our implementation. The automatic extraction of our IRC algorithm into Caml yields a program with competitive performance. This work has been integrated into the CompCert verified compiler.