<div dir="ltr">(FWIW, one thing I forgot to mention in the commit message: some comments may still mention UnknownSize. That's planned to be cleaned up when we actually remove UnknownSize. Since MemoryLocation::UnknownSize == LocationSize::unknown(), it's probably not the end of the world if we say one and mean the other for a short time)</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 10, 2018 at 2:30 PM George Burgess IV via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: gbiv<br>
Date: Wed Oct 10 14:28:44 2018<br>
New Revision: 344186<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=344186&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=344186&view=rev</a><br>
Log:<br>
Replace most users of UnknownSize with LocationSize::unknown(); NFC<br>
<br>
Moving away from UnknownSize is part of the effort to migrate us to<br>
LocationSizes (e.g. the cleanup promised in D44748).<br>
<br>
This doesn't entirely remove all of the uses of UnknownSize; some uses<br>
require tweaks to assume that UnknownSize isn't just some kind of int.<br>
This patch is intended to just be a trivial replacement for all places<br>
where LocationSize::unknown() will Just Work.<br>
<br>
Modified:<br>
llvm/trunk/include/llvm/Analysis/AliasAnalysis.h<br>
llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h<br>
llvm/trunk/include/llvm/Analysis/MemoryLocation.h<br>
llvm/trunk/lib/Analysis/AliasSetTracker.cpp<br>
llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp<br>
llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp<br>
llvm/trunk/lib/Analysis/DependenceAnalysis.cpp<br>
llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp<br>
llvm/trunk/lib/Analysis/MemoryLocation.cpp<br>
llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp<br>
llvm/trunk/lib/CodeGen/MachinePipeliner.cpp<br>
llvm/trunk/lib/Target/ARM/ARMParallelDSP.cpp<br>
llvm/trunk/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp<br>
llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp<br>
llvm/trunk/lib/Transforms/Scalar/LICM.cpp<br>
llvm/trunk/unittests/Analysis/AliasAnalysisTest.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/Analysis/AliasAnalysis.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/AliasAnalysis.h?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/AliasAnalysis.h?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Analysis/AliasAnalysis.h (original)<br>
+++ llvm/trunk/include/llvm/Analysis/AliasAnalysis.h Wed Oct 10 14:28:44 2018<br>
@@ -335,8 +335,7 @@ public:<br>
<br>
/// A convenience wrapper around the primary \c alias interface.<br>
AliasResult alias(const Value *V1, const Value *V2) {<br>
- return alias(V1, MemoryLocation::UnknownSize, V2,<br>
- MemoryLocation::UnknownSize);<br>
+ return alias(V1, LocationSize::unknown(), V2, LocationSize::unknown());<br>
}<br>
<br>
/// A trivial helper function to check to see if the specified pointers are<br>
<br>
Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h (original)<br>
+++ llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h Wed Oct 10 14:28:44 2018<br>
@@ -304,7 +304,7 @@ private:<br>
/// The maximum size of the dereferences of the pointer.<br>
///<br>
/// May be UnknownSize if the sizes are unknown.<br>
- LocationSize Size = MemoryLocation::UnknownSize;<br>
+ LocationSize Size = LocationSize::unknown();<br>
/// The AA tags associated with dereferences of the pointer.<br>
///<br>
/// The members may be null if there are no tags or conflicting tags.<br>
<br>
Modified: llvm/trunk/include/llvm/Analysis/MemoryLocation.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryLocation.h?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryLocation.h?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Analysis/MemoryLocation.h (original)<br>
+++ llvm/trunk/include/llvm/Analysis/MemoryLocation.h Wed Oct 10 14:28:44 2018<br>
@@ -239,7 +239,7 @@ public:<br>
}<br>
<br>
explicit MemoryLocation(const Value *Ptr = nullptr,<br>
- LocationSize Size = UnknownSize,<br>
+ LocationSize Size = LocationSize::unknown(),<br>
const AAMDNodes &AATags = AAMDNodes())<br>
: Ptr(Ptr), Size(Size), AATags(AATags) {}<br>
<br>
<br>
Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original)<br>
+++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Wed Oct 10 14:28:44 2018<br>
@@ -649,7 +649,7 @@ void AliasSet::print(raw_ostream &OS) co<br>
for (iterator I = begin(), E = end(); I != E; ++I) {<br>
if (I != begin()) OS << ", ";<br>
I.getPointer()->printAsOperand(OS << "(");<br>
- if (I.getSize() == MemoryLocation::UnknownSize)<br>
+ if (I.getSize() == LocationSize::unknown())<br>
OS << ", unknown)";<br>
else <br>
OS << ", " << I.getSize() << ")";<br>
<br>
Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)<br>
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Wed Oct 10 14:28:44 2018<br>
@@ -1019,8 +1019,8 @@ static AliasResult aliasSameBasePointerG<br>
<br>
// If we don't know the size of the accesses through both GEPs, we can't<br>
// determine whether the struct fields accessed can't alias.<br>
- if (MaybeV1Size == MemoryLocation::UnknownSize ||<br>
- MaybeV2Size == MemoryLocation::UnknownSize)<br>
+ if (MaybeV1Size == LocationSize::unknown() ||<br>
+ MaybeV2Size == LocationSize::unknown())<br>
return MayAlias;<br>
<br>
const uint64_t V1Size = MaybeV1Size.getValue();<br>
@@ -1184,8 +1184,7 @@ bool BasicAAResult::isGEPBaseAtNegativeO<br>
const DecomposedGEP &DecompGEP, const DecomposedGEP &DecompObject,<br>
LocationSize MaybeObjectAccessSize) {<br>
// If the object access size is unknown, or the GEP isn't inbounds, bail.<br>
- if (MaybeObjectAccessSize == MemoryLocation::UnknownSize ||<br>
- !GEPOp->isInBounds())<br>
+ if (MaybeObjectAccessSize == LocationSize::unknown() || !GEPOp->isInBounds())<br>
return false;<br>
<br>
const uint64_t ObjectAccessSize = MaybeObjectAccessSize.getValue();<br>
@@ -1254,8 +1253,8 @@ BasicAAResult::aliasGEP(const GEPOperato<br>
return NoAlias;<br>
// Do the base pointers alias?<br>
AliasResult BaseAlias =<br>
- aliasCheck(UnderlyingV1, MemoryLocation::UnknownSize, AAMDNodes(),<br>
- UnderlyingV2, MemoryLocation::UnknownSize, AAMDNodes());<br>
+ aliasCheck(UnderlyingV1, LocationSize::unknown(), AAMDNodes(),<br>
+ UnderlyingV2, LocationSize::unknown(), AAMDNodes());<br>
<br>
// Check for geps of non-aliasing underlying pointers where the offsets are<br>
// identical.<br>
@@ -1314,13 +1313,12 @@ BasicAAResult::aliasGEP(const GEPOperato<br>
// pointer, we know they cannot alias.<br>
<br>
// If both accesses are unknown size, we can't do anything useful here.<br>
- if (V1Size == MemoryLocation::UnknownSize &&<br>
- V2Size == MemoryLocation::UnknownSize)<br>
+ if (V1Size == LocationSize::unknown() && V2Size == LocationSize::unknown())<br>
return MayAlias;<br>
<br>
- AliasResult R = aliasCheck(UnderlyingV1, MemoryLocation::UnknownSize,<br>
- AAMDNodes(), V2, MemoryLocation::UnknownSize,<br>
- V2AAInfo, nullptr, UnderlyingV2);<br>
+ AliasResult R =<br>
+ aliasCheck(UnderlyingV1, LocationSize::unknown(), AAMDNodes(), V2,<br>
+ LocationSize::unknown(), V2AAInfo, nullptr, UnderlyingV2);<br>
if (R != MustAlias) {<br>
// If V2 may alias GEP base pointer, conservatively returns MayAlias.<br>
// If V2 is known not to alias GEP base pointer, then the two values<br>
@@ -1351,7 +1349,7 @@ BasicAAResult::aliasGEP(const GEPOperato<br>
// greater, we know they do not overlap.<br>
if (GEP1BaseOffset != 0 && DecompGEP1.VarIndices.empty()) {<br>
if (GEP1BaseOffset >= 0) {<br>
- if (V2Size != MemoryLocation::UnknownSize) {<br>
+ if (V2Size != LocationSize::unknown()) {<br>
if ((uint64_t)GEP1BaseOffset < V2Size.getValue())<br>
return PartialAlias;<br>
return NoAlias;<br>
@@ -1365,8 +1363,8 @@ BasicAAResult::aliasGEP(const GEPOperato<br>
// GEP1 V2<br>
// We need to know that V2Size is not unknown, otherwise we might have<br>
// stripped a gep with negative index ('gep <ptr>, -1, ...).<br>
- if (V1Size != MemoryLocation::UnknownSize &&<br>
- V2Size != MemoryLocation::UnknownSize) {<br>
+ if (V1Size != LocationSize::unknown() &&<br>
+ V2Size != LocationSize::unknown()) {<br>
if (-(uint64_t)GEP1BaseOffset < V1Size.getValue())<br>
return PartialAlias;<br>
return NoAlias;<br>
@@ -1416,9 +1414,8 @@ BasicAAResult::aliasGEP(const GEPOperato<br>
// mod Modulo. Check whether that difference guarantees that the<br>
// two locations do not alias.<br>
uint64_t ModOffset = (uint64_t)GEP1BaseOffset & (Modulo - 1);<br>
- if (V1Size != MemoryLocation::UnknownSize &&<br>
- V2Size != MemoryLocation::UnknownSize &&<br>
- ModOffset >= V2Size.getValue() &&<br>
+ if (V1Size != LocationSize::unknown() &&<br>
+ V2Size != LocationSize::unknown() && ModOffset >= V2Size.getValue() &&<br>
V1Size.getValue() <= Modulo - ModOffset)<br>
return NoAlias;<br>
<br>
@@ -1426,7 +1423,7 @@ BasicAAResult::aliasGEP(const GEPOperato<br>
// If GEP1BasePtr > V2 (GEP1BaseOffset > 0) then we know the pointers<br>
// don't alias if V2Size can fit in the gap between V2 and GEP1BasePtr.<br>
if (AllPositive && GEP1BaseOffset > 0 &&<br>
- V2Size != MemoryLocation::UnknownSize &&<br>
+ V2Size != LocationSize::unknown() &&<br>
V2Size.getValue() <= (uint64_t)GEP1BaseOffset)<br>
return NoAlias;<br>
<br>
@@ -1607,7 +1604,7 @@ AliasResult BasicAAResult::aliasPHI(cons<br>
// unknown to represent all the possible values the GEP could advance the<br>
// pointer to.<br>
if (isRecursive)<br>
- PNSize = MemoryLocation::UnknownSize;<br>
+ PNSize = LocationSize::unknown();<br>
<br>
AliasResult Alias =<br>
aliasCheck(V2, V2Size, V2AAInfo, V1Srcs[0],<br>
@@ -1864,8 +1861,8 @@ bool BasicAAResult::constantOffsetHeuris<br>
const SmallVectorImpl<VariableGEPIndex> &VarIndices,<br>
LocationSize MaybeV1Size, LocationSize MaybeV2Size, int64_t BaseOffset,<br>
AssumptionCache *AC, DominatorTree *DT) {<br>
- if (VarIndices.size() != 2 || MaybeV1Size == MemoryLocation::UnknownSize ||<br>
- MaybeV2Size == MemoryLocation::UnknownSize)<br>
+ if (VarIndices.size() != 2 || MaybeV1Size == LocationSize::unknown() ||<br>
+ MaybeV2Size == LocationSize::unknown())<br>
return false;<br>
<br>
const uint64_t V1Size = MaybeV1Size.getValue();<br>
<br>
Modified: llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp (original)<br>
+++ llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp Wed Oct 10 14:28:44 2018<br>
@@ -556,9 +556,9 @@ bool CFLAndersAAResult::FunctionInfo::ma<br>
OffsetValue{RHS, 0}, Comparator);<br>
<br>
if (RangePair.first != RangePair.second) {<br>
- // Be conservative about UnknownSize<br>
- if (MaybeLHSSize == MemoryLocation::UnknownSize ||<br>
- MaybeRHSSize == MemoryLocation::UnknownSize)<br>
+ // Be conservative about unknown sizes<br>
+ if (MaybeLHSSize == LocationSize::unknown() ||<br>
+ MaybeRHSSize == LocationSize::unknown())<br>
return true;<br>
<br>
const uint64_t LHSSize = MaybeLHSSize.getValue();<br>
<br>
Modified: llvm/trunk/lib/Analysis/DependenceAnalysis.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DependenceAnalysis.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DependenceAnalysis.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Analysis/DependenceAnalysis.cpp (original)<br>
+++ llvm/trunk/lib/Analysis/DependenceAnalysis.cpp Wed Oct 10 14:28:44 2018<br>
@@ -633,8 +633,8 @@ static AliasResult underlyingObjectsAlia<br>
const MemoryLocation &LocB) {<br>
// Check the original locations (minus size) for noalias, which can happen for<br>
// tbaa, incompatible underlying object locations, etc.<br>
- MemoryLocation LocAS(LocA.Ptr, MemoryLocation::UnknownSize, LocA.AATags);<br>
- MemoryLocation LocBS(LocB.Ptr, MemoryLocation::UnknownSize, LocB.AATags);<br>
+ MemoryLocation LocAS(LocA.Ptr, LocationSize::unknown(), LocA.AATags);<br>
+ MemoryLocation LocBS(LocB.Ptr, LocationSize::unknown(), LocB.AATags);<br>
if (AA->alias(LocAS, LocBS) == NoAlias)<br>
return NoAlias;<br>
<br>
<br>
Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)<br>
+++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Wed Oct 10 14:28:44 2018<br>
@@ -509,7 +509,7 @@ public:<br>
/// Register a load and whether it is only read from.<br>
void addLoad(MemoryLocation &Loc, bool IsReadOnly) {<br>
Value *Ptr = const_cast<Value*>(Loc.Ptr);<br>
- AST.add(Ptr, MemoryLocation::UnknownSize, Loc.AATags);<br>
+ AST.add(Ptr, LocationSize::unknown(), Loc.AATags);<br>
Accesses.insert(MemAccessInfo(Ptr, false));<br>
if (IsReadOnly)<br>
ReadOnlyPtr.insert(Ptr);<br>
@@ -518,7 +518,7 @@ public:<br>
/// Register a store.<br>
void addStore(MemoryLocation &Loc) {<br>
Value *Ptr = const_cast<Value*>(Loc.Ptr);<br>
- AST.add(Ptr, MemoryLocation::UnknownSize, Loc.AATags);<br>
+ AST.add(Ptr, LocationSize::unknown(), Loc.AATags);<br>
Accesses.insert(MemAccessInfo(Ptr, true));<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/Analysis/MemoryLocation.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryLocation.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryLocation.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Analysis/MemoryLocation.cpp (original)<br>
+++ llvm/trunk/lib/Analysis/MemoryLocation.cpp Wed Oct 10 14:28:44 2018<br>
@@ -55,7 +55,8 @@ MemoryLocation MemoryLocation::get(const<br>
AAMDNodes AATags;<br>
VI->getAAMetadata(AATags);<br>
<br>
- return MemoryLocation(VI->getPointerOperand(), UnknownSize, AATags);<br>
+ return MemoryLocation(VI->getPointerOperand(), LocationSize::unknown(),<br>
+ AATags);<br>
}<br>
<br>
MemoryLocation MemoryLocation::get(const AtomicCmpXchgInst *CXI) {<br>
@@ -87,7 +88,7 @@ MemoryLocation MemoryLocation::getForSou<br>
}<br>
<br>
MemoryLocation MemoryLocation::getForSource(const AnyMemTransferInst *MTI) {<br>
- uint64_t Size = UnknownSize;<br>
+ uint64_t Size = MemoryLocation::UnknownSize;<br>
if (ConstantInt *C = dyn_cast<ConstantInt>(MTI->getLength()))<br>
Size = C->getValue().getZExtValue();<br>
<br>
@@ -108,7 +109,7 @@ MemoryLocation MemoryLocation::getForDes<br>
}<br>
<br>
MemoryLocation MemoryLocation::getForDest(const AnyMemIntrinsic *MI) {<br>
- uint64_t Size = UnknownSize;<br>
+ uint64_t Size = MemoryLocation::UnknownSize;<br>
if (ConstantInt *C = dyn_cast<ConstantInt>(MI->getLength()))<br>
Size = C->getValue().getZExtValue();<br>
<br>
@@ -189,5 +190,6 @@ MemoryLocation MemoryLocation::getForArg<br>
}<br>
// FIXME: Handle memset_pattern4 and memset_pattern8 also.<br>
<br>
- return MemoryLocation(CS.getArgument(ArgIdx), UnknownSize, AATags);<br>
+ return MemoryLocation(CS.getArgument(ArgIdx), LocationSize::unknown(),<br>
+ AATags);<br>
}<br>
<br>
Modified: llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp Wed Oct 10 14:28:44 2018<br>
@@ -344,11 +344,11 @@ ImplicitNullChecks::areMemoryOpsAliased(<br>
return AR_MayAlias;<br>
continue;<br>
}<br>
- llvm::AliasResult AAResult = AA->alias(<br>
- MemoryLocation(MMO1->getValue(), MemoryLocation::UnknownSize,<br>
- MMO1->getAAInfo()),<br>
- MemoryLocation(MMO2->getValue(), MemoryLocation::UnknownSize,<br>
- MMO2->getAAInfo()));<br>
+ llvm::AliasResult AAResult =<br>
+ AA->alias(MemoryLocation(MMO1->getValue(), LocationSize::unknown(),<br>
+ MMO1->getAAInfo()),<br>
+ MemoryLocation(MMO2->getValue(), LocationSize::unknown(),<br>
+ MMO2->getAAInfo()));<br>
if (AAResult != NoAlias)<br>
return AR_MayAlias;<br>
}<br>
<br>
Modified: llvm/trunk/lib/CodeGen/MachinePipeliner.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachinePipeliner.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachinePipeliner.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/MachinePipeliner.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/MachinePipeliner.cpp Wed Oct 10 14:28:44 2018<br>
@@ -1136,9 +1136,9 @@ void SwingSchedulerDAG::addLoopCarriedDe<br>
continue;<br>
}<br>
AliasResult AAResult = AA->alias(<br>
- MemoryLocation(MMO1->getValue(), MemoryLocation::UnknownSize,<br>
+ MemoryLocation(MMO1->getValue(), LocationSize::unknown(),<br>
MMO1->getAAInfo()),<br>
- MemoryLocation(MMO2->getValue(), MemoryLocation::UnknownSize,<br>
+ MemoryLocation(MMO2->getValue(), LocationSize::unknown(),<br>
MMO2->getAAInfo()));<br>
<br>
if (AAResult != NoAlias) {<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMParallelDSP.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMParallelDSP.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMParallelDSP.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMParallelDSP.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMParallelDSP.cpp Wed Oct 10 14:28:44 2018<br>
@@ -71,7 +71,7 @@ namespace {<br>
virtual ~OpChain() = default;<br>
<br>
void SetMemoryLocations() {<br>
- const auto Size = MemoryLocation::UnknownSize;<br>
+ const auto Size = LocationSize::unknown();<br>
for (auto *V : AllValues) {<br>
if (auto *I = dyn_cast<Instruction>(V)) {<br>
if (I->mayWriteToMemory())<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp Wed Oct 10 14:28:44 2018<br>
@@ -1970,7 +1970,7 @@ mayLoopAccessLocation(Value *Ptr, ModRef<br>
// Get the location that may be stored across the loop. Since the access<br>
// is strided positively through memory, we say that the modified location<br>
// starts at the pointer and has infinite size.<br>
- LocationSize AccessSize = MemoryLocation::UnknownSize;<br>
+ LocationSize AccessSize = LocationSize::unknown();<br>
<br>
// If the loop iterates a fixed number of times, we can refine the access<br>
// size to be exactly the size of the memset, which is (BECount+1)*StoreSize<br>
<br>
Modified: llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp Wed Oct 10 14:28:44 2018<br>
@@ -165,7 +165,7 @@ static MemoryAccessKind checkFunctionMem<br>
<br>
AAMDNodes AAInfo;<br>
I->getAAMetadata(AAInfo);<br>
- MemoryLocation Loc(Arg, MemoryLocation::UnknownSize, AAInfo);<br>
+ MemoryLocation Loc(Arg, LocationSize::unknown(), AAInfo);<br>
<br>
// Skip accesses to local or constant memory as they don't impact the<br>
// externally visible mod/ref behavior.<br>
<br>
Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Wed Oct 10 14:28:44 2018<br>
@@ -693,7 +693,7 @@ bool llvm::canSinkOrHoistInst(Instructio<br>
for (Value *Op : CI->arg_operands())<br>
if (Op->getType()->isPointerTy() &&<br>
pointerInvalidatedByLoop(<br>
- MemoryLocation(Op, MemoryLocation::UnknownSize, AAMDNodes()),<br>
+ MemoryLocation(Op, LocationSize::unknown(), AAMDNodes()),<br>
CurAST, CurLoop, AA))<br>
return false;<br>
return true;<br>
<br>
Modified: llvm/trunk/unittests/Analysis/AliasAnalysisTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/AliasAnalysisTest.cpp?rev=344186&r1=344185&r2=344186&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/AliasAnalysisTest.cpp?rev=344186&r1=344185&r2=344186&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/unittests/Analysis/AliasAnalysisTest.cpp (original)<br>
+++ llvm/trunk/unittests/Analysis/AliasAnalysisTest.cpp Wed Oct 10 14:28:44 2018<br>
@@ -55,8 +55,8 @@ struct AATestPass : FunctionPass {<br>
<br>
for (Value *P1 : Pointers)<br>
for (Value *P2 : Pointers)<br>
- (void)AA.alias(P1, MemoryLocation::UnknownSize, P2,<br>
- MemoryLocation::UnknownSize);<br>
+ (void)AA.alias(P1, LocationSize::unknown(), P2,<br>
+ LocationSize::unknown());<br>
<br>
return false;<br>
}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>