Skip to content

Commit 9ed47d0

Browse files
authored
Merge pull request #100 from CodaFi/five-oh
Build with LLVM 5.0
2 parents a7d99ee + 6bd91e2 commit 9ed47d0

File tree

5 files changed

+10
-97
lines changed

5 files changed

+10
-97
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ matrix:
1818
sudo: required
1919
dist: trusty
2020
env:
21-
- LLVM_API_VERSION=4.0
21+
- LLVM_API_VERSION=5.0
2222
before_install:
2323
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:"${PKG_CONFIG_PATH}"
2424
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -

Sources/LLVM/IRType.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ public extension IRType {
2929
public func constPointerNull() -> IRValue {
3030
return LLVMConstPointerNull(asLLVM())
3131
}
32-
33-
/// Dumps a representation of this type to stderr.
34-
public func dump() {
35-
LLVMDumpType(asLLVM())
36-
}
3732
}
3833

3934
internal func convertType(_ type: LLVMTypeRef) -> IRType {

Sources/LLVM/PassManager.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ public enum FunctionPass {
166166
/// These functions removes symbols from functions and modules without
167167
/// touching symbols for debugging information.
168168
case stripSymbols
169+
/// Performs a loop vectorization pass to widen instructions in loops to
170+
/// operate on multiple consecutive iterations.
171+
case loopVectorize
172+
/// This pass performs a superword-level parallelism pass to combine
173+
/// similar independent instructions into vector instructions.
174+
case slpVectorize
169175
}
170176

171177
/// A `FunctionPassManager` is an object that collects a sequence of passes
@@ -225,7 +231,8 @@ public class FunctionPassManager {
225231
.pruneEH: LLVMAddPruneEHPass,
226232
.stripDeadPrototypes: LLVMAddStripDeadPrototypesPass,
227233
.stripSymbols: LLVMAddStripSymbolsPass,
228-
234+
.loopVectorize: LLVMAddLoopVectorizePass,
235+
.slpVectorize: LLVMAddSLPVectorizePass,
229236
// .internalize: LLVMAddInternalizePass,
230237
// .sroaWithThreshhold: LLVMAddScalarReplAggregatesPassWithThreshold,
231238
]

Sources/LLVM/Predicates+Deprecations.swift

Lines changed: 0 additions & 90 deletions
This file was deleted.

utils/make-pkgconfig.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func makeFile() throws {
6868

6969
let versionStr = run(llvmConfig, args: ["--version"])!
7070
.replacing(charactersIn: .newlines, with: "")
71+
.replacingOccurrences(of: "svn", with: "")
7172
let components = versionStr.components(separatedBy: ".")
7273
.flatMap { Int($0) }
7374

0 commit comments

Comments
 (0)