[PATCH] D11649: [regalloc] Make RegMask clobbers prevent merging vreg's into PhysRegs when hoisting def's upwards.

Matthias Braun matze at braunis.de
Thu Jul 30 11:05:26 PDT 2015


MatzeB accepted this revision.
MatzeB added a reviewer: MatzeB.
MatzeB added a comment.
This revision is now accepted and ready to land.

The patch LGTM (maybe remove the complaints about definesRegister() from the comment).


================
Comment at: lib/CodeGen/RegisterCoalescer.cpp:1541
@@ -1534,1 +1540,3 @@
+          return false;
+      }
     }
----------------
qcolombet wrote:
> This check should have been handled by the loop starting line 1497, IIRC.
> I.e., this shouldn’t be necessary.
>From what I can see we do not create mini liverange segments for clobbers. This is both a bit scary but also understandable from a performance point of view as I imagine creating countless small segments would increase the LiveIntervals quite a bit.

The register allocators (the LiveRegMatrix class) has a special code paths to deal with regmasks.

That definesRegister() doesn't account for regmasks is understandable as the register isn't defined to something sensible, but there is certainly a case to make for MachineInstr::killsRegister() to check for register masks.


http://reviews.llvm.org/D11649







More information about the llvm-commits mailing list