Skip to content

Commit

Permalink
Try #2224:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Apr 1, 2021
2 parents 7a6ea72 + 656c8bc commit 5472d05
Show file tree
Hide file tree
Showing 6 changed files with 233 additions and 181 deletions.
27 changes: 15 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lib/compiler-cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ edition = "2018"
wasmer-compiler = { path = "../compiler", version = "1.0.2", features = ["translator"], default-features = false }
wasmer-vm = { path = "../vm", version = "1.0.2" }
wasmer-types = { path = "../types", version = "1.0.2", default-features = false, features = ["std"] }
cranelift-entity = { version = "0.70", default-features = false }
cranelift-codegen = { version = "0.70", default-features = false, features = ["x86", "arm64"] }
cranelift-frontend = { version = "0.70", default-features = false }
cranelift-entity = { version = "0.72", default-features = false }
cranelift-codegen = { version = "0.72", default-features = false, features = ["x86", "arm64"] }
cranelift-frontend = { version = "0.72", default-features = false }
tracing = "0.1"
hashbrown = { version = "0.9", optional = true }
rayon = "1.5"
Expand All @@ -29,7 +29,7 @@ loupe = "0.1"

[dev-dependencies]
target-lexicon = { version = "0.11", default-features = false }
cranelift-codegen = { version = "0.70", features = ["enable-serde", "all-arch"] }
cranelift-codegen = { version = "0.72", features = ["enable-serde", "all-arch"] }
lazy_static = "1.4"

[badges]
Expand Down
25 changes: 8 additions & 17 deletions lib/compiler-cranelift/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ impl Cranelift {
self
}

/// Enable SIMD support.
pub fn enable_simd(&mut self, enable: bool) -> &mut Self {
self.enable_simd = enable;
self
}

/// The optimization levels when optimizing the IR.
pub fn opt_level(&mut self, opt_level: CraneliftOptLevel) -> &mut Self {
self.opt_level = opt_level;
Expand Down Expand Up @@ -153,18 +147,15 @@ impl Cranelift {
.set("enable_verifier", enable_verifier)
.expect("should be valid flag");

let opt_level = if self.enable_simd {
"none"
} else {
match self.opt_level {
CraneliftOptLevel::None => "none",
CraneliftOptLevel::Speed => "speed",
CraneliftOptLevel::SpeedAndSize => "speed_and_size",
}
};

flags
.set("opt_level", opt_level)
.set(
"opt_level",
match self.opt_level {
CraneliftOptLevel::None => "none",
CraneliftOptLevel::Speed => "speed",
CraneliftOptLevel::SpeedAndSize => "speed_and_size",
},
)
.expect("should be valid flag");

let enable_simd = if self.enable_simd { "true" } else { "false" };
Expand Down
Loading

0 comments on commit 5472d05

Please sign in to comment.