Drop 'basic-blocks' feature (#1363)

* All: Drop 'basic-blocks' feature

This makes it so that 'basic-blocks' cannot be disabled and we can
start assuming it everywhere.

* Tests: Replace non-bb filetests with bb version

* Tests: Adapt solver-fixedconflict filetests to use basic blocks
This commit is contained in:
Ryan Hunt
2020-01-23 23:36:06 -06:00
committed by Sean Stangl
parent 710182ad26
commit c360007b19
29 changed files with 139 additions and 599 deletions

View File

@@ -589,19 +589,16 @@ impl Mutator for MergeBlocks {
let pred = cfg.pred_iter(ebb).next().unwrap();
#[cfg(feature = "basic-blocks")]
{
// If the branch instruction that lead us to this block is preceded by another branch
// instruction, then we have a conditional jump sequence that we should not break by
// replacing the second instruction by more of them.
if let Some(pred_pred_inst) = func.layout.prev_inst(pred.inst) {
if func.dfg[pred_pred_inst].opcode().is_branch() {
return Some((
func,
format!("did nothing for {}", ebb),
ProgressStatus::Skip,
));
}
// If the branch instruction that lead us to this block is preceded by another branch
// instruction, then we have a conditional jump sequence that we should not break by
// replacing the second instruction by more of them.
if let Some(pred_pred_inst) = func.layout.prev_inst(pred.inst) {
if func.dfg[pred_pred_inst].opcode().is_branch() {
return Some((
func,
format!("did nothing for {}", ebb),
ProgressStatus::Skip,
));
}
}