From owner-svn-src-stable-9@freebsd.org Wed Jul 29 14:07:31 2015 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 664619AD7F7; Wed, 29 Jul 2015 14:07:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49DDDFCA; Wed, 29 Jul 2015 14:07:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6TE7VKJ063716; Wed, 29 Jul 2015 14:07:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6TE7Uxc063711; Wed, 29 Jul 2015 14:07:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201507291407.t6TE7Uxc063711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 29 Jul 2015 14:07:30 +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: r286012 - in stable: 10/contrib/llvm/include/llvm/CodeGen 10/contrib/llvm/lib/CodeGen/SelectionDAG 10/contrib/llvm/lib/Target/X86 10/contrib/llvm/patches 9/contrib/llvm/include/llvm/Cod... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2015 14:07:31 -0000 Author: dim Date: Wed Jul 29 14:07:29 2015 New Revision: 286012 URL: https://svnweb.freebsd.org/changeset/base/286012 Log: Revert r286007-r286009 for now, until I can figure out how to make the fix compile with older gcc and libstdc++. Deleted: stable/9/contrib/llvm/patches/patch-r286007-llvm-r219009-x86-codegen-crash.diff Modified: stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/9/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Deleted: stable/10/contrib/llvm/patches/patch-r286007-llvm-r219009-x86-codegen-crash.diff Modified: stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/10/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h Wed Jul 29 13:49:34 2015 (r286011) +++ stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h Wed Jul 29 14:07:29 2015 (r286012) @@ -238,12 +238,6 @@ public: const unsigned char *MatcherTable, unsigned TableSize); - /// \brief Return true if complex patterns for this target can mutate the - /// DAG. - virtual bool ComplexPatternFuncMutatesDAG() const { - return false; - } - private: // Calls to these functions are generated by tblgen. Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jul 29 13:49:34 2015 (r286011) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jul 29 14:07:29 2015 (r286012) @@ -2345,42 +2345,6 @@ struct MatchScope { bool HasChainNodesMatched, HasGlueResultNodesMatched; }; -/// \\brief A DAG update listener to keep the matching state -/// (i.e. RecordedNodes and MatchScope) uptodate if the target is allowed to -/// change the DAG while matching. X86 addressing mode matcher is an example -/// for this. -class MatchStateUpdater : public SelectionDAG::DAGUpdateListener -{ - SmallVectorImpl > &RecordedNodes; - SmallVectorImpl &MatchScopes; -public: - MatchStateUpdater(SelectionDAG &DAG, - SmallVectorImpl > &RN, - SmallVectorImpl &MS) : - SelectionDAG::DAGUpdateListener(DAG), - RecordedNodes(RN), MatchScopes(MS) { } - - void NodeDeleted(SDNode *N, SDNode *E) { - // Some early-returns here to avoid the search if we deleted the node or - // if the update comes from MorphNodeTo (MorphNodeTo is the last thing we - // do, so it's unnecessary to update matching state at that point). - // Neither of these can occur currently because we only install this - // update listener during matching a complex patterns. - if (!E || E->isMachineOpcode()) - return; - // Performing linear search here does not matter because we almost never - // run this code. You'd have to have a CSE during complex pattern - // matching. - for (auto &I : RecordedNodes) - if (I.first.getNode() == N) - I.first.setNode(E); - - for (auto &I : MatchScopes) - for (auto &J : I.NodeStack) - if (J.getNode() == N) - J.setNode(E); - } -}; } SDNode *SelectionDAGISel:: @@ -2635,14 +2599,6 @@ SelectCodeCommon(SDNode *NodeToMatch, co unsigned CPNum = MatcherTable[MatcherIndex++]; unsigned RecNo = MatcherTable[MatcherIndex++]; assert(RecNo < RecordedNodes.size() && "Invalid CheckComplexPat"); - - // If target can modify DAG during matching, keep the matching state - // consistent. - std::unique_ptr MSU; - if (ComplexPatternFuncMutatesDAG()) - MSU.reset(new MatchStateUpdater(*CurDAG, RecordedNodes, - MatchScopes)); - if (!CheckComplexPattern(NodeToMatch, RecordedNodes[RecNo].second, RecordedNodes[RecNo].first, CPNum, RecordedNodes)) Modified: stable/9/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Jul 29 13:49:34 2015 (r286011) +++ stable/9/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Jul 29 14:07:29 2015 (r286012) @@ -290,13 +290,6 @@ namespace { const X86InstrInfo *getInstrInfo() const { return getTargetMachine().getInstrInfo(); } - - /// \brief Address-mode matching performs shift-of-and to and-of-shift - /// reassociation in order to expose more scaled addressing - /// opportunities. - bool ComplexPatternFuncMutatesDAG() const override { - return true; - } }; }