diff options
| author | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2011-08-11 19:09:52 -0400 |
|---|---|---|
| committer | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2011-08-11 19:09:52 -0400 |
| commit | 6402b63b4fde61610488f99e40faaa304089e3f2 (patch) | |
| tree | bebbc3d938154dff12108d783ad53d07a337604b /src/comp/lib | |
| parent | 4cee06397633cede0163d4b520a979cb7a5177de (diff) | |
| download | rust-6402b63b4fde61610488f99e40faaa304089e3f2.tar.gz rust-6402b63b4fde61610488f99e40faaa304089e3f2.zip | |
Use the new C API for PassManagerBuilder.
Diffstat (limited to 'src/comp/lib')
| -rw-r--r-- | src/comp/lib/llvm.rs | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs index 4def2d116bc..02fe2c6c59d 100644 --- a/src/comp/lib/llvm.rs +++ b/src/comp/lib/llvm.rs @@ -141,6 +141,7 @@ native "cdecl" mod llvm = "rustllvm" { type ModuleProviderRef; type MemoryBufferRef; type PassManagerRef; + type PassManagerBuilderRef; type UseRef; type TargetDataRef; @@ -798,13 +799,29 @@ native "cdecl" mod llvm = "rustllvm" { fn LLVMAddTypeBasedAliasAnalysisPass(PM: PassManagerRef); fn LLVMAddBasicAliasAnalysisPass(PM: PassManagerRef); - fn LLVMAddStandardFunctionPasses(PM: PassManagerRef, - OptimizationLevel: uint); - fn LLVMAddStandardModulePasses(PM: PassManagerRef, - OptimizationLevel: uint, - OptimizeSize: Bool, UnitAtATime: Bool, - UnrollLoops: Bool, SimplifyLibCalls: Bool, - InliningThreshold: uint); + fn LLVMPassManagerBuilderCreate() -> PassManagerBuilderRef; + fn LLVMPassManagerBuilderDispose(PMB: PassManagerBuilderRef); + fn LLVMPassManagerBuilderSetOptLevel(PMB: PassManagerBuilderRef, + OptimizationLevel: uint); + fn LLVMPassManagerBuilderSetSizeLevel(PMB: PassManagerBuilderRef, + Value: Bool); + fn LLVMPassManagerBuilderSetDisableUnitAtATime(PMB: PassManagerBuilderRef, + Value: Bool); + fn LLVMPassManagerBuilderSetDisableUnrollLoops(PMB: PassManagerBuilderRef, + Value: Bool); + fn LLVMPassManagerBuilderSetDisableSimplifyLibCalls(PMB: + PassManagerBuilderRef, + Value: Bool); + fn LLVMPassManagerBuilderUseInlinerWithThreshold(PMB: + PassManagerBuilderRef, + threshold: uint); + fn LLVMPassManagerBuilderPopulateModulePassManager(PMB: + PassManagerBuilderRef, + PM: PassManagerRef); + + fn LLVMPassManagerBuilderPopulateFunctionPassManager(PMB: + PassManagerBuilderRef, + PM: PassManagerRef); /** Destroys a memory buffer. */ fn LLVMDisposeMemoryBuffer(MemBuf: MemoryBufferRef); |
