[PATCH 1/5] refactor LiveInterval: introduce new LiveRanges class

Andrew Trick atrick at apple.com
Fri Sep 6 15:36:58 PDT 2013


On Aug 29, 2013, at 6:07 PM, Matthias Braun <matze at braunis.de> wrote:

> 
> LiveRanges has logic to manage a set list LiveRange instances
> and a list of value numbers which previously was in LiveInterval,
> without having details like spill weight or a fixed register number.
> LiveInterval is now a direct subclass of LiveRanges and simply adds the
> spill weight and the register number.
> ---
> include/llvm/CodeGen/LiveInterval.h  | 143 +++++++++++++++++++++--------------
> lib/CodeGen/LiveInterval.cpp         | 128 +++++++++++++++----------------
> lib/CodeGen/LiveIntervalAnalysis.cpp |  20 ++---
> 3 files changed, 156 insertions(+), 135 deletions(-)
> 
> <0001-refactor-LiveInterval-introduce-new-LiveRanges-class.patch>_______________________________________________

I don’t want to hold up patches with philosophical arguments—and it’s not your fault that some terminology is already misused. This is just something to think about:

In compiler literature a LiveRange is an allocatable entity as seen by the register allocator.

By definition, a range is a disjoint set of intervals where each interval represents all values between two end points. So in the context of a compiler, interfence is computed by checking intersection of intervals.

The term LiveRanges (plural) would naturally refer to multiple allocatable entities which may or may not overlap. I would expect a LiveRanges data structure to represent multiple virtual registers.

-Andy



More information about the llvm-commits mailing list