Update to LLVM 8.0.

This commit is contained in:
Nick Lewycky 2019-07-08 14:10:37 -07:00
parent 51556e74da
commit ea83924547
4 changed files with 10 additions and 15 deletions

View File

@ -6,7 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.4" } wasmer-runtime-core = { path = "../runtime-core", version = "0.5.4" }
inkwell = { git = "https://github.com/wasmerio/inkwell", branch = "llvm7-0" } inkwell = { git = "https://github.com/lumen/inkwell", rev = "64921e418c3e8f4b32f9beed56ebd5aac4e677c7", features = ["llvm8-0"] }
wasmparser = "0.32.1" wasmparser = "0.32.1"
hashbrown = "0.1.8" hashbrown = "0.1.8"
smallvec = "0.6.8" smallvec = "0.6.8"

View File

@ -41,7 +41,7 @@ lazy_static! {
// Did the user give us a binary path to use? If yes, try // Did the user give us a binary path to use? If yes, try
// to use that and fail if it doesn't work. // to use that and fail if it doesn't work.
let binary_prefix_var = "LLVM_SYS_70_PREFIX"; let binary_prefix_var = "LLVM_SYS_80_PREFIX";
let path = if let Some(path) = env::var_os(&binary_prefix_var) { let path = if let Some(path) = env::var_os(&binary_prefix_var) {
Some(path.to_str().unwrap().to_owned()) Some(path.to_str().unwrap().to_owned())

View File

@ -139,24 +139,19 @@ struct SymbolLookup : llvm::JITSymbolResolver {
public: public:
SymbolLookup(callbacks_t callbacks) : callbacks(callbacks) {} SymbolLookup(callbacks_t callbacks) : callbacks(callbacks) {}
virtual llvm::Expected<LookupResult> lookup(const LookupSet& symbols) override { void lookup(const LookupSet& symbols, OnResolvedFunction OnResolved) {
LookupResult result; LookupResult result;
for (auto symbol : symbols) { for (auto symbol : symbols) {
result.emplace(symbol, symbol_lookup(symbol)); result.emplace(symbol, symbol_lookup(symbol));
} }
return result; OnResolved(result);
} }
virtual llvm::Expected<LookupFlagsResult> lookupFlags(const LookupSet& symbols) override { llvm::Expected<LookupSet> getResponsibilitySet(const LookupSet &Symbols) {
LookupFlagsResult result; const std::set<llvm::StringRef> empty;
return empty;
for (auto symbol : symbols) {
result.emplace(symbol, symbol_lookup(symbol).getFlags());
}
return result;
} }
private: private:

View File

@ -2603,7 +2603,7 @@ impl ModuleCodeGenerator<LLVMFunctionCodeGenerator, LLVMBackend, CodegenError>
self.intrinsics.as_ref().unwrap(), self.intrinsics.as_ref().unwrap(),
); );
let pass_manager = PassManager::create_for_module(); let pass_manager = PassManager::create(());
if cfg!(test) { if cfg!(test) {
pass_manager.add_verifier_pass(); pass_manager.add_verifier_pass();
} }
@ -2614,7 +2614,7 @@ impl ModuleCodeGenerator<LLVMFunctionCodeGenerator, LLVMBackend, CodegenError>
pass_manager.add_merged_load_store_motion_pass(); pass_manager.add_merged_load_store_motion_pass();
pass_manager.add_new_gvn_pass(); pass_manager.add_new_gvn_pass();
pass_manager.add_aggressive_dce_pass(); pass_manager.add_aggressive_dce_pass();
pass_manager.run_on_module(&self.module); pass_manager.run_on(&self.module);
// self.module.print_to_stderr(); // self.module.print_to_stderr();