Skip to content

Commit 1704098

Browse files
committed
v3: vfmt
1 parent eb9bce3 commit 1704098

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

vlib/v3/ssa/optimize/phi.v

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ fn eliminate_phi_nodes(mut m ssa.Module) {
246246
}
247247

248248
for pred_blk in pred_copy_blocks {
249-
resolve_parallel_copies(mut m, pred_blk, pred_copy_dests[pred_blk], pred_copy_srcs[pred_blk])
249+
resolve_parallel_copies(mut m, pred_blk, pred_copy_dests[pred_blk],
250+
pred_copy_srcs[pred_blk])
250251
}
251252
for pred_blk in pred_copy_blocks {
252253
pred_copy_dests[pred_blk] = []

vlib/v3/ssa/optimize/verify.v

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ fn is_legacy_noncritical_verify_error(err VerifyError) bool {
108108
// a terminator within the same block). These are tolerated by the lenient
109109
// verify_ssa() and removed by remove_unreachable_blocks / DCE.
110110
if err.msg.contains('has no instructions') || err.msg.contains('not at end of block')
111-
|| err.msg.contains('multiple terminators') || err.msg.contains('does not end with terminator') {
111+
|| err.msg.contains('multiple terminators')
112+
|| err.msg.contains('does not end with terminator') {
112113
return true
113114
}
114115
// Type-precision findings. The v3 builder does not maintain strict SSA typing
@@ -340,6 +341,7 @@ fn verify_instruction(m &ssa.Module, func_id int, blk_id int, val_id int, instr
340341
}
341342
else {}
342343
}
344+
343345
return errors
344346
}
345347

vlib/v3/ssa/worker.v

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ pub fn (mut m Module) new_worker_module() &Module {
7878
fn worker_type_cache_key(t Type, type_remap []TypeID) string {
7979
return match t.kind {
8080
.int_t {
81-
if t.is_unsigned { 'u${t.width}' } else { 'i${t.width}' }
81+
if t.is_unsigned {
82+
'u${t.width}'
83+
} else {
84+
'i${t.width}'
85+
}
8286
}
8387
.float_t {
8488
'f${t.width}'

vlib/v3/tests/ssa_worker_test.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ fn test_worker_clone_merge_remaps_block_and_value_operands() {
4343
params: w.funcs[fidx].params
4444
}
4545

46-
m.merge_worker_module(w, [fd], seed_values, seed_instrs, seed_blocks, seed_types,
47-
seed_funcs)
46+
m.merge_worker_module(w, [fd], seed_values, seed_instrs, seed_blocks, seed_types, seed_funcs)
4847

4948
// The function now has its 4 blocks, all parented correctly.
5049
assert m.funcs[fidx].blocks.len == 4

0 commit comments

Comments
 (0)