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