[llvm] r322747 - [MDA] Use common code instead of reimplementing same. [NFC]
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 11:57:20 PST 2018
Author: reames
Date: Wed Jan 17 11:57:19 2018
New Revision: 322747
URL: http://llvm.org/viewvc/llvm-project?rev=322747&view=rev
Log:
[MDA] Use common code instead of reimplementing same. [NFC]
Modified:
llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=322747&r1=322746&r2=322747&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Wed Jan 17 11:57:19 2018
@@ -154,24 +154,16 @@ static ModRefInfo GetLocation(const Inst
}
if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
- AAMDNodes AAInfo;
-
switch (II->getIntrinsicID()) {
case Intrinsic::lifetime_start:
case Intrinsic::lifetime_end:
case Intrinsic::invariant_start:
- II->getAAMetadata(AAInfo);
- Loc = MemoryLocation(
- II->getArgOperand(1),
- cast<ConstantInt>(II->getArgOperand(0))->getZExtValue(), AAInfo);
+ Loc = MemoryLocation::getForArgument(II, 1, TLI);
// These intrinsics don't really modify the memory, but returning Mod
// will allow them to be handled conservatively.
return ModRefInfo::Mod;
case Intrinsic::invariant_end:
- II->getAAMetadata(AAInfo);
- Loc = MemoryLocation(
- II->getArgOperand(2),
- cast<ConstantInt>(II->getArgOperand(1))->getZExtValue(), AAInfo);
+ Loc = MemoryLocation::getForArgument(II, 2, TLI);
// These intrinsics don't really modify the memory, but returning Mod
// will allow them to be handled conservatively.
return ModRefInfo::Mod;
More information about the llvm-commits
mailing list