[llvm-commits] PATCH: Fix quadratic behavior in PR12652

Chandler Carruth chandlerc at gmail.com
Fri Jul 6 16:08:08 PDT 2012


On Fri, Jul 6, 2012 at 4:01 PM, Chandler Carruth <chandlerc at gmail.com>wrote:

> On Fri, Jul 6, 2012 at 3:51 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:
>
>>
>> On Jul 6, 2012, at 3:40 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
>>
>> I still think we should likely make join() use this code because we
>> should make it handle that input pattern efficiently, but fall back on
>> something that isn't super-linear when it hits edge cases.
>>
>>
>> How about sticking the merge state in a (local) class:
>>
>> class LIMerger {
>>   NewRanges, …
>> public:
>>   LIMerger(LiveInterval &LHS, SlotIndex StartPos);
>>   void add(SlotIndex From, SlotIndex To, VNInfo *VNI);
>>   void finish();
>> };
>>
>> That interface could readily be used by all three clients, and you don't
>> clutter up the code with value mapping stuff.
>>
>
> I'd love an interface that doesn't involve the value mapping stuff...
>

What I wouldn't give for a lambda that accepts the RHS range and produces
the "fixed" range for merging...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120706/a0d315ff/attachment.html>


More information about the llvm-commits mailing list