diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-28 20:49:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-28 20:49:53 +0000 |
commit | c78f2a39945339752a163949a2d7c27f28635d99 (patch) | |
tree | 52a5514af685d5c021e7859f031602936acf290f /utils/TableGen/DAGISelMatcher.cpp | |
parent | b65c5f2ec347db8342cb7e42d072b0088b74fa73 (diff) | |
download | llvm-c78f2a39945339752a163949a2d7c27f28635d99.tar.gz llvm-c78f2a39945339752a163949a2d7c27f28635d99.tar.bz2 llvm-c78f2a39945339752a163949a2d7c27f28635d99.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelMatcher.cpp')
-rw-r--r-- | utils/TableGen/DAGISelMatcher.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/TableGen/DAGISelMatcher.cpp b/utils/TableGen/DAGISelMatcher.cpp index d939edb563..085682fd1b 100644 --- a/utils/TableGen/DAGISelMatcher.cpp +++ b/utils/TableGen/DAGISelMatcher.cpp @@ -39,8 +39,12 @@ ScopeMatcher::~ScopeMatcher() { void ScopeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "Scope\n"; - for (unsigned i = 0, e = getNumChildren(); i != e; ++i) - getChild(i)->print(OS, indent+2); + for (unsigned i = 0, e = getNumChildren(); i != e; ++i) { + if (getChild(i) == 0) + OS.indent(indent+1) << "NULL POINTER\n"; + else + getChild(i)->print(OS, indent+2); + } } void RecordMatcher::printImpl(raw_ostream &OS, unsigned indent) const { |