summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-28 20:49:53 +0000
committerChris Lattner <sabre@nondot.org>2010-02-28 20:49:53 +0000
commit102a8a01e67e6b7e237e0f156402f9c9d3aa6b24 (patch)
treef5711cb4b95ceb841c2660c7d21b2c2174ef65ed /llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
parent84f5ba80df5295fdc879121a7867be7a72b63ea7 (diff)
downloadbcm5719-llvm-102a8a01e67e6b7e237e0f156402f9c9d3aa6b24.tar.gz
bcm5719-llvm-102a8a01e67e6b7e237e0f156402f9c9d3aa6b24.zip
enhance the new isel to use SelectNodeTo for most patterns,
even some the old isel didn't. There are several parts of this that make me feel dirty, but it's no worse than the old isel. I'll clean up the parts I can do without ripping out the old one next. llvm-svn: 97415
Diffstat (limited to 'llvm/utils/TableGen/DAGISelMatcherEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/DAGISelMatcherEmitter.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp b/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
index 942a61225ee..aec1e18aa72 100644
--- a/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
@@ -416,18 +416,23 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx,
// Print the result #'s for EmitNode.
if (const EmitNodeMatcher *E = dyn_cast<EmitNodeMatcher>(EN)) {
- if (EN->getVT(0) != MVT::Flag && EN->getVT(0) != MVT::Other) {
+ if (unsigned NumResults = EN->getNumNonChainFlagVTs()) {
OS.PadToColumn(CommentIndent) << "// Results = ";
unsigned First = E->getFirstResultSlot();
- for (unsigned i = 0, e = EN->getNumVTs(); i != e; ++i) {
- if (EN->getVT(0) == MVT::Flag || EN->getVT(0) == MVT::Other)
- break;
+ for (unsigned i = 0; i != NumResults; ++i)
OS << "#" << First+i << " ";
- }
}
}
-
OS << '\n';
+
+ if (const SelectNodeToMatcher *SNT = dyn_cast<SelectNodeToMatcher>(N)) {
+ OS.PadToColumn(Indent*2) << "// Src: "
+ << *SNT->getPattern().getSrcPattern() << '\n';
+ OS.PadToColumn(Indent*2) << "// Dst: "
+ << *SNT->getPattern().getDstPattern() << '\n';
+
+ }
+
return 6+EN->getNumVTs()+NumOperandBytes;
}
case Matcher::MarkFlagResults: {
OpenPOWER on IntegriCloud