• Home
  • Search
  • Register allocation and spilling using the expected distance heuristic
  • https://doi.org/10.1002/spe.2393Copy DOI Icon

Register allocation and spilling using the expected distance heuristic

Show More
  • Abstract
  • Literature Map
  • References
  • Similar Papers
Abstract

SummaryThe primary goal of the register allocation phase in a compiler is to minimize register spills to memory. Spill decisions by the allocator are often made based on the costs of spilling a virtual register and, therefore, on an assumed placement of spill instructions. However, because most allocators make these decisions incrementally, placement opportunities can change as allocation proceeds, calling into question the basis for the original spill decision. An alternative heuristic to placement costs for spill decisions focuses on where program execution will lead. Spilling the virtual register with the Furthest Next Use is known to lead to the minimum number of loads under certain conditions in straight‐line code. While it has been implemented in register allocation in different forms, none of these implementations fully exploits profiling information. We present a register allocator that can adapt to improved profiling information, using branch probabilities to compute an Expected Distance to Next Use for making spill decisions and block frequency information to optimize post‐allocation spill instruction placement. Spill placement is optimized after allocation using a novel method for minimizing spill instruction costs on the control flow graph. Our evaluation of the allocator compared with LLVM recognizes more than 36% and 50% reductions, on average, in the number of dynamically executed store and load instructions, respectively, when using statically derived profiling information. When using dynamically gathered profiling, these improvements increase to 50% and 60% reductions, on average, for stores and loads, respectively. Copyright © 2016 John Wiley & Sons, Ltd.

Similar Papers
  • Research Article
  • Citations4

Studying Optimal Spilling in the Light of SSA

  • Jan 09, 2015
  • ACM Transactions on Architecture and Code Optimization
  • Quentin Colombet +2
  • Conference Article

Parallel trace register allocation

  • Jan 01, 2018
  • Josef Eisl +2
  • Research Article
  • Citations11

Register allocation for write activity minimization on non-volatile main memory for embedded systems

  • Sep 10, 2011
  • Journal of Systems Architecture
  • Yazhi Huang +2
  • Research Article
  • Citations22

Register Allocation in Structured Programs

  • Nov 01, 1998
  • Journal of Algorithms
  • Sampath Kannan +1
  • Conference Article
  • Citations30

Register allocation in structured programs

  • Jan 22, 1995
  • Sampath Kannan +1
  • Conference Article
  • Citations100

LaTTe: a Java VM just-in-time compiler with fast and efficient register allocation

  • Oct 12, 1999
  • Byungsun Yang +9
  • Research Article
  • Citations1

A compiling technique for dataflow machines — new algorithm for optimum translation from control flow graph into dataflow graph

  • Jan 01, 1996
  • Systems and Computers in Japan
  • Toshiaki Yasue +1
  • Conference Article
  • Citations25

CoDaRR: Continuous Data Space Randomization against Data-Only Attacks

  • Oct 05, 2020
  • Prabhu Rajasekaran +5
  • Research Article
  • Citations42

Global register allocation at link time

  • Jul 01, 1986
  • ACM SIGPLAN Notices
  • David W Wall
  • Research Article
  • Citations1

RegGuard: Leveraging CPU registers for mitigation of control- and data-oriented attacks

  • Mar 29, 2023
  • Computers & Security
  • Munir Geden +1
  • Conference Article
  • Citations1

ML-Driven Prediction of Optimal Control Flow Graph Traversal Algorithm in Modern Applications

  • Jun 09, 2025
  • Milan Čugurović +5
  • Research Article
  • Citations1

Using postdomination to reduce space requirements of data flow analysis

  • Dec 27, 2005
  • Information Processing Letters
  • C Bernardeschi +3
  • Book Chapter
  • Citations26

Compiler algorithms on if-conversion, speculative predicates assignment and predicated code optimizations

  • Jan 01, 1997
  • Jesse Z Fang
  • Conference Article
  • Citations160

Speculative execution via address prediction and data prefetching

  • Jan 01, 1997
  • José González +1
  • PDF
  • Research Article

Разработка компиляторов предметно-ориентированных языков для спецпроцессоров

  • Jan 01, 2020
  • Proceedings of the Institute for System Programming of the RAS
  • Pyotr Nikolaevich Sovietov
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.