Module Il


module Il: sig  end


type temp_id = int

type identifier = string

type field = identifier * Ctt_abstree.c_type

type il_switch_label = Il1.il_switch_label =
| CASE of Big_int.big_int
| DEFAULT


type il_if_type = Il1.il_if_type =
| IFNOT
| IFTRUE


type il_binop = Il1.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 = Il1.il_lvalue =
| ILlvPtr of temp_id
| ILlvVar of identifier * Ctt_abstree.c_type
| ILlvTemp of temp_id


type il_expr = Il1.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 il =
| ILstmtIf of il_if_type * temp_id * int
| ILstmtSwitch of temp_id * (il_switch_label * int) list
| ILstmtGoto of int
| ILstmtReturn of temp_id option
| ILstmtAssign of temp_id * Ctt_abstree.c_type * il_expr
| ILstmtRead of temp_id * Ctt_abstree.c_type * il_lvalue * field list
| ILstmtWrite of il_lvalue * field list * temp_id
| ILstmtInitialize of temp_id * Ctt_abstree.c_type * Cttm_abstree.cttm_initializer option
| ILstmtSequence of il list
| ILstmtParallel of il list


type il_basic_block = {
   predecessor : int list;
   successor : int list;
   immediate_dominator : int;
   nest_level : int;
   mutable phi_function : (temp_id * Ctt_abstree.c_type * temp_id array) list;
   mutable code : il list;
}

type il_variable_attribute = {
   original_name : string option;
   variable_type : Ctt_abstree.c_type;
   storage_class : Ctt_abstree.local_storage_class;
}

type il_function = {
   body : il_basic_block array;
   max_variable_number : int;
   variable_environment : il_variable_attribute array;
   arguments : (identifier * Ctt_abstree.c_type) array;
}