diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-19 17:41:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-19 17:41:26 +0000 |
commit | 774ce29399364823dba62217ebf7bc8701005140 (patch) | |
tree | 78aecb8cb366567b7c4dcbed65284c6fd37e7fd0 /utils/TableGen/CodeGenDAGPatterns.h | |
parent | 81f04d59f6216d0e105daa9bde2250ca6af35fa5 (diff) |
make FillWithPossibleTypes take a predicate to filter types so that
we don't blow the smallvector as often. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h index caf053285d..947cfe7f6d 100644 --- a/utils/TableGen/CodeGenDAGPatterns.h +++ b/utils/TableGen/CodeGenDAGPatterns.h @@ -54,7 +54,7 @@ namespace EEVT { /// Vector has one concrete type: The type is completely known. /// class TypeSet { - SmallVector<MVT::SimpleValueType, 2> TypeVec; + SmallVector<MVT::SimpleValueType, 4> TypeVec; public: TypeSet() {} TypeSet(MVT::SimpleValueType VT, TreePattern &TP); @@ -136,8 +136,11 @@ namespace EEVT { private: /// FillWithPossibleTypes - Set to all legal types and return true, only - /// valid on completely unknown type sets - bool FillWithPossibleTypes(TreePattern &TP); + /// valid on completely unknown type sets. If Pred is non-null, only MVTs + /// that pass the predicate are added. + bool FillWithPossibleTypes(TreePattern &TP, + bool (*Pred)(MVT::SimpleValueType) = 0, + const char *PredicateName = 0); }; } |