summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-07-10 00:51:11 +0000
committerJim Grosbach <grosbach@apple.com>2012-07-10 00:51:11 +0000
commit63078f2d8cf4ad035282e495800e3ac2ec0aef95 (patch)
treec8e38e6b17cd8dfc709d8f4093beff2380ae5097 /include
parent182ef6fcaacbf44e17a96ea6614cbb5e1af1c3c2 (diff)
downloadllvm-63078f2d8cf4ad035282e495800e3ac2ec0aef95.tar.gz
llvm-63078f2d8cf4ad035282e495800e3ac2ec0aef95.tar.bz2
llvm-63078f2d8cf4ad035282e495800e3ac2ec0aef95.tar.xz
Allow intrinsics to be used in place of node matchables.
TableGen has support for using an intrinics name directly in a DAG, but this breaks down when referring to just a node, as that's handled initializer list stuff entirely via subclassing in the parser. That is, using an instrinsic like "(int_my_intrinsic ...)" works fine. Using it standalone for parameterizing the operator in such a DAG does not. Fixing this is simple enough, as we simply declare Intrinsic as deriving from SDPatternOperator, which is the class name intended for exactly this purpose in TargetSelectionDAG.td. When the intrinsic is actually used in the DAG pattern, it will be recognized and expanded to an intrinsic_wo_chain (et. al.) just like when it's used directly. Incoming ARM NEON cleanup based on this and a bit of functionality improvement after that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Intrinsics.td3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td
index 95fd843051..e4bb169622 100644
--- a/include/llvm/Intrinsics.td
+++ b/include/llvm/Intrinsics.td
@@ -161,10 +161,11 @@ def llvm_vararg_ty : LLVMType<isVoid>; // this means vararg here
// intrinsic.
// * Properties can be set to describe the behavior of the intrinsic.
//
+class SDPatternOperator;
class Intrinsic<list<LLVMType> ret_types,
list<LLVMType> param_types = [],
list<IntrinsicProperty> properties = [],
- string name = ""> {
+ string name = ""> : SDPatternOperator {
string LLVMName = name;
string TargetPrefix = ""; // Set to a prefix for target-specific intrinsics.
list<LLVMType> RetTypes = ret_types;