Skip to content

Build with LLVM 5.0 #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ matrix:
sudo: required
dist: trusty
env:
- LLVM_API_VERSION=4.0
- LLVM_API_VERSION=5.0
before_install:
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:"${PKG_CONFIG_PATH}"
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
Expand Down
5 changes: 0 additions & 5 deletions Sources/LLVM/IRType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ public extension IRType {
public func constPointerNull() -> IRValue {
return LLVMConstPointerNull(asLLVM())
}

/// Dumps a representation of this type to stderr.
public func dump() {
LLVMDumpType(asLLVM())
}
}

internal func convertType(_ type: LLVMTypeRef) -> IRType {
Expand Down
9 changes: 8 additions & 1 deletion Sources/LLVM/PassManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ public enum FunctionPass {
/// These functions removes symbols from functions and modules without
/// touching symbols for debugging information.
case stripSymbols
/// Performs a loop vectorization pass to widen instructions in loops to
/// operate on multiple consecutive iterations.
case loopVectorize
/// This pass performs a superword-level parallelism pass to combine
/// similar independent instructions into vector instructions.
case slpVectorize
}

/// A `FunctionPassManager` is an object that collects a sequence of passes
Expand Down Expand Up @@ -225,7 +231,8 @@ public class FunctionPassManager {
.pruneEH: LLVMAddPruneEHPass,
.stripDeadPrototypes: LLVMAddStripDeadPrototypesPass,
.stripSymbols: LLVMAddStripSymbolsPass,

.loopVectorize: LLVMAddLoopVectorizePass,
.slpVectorize: LLVMAddSLPVectorizePass,
// .internalize: LLVMAddInternalizePass,
// .sroaWithThreshhold: LLVMAddScalarReplAggregatesPassWithThreshold,
]
Expand Down
90 changes: 0 additions & 90 deletions Sources/LLVM/Predicates+Deprecations.swift

This file was deleted.

1 change: 1 addition & 0 deletions utils/make-pkgconfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func makeFile() throws {

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

Expand Down