svn commit: r338689 - head/contrib/llvm/lib/CodeGen

Dimitry Andric dim at FreeBSD.org
Fri Sep 14 19:25:24 UTC 2018


Author: dim
Date: Fri Sep 14 19:25:23 2018
New Revision: 338689
URL: https://svnweb.freebsd.org/changeset/base/338689

Log:
  Pull in r335365 from upstream llvm trunk (by Krzysztof Parzyszek):
  
    Initialize LiveRegs once in BranchFolder::mergeCommonTails
  
  This should fix '(TRI && "LivePhysRegs is not initialized."' assertions
  when building the lang/qt5-qml port in certain configurations.
  
  Approved by:	re (kib)
  Reported by:	Piotr Kubaj <pkubaj at anongoth.pl>
  PR:		231355
  MFC after:	3 days

Modified:
  head/contrib/llvm/lib/CodeGen/BranchFolding.cpp

Modified: head/contrib/llvm/lib/CodeGen/BranchFolding.cpp
==============================================================================
--- head/contrib/llvm/lib/CodeGen/BranchFolding.cpp	Fri Sep 14 18:12:30 2018	(r338688)
+++ head/contrib/llvm/lib/CodeGen/BranchFolding.cpp	Fri Sep 14 19:25:23 2018	(r338689)
@@ -884,11 +884,12 @@ void BranchFolder::mergeCommonTails(unsigned commonTai
   if (UpdateLiveIns) {
     LivePhysRegs NewLiveIns(*TRI);
     computeLiveIns(NewLiveIns, *MBB);
+    LiveRegs.init(*TRI);
 
     // The flag merging may lead to some register uses no longer using the
     // <undef> flag, add IMPLICIT_DEFs in the predecessors as necessary.
     for (MachineBasicBlock *Pred : MBB->predecessors()) {
-      LiveRegs.init(*TRI);
+      LiveRegs.clear();
       LiveRegs.addLiveOuts(*Pred);
       MachineBasicBlock::iterator InsertBefore = Pred->getFirstTerminator();
       for (unsigned Reg : NewLiveIns) {


More information about the svn-src-head mailing list