Remove loupe dependency

Closes #2731
Closes #2744
This commit is contained in:
Manos Pitsidianakis
2022-05-04 20:33:52 +03:00
parent 92b7cb01b5
commit 00f9a3c8d7
99 changed files with 126 additions and 479 deletions

View File

@@ -24,7 +24,6 @@ libc = { version = "^0.2", default-features = false }
byteorder = "1"
itertools = "0.10"
rayon = "1.5"
loupe = "0.1"
[dependencies.inkwell]
package = "inkwell"

View File

@@ -7,7 +7,6 @@ use inkwell::memory_buffer::MemoryBuffer;
use inkwell::module::{Linkage, Module};
use inkwell::targets::FileType;
use inkwell::DLLStorageClass;
use loupe::MemoryUsage;
use rayon::iter::ParallelBridge;
use rayon::prelude::{IntoParallelIterator, IntoParallelRefIterator, ParallelIterator};
use std::sync::Arc;
@@ -23,7 +22,6 @@ use wasmer_types::{FunctionIndex, LocalFunctionIndex, SignatureIndex};
/// A compiler that compiles a WebAssembly module with LLVM, translating the Wasm to LLVM IR,
/// optimizing it and then translating to assembly.
#[derive(MemoryUsage)]
pub struct LLVMCompiler {
config: LLVM,
}

View File

@@ -5,7 +5,6 @@ use inkwell::targets::{
};
pub use inkwell::OptimizationLevel as LLVMOptLevel;
use itertools::Itertools;
use loupe::MemoryUsage;
use std::fmt::Debug;
use std::sync::Arc;
use target_lexicon::Architecture;
@@ -38,14 +37,12 @@ pub trait LLVMCallbacks: Debug + Send + Sync {
fn obj_memory_buffer(&self, function: &CompiledKind, memory_buffer: &InkwellMemoryBuffer);
}
#[derive(Debug, Clone, MemoryUsage)]
#[derive(Debug, Clone)]
pub struct LLVM {
pub(crate) enable_nan_canonicalization: bool,
pub(crate) enable_verifier: bool,
#[loupe(skip)]
pub(crate) opt_level: LLVMOptLevel,
is_pic: bool,
#[loupe(skip)]
pub(crate) callbacks: Option<Arc<dyn LLVMCallbacks>>,
/// The middleware chain.
pub(crate) middlewares: Vec<Arc<dyn ModuleMiddleware>>,