[PATCH] D35985: Skip live range segment verification for reserved physregs

Stefan Maksimovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 05:29:19 PST 2017


smaksimovic updated this revision to Diff 125715.
smaksimovic added a comment.
Herald added a subscriber: qcolombet.

Updated patch with my first suggestion by removing the live range of the register unit right before deleting the copy machine instruction as opposed to the attempt mentioned in my previous message.
Problem with the latter was that it seems we couldn't simply skip the interference check if the register unit didn't have its live range computed at that point, so we couldn't take that route.


https://reviews.llvm.org/D35985

Files:
  lib/CodeGen/RegisterCoalescer.cpp
  test/CodeGen/Mips/no-odd-spreg-msa.ll


Index: test/CodeGen/Mips/no-odd-spreg-msa.ll
===================================================================
--- test/CodeGen/Mips/no-odd-spreg-msa.ll
+++ test/CodeGen/Mips/no-odd-spreg-msa.ll
@@ -1,8 +1,8 @@
 ; RUN: llc -march=mipsel -mcpu=mips32 -mattr=+fp64,+msa,-nooddspreg \
-; RUN:   -no-integrated-as -relocation-model=pic < %s | \
+; RUN:   -no-integrated-as -verify-machineinstrs -relocation-model=pic < %s | \
 ; RUN:   FileCheck %s -check-prefixes=ALL,ODDSPREG
 ; RUN: llc -march=mipsel -mcpu=mips32 -mattr=+fp64,+msa,+nooddspreg \
-; RUN:   -no-integrated-as -relocation-model=pic < %s | \
+; RUN:   -no-integrated-as -verify-machineinstrs -relocation-model=pic < %s | \
 ; RUN:   FileCheck %s -check-prefixes=ALL,NOODDSPREG
 
 @v4f32 = global <4 x float> zeroinitializer
Index: lib/CodeGen/RegisterCoalescer.cpp
===================================================================
--- lib/CodeGen/RegisterCoalescer.cpp
+++ lib/CodeGen/RegisterCoalescer.cpp
@@ -1878,6 +1878,9 @@
     }
   }
 
+  for (MCRegUnitIterator UI(DstReg, TRI); UI.isValid(); ++UI)
+    LIS->removeRegUnit(*UI);
+
   deleteInstr(CopyMI);
 
   // We don't track kills for reserved registers.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35985.125715.patch
Type: text/x-patch
Size: 1181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171206/6b2d54a5/attachment.bin>


More information about the llvm-commits mailing list