Skip to content

Commit c79458a

Browse files
authored
Merge pull request #23893 from gottesmm/master-next-49450147
[upstream-update] Add to SwiftAAResult a getModRefInfo entrypoint tha…
2 parents 178fca4 + 36b9cac commit c79458a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

include/swift/LLVMPasses/Passes.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ namespace swift {
3131

3232
using AAResultBase::getModRefInfo;
3333
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
34-
const llvm::MemoryLocation &Loc);
34+
const llvm::MemoryLocation &Loc) {
35+
llvm::AAQueryInfo AAQI;
36+
return getModRefInfo(Call, Loc, AAQI);
37+
}
38+
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
39+
const llvm::MemoryLocation &Loc,
40+
llvm::AAQueryInfo &AAQI);
3541
};
3642

3743
class SwiftAAWrapperPass : public llvm::ImmutablePass {

lib/LLVMPasses/LLVMSwiftAA.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ static ModRefInfo getConservativeModRefForKind(const llvm::Instruction &I) {
3333
}
3434

3535
ModRefInfo SwiftAAResult::getModRefInfo(const llvm::CallBase *Call,
36-
const llvm::MemoryLocation &Loc) {
36+
const llvm::MemoryLocation &Loc,
37+
llvm::AAQueryInfo &AAQI) {
3738
// We know at compile time that certain entry points do not modify any
3839
// compiler-visible state ever. Quickly check if we have one of those
3940
// instructions and return if so.
4041
if (ModRefInfo::NoModRef == getConservativeModRefForKind(*Call))
4142
return ModRefInfo::NoModRef;
4243

4344
// Otherwise, delegate to the rest of the AA ModRefInfo machinery.
44-
AAQueryInfo AAQI;
4545
return AAResultBase::getModRefInfo(Call, Loc, AAQI);
4646
}
4747

0 commit comments

Comments
 (0)