aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/CodeGenDAGPatterns.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-18 23:15:10 +0000
committerChris Lattner <sabre@nondot.org>2010-03-18 23:15:10 +0000
commit6c6ba364931acb113973ad3e6d69736969c59299 (patch)
treee3a109a433374f7de2646d06df965ef31e85bfde /utils/TableGen/CodeGenDAGPatterns.h
parent1ff781fb501505660f6ccb7558ad9e613db21517 (diff)
downloadexternal_llvm-6c6ba364931acb113973ad3e6d69736969c59299.zip
external_llvm-6c6ba364931acb113973ad3e6d69736969c59299.tar.gz
external_llvm-6c6ba364931acb113973ad3e6d69736969c59299.tar.bz2
infer results of a pattern from implicit defs. This allows you to do something
like this: def : Pat<(add ...), (FOOINST)>; When fooinst only has a single implicit def (e.g. to R1). This will be handled as if written as (set R1, (FOOINST ...)) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h
index 44f82fe..c32b23a 100644
--- a/utils/TableGen/CodeGenDAGPatterns.h
+++ b/utils/TableGen/CodeGenDAGPatterns.h
@@ -88,6 +88,10 @@ namespace EEVT {
return TypeVec;
}
+ bool isVoid() const {
+ return TypeVec.size() == 1 && TypeVec[0] == MVT::isVoid;
+ }
+
/// hasIntegerTypes - Return true if this TypeSet contains any integer value
/// types.
bool hasIntegerTypes() const;