diff --git a/arnoldc/src/arnold.rs b/arnoldc/src/arnold.rs index 15eee9b0..e0ae689a 100644 --- a/arnoldc/src/arnold.rs +++ b/arnoldc/src/arnold.rs @@ -1,7 +1,6 @@ use anyhow::Result; use std::fmt::Formatter; use std::sync::Arc; -use std::sync::RwLock; use xrcf::ir::APInt; use xrcf::ir::Attribute; use xrcf::ir::Block; diff --git a/arnoldc/src/arnold_to_mlir.rs b/arnoldc/src/arnold_to_mlir.rs index 2ccbd6c7..5cb9fee5 100644 --- a/arnoldc/src/arnold_to_mlir.rs +++ b/arnoldc/src/arnold_to_mlir.rs @@ -1,7 +1,6 @@ use crate::arnold; use anyhow::Result; use std::sync::Arc; -use std::sync::RwLock; use xrcf::convert::apply_rewrites; use xrcf::convert::ChangedOp; use xrcf::convert::Pass; diff --git a/arnoldc/src/main.rs b/arnoldc/src/main.rs index 2722be76..2fe4868e 100644 --- a/arnoldc/src/main.rs +++ b/arnoldc/src/main.rs @@ -102,8 +102,7 @@ mod tests { use anyhow::Result; use indoc::indoc; use std::panic::Location; - use std::sync::Arc; - use std::sync::RwLock; + use xrcf::convert::RewriteResult; use xrcf::shared::Shared; use xrcf::tester::Tester; diff --git a/xrcf/src/canonicalize.rs b/xrcf/src/canonicalize.rs index e4f87782..40155f90 100644 --- a/xrcf/src/canonicalize.rs +++ b/xrcf/src/canonicalize.rs @@ -8,8 +8,6 @@ use crate::ir::Users; use crate::shared::Shared; use crate::shared::SharedExt; use anyhow::Result; -use std::sync::Arc; -use std::sync::RwLock; pub struct CanonicalizeOp; diff --git a/xrcf/src/convert/cf_to_llvm.rs b/xrcf/src/convert/cf_to_llvm.rs index 6d328094..0cd97ec7 100644 --- a/xrcf/src/convert/cf_to_llvm.rs +++ b/xrcf/src/convert/cf_to_llvm.rs @@ -9,8 +9,6 @@ use crate::ir::Op; use crate::shared::Shared; use crate::shared::SharedExt; use anyhow::Result; -use std::sync::Arc; -use std::sync::RwLock; struct BranchLowering; diff --git a/xrcf/src/convert/experimental_to_mlir.rs b/xrcf/src/convert/experimental_to_mlir.rs index 42160bc4..7a9f851c 100644 --- a/xrcf/src/convert/experimental_to_mlir.rs +++ b/xrcf/src/convert/experimental_to_mlir.rs @@ -24,7 +24,6 @@ use crate::shared::SharedExt; use anyhow::Result; use dialect::experimental::PrintfOp; use std::sync::Arc; -use std::sync::RwLock; struct PrintLowering; diff --git a/xrcf/src/convert/func_to_llvm.rs b/xrcf/src/convert/func_to_llvm.rs index 627581a8..ef3bffb9 100644 --- a/xrcf/src/convert/func_to_llvm.rs +++ b/xrcf/src/convert/func_to_llvm.rs @@ -12,8 +12,6 @@ use crate::ir::Op; use crate::shared::Shared; use crate::shared::SharedExt; use anyhow::Result; -use std::sync::Arc; -use std::sync::RwLock; struct AddLowering; diff --git a/xrcf/src/convert/mlir_to_llvmir.rs b/xrcf/src/convert/mlir_to_llvmir.rs index e3f984ad..aba843e9 100644 --- a/xrcf/src/convert/mlir_to_llvmir.rs +++ b/xrcf/src/convert/mlir_to_llvmir.rs @@ -27,8 +27,6 @@ use crate::shared::Shared; use crate::shared::SharedExt; use crate::targ3t; use anyhow::Result; -use std::sync::Arc; -use std::sync::RwLock; struct AddLowering; diff --git a/xrcf/src/dialect/arith/op.rs b/xrcf/src/dialect/arith/op.rs index 4dff74ed..6c18bd06 100644 --- a/xrcf/src/dialect/arith/op.rs +++ b/xrcf/src/dialect/arith/op.rs @@ -21,7 +21,6 @@ use anyhow::Result; use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use std::sync::RwLock; /// The token kind used for variables in this dialect. /// diff --git a/xrcf/src/dialect/experimental/op.rs b/xrcf/src/dialect/experimental/op.rs index 5a2b1fad..667dccf8 100644 --- a/xrcf/src/dialect/experimental/op.rs +++ b/xrcf/src/dialect/experimental/op.rs @@ -15,7 +15,6 @@ use crate::shared::SharedExt; use anyhow::Result; use std::fmt::Formatter; use std::sync::Arc; -use std::sync::RwLock; const TOKEN_KIND: TokenKind = TokenKind::PercentIdentifier; diff --git a/xrcf/src/dialect/func/op.rs b/xrcf/src/dialect/func/op.rs index cb9f8395..56f72b10 100644 --- a/xrcf/src/dialect/func/op.rs +++ b/xrcf/src/dialect/func/op.rs @@ -19,7 +19,6 @@ use crate::shared::SharedExt; use anyhow::Result; use std::fmt::Formatter; use std::sync::Arc; -use std::sync::RwLock; const TOKEN_KIND: TokenKind = TokenKind::PercentIdentifier; diff --git a/xrcf/src/dialect/llvm/attribute.rs b/xrcf/src/dialect/llvm/attribute.rs index 33935d61..5be9661d 100644 --- a/xrcf/src/dialect/llvm/attribute.rs +++ b/xrcf/src/dialect/llvm/attribute.rs @@ -6,8 +6,6 @@ use crate::parser::ParserDispatch; use crate::shared::Shared; use std::fmt::Formatter; use std::fmt::Result; -use std::sync::Arc; -use std::sync::RwLock; pub struct LinkageAttr { value: String, diff --git a/xrcf/src/dialect/llvm/op.rs b/xrcf/src/dialect/llvm/op.rs index 5e412532..80af7b34 100644 --- a/xrcf/src/dialect/llvm/op.rs +++ b/xrcf/src/dialect/llvm/op.rs @@ -23,7 +23,6 @@ use anyhow::Result; use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use std::sync::RwLock; const TOKEN_KIND: TokenKind = TokenKind::PercentIdentifier; diff --git a/xrcf/src/dialect/llvm/typ.rs b/xrcf/src/dialect/llvm/typ.rs index effb9115..2d64b73e 100644 --- a/xrcf/src/dialect/llvm/typ.rs +++ b/xrcf/src/dialect/llvm/typ.rs @@ -8,8 +8,6 @@ use crate::shared::SharedExt; use anyhow::Result; use std::fmt::Display; use std::fmt::Formatter; -use std::sync::Arc; -use std::sync::RwLock; /// Represent an integer type such as i32 or i64. /// diff --git a/xrcf/src/dialect/scf/op.rs b/xrcf/src/dialect/scf/op.rs index 790e1a10..8b211811 100644 --- a/xrcf/src/dialect/scf/op.rs +++ b/xrcf/src/dialect/scf/op.rs @@ -11,8 +11,6 @@ use crate::shared::Shared; use crate::shared::SharedExt; use anyhow::Result; use std::fmt::Formatter; -use std::sync::Arc; -use std::sync::RwLock; const TOKEN_KIND: TokenKind = TokenKind::PercentIdentifier; diff --git a/xrcf/src/ir/attribute.rs b/xrcf/src/ir/attribute.rs index b9585206..23098588 100644 --- a/xrcf/src/ir/attribute.rs +++ b/xrcf/src/ir/attribute.rs @@ -16,7 +16,6 @@ use std::collections::HashMap; use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use std::sync::RwLock; /// Attributes are known-constant values of operations (a variable is not allowed). /// Attributes belong to operations and can be used to, for example, specify diff --git a/xrcf/src/ir/module.rs b/xrcf/src/ir/module.rs index 4f9d3794..80896175 100644 --- a/xrcf/src/ir/module.rs +++ b/xrcf/src/ir/module.rs @@ -12,8 +12,6 @@ use crate::shared::SharedExt; use anyhow::Result; use std::fmt::Display; use std::fmt::Formatter; -use std::sync::Arc; -use std::sync::RwLock; // See `include/mlir/IR/BuiltinOps.h` and goto definition of // `mlir/IR/BuiltinOps.h.inc`. diff --git a/xrcf/src/ir/op.rs b/xrcf/src/ir/op.rs index 78f7bca5..c45a4e0e 100644 --- a/xrcf/src/ir/op.rs +++ b/xrcf/src/ir/op.rs @@ -14,7 +14,6 @@ use anyhow::Result; use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use std::sync::RwLock; /// A specific operation. /// diff --git a/xrcf/src/ir/op_operand.rs b/xrcf/src/ir/op_operand.rs index a3bf5cc0..8c8bc17a 100644 --- a/xrcf/src/ir/op_operand.rs +++ b/xrcf/src/ir/op_operand.rs @@ -14,7 +14,6 @@ use anyhow::Result; use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use std::sync::RwLock; pub struct OpOperand { value: Shared, diff --git a/xrcf/src/ir/operation.rs b/xrcf/src/ir/operation.rs index 5523bebd..190e9000 100644 --- a/xrcf/src/ir/operation.rs +++ b/xrcf/src/ir/operation.rs @@ -23,8 +23,6 @@ use anyhow::Result; use std::default::Default; use std::fmt::Display; use std::fmt::Formatter; -use std::sync::Arc; -use std::sync::RwLock; #[derive(Clone, PartialEq, Eq, Debug)] pub struct OperationName { diff --git a/xrcf/src/ir/region.rs b/xrcf/src/ir/region.rs index 04b0e42e..f36aec05 100644 --- a/xrcf/src/ir/region.rs +++ b/xrcf/src/ir/region.rs @@ -7,8 +7,6 @@ use crate::shared::Shared; use crate::shared::SharedExt; use std::fmt::Display; use std::fmt::Formatter; -use std::sync::Arc; -use std::sync::RwLock; /// A list of blocks. pub struct Region { diff --git a/xrcf/src/ir/value.rs b/xrcf/src/ir/value.rs index 652af9a4..7ec5ea7c 100644 --- a/xrcf/src/ir/value.rs +++ b/xrcf/src/ir/value.rs @@ -17,7 +17,6 @@ use crate::shared::SharedExt; use anyhow::Result; use std::fmt::Display; use std::sync::Arc; -use std::sync::RwLock; pub enum BlockArgumentName { /// Anonymous block arguments are used for functions without an implementation. diff --git a/xrcf/src/targ3t/llvmir/op.rs b/xrcf/src/targ3t/llvmir/op.rs index 2939be70..c0fe6103 100644 --- a/xrcf/src/targ3t/llvmir/op.rs +++ b/xrcf/src/targ3t/llvmir/op.rs @@ -17,7 +17,6 @@ use crate::shared::SharedExt; use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use std::sync::RwLock; /// Display an operand LLVMIR style (e.g., `i32 8`, `i32 %0`, or `label %exit`). fn display_operand(f: &mut Formatter<'_>, operand: &Shared) -> std::fmt::Result { diff --git a/xrcf/src/targ3t/llvmir/typ.rs b/xrcf/src/targ3t/llvmir/typ.rs index 503266f5..90948f6d 100644 --- a/xrcf/src/targ3t/llvmir/typ.rs +++ b/xrcf/src/targ3t/llvmir/typ.rs @@ -4,8 +4,6 @@ use crate::shared::Shared; use crate::shared::SharedExt; use std::fmt::Display; use std::fmt::Formatter; -use std::sync::Arc; -use std::sync::RwLock; #[derive(Clone)] pub struct ArrayType { diff --git a/xrcf/src/transform.rs b/xrcf/src/transform.rs index fe6c43dc..84b2948c 100644 --- a/xrcf/src/transform.rs +++ b/xrcf/src/transform.rs @@ -16,8 +16,6 @@ use clap::ArgMatches; use std::env::ArgsOs; use std::fmt; use std::fmt::Display; -use std::sync::Arc; -use std::sync::RwLock; use tracing::subscriber::SetGlobalDefaultError; use tracing::Level; use tracing_subscriber;