[llvm-commits] PATCH: Fix very slow algorithm in RescheduleMIBelowKill

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Jul 13 13:03:43 PDT 2012


On Jul 13, 2012, at 11:41 AM, Chandler Carruth <chandlerc at gmail.com> wrote:
>> 
>> The other option to just bailing in findKill is to store the Kills in LiveVariable as a DenseMap<MachineBasicBlock*, MachineInstr*>. I don't immediately see anything that would likely make this terrible. The case where there are *tons* of kills, is probably already the case where its worth the extra memory to get some performance.
> 
> I think it is rare enough that you can simply bail if the kill list is too large.
> 
> Yea, I don't even have a test case where it happens. I can add the code defensively if you're worried.

No, don't bother.

> Final patch attached. I've updated both of the Reschedule functions, and removed findLocalKills completely.

LGTM, thanks!

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120713/f71f8e34/attachment.html>


More information about the llvm-commits mailing list