llvm::LiveRangeStage

Stages a live range passes through during greedy register allocation.

Synopsis

Declared in <llvm/CodeGen/RegAllocEvictionAdvisor.h>

enum LiveRangeStage;

Description

Live ranges pass through a number of stages as we try to allocate them. Some of the stages may also create new live ranges:

  • Region splitting.

  • Per-block splitting.

  • Local splitting.

  • Spilling.

Ranges produced by one of the stages skip the previous stages when they are dequeued. This improves performance because we can skip interference checks that are unlikely to give any results. It also guarantees that the live range splitting algorithm terminates, something that is otherwise hard to ensure.

Members

NameDescription
RS_New Newly created live range that has never been queued.
RS_Assign Only attempt assignment and eviction. Then requeue as RS_Split.
RS_Split Attempt live range splitting if assignment is impossible.
RS_Split2 Attempt more aggressive live range splitting that is guaranteed to make progress. This is used for split products that may not be making progress.
RS_Spill Live range will be spilled. No more splitting will be attempted.
RS_Done There is nothing more we can do to this live range. Abort compilation if it can't be assigned.