Skip to content

master-next: Adjust for LLVM r350503 #21778

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 1 commit into from
Jan 10, 2019
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 include/swift/LLVMPasses/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace swift {
const llvm::PreservedAnalyses &) { return false; }

using AAResultBase::getModRefInfo;
llvm::ModRefInfo getModRefInfo(llvm::ImmutableCallSite CS,
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
const llvm::MemoryLocation &Loc);
};

Expand Down
7 changes: 3 additions & 4 deletions lib/LLVMPasses/LLVMSwiftAA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ static ModRefInfo getConservativeModRefForKind(const llvm::Instruction &I) {
llvm_unreachable("Not a valid Instruction.");
}

ModRefInfo SwiftAAResult::getModRefInfo(llvm::ImmutableCallSite CS,
ModRefInfo SwiftAAResult::getModRefInfo(const llvm::CallBase *Call,
const llvm::MemoryLocation &Loc) {
// We know at compile time that certain entry points do not modify any
// compiler-visible state ever. Quickly check if we have one of those
// instructions and return if so.
if (ModRefInfo::NoModRef ==
getConservativeModRefForKind(*CS.getInstruction()))
if (ModRefInfo::NoModRef == getConservativeModRefForKind(*Call))
return ModRefInfo::NoModRef;

// Otherwise, delegate to the rest of the AA ModRefInfo machinery.
return AAResultBase::getModRefInfo(CS, Loc);
return AAResultBase::getModRefInfo(Call, Loc);
}

//===----------------------------------------------------------------------===//
Expand Down