Live interval splitting:
[oota-llvm.git] / include / llvm / Intrinsics.td
index 6f21a1c7bd078a48aff76212615147c11f3a251a..08d82588aa1f8a68be46b6f397468380d98d96e2 100644 (file)
@@ -76,6 +76,9 @@ def llvm_i32_ty        : LLVMType<i32>;
 def llvm_i64_ty        : LLVMType<i64>;
 def llvm_float_ty      : LLVMType<f32>;
 def llvm_double_ty     : LLVMType<f64>;
+def llvm_f80_ty        : LLVMType<f80>;
+def llvm_f128_ty       : LLVMType<f128>;
+def llvm_ppcf128_ty    : LLVMType<ppcf128>;
 def llvm_ptr_ty        : LLVMPointerType<llvm_i8_ty>;             // i8*
 def llvm_ptrptr_ty     : LLVMPointerType<llvm_ptr_ty>;            // i8**
 def llvm_empty_ty      : LLVMType<OtherVT>;                       // { }
@@ -146,12 +149,19 @@ def int_gcwrite : Intrinsic<[llvm_void_ty, llvm_ptr_ty, llvm_ptr_ty,
 //  
 def int_returnaddress : Intrinsic<[llvm_ptr_ty, llvm_i32_ty], [IntrNoMem]>;
 def int_frameaddress  : Intrinsic<[llvm_ptr_ty, llvm_i32_ty], [IntrNoMem]>;
-def int_stacksave     : Intrinsic<[llvm_ptr_ty], [IntrReadMem]>,
+
+// Note: we treat stacksave/stackrestore as writemem because we don't otherwise
+// model their dependencies on allocas.
+def int_stacksave     : Intrinsic<[llvm_ptr_ty]>,
                         GCCBuiltin<"__builtin_stack_save">;
 def int_stackrestore  : Intrinsic<[llvm_void_ty, llvm_ptr_ty]>,
                         GCCBuiltin<"__builtin_stack_restore">;
+// IntrWriteArgMem is more pessimistic than strictly necessary for prefetch,
+// however it does conveniently prevent the prefetch from being reordered
+// with respect to nearby accesses to the same memory.
 def int_prefetch      : Intrinsic<[llvm_void_ty, llvm_ptr_ty, 
-                                   llvm_i32_ty, llvm_i32_ty]>;
+                                   llvm_i32_ty, llvm_i32_ty],
+                                  [IntrWriteArgMem]>;
 def int_pcmarker      : Intrinsic<[llvm_void_ty, llvm_i32_ty]>;
 
 def int_readcyclecounter : Intrinsic<[llvm_i64_ty]>;
@@ -175,11 +185,12 @@ let Properties = [IntrWriteArgMem] in {
 }
 
 let Properties = [IntrNoMem] in {
-  def int_sqrt_f32 : Intrinsic<[llvm_float_ty, llvm_float_ty]>;
-  def int_sqrt_f64 : Intrinsic<[llvm_double_ty, llvm_double_ty]>;
-
-  def int_powi_f32 : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_i32_ty]>;
-  def int_powi_f64 : Intrinsic<[llvm_double_ty, llvm_double_ty, llvm_i32_ty]>;
+  def int_sqrt : Intrinsic<[llvm_anyfloat_ty, LLVMMatchType<0>]>;
+  def int_powi : Intrinsic<[llvm_anyfloat_ty, LLVMMatchType<0>, llvm_i32_ty]>;
+  def int_sin  : Intrinsic<[llvm_anyfloat_ty, LLVMMatchType<0>]>;
+  def int_cos  : Intrinsic<[llvm_anyfloat_ty, LLVMMatchType<0>]>; 
+  def int_pow  : Intrinsic<[llvm_anyfloat_ty,
+                            LLVMMatchType<0>, LLVMMatchType<0>]>; 
 }
 
 // NOTE: these are internal interfaces.
@@ -218,10 +229,14 @@ def int_dbg_declare      : Intrinsic<[llvm_void_ty, llvm_descriptor_ty,
 
 //===------------------ Exception Handling Intrinsics----------------------===//
 //
-def int_eh_exception  : Intrinsic<[llvm_ptr_ty]>;
-def int_eh_selector   : Intrinsic<[llvm_i32_ty, llvm_ptr_ty, llvm_ptr_ty,
-                                                llvm_vararg_ty]>;
-def int_eh_typeid_for : Intrinsic<[llvm_i32_ty, llvm_ptr_ty]>;
+def int_eh_exception     : Intrinsic<[llvm_ptr_ty]>;
+def int_eh_selector_i32  : Intrinsic<[llvm_i32_ty, llvm_ptr_ty, llvm_ptr_ty,
+                                                   llvm_vararg_ty]>;
+def int_eh_selector_i64  : Intrinsic<[llvm_i64_ty, llvm_ptr_ty, llvm_ptr_ty,
+                                                   llvm_vararg_ty]>;
+
+def int_eh_typeid_for_i32 : Intrinsic<[llvm_i32_ty, llvm_ptr_ty]>;
+def int_eh_typeid_for_i64 : Intrinsic<[llvm_i64_ty, llvm_ptr_ty]>;
 
 def int_eh_return     : Intrinsic<[llvm_void_ty, llvm_i32_ty, llvm_ptr_ty]>,
                         GCCBuiltin<"__builtin_eh_return">;
@@ -236,14 +251,21 @@ def int_eh_dwarf_cfa  : Intrinsic<[llvm_ptr_ty, llvm_i32_ty]>;
 def int_var_annotation : Intrinsic<[llvm_void_ty, llvm_ptr_ty, llvm_ptr_ty,
                                     llvm_ptr_ty, llvm_i32_ty], 
                                     [], "llvm.var.annotation">;
+                                    
+def int_annotation : Intrinsic<[llvm_anyint_ty, LLVMMatchType<0>, llvm_ptr_ty,
+                                llvm_ptr_ty, llvm_i32_ty], 
+                                [], "llvm.annotation">;
 
 //===------------------------ Trampoline Intrinsics -----------------------===//
 //
-def int_init_trampoline   : Intrinsic<[llvm_void_ty, llvm_ptr_ty, llvm_ptr_ty,
-                                       llvm_ptr_ty], []>,
-                            GCCBuiltin<"__builtin_init_trampoline">;
-def int_adjust_trampoline : Intrinsic<[llvm_ptr_ty, llvm_ptr_ty], [IntrNoMem]>,
-                            GCCBuiltin<"__builtin_adjust_trampoline">;
+def int_init_trampoline : Intrinsic<[llvm_ptr_ty, llvm_ptr_ty, llvm_ptr_ty,
+                                     llvm_ptr_ty], []>,
+                          GCCBuiltin<"__builtin_init_trampoline">;
+
+//===-------------------------- Other Intrinsics --------------------------===//
+//
+def int_flt_rounds : Intrinsic<[llvm_i32_ty]>,
+                     GCCBuiltin<"__builtin_flt_rounds">;
 
 //===----------------------------------------------------------------------===//
 // Target-specific intrinsics
@@ -251,3 +273,4 @@ def int_adjust_trampoline : Intrinsic<[llvm_ptr_ty, llvm_ptr_ty], [IntrNoMem]>,
 
 include "llvm/IntrinsicsPowerPC.td"
 include "llvm/IntrinsicsX86.td"
+include "llvm/IntrinsicsARM.td"