aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-19 17:41:26 +0000
committerChris Lattner <sabre@nondot.org>2010-03-19 17:41:26 +0000
commit6d765ebc0dadb4129727c220cdb128c40d589622 (patch)
tree5e951fb2c3e8148f5e846ebe4e5ad161db7d53d8 /llvm/utils/TableGen/CodeGenDAGPatterns.h
parent0dab68f3d0b629f03f1e29e997e81b4b7d28775e (diff)
downloadllvm-6d765ebc0dadb4129727c220cdb128c40d589622.zip
llvm-6d765ebc0dadb4129727c220cdb128c40d589622.tar.gz
llvm-6d765ebc0dadb4129727c220cdb128c40d589622.tar.bz2
make FillWithPossibleTypes take a predicate to filter types so that
we don't blow the smallvector as often. No functionality change. llvm-svn: 98968
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h
index caf0532..947cfe7 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.h
+++ b/llvm/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);
};
}