diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-28 20:55:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-28 20:55:18 +0000 |
commit | 9a21500edc485a2c383a03fba429943f031c1398 (patch) | |
tree | 2f2388ea6ca1e1a78ed958fd753ded3b69ad00c0 /utils/TableGen/DAGISelMatcherOpt.cpp | |
parent | c78f2a39945339752a163949a2d7c27f28635d99 (diff) | |
download | external_llvm-9a21500edc485a2c383a03fba429943f031c1398.zip external_llvm-9a21500edc485a2c383a03fba429943f031c1398.tar.gz external_llvm-9a21500edc485a2c383a03fba429943f031c1398.tar.bz2 |
use MorphNodeTo instead of SelectNodeTo. SelectNodeTo
is just a silly wrapper around MorphNodeTo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97416 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelMatcherOpt.cpp')
-rw-r--r-- | utils/TableGen/DAGISelMatcherOpt.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/utils/TableGen/DAGISelMatcherOpt.cpp b/utils/TableGen/DAGISelMatcherOpt.cpp index 2ea178f..65a01fa 100644 --- a/utils/TableGen/DAGISelMatcherOpt.cpp +++ b/utils/TableGen/DAGISelMatcherOpt.cpp @@ -66,11 +66,11 @@ static void ContractNodes(OwningPtr<Matcher> &MatcherPtr, return ContractNodes(MatcherPtr, CGP); } - // Turn EmitNode->CompleteMatch into SelectNodeTo if we can. + // Turn EmitNode->CompleteMatch into MorphNodeTo if we can. if (EmitNodeMatcher *EN = dyn_cast<EmitNodeMatcher>(N)) if (CompleteMatchMatcher *CM = dyn_cast<CompleteMatchMatcher>(EN->getNext())) { - // We can only use SelectNodeTo if the result values match up. + // We can only use MorphNodeTo if the result values match up. unsigned RootResultFirst = EN->getFirstResultSlot(); bool ResultsMatch = true; for (unsigned i = 0, e = CM->getNumResults(); i != e; ++i) @@ -78,7 +78,7 @@ static void ContractNodes(OwningPtr<Matcher> &MatcherPtr, ResultsMatch = false; // If the selected node defines a subset of the flag/chain results, we - // can't use SelectNodeTo. For example, we can't use SelectNodeTo if the + // can't use MorphNodeTo. For example, we can't use MorphNodeTo if the // matched pattern has a chain but the root node doesn't. const PatternToMatch &Pattern = CM->getPattern(); @@ -87,7 +87,7 @@ static void ContractNodes(OwningPtr<Matcher> &MatcherPtr, ResultsMatch = false; // If the matched node has a flag and the output root doesn't, we can't - // use SelectNodeTo. + // use MorphNodeTo. // // NOTE: Strictly speaking, we don't have to check for the flag here // because the code in the pattern generator doesn't handle it right. We @@ -109,20 +109,20 @@ static void ContractNodes(OwningPtr<Matcher> &MatcherPtr, if (ResultsMatch) { const SmallVectorImpl<MVT::SimpleValueType> &VTs = EN->getVTList(); const SmallVectorImpl<unsigned> &Operands = EN->getOperandList(); - MatcherPtr.reset(new SelectNodeToMatcher(EN->getOpcodeName(), - &VTs[0], VTs.size(), - Operands.data(), Operands.size(), - EN->hasChain(), EN->hasFlag(), - EN->hasMemRefs(), - EN->getNumFixedArityOperands(), - Pattern)); + MatcherPtr.reset(new MorphNodeToMatcher(EN->getOpcodeName(), + &VTs[0], VTs.size(), + Operands.data(),Operands.size(), + EN->hasChain(), EN->hasFlag(), + EN->hasMemRefs(), + EN->getNumFixedArityOperands(), + Pattern)); return; } // FIXME: Handle OPC_MarkFlagResults. - // FIXME2: Kill off all the SelectionDAG::SelectNodeTo and getMachineNode - // variants. Call MorphNodeTo instead of SelectNodeTo. + // FIXME2: Kill off all the SelectionDAG::MorphNodeTo and getMachineNode + // variants. } ContractNodes(N->getNextPtr(), CGP); |