Jump to content

Spill metric

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 203.12.172.254 (talk) at 04:18, 10 February 2012 (correcting apparent grammar error with -> which). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A spill metric is a heuristic metric used by register allocators to decide which registers to spill. Popular spill metrics are:

  • cost / degree - introduced in Chaitin's algorithm
  • cost / degree2 - emphasizes the spill's effect on neighbours
  • cost - emphasizes run time
  • minimising number of spill operations

Where cost is the estimated cost of spilling a value from registers into memory.