diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-16 06:10:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-16 06:10:58 +0000 |
commit | e39650a805425ffdbd79692c7d1bad80f7332dae (patch) | |
tree | 8f37117cb54641819bccacc5809ef98d6c0f6dd2 /utils/TableGen/CodeGenDAGPatterns.h | |
parent | a08b587494a09a94a72245dd9d7088564e511f4e (diff) |
add support for the new isel matcher to generate
(isprofitable|islegal)tofold checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96331 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h index 5eef9e1ddc..f1f7bca1a8 100644 --- a/utils/TableGen/CodeGenDAGPatterns.h +++ b/utils/TableGen/CodeGenDAGPatterns.h @@ -216,6 +216,13 @@ public: void setChild(unsigned i, TreePatternNode *N) { Children[i] = N; } + + /// hasChild - Return true if N is any of our children. + bool hasChild(const TreePatternNode *N) const { + for (unsigned i = 0, e = Children.size(); i != e; ++i) + if (Children[i] == N) return true; + return false; + } const std::vector<std::string> &getPredicateFns() const {return PredicateFns;} void clearPredicateFns() { PredicateFns.clear(); } |