@@ -247,7 +247,7 @@ static bool ir_is_same_mem_var(const ir_ctx *ctx, ir_ref r1, int32_t offset)
247247 int32_t o1 ;
248248
249249 if (IR_IS_CONST_REF (r1 )) {
250- return false ;
250+ return 0 ;
251251 }
252252
253253 IR_ASSERT (ctx -> vregs [r1 ]);
@@ -1058,9 +1058,9 @@ static void ir_emit_dessa_moves(ir_ctx *ctx, int b, ir_block *bb)
10581058/* TAILCALL optimization */
10591059static bool ir_may_be_local_addr (ir_ctx * ctx , ir_insn * insn )
10601060{
1061- if (insn -> op == IR_PARAM ) return false ;
1061+ if (insn -> op == IR_PARAM ) return 0 ;
10621062
1063- return true ;
1063+ return 1 ;
10641064}
10651065
10661066static bool ir_try_tailcall (ir_ctx * ctx , ir_ref ref , ir_insn * insn )
@@ -1078,7 +1078,7 @@ static bool ir_try_tailcall(ir_ctx *ctx, ir_ref ref, ir_insn *insn)
10781078
10791079 if (rule ) {
10801080 ctx -> rules [ref ] = rule ;
1081- return false ;
1081+ return 0 ;
10821082 }
10831083 proto_ref = func -> proto ;
10841084 } else if (func -> op == IR_FUNC_ADDR ) {
@@ -1088,10 +1088,10 @@ static bool ir_try_tailcall(ir_ctx *ctx, ir_ref ref, ir_insn *insn)
10881088 proto_ref = ctx -> ir_base [insn -> op2 ].op2 ;
10891089 }
10901090
1091- if (!proto_ref ) return false ;
1091+ if (!proto_ref ) return 0 ;
10921092 proto = (const ir_proto_t * )ir_get_str (ctx , proto_ref );
10931093
1094- if ((proto -> flags & IR_CALL_CONV_MASK ) != (ctx -> flags & IR_CALL_CONV_MASK )) return false ;
1094+ if ((proto -> flags & IR_CALL_CONV_MASK ) != (ctx -> flags & IR_CALL_CONV_MASK )) return 0 ;
10951095
10961096 cc = ir_get_call_conv_dsc (proto ? proto -> flags : IR_CC_DEFAULT );
10971097 copy_stack = 0 ;
@@ -1101,7 +1101,7 @@ static bool ir_try_tailcall(ir_ctx *ctx, ir_ref ref, ir_insn *insn)
11011101 }
11021102
11031103 // TODO: "params_stack_size" must match the "args_stack_size"
1104- if (params_stack_size ) return false ;
1104+ if (params_stack_size ) return 0 ;
11051105
11061106 /* check for passing addresses of local variable */
11071107 uint32_t n = insn -> inputs_count ;
@@ -1110,7 +1110,7 @@ static bool ir_try_tailcall(ir_ctx *ctx, ir_ref ref, ir_insn *insn)
11101110 if (!IR_IS_CONST_REF (input ) && ctx -> ir_base [input ].type == IR_ADDR ) {
11111111 /* Passing addrss of local varible to TAILCALL is disallowd */
11121112 if (ir_may_be_local_addr (ctx , & ctx -> ir_base [input ])) {
1113- return false ;
1113+ return 0 ;
11141114 }
11151115 }
11161116 }
@@ -1134,7 +1134,7 @@ static bool ir_try_tailcall(ir_ctx *ctx, ir_ref ref, ir_insn *insn)
11341134
11351135 ctx -> rules [ref ] = IR_TAILCALL | IR_NO_REG ;
11361136
1137- return true ;
1137+ return 1 ;
11381138}
11391139
11401140#if 0
@@ -1558,38 +1558,38 @@ static bool ir_load_may_reuse_var_slot(ir_ctx *ctx, ir_block *bb, ir_ref var, ir
15581558 if (n ) {
15591559 for (p = ctx -> use_edges + use_list -> refs ; n > 0 ; p ++ , n -- ) {
15601560 use = * p ;
1561- if (use < load || use > bb -> end ) return false ;
1561+ if (use < load || use > bb -> end ) return 0 ;
15621562 if (use > last_use ) last_use = use ;
15631563 }
15641564 for (i = load + 1 , insn = & ctx -> ir_base [i ]; i < last_use ;) {
15651565 if ((insn -> op == IR_VSTORE || insn -> op == IR_VSTORE_v ) && insn -> op2 == var ) {
1566- return false ;
1566+ return 0 ;
15671567 }
15681568 n = ir_insn_len (insn );
15691569 i += n ;
15701570 insn += n ;
15711571 }
15721572 }
1573- return true ;
1573+ return 1 ;
15741574}
15751575
15761576static bool ir_store_may_reuse_var_slot (ir_ctx * ctx , ir_block * bb , ir_ref var , ir_ref store , ir_ref val )
15771577{
15781578 ir_ref i , n ;
15791579 ir_insn * insn ;
15801580
1581- if (val < bb -> start && val > store ) return false ;
1581+ if (val < bb -> start && val > store ) return 0 ;
15821582
15831583 for (i = val , insn = & ctx -> ir_base [i ]; i < store ;) {
15841584 if ((insn -> op == IR_VLOAD || insn -> op == IR_VLOAD_v || insn -> op == IR_VSTORE || insn -> op == IR_VSTORE_v )
15851585 && insn -> op2 == var ) {
1586- return false ;
1586+ return 0 ;
15871587 }
15881588 n = ir_insn_len (insn );
15891589 i += n ;
15901590 insn += n ;
15911591 }
1592- return true ;
1592+ return 1 ;
15931593}
15941594
15951595static void ir_add_fusion_data (ir_ctx * ctx , ir_ref ref , ir_ref input , ir_reg_alloc_simple_data * x )
0 commit comments