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...
Dimitry Andric
dim at FreeBSD.org
Wed Jul 29 14:07:33 UTC 2015
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/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
Changes in other areas also in this revision:
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)
Modified: stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h
==============================================================================
--- stable/10/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h Wed Jul 29 13:49:34 2015 (r286011)
+++ stable/10/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/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
==============================================================================
--- stable/10/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jul 29 13:49:34 2015 (r286011)
+++ stable/10/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<std::pair<SDValue, SDNode*> > &RecordedNodes;
- SmallVectorImpl<MatchScope> &MatchScopes;
-public:
- MatchStateUpdater(SelectionDAG &DAG,
- SmallVectorImpl<std::pair<SDValue, SDNode*> > &RN,
- SmallVectorImpl<MatchScope> &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<MatchStateUpdater> MSU;
- if (ComplexPatternFuncMutatesDAG())
- MSU.reset(new MatchStateUpdater(*CurDAG, RecordedNodes,
- MatchScopes));
-
if (!CheckComplexPattern(NodeToMatch, RecordedNodes[RecNo].second,
RecordedNodes[RecNo].first, CPNum,
RecordedNodes))
Modified: stable/10/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
==============================================================================
--- stable/10/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Jul 29 13:49:34 2015 (r286011)
+++ stable/10/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;
- }
};
}
More information about the svn-src-stable-10
mailing list