[PATCH 0/5] LiveInterval refactoring

Matthias Braun mbraun at apple.com
Tue Sep 3 11:30:19 PDT 2013


On Sep 2, 2013, at 8:01 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:

> 
> On Aug 29, 2013, at 6:07 PM, Matthias Braun <matze at braunis.de> wrote:
> 
>> 
>> This patchset is a step towards having subregister liveness in the
>> LiveIntervall class. It factors out some functionality of the LiveInterval
>> class into a new LiveRanges class to enable reusage. As a proof of concept
>> the final patch rewrite the Register Unit liveness tracking to use this new
>> class and thereby avoid having unnecessary register number and spill weight
>> fields there.
>> 
>> Matthias Braun (5):
>> refactor LiveInterval: introduce new LiveRanges class
>> Pass LiveQueryResult by value
>> change MachineVerifier to work on LiveRanges + LiveInterval
>> work on LiveRanges instead of LiveInterval where possible
>> Represent RegUnit liveness with LiveRanges instances
> 
> Hi Matthias,
> 
> These patches all LGTM, except for the LiveRanges class name.
> 
> The struct LiveRange is badly misnamed, and it should really just be an implementation detail of LiveInterval. Could you start by moving it into that class as struct LiveInterval::Segment?
> 
> Then you can use the proper name LiveRange for your new 'LiveRanges' class.
Sounds good. Though I’m having trouble make Segment an inner class of LiveInterval:
I need to specialize the isPodLike type constraint class. But apparently c++ forces you to specialize templates at the same scope where the template was specified, so it is only possible
to do that after the LiveIntervall class, where it is too late, because the SmallVector<Segment> has already been instantiated.
So I guess I have to create a LiveSegment class outside LiveInterval, unless I’m missing some C++ tricks here…

Greetings,
	Matthias





More information about the llvm-commits mailing list