Add simple_gvn to the optimization pipeline for WebAssembly functions.

This commit is contained in:
Dan Gohman
2017-08-30 14:32:42 -07:00
parent dcb65b59c1
commit 9ea5226b89

View File

@@ -196,6 +196,18 @@ fn handle_module(flag_verbose: bool,
}
}
};
match context.simple_gvn() {
Ok(())=> (),
Err(error) => {
match error {
CtonError::Verifier(err) => {
return Err(pretty_verifier_error(&context.func, None, err));
}
CtonError::ImplLimitExceeded |
CtonError::CodeTooLarge => return Err(String::from(error.description())),
}
}
};
match verifier::verify_context(&context.func, &context.cfg, &context.domtree, None) {
Ok(()) => (),
Err(err) => return Err(pretty_verifier_error(&context.func, None, err)),