diff options
author | dim <dim@FreeBSD.org> | 2015-07-29 14:07:29 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-07-29 14:07:29 +0000 |
commit | e7468c5bc3d6186387903b6eaf28e1b6da90794c (patch) | |
tree | 6ef9f2eb698f7b7e441290359ecbdfa20c1b2078 /contrib/llvm/lib/CodeGen/SelectionDAG | |
parent | 0320ef685432002aead018199e86bbd6507042a0 (diff) | |
download | FreeBSD-src-e7468c5bc3d6186387903b6eaf28e1b6da90794c.zip FreeBSD-src-e7468c5bc3d6186387903b6eaf28e1b6da90794c.tar.gz |
Revert r286007-r286009 for now, until I can figure out how to make the
fix compile with older gcc and libstdc++.
Diffstat (limited to 'contrib/llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index e398531..b8b4db4 100644 --- a/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -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, const unsigned char *MatcherTable, 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)) |