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:
@@ -31,7 +31,7 @@ use crate::binemit::{CodeInfo, CodeOffset};
|
||||
use crate::cursor::{Cursor, FuncCursor};
|
||||
use crate::dominator_tree::DominatorTree;
|
||||
use crate::flowgraph::ControlFlowGraph;
|
||||
use crate::ir::{Function, InstructionData, Opcode};
|
||||
use crate::ir::{Ebb, Function, Inst, InstructionData, Opcode, Value, ValueList};
|
||||
use crate::isa::{EncInfo, TargetIsa};
|
||||
use crate::iterators::IteratorExtras;
|
||||
use crate::regalloc::RegDiversions;
|
||||
@@ -40,9 +40,6 @@ use crate::CodegenResult;
|
||||
use core::convert::TryFrom;
|
||||
use log::debug;
|
||||
|
||||
#[cfg(feature = "basic-blocks")]
|
||||
use crate::ir::{Ebb, Inst, Value, ValueList};
|
||||
|
||||
/// Relax branches and compute the final layout of EBB headers in `func`.
|
||||
///
|
||||
/// Fill in the `func.offsets` table so the function is ready for binary emission.
|
||||
@@ -61,7 +58,6 @@ pub fn relax_branches(
|
||||
func.offsets.resize(func.dfg.num_ebbs());
|
||||
|
||||
// Start by removing redundant jumps.
|
||||
#[cfg(feature = "basic-blocks")]
|
||||
fold_redundant_jumps(func, _cfg, _domtree);
|
||||
|
||||
// Convert jumps to fallthrough instructions where possible.
|
||||
@@ -154,7 +150,6 @@ pub fn relax_branches(
|
||||
|
||||
/// Folds an instruction if it is a redundant jump.
|
||||
/// Returns whether folding was performed (which invalidates the CFG).
|
||||
#[cfg(feature = "basic-blocks")]
|
||||
fn try_fold_redundant_jump(
|
||||
func: &mut Function,
|
||||
cfg: &mut ControlFlowGraph,
|
||||
@@ -260,7 +255,6 @@ fn try_fold_redundant_jump(
|
||||
|
||||
/// Redirects `jump` instructions that point to other `jump` instructions to the final destination.
|
||||
/// This transformation may orphan some blocks.
|
||||
#[cfg(feature = "basic-blocks")]
|
||||
fn fold_redundant_jumps(
|
||||
func: &mut Function,
|
||||
cfg: &mut ControlFlowGraph,
|
||||
|
||||
Reference in New Issue
Block a user