Skip to content

Commit

Permalink
Merge #1016
Browse files Browse the repository at this point in the history
1016: [fix 962] Activate pre_validation when llvm backend selected r=nlewycky a=pventuzelo

# Description

After analysis of issue #962 by me and @nlewycky, it seems to be better to validate the wasm module before calling the llvm compiler.

This change will imply potential overhead in term of execution speed using llvm backend.

I will also suggest to set pre_validation to true for Singlepass by default:
https://github.com/wasmerio/wasmer/blob/5c1c786e355b7dc83f4fcb31c3739b0f1d9981c4/lib/runtime-core/src/codegen.rs#L263-L269

Additional improvement proposal for wasmer API & cli command options:
* add an API `compile_without_validation`.
* add a flag option in wasmer binary to deactivate `pre_validation` for all backend.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Patrick Ventuzelo <ventuzelo.patrick@gmail.com>
  • Loading branch information
bors[bot] and pventuzelo authored Nov 25, 2019
2 parents 5c1c786 + 7ca0430 commit a69c029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runtime-core/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl<
fn requires_pre_validation(backend: Backend) -> bool {
match backend {
Backend::Cranelift => true,
Backend::LLVM => false,
Backend::LLVM => true,
Backend::Singlepass => false,
}
}
Expand Down

0 comments on commit a69c029

Please sign in to comment.