Home | History | Annotate | Download | only in Chapter7

Lines Matching full:builder

11 let builder = builder context
18 let builder = builder_at context (instr_begin (entry_block the_function)) in
19 build_alloca double_type var_name builder
28 build_load v name builder
37 build_call callee [|operand|] "unop" builder
56 ignore(build_store val_ variable builder);
63 | '+' -> build_fadd lhs_val rhs_val "addtmp" builder
64 | '-' -> build_fsub lhs_val rhs_val "subtmp" builder
65 | '*' -> build_fmul lhs_val rhs_val "multmp" builder
68 let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in
69 build_uitofp i double_type "booltmp" builder
79 build_call callee [|lhs_val; rhs_val|] "binop" builder
95 build_call callee args "calltmp" builder
101 let cond_val = build_fcmp Fcmp.One cond zero "ifcond" builder in
105 let start_bb = insertion_block builder in
111 position_at_end then_bb builder;
117 let new_then_bb = insertion_block builder in
121 position_at_end else_bb builder;
126 let new_else_bb = insertion_block builder in
130 position_at_end merge_bb builder;
132 let phi = build_phi incoming "iftmp" builder in
135 position_at_end start_bb builder;
136 ignore (build_cond_br cond_val then_bb else_bb builder);
140 position_at_end new_then_bb builder; ignore (build_br merge_bb builder);
141 position_at_end new_else_bb builder; ignore (build_br merge_bb builder);
143 (* Finally, set the builder to the end of the merge block. *)
144 position_at_end merge_bb builder;
168 let the_function = block_parent (insertion_block builder) in
177 ignore(build_store start_val alloca builder);
185 ignore (build_br loop_bb builder);
188 position_at_end loop_bb builder;
216 let cur_var = build_load alloca var_name builder in
217 let next_var = build_add cur_var step_val "nextvar" builder in
218 ignore(build_store next_var alloca builder);
222 let end_cond = build_fcmp Fcmp.One end_cond zero "loopcond" builder in
228 ignore (build_cond_br end_cond loop_bb after_bb builder);
231 position_at_end after_bb builder;
244 let the_function = block_parent (insertion_block builder) in
261 ignore(build_store init_val alloca builder);
329 ignore(build_store ai alloca builder);
350 position_at_end bb builder;
359 let _ = build_ret ret_val builder in