Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2018 19:25:23 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338689 - head/contrib/llvm/lib/CodeGen
Message-ID:  <201809141925.w8EJPNGg046094@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809141925.w8EJPNGg046094>