From owner-svn-src-all@FreeBSD.ORG Thu Jul 11 06:48:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 131A9D57; Thu, 11 Jul 2013 06:48:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0446D15BA; Thu, 11 Jul 2013 06:48:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B6mrCN061112; Thu, 11 Jul 2013 06:48:53 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B6mrUX061111; Thu, 11 Jul 2013 06:48:53 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201307110648.r6B6mrUX061111@svn.freebsd.org> From: Dimitry Andric Date: Thu, 11 Jul 2013 06:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253192 - stable/9/contrib/llvm/lib/CodeGen/SelectionDAG X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 06:48:54 -0000 Author: dim Date: Thu Jul 11 06:48:53 2013 New Revision: 253192 URL: http://svnweb.freebsd.org/changeset/base/253192 Log: MFC r253042: Pull in r185616 from llvm trunk: FastISel can only append to basic blocks. Compute the insertion point from the end of the basic block instead of skipping labels from the front. This caused failures in landing pads when live-in copies where inserted before instruction selection. I missed this change in r252720; without it, certain compilation flags can cause exception labels to not be generated, but still referenced, leading to link errors. Reported by: zeising Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp Thu Jul 11 05:58:28 2013 (r253191) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp Thu Jul 11 06:48:53 2013 (r253192) @@ -75,15 +75,12 @@ STATISTIC(NumFastIselDead, "Number of de void FastISel::startNewBlock() { LocalValueMap.clear(); + // Instructions are appended to FuncInfo.MBB. If the basic block already + // contains labels or copies, use the last instruction as the last local + // value. EmitStartPt = 0; - - // Advance the emit start point past any EH_LABEL instructions. - MachineBasicBlock::iterator - I = FuncInfo.MBB->begin(), E = FuncInfo.MBB->end(); - while (I != E && I->getOpcode() == TargetOpcode::EH_LABEL) { - EmitStartPt = I; - ++I; - } + if (!FuncInfo.MBB->empty()) + EmitStartPt = &FuncInfo.MBB->back(); LastLocalValue = EmitStartPt; }