[PATCH] VirtRegMap: Add undef flag when reading undefined subregisters.

Quentin Colombet qcolombet at apple.com
Tue Jun 16 09:33:48 PDT 2015


Hi Matthias,

LGTM with a couple of comments.

Cheers,
-Quentin


REPOSITORY
  rL LLVM

================
Comment at: lib/CodeGen/RegisterCoalescer.cpp:2637
@@ -2637,1 +2636,3 @@
+      assert(TargetRegisterInfo::isImpreciseLaneMask(
+             CP.getNewRC()->getLaneMask())
              && "SubRange merge should only fail when merging into bit 32.");
----------------
Not a big deal, but I’d do the API update as a separate commit.
Now, it feels kind of strange to have a coalescer change given we are fixing the VirtRegMap :).

================
Comment at: lib/CodeGen/VirtRegMap.cpp:301
@@ +300,3 @@
+  unsigned SubRegIdx = MO.getSubReg();
+  assert(SubRegIdx != 0);
+  const MachineInstr &MI = *MO.getParent();
----------------
Add a message in the assert, like precondition is violated, subreg must be != 0.

http://reviews.llvm.org/D10470

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list