diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-28 23:00:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-28 23:00:47 +0000 |
commit | ccd23cc2a49f02acbcdd50128a9022477f7cb6a4 (patch) | |
tree | 5bc11be8b9cadef4c3815f8507491b6f4c965baa /utils | |
parent | d20c0bc5698688f69e52dc4d19cedfcd973a7088 (diff) | |
download | external_llvm-ccd23cc2a49f02acbcdd50128a9022477f7cb6a4.zip external_llvm-ccd23cc2a49f02acbcdd50128a9022477f7cb6a4.tar.gz external_llvm-ccd23cc2a49f02acbcdd50128a9022477f7cb6a4.tar.bz2 |
simplify some code now that chain/flag results are not stored in
the vtlist for emitnode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97429 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/DAGISelMatcher.h | 9 | ||||
-rw-r--r-- | utils/TableGen/DAGISelMatcherEmitter.cpp | 2 | ||||
-rw-r--r-- | utils/TableGen/DAGISelMatcherOpt.cpp | 6 |
3 files changed, 4 insertions, 13 deletions
diff --git a/utils/TableGen/DAGISelMatcher.h b/utils/TableGen/DAGISelMatcher.h index d9c8b29..ea48a0b 100644 --- a/utils/TableGen/DAGISelMatcher.h +++ b/utils/TableGen/DAGISelMatcher.h @@ -902,15 +902,6 @@ public: return VTs[i]; } - /// getNumNonChainFlagVTs - Return the number of normal results that this node - /// will have, ignoring flag and chain results. - unsigned getNumNonChainFlagVTs() const { - for (unsigned i = 0, e = getNumVTs(); i != e; ++i) - if (VTs[i] == MVT::Flag || VTs[i] == MVT::Other) - return i; - return getNumVTs(); - } - unsigned getNumOperands() const { return Operands.size(); } unsigned getOperand(unsigned i) const { assert(i < Operands.size()); diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index 76241c5..3f78cdd 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -372,7 +372,7 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, // Print the result #'s for EmitNode. if (const EmitNodeMatcher *E = dyn_cast<EmitNodeMatcher>(EN)) { - if (unsigned NumResults = EN->getNumNonChainFlagVTs()) { + if (unsigned NumResults = EN->getNumVTs()) { OS.PadToColumn(CommentIndent) << "// Results = "; unsigned First = E->getFirstResultSlot(); for (unsigned i = 0; i != NumResults; ++i) diff --git a/utils/TableGen/DAGISelMatcherOpt.cpp b/utils/TableGen/DAGISelMatcherOpt.cpp index 01723d3..37643c3 100644 --- a/utils/TableGen/DAGISelMatcherOpt.cpp +++ b/utils/TableGen/DAGISelMatcherOpt.cpp @@ -65,7 +65,9 @@ static void ContractNodes(OwningPtr<Matcher> &MatcherPtr, MatcherPtr.reset(MP->takeNext()); return ContractNodes(MatcherPtr, CGP); } - + + // FIXME: Handle OPC_MarkFlagResults. + // Turn EmitNode->CompleteMatch into MorphNodeTo if we can. if (EmitNodeMatcher *EN = dyn_cast<EmitNodeMatcher>(N)) if (CompleteMatchMatcher *CM = @@ -120,8 +122,6 @@ static void ContractNodes(OwningPtr<Matcher> &MatcherPtr, return; } - // FIXME: Handle OPC_MarkFlagResults. - // FIXME2: Kill off all the SelectionDAG::MorphNodeTo and getMachineNode // variants. } |