Module Il1


module Il1: sig  end


type temp_id = int

type identifier = string

type field = identifier * Ctt_abstree.c_type

type il_switch_label =
| CASE of Big_int.big_int
| DEFAULT


type il_if_type =
| IFNOT
| IFTRUE


type il_binop =
| ILbinTimes
| ILbinDiv
| ILbinPlusVV
| ILbinMinusVV
| ILbinPlusPV
| ILbinMinusPP
| ILbinMinusPV
| ILbinModulo
| ILbinLshift
| ILbinRshift
| ILbinLogAnd
| ILbinLogOr
| ILbinIntAnd
| ILbinIntOr
| ILbinIntXor
| ILbinLessThan
| ILbinLessEqual
| ILbinGtrThan
| ILbinGtrEqual
| ILbinEqual
| ILbinNotEqual


type il_lvalue =
| ILlvPtr of temp_id
| ILlvVar of identifier * Ctt_abstree.c_type
| ILlvTemp of temp_id


type il_expr =
| ILexpCoerce of Ctt_abstree.c_type * temp_id
| ILexpConstant of Cttm_abstree.c_constants
| ILexpUndefined
| ILexpBinop of il_binop * temp_id * temp_id
| ILexpUnaryop of Cttm_abstree.unaryop * temp_id
| ILexpInvoke of il_lvalue * temp_id list
| ILexpAddress of il_lvalue * field list
| ILexpArgument of int
| ILexpIdent of temp_id


type il1_desc =
| IL1stmtDeclAutoScalar of Ctt_abstree.local_storage_class * Ctt_abstree.c_type * identifier
* temp_id option
| IL1stmtDeclBulk of Ctt_abstree.local_storage_class * Ctt_abstree.c_type * identifier
* Cttm_abstree.cttm_initializer option
| IL1stmtIf of il_if_type * temp_id * int
| IL1stmtSwitch of temp_id * (il_switch_label * int) list
| IL1stmtGoto of int
| IL1stmtReturn of temp_id option
| IL1stmtDefTemp of temp_id * Ctt_abstree.c_type * il_expr
| IL1stmtReadToTemp of temp_id * Ctt_abstree.c_type * il_lvalue * field list
| IL1stmtWrite of il_lvalue * field list * temp_id
| IL1stmtSequence of il1 list
| IL1stmtParallel of il1 list


type il1 = {
   il1_depends : temp_id Set_list.set;
   il1_defines : temp_id Set_list.set;
   il1_t : il1_desc;
}

type il1_basic_block = {
   predecessor : int list;
   successor : int list;
   immediate_dominator : int;
   code : il1 list;
}

type il1_function_body = il1_basic_block array

type il1_global_declaration =
| IL1declFunction of Ctt_abstree.global_storage_class * Ctt_abstree.c_type * identifier
* identifier list * il1_function_body
| IL1declVariable of Ctt_abstree.global_storage_class * Ctt_abstree.c_type * identifier
* Cttm_abstree.cttm_initializer option