diff --git a/src/librustc/back/passes.rs b/src/librustc/back/passes.rs index 714e7d666ac..b77ed10c21b 100644 --- a/src/librustc/back/passes.rs +++ b/src/librustc/back/passes.rs @@ -97,7 +97,6 @@ pub fn create_standard_passes(level: OptLevel) -> ~[~str] { passes.push(~"sroa"); passes.push(~"domtree"); passes.push(~"early-cse"); - passes.push(~"simplify-libcalls"); passes.push(~"lazy-value-info"); passes.push(~"jump-threading"); passes.push(~"correlated-propagation"); diff --git a/src/librustc/lib/llvm.rs b/src/librustc/lib/llvm.rs index 6c631a104aa..842746f8209 100644 --- a/src/librustc/lib/llvm.rs +++ b/src/librustc/lib/llvm.rs @@ -1541,7 +1541,8 @@ pub mod llvm { Op: AtomicBinOp, LHS: ValueRef, RHS: ValueRef, - Order: AtomicOrdering) + Order: AtomicOrdering, + SingleThreaded: Bool) -> ValueRef; pub fn LLVMBuildAtomicFence(B: BuilderRef, Order: AtomicOrdering); diff --git a/src/librustc/middle/trans/builder.rs b/src/librustc/middle/trans/builder.rs index d876b4d0b16..1d821e5af94 100644 --- a/src/librustc/middle/trans/builder.rs +++ b/src/librustc/middle/trans/builder.rs @@ -940,7 +940,7 @@ impl Builder { dst: ValueRef, src: ValueRef, order: AtomicOrdering) -> ValueRef { unsafe { - llvm::LLVMBuildAtomicRMW(self.llbuilder, op, dst, src, order) + llvm::LLVMBuildAtomicRMW(self.llbuilder, op, dst, src, order, False) } } diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index beaa7e1daef..04c062072d6 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -113,6 +113,7 @@ public: virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, unsigned SectionID, bool isReadOnly); + bool finalizeMemory(std::string *ErrMsg) { return false; } virtual bool applyPermissions(std::string *Str); @@ -340,7 +341,6 @@ LLVMRustBuildJIT(void* mem, std::string Err; TargetOptions Options; - Options.JITExceptionHandling = true; Options.JITEmitDebugInfo = true; Options.NoFramePointerElim = true; Options.EnableSegmentedStacks = EnableSegmentedStacks; @@ -516,15 +516,6 @@ extern "C" LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, extern "C" LLVMValueRef LLVMBuildAtomicFence(LLVMBuilderRef B, AtomicOrdering order) { return wrap(unwrap(B)->CreateFence(order)); } -extern "C" LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B, - AtomicRMWInst::BinOp op, - LLVMValueRef target, - LLVMValueRef source, - AtomicOrdering order) { - return wrap(unwrap(B)->CreateAtomicRMW(op, - unwrap(target), unwrap(source), - order)); -} extern "C" void LLVMSetDebug(int Enabled) { #ifndef NDEBUG diff --git a/src/rustllvm/rustllvm.h b/src/rustllvm/rustllvm.h index d4202abd285..eeefb19883e 100644 --- a/src/rustllvm/rustllvm.h +++ b/src/rustllvm/rustllvm.h @@ -8,8 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#include "llvm/IR/IRBuilder.h" #include "llvm/IR/InlineAsm.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/Module.h" #include "llvm/Linker.h" #include "llvm/PassManager.h" #include "llvm/IR/InlineAsm.h"