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

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Sep 6 16:16:00 PDT 2013


On Sep 6, 2013, at 3:36 PM, Andrew Trick <atrick at apple.com> wrote:

> 
> 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.

I think we should use this opportunity to get the names right. We’re causing massive churn anyway.

> 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.

It seems that one of these definitions will have to give since we want to represent the liveness of a virtual register as a linked list of {mask + disjoint set of intervals}.

/jakob





More information about the llvm-commits mailing list