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 | 6d765ebc0dadb4129727c220cdb128c40d589622 (patch) | |
| tree | 5e951fb2c3e8148f5e846ebe4e5ad161db7d53d8 /llvm/utils/TableGen/CodeGenDAGPatterns.h | |
| parent | 0dab68f3d0b629f03f1e29e997e81b4b7d28775e (diff) | |
| download | bcm5719-llvm-6d765ebc0dadb4129727c220cdb128c40d589622.tar.gz bcm5719-llvm-6d765ebc0dadb4129727c220cdb128c40d589622.zip | |
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.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h index caf053285d9..947cfe7f6dd 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); }; } |

