package ollvm

  1. Overview
  2. Docs
type linkage =
  1. | LINKAGE_Private
  2. | LINKAGE_Internal
  3. | LINKAGE_Available_externally
  4. | LINKAGE_Linkonce
  5. | LINKAGE_Weak
  6. | LINKAGE_Common
  7. | LINKAGE_Appending
  8. | LINKAGE_Extern_weak
  9. | LINKAGE_Linkonce_odr
  10. | LINKAGE_Weak_odr
  11. | LINKAGE_External
and dll_storage =
  1. | DLLSTORAGE_Dllimport
  2. | DLLSTORAGE_Dllexport
and visibility =
  1. | VISIBILITY_Default
  2. | VISIBILITY_Hidden
  3. | VISIBILITY_Protected
and cconv =
  1. | CC_Ccc
  2. | CC_Fastcc
  3. | CC_Coldcc
  4. | CC_Cc of int
and param_attr =
  1. | PARAMATTR_Zeroext
  2. | PARAMATTR_Signext
  3. | PARAMATTR_Inreg
  4. | PARAMATTR_Byval
  5. | PARAMATTR_Inalloca
  6. | PARAMATTR_Sret
  7. | PARAMATTR_Align of int
  8. | PARAMATTR_Noalias
  9. | PARAMATTR_Nocapture
  10. | PARAMATTR_Nest
  11. | PARAMATTR_Returned
  12. | PARAMATTR_Nonnull
  13. | PARAMATTR_Dereferenceable of int
and fn_attr =
  1. | FNATTR_Alignstack of int
  2. | FNATTR_Alwaysinline
  3. | FNATTR_Builtin
  4. | FNATTR_Cold
  5. | FNATTR_Inlinehint
  6. | FNATTR_Jumptable
  7. | FNATTR_Minsize
  8. | FNATTR_Naked
  9. | FNATTR_Nobuiltin
  10. | FNATTR_Noduplicate
  11. | FNATTR_Noimplicitfloat
  12. | FNATTR_Noinline
  13. | FNATTR_Nonlazybind
  14. | FNATTR_Noredzone
  15. | FNATTR_Noreturn
  16. | FNATTR_Nounwind
  17. | FNATTR_Optnone
  18. | FNATTR_Optsize
  19. | FNATTR_Readnone
  20. | FNATTR_Readonly
  21. | FNATTR_Returns_twice
  22. | FNATTR_Sanitize_address
  23. | FNATTR_Sanitize_memory
  24. | FNATTR_Sanitize_thread
  25. | FNATTR_Ssp
  26. | FNATTR_Sspreq
  27. | FNATTR_Sspstrong
  28. | FNATTR_Uwtable
  29. | FNATTR_String of string
  30. | FNATTR_Key_value of string * string
  31. | FNATTR_Attr_grp of int
and ident =
  1. | ID_Global of string
  2. | ID_Local of string
and typ =
  1. | TYPE_I of int
  2. | TYPE_Pointer of typ
  3. | TYPE_Void
  4. | TYPE_Half
  5. | TYPE_Float
  6. | TYPE_Double
  7. | TYPE_X86_fp80
  8. | TYPE_Fp128
  9. | TYPE_Ppc_fp128
  10. | TYPE_Label
  11. | TYPE_Metadata
  12. | TYPE_X86_mmx
  13. | TYPE_Array of int * typ
  14. | TYPE_Function of typ * typ list
  15. | TYPE_Struct of typ list
  16. | TYPE_Packed_struct of typ list
  17. | TYPE_Opaque
  18. | TYPE_Vector of int * typ
and metadata =
  1. | METADATA_Const of tvalue
  2. | METADATA_Null
  3. | METADATA_Id of string
  4. | METADATA_String of string
  5. | METADATA_Named of string list
  6. | METADATA_Node of metadata list
and icmp =
  1. | Eq
  2. | Ne
  3. | Ugt
  4. | Uge
  5. | Ult
  6. | Ule
  7. | Sgt
  8. | Sge
  9. | Slt
  10. | Sle
and fcmp =
  1. | False
  2. | Oeq
  3. | Ogt
  4. | Oge
  5. | Olt
  6. | Ole
  7. | One
  8. | Ord
  9. | Uno
  10. | Ueq
  11. | Ugt
  12. | Uge
  13. | Ult
  14. | Ule
  15. | Une
  16. | True
and ibinop =
  1. | Add of bool * bool
  2. | Sub of bool * bool
  3. | Mul of bool * bool
  4. | Shl of bool * bool
  5. | UDiv of bool
  6. | SDiv of bool
  7. | LShr of bool
  8. | AShr of bool
  9. | URem
  10. | SRem
  11. | And
  12. | Or
  13. | Xor
and fbinop =
  1. | FAdd
  2. | FSub
  3. | FMul
  4. | FDiv
  5. | FRem
and fast_math =
  1. | Nnan
  2. | Ninf
  3. | Nsz
  4. | Arcp
  5. | Fast
and conversion_type =
  1. | Trunc
  2. | Zext
  3. | Sext
  4. | Fptrunc
  5. | Fpext
  6. | Uitofp
  7. | Sitofp
  8. | Fptoui
  9. | Fptosi
  10. | Inttoptr
  11. | Ptrtoint
  12. | Bitcast
and tvalue = typ * value
and tident = typ * ident
and value =
  1. | VALUE_Ident of ident
  2. | VALUE_Integer of int
  3. | VALUE_Float of float
  4. | VALUE_Bool of bool
  5. | VALUE_Null
  6. | VALUE_Undef
  7. | VALUE_Struct of tvalue list
  8. | VALUE_Packed_struct of tvalue list
  9. | VALUE_Array of tvalue list
  10. | VALUE_Vector of tvalue list
  11. | VALUE_Zero_initializer
and instr =
  1. | INSTR_IBinop of ibinop * typ * value * value
  2. | INSTR_ICmp of icmp * typ * value * value
  3. | INSTR_FBinop of fbinop * fast_math list * typ * value * value
  4. | INSTR_FCmp of fcmp * typ * value * value
  5. | INSTR_Conversion of conversion_type * typ * value * typ
  6. | INSTR_GetElementPtr of tvalue * tvalue list
  7. | INSTR_ExtractElement of tvalue * tvalue
  8. | INSTR_InsertElement of tvalue * tvalue * tvalue
  9. | INSTR_ShuffleVector of tvalue * tvalue * tvalue
  10. | INSTR_ExtractValue of tvalue * int list
  11. | INSTR_InsertValue of tvalue * tvalue * int list
  12. | INSTR_Call of tident * tvalue list
  13. | INSTR_Alloca of typ * tvalue option * int option
  14. | INSTR_Load of bool * tvalue * int option
  15. | INSTR_Phi of typ * (value * ident) list
  16. | INSTR_Select of tvalue * tvalue * tvalue
  17. | INSTR_VAArg
  18. | INSTR_LandingPad
  19. | INSTR_Store of bool * tvalue * tident * int option
  20. | INSTR_Fence
  21. | INSTR_AtomicCmpXchg
  22. | INSTR_AtomicRMW
  23. | INSTR_Invoke of tident * tvalue list * tident * tident
  24. | INSTR_Ret of tvalue
  25. | INSTR_Ret_void
  26. | INSTR_Br of tvalue * tident * tident
  27. | INSTR_Br_1 of tident
  28. | INSTR_Switch of tvalue * tident * (tvalue * tident) list
  29. | INSTR_IndirectBr of tvalue * tident list
  30. | INSTR_Resume of tvalue
  31. | INSTR_Unreachable
  32. | INSTR_Assign of ident * instr
and toplevelentry =
  1. | TLE_Target of string
  2. | TLE_Datalayout of string
  3. | TLE_Declaration of declaration
  4. | TLE_Definition of definition
  5. | TLE_Type_decl of ident * typ
  6. | TLE_Global of global
  7. | TLE_Metadata of string * metadata
  8. | TLE_Attribute_group of int * fn_attr list
and toplevelentries = toplevelentry list
and global = {
  1. g_ident : ident;
  2. g_typ : typ;
  3. g_constant : bool;
  4. g_value : value option;
  5. g_linkage : linkage option;
  6. g_visibility : visibility option;
  7. g_dll_storage : dll_storage option;
  8. g_thread_local : thread_local_storage option;
  9. g_unnamed_addr : bool;
  10. g_addrspace : int option;
  11. g_externally_initialized : bool;
  12. g_section : string option;
  13. g_align : int option;
}
and thread_local_storage =
  1. | TLS_Localdynamic
  2. | TLS_Initialexec
  3. | TLS_Localexec
and declaration = {
  1. dc_name : ident;
  2. dc_type : typ;
  3. dc_param_attrs : param_attr list * param_attr list list;
}
and definition = {
  1. df_prototype : declaration;
  2. df_args : ident list;
  3. df_instrs : block list;
  4. df_linkage : linkage option;
  5. df_visibility : visibility option;
  6. df_dll_storage : dll_storage option;
  7. df_cconv : cconv option;
  8. df_attrs : fn_attr list;
  9. df_section : string option;
  10. df_align : int option;
  11. df_gc : string option;
}
and block = string * instr list
and modul = {
  1. m_name : string;
  2. m_target : toplevelentry;
  3. m_datalayout : toplevelentry;
  4. m_globals : (string * global) list;
  5. m_declarations : (string * declaration) list;
  6. m_definitions : (string * definition) list;
}
OCaml

Innovation. Community. Security.