[PATCH] D16831: [regalloc][WinEH] Do not mark intervals as not spillable if they contain a regmask
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 16:00:56 PST 2016
MatzeB added inline comments.
================
Comment at: lib/CodeGen/LiveInterval.cpp:757-762
@@ +756,8 @@
+ return false;
+ // Otherwise, see if any regmask is contained by any of our segments.
+ for (const Segment &S : segments) {
+ // Find the first regmask slot at or after this segment start.
+ while (*SlotI < S.start)
+ if (++SlotI == SlotE)
+ return false;
+ // If the segment contains this slot, we have our answer.
----------------
This does not need to be a quadratic algorithm as the regmaskslots and segments are both sorted!
I'd initialize an iterator with segments.begin(), loop over the RegMaskSlots and use advanceTo() to check each index.
Repository:
rL LLVM
http://reviews.llvm.org/D16831
More information about the llvm-commits
mailing list