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
diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h
index caf0532..947cfe7 100644
--- a/utils/TableGen/CodeGenDAGPatterns.h
+++ b/utils/TableGen/CodeGenDAGPatterns.h
@@ -54,7 +54,7 @@
/// 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 @@
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);
};
}