Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Sep 2018 14:53:04 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r338710 - stable/11/contrib/llvm/lib/CodeGen
Message-ID:  <201809171453.w8HEr4R3023084@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Mon Sep 17 14:53:03 2018
New Revision: 338710
URL: https://svnweb.freebsd.org/changeset/base/338710

Log:
  MFC r338689:
  
  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.
  
  Reported by:	Piotr Kubaj <pkubaj@anongoth.pl>
  PR:		231355

Modified:
  stable/11/contrib/llvm/lib/CodeGen/BranchFolding.cpp
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/llvm/lib/CodeGen/BranchFolding.cpp
==============================================================================
--- stable/11/contrib/llvm/lib/CodeGen/BranchFolding.cpp	Mon Sep 17 11:24:16 2018	(r338709)
+++ stable/11/contrib/llvm/lib/CodeGen/BranchFolding.cpp	Mon Sep 17 14:53:03 2018	(r338710)
@@ -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?201809171453.w8HEr4R3023084>