@@ -267,10 +267,6 @@ pub struct Options {
267
267
pub fixed_regs : bool ,
268
268
pub fixed_nonallocatable : bool ,
269
269
pub clobbers : bool ,
270
- pub control_flow : bool ,
271
- pub reducible : bool ,
272
- pub block_params : bool ,
273
- pub always_local_uses : bool ,
274
270
pub reftypes : bool ,
275
271
}
276
272
@@ -281,10 +277,6 @@ impl core::default::Default for Options {
281
277
fixed_regs : false ,
282
278
fixed_nonallocatable : false ,
283
279
clobbers : false ,
284
- control_flow : true ,
285
- reducible : false ,
286
- block_params : true ,
287
- always_local_uses : false ,
288
280
reftypes : false ,
289
281
}
290
282
}
@@ -322,12 +314,9 @@ impl Func {
322
314
let mut from = 0 ;
323
315
let mut out_blocks = vec ! [ ] ;
324
316
let mut in_blocks = vec ! [ ] ;
325
- // For reducibility, if selected: enforce strict nesting of backedges
326
- let mut max_backedge_src = 0 ;
327
- let mut min_backedge_dest = num_blocks;
328
317
while from < num_blocks {
329
318
in_blocks. push ( from) ;
330
- if num_blocks > 3 && from < num_blocks - 3 && bool:: arbitrary ( u) ? && opts . control_flow {
319
+ if num_blocks > 3 && from < num_blocks - 3 && bool:: arbitrary ( u) ? {
331
320
// To avoid critical edges, we use from+1 as an edge
332
321
// block, and advance `from` an extra block; `from+2`
333
322
// will be the next normal iteration.
@@ -342,18 +331,7 @@ impl Func {
342
331
from += 1 ;
343
332
}
344
333
for pred in out_blocks {
345
- let mut succ = * u. choose ( & in_blocks[ ..] ) ?;
346
- if opts. reducible && ( pred >= succ) {
347
- if pred < max_backedge_src || succ > min_backedge_dest {
348
- // If the chosen edge would result in an
349
- // irreducible CFG, just make this a diamond
350
- // instead.
351
- succ = pred + 2 ;
352
- } else {
353
- max_backedge_src = pred;
354
- min_backedge_dest = succ;
355
- }
356
- }
334
+ let succ = * u. choose ( & in_blocks[ ..] ) ?;
357
335
builder. add_edge ( Block :: new ( pred) , Block :: new ( succ) ) ;
358
336
}
359
337
@@ -402,17 +380,18 @@ impl Func {
402
380
}
403
381
}
404
382
vregs_by_block. push ( vregs. clone ( ) ) ;
405
- vregs_by_block_to_be_defined . push ( vec ! [ ] ) ;
383
+ let mut vregs_to_be_defined = vec ! [ ] ;
406
384
let mut max_block_params = u. int_in_range ( 0 ..=core:: cmp:: min ( 3 , vregs. len ( ) / 3 ) ) ?;
407
385
for & vreg in & vregs {
408
- if block > 0 && opts . block_params && bool:: arbitrary ( u) ? && max_block_params > 0 {
386
+ if block > 0 && bool:: arbitrary ( u) ? && max_block_params > 0 {
409
387
block_params[ block] . push ( vreg) ;
410
388
max_block_params -= 1 ;
411
389
} else {
412
- vregs_by_block_to_be_defined . last_mut ( ) . unwrap ( ) . push ( vreg) ;
390
+ vregs_to_be_defined . push ( vreg) ;
413
391
}
414
392
}
415
- vregs_by_block_to_be_defined. last_mut ( ) . unwrap ( ) . reverse ( ) ;
393
+ vregs_to_be_defined. reverse ( ) ;
394
+ vregs_by_block_to_be_defined. push ( vregs_to_be_defined) ;
416
395
builder. set_block_params_in ( Block :: new ( block) , & block_params[ block] [ ..] ) ;
417
396
}
418
397
@@ -435,12 +414,10 @@ impl Func {
435
414
let mut allocations = vec ! [ Allocation :: none( ) ] ;
436
415
for _ in 0 ..u. int_in_range ( 0 ..=3 ) ? {
437
416
let vreg = if avail. len ( ) > 0
438
- && ( opts. always_local_uses
439
- || remaining_nonlocal_uses == 0
440
- || bool:: arbitrary ( u) ?)
417
+ && ( remaining_nonlocal_uses == 0 || bool:: arbitrary ( u) ?)
441
418
{
442
419
* u. choose ( & avail[ ..] ) ?
443
- } else if !opts . always_local_uses {
420
+ } else {
444
421
let def_block = choose_dominating_block (
445
422
& builder. idom [ ..] ,
446
423
Block :: new ( block) ,
@@ -454,8 +431,6 @@ impl Func {
454
431
}
455
432
remaining_nonlocal_uses -= 1 ;
456
433
* u. choose ( & vregs_by_block[ def_block. index ( ) ] ) ?
457
- } else {
458
- break ;
459
434
} ;
460
435
let use_constraint = OperandConstraint :: arbitrary ( u) ?;
461
436
operands. push ( Operand :: new (
0 commit comments