diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-06-13 21:46:59 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-06-13 22:53:10 -0700 |
| commit | dc18321ef589711ee0a0e5adc5b7ed412641e73e (patch) | |
| tree | 341d1cd1ae37f7951358a62f911248b792c70ed9 /src/rustllvm/RustWrapper.cpp | |
| parent | 079ffa362fbec884c6397581c5f9898c4aba392e (diff) | |
| download | rust-dc18321ef589711ee0a0e5adc5b7ed412641e73e.tar.gz rust-dc18321ef589711ee0a0e5adc5b7ed412641e73e.zip | |
Don't run passes again on JIT code
These passes are already run beforehand, no need to do them twice.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 30e01b53ab7..ba87624e2dd 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -331,9 +331,7 @@ LLVMRustLoadCrate(void* mem, const char* crate) { extern "C" LLVMExecutionEngineRef LLVMRustBuildJIT(void* mem, - LLVMPassManagerRef PMR, LLVMModuleRef M, - CodeGenOpt::Level OptLevel, bool EnableSegmentedStacks) { InitializeNativeTarget(); @@ -346,25 +344,13 @@ LLVMRustBuildJIT(void* mem, Options.JITEmitDebugInfo = true; Options.NoFramePointerElim = true; Options.EnableSegmentedStacks = EnableSegmentedStacks; - PassManager *PM = unwrap<PassManager>(PMR); RustMCJITMemoryManager* MM = (RustMCJITMemoryManager*) mem; - assert(MM); - PM->add(createBasicAliasAnalysisPass()); - PM->add(createInstructionCombiningPass()); - PM->add(createReassociatePass()); - PM->add(createGVNPass()); - PM->add(createCFGSimplificationPass()); - PM->add(createFunctionInliningPass()); - PM->add(createPromoteMemoryToRegisterPass()); - PM->run(*unwrap(M)); - ExecutionEngine* EE = EngineBuilder(unwrap(M)) .setErrorStr(&Err) .setTargetOptions(Options) .setJITMemoryManager(MM) - .setOptLevel(OptLevel) .setUseMCJIT(true) .setAllocateGVsWithCode(false) .create(); |
