[OCaml] PR19859: Add Llvm.{fcmp_predicate,float_of_const}.
[oota-llvm.git] / bindings / ocaml / llvm / llvm.mli
index 8a205ce1efa6211d7430e2e98f78c18b8cb392c4..10aa706b70ef9f949f18b6f24cfd8c1b2b2879b1 100644 (file)
@@ -842,6 +842,11 @@ val const_int_of_string : lltype -> string -> int -> llvalue
     value [n]. See the method [llvm::ConstantFP::get]. *)
 val const_float : lltype -> float -> llvalue
 
+(** [float_of_const c] returns the float value of the [c] constant float.
+    None is returned if this is not an float constant.
+    See the method [llvm::ConstantFP::getDoubleValue].*)
+val float_of_const : llvalue -> float option
+
 (** [const_float_of_string ty s] returns the floating point constant of type
     [ty] and value [n]. See the method [llvm::ConstantFP::get]. *)
 val const_float_of_string : lltype -> string -> llvalue
@@ -1699,6 +1704,10 @@ val instr_opcode : llvalue -> Opcode.t
     instruction [i]. *)
 val icmp_predicate : llvalue -> Icmp.t option
 
+(** [fcmp_predicate i] returns the [fcmp.t] corresponding to an [fcmp]
+    instruction [i]. *)
+val fcmp_predicate : llvalue -> Fcmp.t option
+
 (** [inst_clone i] returns a copy of instruction [i],
     The instruction has no parent, and no name.
     See the method [llvm::Instruction::clone]. *)