diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-25 19:00:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-25 19:00:39 +0000 |
commit | d6c84720df0b63e34081e0c7890f3074d8b110b9 (patch) | |
tree | f46552db5b37742ed3f49f1084681468b7222756 /utils/TableGen/DAGISelMatcher.cpp | |
parent | 2333655ed04637ffd049b9299685a0752aab8e8d (diff) | |
download | external_llvm-d6c84720df0b63e34081e0c7890f3074d8b110b9.zip external_llvm-d6c84720df0b63e34081e0c7890f3074d8b110b9.tar.gz external_llvm-d6c84720df0b63e34081e0c7890f3074d8b110b9.tar.bz2 |
change the scope node to include a list of children to be checked
instead of to have a chained series of scope nodes. This makes
the generated table smaller, improves the efficiency of the
interpreter, and make the factoring optimization much more
reasonable to implement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelMatcher.cpp')
-rw-r--r-- | utils/TableGen/DAGISelMatcher.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/TableGen/DAGISelMatcher.cpp b/utils/TableGen/DAGISelMatcher.cpp index e012928..561d612 100644 --- a/utils/TableGen/DAGISelMatcher.cpp +++ b/utils/TableGen/DAGISelMatcher.cpp @@ -25,9 +25,18 @@ void Matcher::print(raw_ostream &OS, unsigned indent) const { return Next->print(OS, indent); } +ScopeMatcher::~ScopeMatcher() { + for (unsigned i = 0, e = Children.size(); i != e; ++i) + delete Children[i]; +} + + +// printImpl methods. + void ScopeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "Scope\n"; - Check->print(OS, indent+2); + for (unsigned i = 0, e = getNumChildren(); i != e; ++i) + getChild(i)->print(OS, indent+2); } void RecordMatcher::printImpl(raw_ostream &OS, unsigned indent) const { |