Skip to content

Commit

Permalink
Run cargo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-hartl committed Jul 7, 2024
1 parent cabd924 commit 2c6499a
Show file tree
Hide file tree
Showing 17 changed files with 10 additions and 48 deletions.
1 change: 0 additions & 1 deletion ir/crates/back/src/codegen/machine/function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use crate::codegen::machine::{
Instr,
InstrId,
MachInstr,
Register,
Size,
TargetMachine,
VRegRef,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::codegen::{
VRegRef,
},
register_allocator::{
LiveRange,
LivenessRepr,
ProgPoint,
RegAllocAlgorithm,
Expand Down
5 changes: 1 addition & 4 deletions ir/crates/compiler/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ use std::path::PathBuf;
use anyhow::Result;
use clap::Parser;
use natrix_back::{
codegen::{
register_allocator,
targets::x86_64,
},
codegen::targets::x86_64,
emu::Emulator,
};
use natrix_middle::{
Expand Down
9 changes: 3 additions & 6 deletions ir/crates/middle/src/instruction.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use std::{
fmt::{
Display,
Formatter,
},
ops::Sub,
use std::fmt::{
Display,
Formatter,
};

use smallvec::{
Expand Down
1 change: 0 additions & 1 deletion ir/crates/middle/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use crate::{
optimization::PipelineConfig,
Function,
FunctionRef,
Instr,
};

#[derive(Debug, Clone, Default)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use rustc_hash::FxHashMap;
use tracing::debug;

use crate::{
cfg::{
Expand Down Expand Up @@ -200,7 +199,6 @@ impl ConstantFoldPass {
#[cfg(test)]
mod tests {
use crate::{
cfg,
optimization::PipelineConfig,
test::{
assert_module_is_equal_to_src,
Expand Down
1 change: 0 additions & 1 deletion ir/crates/middle/src/optimization/basic_block_pass/cse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ impl BasicBlockPass for CSEPass {
#[cfg(test)]
mod tests {
use crate::{
cfg,
optimization::PipelineConfig,
test::create_test_module_from_source,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ impl FunctionPass for Pass {
#[cfg(test)]
mod tests {
use crate::{
cfg,
optimization::{
CFGSimplifyPipelineConfig,
PipelineConfig,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use tracing::debug;

use crate::{
cfg::{
BasicBlockRef,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ mod tests {
use tracing_test::traced_test;

use crate::{
cfg,
optimization::{
CFGSimplifyPipelineConfig,
PipelineConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use crate::{
module::Module,
optimization::function_pass::FunctionPass,
FunctionRef,
Instr,
};

/// # Unreachable Basic Block Elimination
Expand Down Expand Up @@ -153,10 +152,8 @@ mod tests {
use tracing_test::traced_test;

use crate::{
cfg,
optimization::{
CFGSimplifyPipelineConfig,
Pipeline,
PipelineConfig,
},
test::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
use tracing::{
debug,
debug_span,
};

use crate::{
analysis::dataflow::{
concrete_value,
Expand All @@ -12,7 +7,6 @@ use crate::{
},
cfg::TerminatorKind,
instruction::{
Const,
InstrKind,
Op,
},
Expand All @@ -38,7 +32,7 @@ impl FunctionPass for ConstantPropagation {
let mut changes = 0;
let mut analysis_runner =
concrete_value::AnalysisRunner::new(&mut module.functions[function]);
while let Some((bb_ref, mut instr_walker)) = analysis_runner.next_bb() {
while let Some((bb_ref, instr_walker)) = analysis_runner.next_bb() {
// let bb = instr_walker.function.cfg.basic_block(bb_id);
// let bb_args = bb.arguments();
// if !bb_args.is_empty() {
Expand Down
1 change: 0 additions & 1 deletion lang/src/codegen/c/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use crate::{
CAst,
CBlock,
CExpr,
CFunctionDecl,
CItem,
CParameter,
CStmt,
Expand Down
2 changes: 1 addition & 1 deletion lang/src/codegen/c/transpiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl<'a> CTranspiler<'a> {
CItem::FunctionDecl(function_decl) => function_decl,
_ => unreachable!(),
};
let mut body_stmts = function
let body_stmts = function
.body
.iter()
.map(|stmt| self.transpile_stmt(ast, *stmt))
Expand Down
3 changes: 0 additions & 3 deletions lang/src/compilation_unit.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{
cell::RefCell,
ops::Deref,
rc::Rc,
};

Expand Down Expand Up @@ -30,7 +29,6 @@ use crate::{
BoolExpr,
CallExpr,
Expr,
ExprId,
FunctionDeclaration,
IfExpr,
ItemId,
Expand All @@ -39,7 +37,6 @@ use crate::{
ParenthesizedExpr,
ReturnStmt,
Stmt,
StmtId,
StmtKind,
UnOpKind,
UnaryExpr,
Expand Down
12 changes: 3 additions & 9 deletions lang/src/mir/builder.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
use std::{
collections::{
HashMap,
HashSet,
},
ops::{
Deref,
DerefMut,
},
use std::collections::{
HashMap,
HashSet,
};

use fusion_compiler::{
Expand Down
5 changes: 1 addition & 4 deletions lang/src/mir/optimizations/global/branch_elimination.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use std::collections::{
HashMap,
HashSet,
};
use std::collections::HashMap;

use itertools::Itertools;

Expand Down

0 comments on commit 2c6499a

Please sign in to comment.