diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index c614939522f..e018ed6ee8a 100644 --- a/include/llvm/Analysis/AliasAnalysis.h +++ b/include/llvm/Analysis/AliasAnalysis.h @@ -325,8 +325,8 @@ public: AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB); /// A convenience wrapper around the primary \c alias interface. - AliasResult alias(const Value *V1, uint64_t V1Size, const Value *V2, - uint64_t V2Size) { + AliasResult alias(const Value *V1, LocationSize V1Size, const Value *V2, + LocationSize V2Size) { return alias(MemoryLocation(V1, V1Size), MemoryLocation(V2, V2Size)); } @@ -343,8 +343,8 @@ public: } /// A convenience wrapper around the \c isNoAlias helper interface. - bool isNoAlias(const Value *V1, uint64_t V1Size, const Value *V2, - uint64_t V2Size) { + bool isNoAlias(const Value *V1, LocationSize V1Size, const Value *V2, + LocationSize V2Size) { return isNoAlias(MemoryLocation(V1, V1Size), MemoryLocation(V2, V2Size)); } @@ -501,7 +501,7 @@ public: /// getModRefInfo (for call sites) - A convenience wrapper. ModRefInfo getModRefInfo(ImmutableCallSite CS, const Value *P, - uint64_t Size) { + LocationSize Size) { return getModRefInfo(CS, MemoryLocation(P, Size)); } @@ -512,7 +512,8 @@ public: } /// getModRefInfo (for calls) - A convenience wrapper. - ModRefInfo getModRefInfo(const CallInst *C, const Value *P, uint64_t Size) { + ModRefInfo getModRefInfo(const CallInst *C, const Value *P, + LocationSize Size) { return getModRefInfo(C, MemoryLocation(P, Size)); } @@ -523,7 +524,8 @@ public: } /// getModRefInfo (for invokes) - A convenience wrapper. - ModRefInfo getModRefInfo(const InvokeInst *I, const Value *P, uint64_t Size) { + ModRefInfo getModRefInfo(const InvokeInst *I, const Value *P, + LocationSize Size) { return getModRefInfo(I, MemoryLocation(P, Size)); } @@ -532,7 +534,8 @@ public: ModRefInfo getModRefInfo(const LoadInst *L, const MemoryLocation &Loc); /// getModRefInfo (for loads) - A convenience wrapper. - ModRefInfo getModRefInfo(const LoadInst *L, const Value *P, uint64_t Size) { + ModRefInfo getModRefInfo(const LoadInst *L, const Value *P, + LocationSize Size) { return getModRefInfo(L, MemoryLocation(P, Size)); } @@ -541,7 +544,8 @@ public: ModRefInfo getModRefInfo(const StoreInst *S, const MemoryLocation &Loc); /// getModRefInfo (for stores) - A convenience wrapper. - ModRefInfo getModRefInfo(const StoreInst *S, const Value *P, uint64_t Size) { + ModRefInfo getModRefInfo(const StoreInst *S, const Value *P, + LocationSize Size) { return getModRefInfo(S, MemoryLocation(P, Size)); } @@ -550,7 +554,8 @@ public: ModRefInfo getModRefInfo(const FenceInst *S, const MemoryLocation &Loc); /// getModRefInfo (for fences) - A convenience wrapper. - ModRefInfo getModRefInfo(const FenceInst *S, const Value *P, uint64_t Size) { + ModRefInfo getModRefInfo(const FenceInst *S, const Value *P, + LocationSize Size) { return getModRefInfo(S, MemoryLocation(P, Size)); } @@ -580,7 +585,8 @@ public: ModRefInfo getModRefInfo(const VAArgInst *I, const MemoryLocation &Loc); /// getModRefInfo (for va_args) - A convenience wrapper. - ModRefInfo getModRefInfo(const VAArgInst *I, const Value *P, uint64_t Size) { + ModRefInfo getModRefInfo(const VAArgInst *I, const Value *P, + LocationSize Size) { return getModRefInfo(I, MemoryLocation(P, Size)); } @@ -590,7 +596,7 @@ public: /// getModRefInfo (for catchpads) - A convenience wrapper. ModRefInfo getModRefInfo(const CatchPadInst *I, const Value *P, - uint64_t Size) { + LocationSize Size) { return getModRefInfo(I, MemoryLocation(P, Size)); } @@ -600,7 +606,7 @@ public: /// getModRefInfo (for catchrets) - A convenience wrapper. ModRefInfo getModRefInfo(const CatchReturnInst *I, const Value *P, - uint64_t Size) { + LocationSize Size) { return getModRefInfo(I, MemoryLocation(P, Size)); } @@ -646,7 +652,7 @@ public: /// A convenience wrapper for constructing the memory location. ModRefInfo getModRefInfo(const Instruction *I, const Value *P, - uint64_t Size) { + LocationSize Size) { return getModRefInfo(I, MemoryLocation(P, Size)); } @@ -671,7 +677,7 @@ public: /// A convenience wrapper to synthesize a memory location. ModRefInfo callCapturesBefore(const Instruction *I, const Value *P, - uint64_t Size, DominatorTree *DT, + LocationSize Size, DominatorTree *DT, OrderedBasicBlock *OBB = nullptr) { return callCapturesBefore(I, MemoryLocation(P, Size), DT, OBB); } @@ -687,7 +693,7 @@ public: /// A convenience wrapper synthesizing a memory location. bool canBasicBlockModify(const BasicBlock &BB, const Value *P, - uint64_t Size) { + LocationSize Size) { return canBasicBlockModify(BB, MemoryLocation(P, Size)); } @@ -702,7 +708,7 @@ public: /// A convenience wrapper synthesizing a memory location. bool canInstructionRangeModRef(const Instruction &I1, const Instruction &I2, - const Value *Ptr, uint64_t Size, + const Value *Ptr, LocationSize Size, const ModRefInfo Mode) { return canInstructionRangeModRef(I1, I2, MemoryLocation(Ptr, Size), Mode); } diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index 7da3ebabb8a..2a11d64f042 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -52,7 +52,7 @@ class AliasSet : public ilist_node { PointerRec **PrevInList = nullptr; PointerRec *NextInList = nullptr; AliasSet *AS = nullptr; - uint64_t Size = 0; + LocationSize Size = 0; AAMDNodes AAInfo; public: @@ -69,7 +69,7 @@ class AliasSet : public ilist_node { return &NextInList; } - bool updateSizeAndAAInfo(uint64_t NewSize, const AAMDNodes &NewAAInfo) { + bool updateSizeAndAAInfo(LocationSize NewSize, const AAMDNodes &NewAAInfo) { bool SizeChanged = false; if (NewSize > Size) { Size = NewSize; @@ -91,7 +91,7 @@ class AliasSet : public ilist_node { return SizeChanged; } - uint64_t getSize() const { return Size; } + LocationSize getSize() const { return Size; } /// Return the AAInfo, or null if there is no information or conflicting /// information. @@ -247,7 +247,7 @@ public: value_type *operator->() const { return &operator*(); } Value *getPointer() const { return CurNode->getValue(); } - uint64_t getSize() const { return CurNode->getSize(); } + LocationSize getSize() const { return CurNode->getSize(); } AAMDNodes getAAInfo() const { return CurNode->getAAInfo(); } iterator& operator++() { // Preincrement @@ -287,9 +287,8 @@ private: void removeFromTracker(AliasSetTracker &AST); - void addPointer(AliasSetTracker &AST, PointerRec &Entry, uint64_t Size, - const AAMDNodes &AAInfo, - bool KnownMustAlias = false); + void addPointer(AliasSetTracker &AST, PointerRec &Entry, LocationSize Size, + const AAMDNodes &AAInfo, bool KnownMustAlias = false); void addUnknownInst(Instruction *I, AliasAnalysis &AA); void removeUnknownInst(AliasSetTracker &AST, Instruction *I) { @@ -309,8 +308,8 @@ private: public: /// Return true if the specified pointer "may" (or must) alias one of the /// members in the set. - bool aliasesPointer(const Value *Ptr, uint64_t Size, const AAMDNodes &AAInfo, - AliasAnalysis &AA) const; + bool aliasesPointer(const Value *Ptr, LocationSize Size, + const AAMDNodes &AAInfo, AliasAnalysis &AA) const; bool aliasesUnknownInst(const Instruction *Inst, AliasAnalysis &AA) const; }; @@ -364,7 +363,7 @@ public: /// These methods return true if inserting the instruction resulted in the /// addition of a new alias set (i.e., the pointer did not alias anything). /// - void add(Value *Ptr, uint64_t Size, const AAMDNodes &AAInfo); // Add a loc. + void add(Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo); // Add a loc void add(LoadInst *LI); void add(StoreInst *SI); void add(VAArgInst *VAAI); @@ -384,12 +383,12 @@ public: /// argument is non-null, this method sets the value to true if a new alias /// set is created to contain the pointer (because the pointer didn't alias /// anything). - AliasSet &getAliasSetForPointer(Value *P, uint64_t Size, + AliasSet &getAliasSetForPointer(Value *P, LocationSize Size, const AAMDNodes &AAInfo); /// Return the alias set containing the location specified if one exists, /// otherwise return null. - AliasSet *getAliasSetForPointerIfExists(const Value *P, uint64_t Size, + AliasSet *getAliasSetForPointerIfExists(const Value *P, LocationSize Size, const AAMDNodes &AAInfo) { return mergeAliasSetsForPointer(P, Size, AAInfo); } @@ -446,9 +445,9 @@ private: return *Entry; } - AliasSet &addPointer(Value *P, uint64_t Size, const AAMDNodes &AAInfo, + AliasSet &addPointer(Value *P, LocationSize Size, const AAMDNodes &AAInfo, AliasSet::AccessLattice E); - AliasSet *mergeAliasSetsForPointer(const Value *Ptr, uint64_t Size, + AliasSet *mergeAliasSetsForPointer(const Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo); /// Merge all alias sets into a single set that is considered to alias any diff --git a/include/llvm/Analysis/BasicAliasAnalysis.h b/include/llvm/Analysis/BasicAliasAnalysis.h index 1edc7f300f7..8fb3c3a63f2 100644 --- a/include/llvm/Analysis/BasicAliasAnalysis.h +++ b/include/llvm/Analysis/BasicAliasAnalysis.h @@ -171,7 +171,7 @@ private: static bool isGEPBaseAtNegativeOffset(const GEPOperator *GEPOp, const DecomposedGEP &DecompGEP, const DecomposedGEP &DecompObject, - uint64_t ObjectAccessSize); + LocationSize ObjectAccessSize); /// A Heuristic for aliasGEP that searches for a constant offset /// between the variables. @@ -183,31 +183,33 @@ private: /// the addition overflows. bool constantOffsetHeuristic(const SmallVectorImpl &VarIndices, - uint64_t V1Size, uint64_t V2Size, int64_t BaseOffset, - AssumptionCache *AC, DominatorTree *DT); + LocationSize V1Size, LocationSize V2Size, + int64_t BaseOffset, AssumptionCache *AC, + DominatorTree *DT); bool isValueEqualInPotentialCycles(const Value *V1, const Value *V2); void GetIndexDifference(SmallVectorImpl &Dest, const SmallVectorImpl &Src); - AliasResult aliasGEP(const GEPOperator *V1, uint64_t V1Size, + AliasResult aliasGEP(const GEPOperator *V1, LocationSize V1Size, const AAMDNodes &V1AAInfo, const Value *V2, - uint64_t V2Size, const AAMDNodes &V2AAInfo, + LocationSize V2Size, const AAMDNodes &V2AAInfo, const Value *UnderlyingV1, const Value *UnderlyingV2); - AliasResult aliasPHI(const PHINode *PN, uint64_t PNSize, + AliasResult aliasPHI(const PHINode *PN, LocationSize PNSize, const AAMDNodes &PNAAInfo, const Value *V2, - uint64_t V2Size, const AAMDNodes &V2AAInfo, + LocationSize V2Size, const AAMDNodes &V2AAInfo, const Value *UnderV2); - AliasResult aliasSelect(const SelectInst *SI, uint64_t SISize, + AliasResult aliasSelect(const SelectInst *SI, LocationSize SISize, const AAMDNodes &SIAAInfo, const Value *V2, - uint64_t V2Size, const AAMDNodes &V2AAInfo, + LocationSize V2Size, const AAMDNodes &V2AAInfo, const Value *UnderV2); - AliasResult aliasCheck(const Value *V1, uint64_t V1Size, AAMDNodes V1AATag, - const Value *V2, uint64_t V2Size, AAMDNodes V2AATag, + AliasResult aliasCheck(const Value *V1, LocationSize V1Size, + AAMDNodes V1AATag, const Value *V2, + LocationSize V2Size, AAMDNodes V2AATag, const Value *O1 = nullptr, const Value *O2 = nullptr); }; diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h index f6da59a995a..1c6ec98dfed 100644 --- a/include/llvm/Analysis/MemoryDependenceAnalysis.h +++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h @@ -303,7 +303,7 @@ private: /// The maximum size of the dereferences of the pointer. /// /// May be UnknownSize if the sizes are unknown. - uint64_t Size = MemoryLocation::UnknownSize; + LocationSize Size = MemoryLocation::UnknownSize; /// The AA tags associated with dereferences of the pointer. /// /// The members may be null if there are no tags or conflicting tags. diff --git a/include/llvm/Analysis/MemoryLocation.h b/include/llvm/Analysis/MemoryLocation.h index e8f6644462e..6b680000312 100644 --- a/include/llvm/Analysis/MemoryLocation.h +++ b/include/llvm/Analysis/MemoryLocation.h @@ -33,6 +33,10 @@ class AnyMemTransferInst; class AnyMemIntrinsic; class TargetLibraryInfo; +// Represents the size of a MemoryLocation. Logically, it's an +// Optional, with a special UnknownSize value from `MemoryLocation`. +using LocationSize = uint64_t; + /// Representation for a specific memory location. /// /// This abstraction can be used to represent a specific location in memory. @@ -59,7 +63,7 @@ public: /// virtual address space, because there are restrictions on stepping out of /// one object and into another. See /// http://llvm.org/docs/LangRef.html#pointeraliasing - uint64_t Size; + LocationSize Size; /// The metadata nodes which describes the aliasing of the location (each /// member is null if that kind of information is unavailable). @@ -108,7 +112,7 @@ public: const TargetLibraryInfo &TLI); explicit MemoryLocation(const Value *Ptr = nullptr, - uint64_t Size = UnknownSize, + LocationSize Size = UnknownSize, const AAMDNodes &AATags = AAMDNodes()) : Ptr(Ptr), Size(Size), AATags(AATags) {} @@ -118,7 +122,7 @@ public: return Copy; } - MemoryLocation getWithNewSize(uint64_t NewSize) const { + MemoryLocation getWithNewSize(LocationSize NewSize) const { MemoryLocation Copy(*this); Copy.Size = NewSize; return Copy; @@ -145,7 +149,7 @@ template <> struct DenseMapInfo { } static unsigned getHashValue(const MemoryLocation &Val) { return DenseMapInfo::getHashValue(Val.Ptr) ^ - DenseMapInfo::getHashValue(Val.Size) ^ + DenseMapInfo::getHashValue(Val.Size) ^ DenseMapInfo::getHashValue(Val.AATags); } static bool isEqual(const MemoryLocation &LHS, const MemoryLocation &RHS) { diff --git a/lib/Analysis/AliasSetTracker.cpp b/lib/Analysis/AliasSetTracker.cpp index 6fac7ddbb5b..e4b805aca91 100644 --- a/lib/Analysis/AliasSetTracker.cpp +++ b/lib/Analysis/AliasSetTracker.cpp @@ -127,7 +127,7 @@ void AliasSet::removeFromTracker(AliasSetTracker &AST) { } void AliasSet::addPointer(AliasSetTracker &AST, PointerRec &Entry, - uint64_t Size, const AAMDNodes &AAInfo, + LocationSize Size, const AAMDNodes &AAInfo, bool KnownMustAlias) { assert(!Entry.hasAliasSet() && "Entry already in set!"); @@ -183,7 +183,7 @@ void AliasSet::addUnknownInst(Instruction *I, AliasAnalysis &AA) { /// aliasesPointer - Return true if the specified pointer "may" (or must) /// alias one of the members in the set. /// -bool AliasSet::aliasesPointer(const Value *Ptr, uint64_t Size, +bool AliasSet::aliasesPointer(const Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo, AliasAnalysis &AA) const { if (AliasAny) @@ -263,7 +263,7 @@ void AliasSetTracker::clear() { /// alias the pointer. Return the unified set, or nullptr if no set that aliases /// the pointer was found. AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr, - uint64_t Size, + LocationSize Size, const AAMDNodes &AAInfo) { AliasSet *FoundSet = nullptr; for (iterator I = begin(), E = end(); I != E;) { @@ -303,7 +303,8 @@ AliasSet *AliasSetTracker::findAliasSetForUnknownInst(Instruction *Inst) { /// getAliasSetForPointer - Return the alias set that the specified pointer /// lives in. -AliasSet &AliasSetTracker::getAliasSetForPointer(Value *Pointer, uint64_t Size, +AliasSet &AliasSetTracker::getAliasSetForPointer(Value *Pointer, + LocationSize Size, const AAMDNodes &AAInfo) { AliasSet::PointerRec &Entry = getEntryFor(Pointer); @@ -348,7 +349,8 @@ AliasSet &AliasSetTracker::getAliasSetForPointer(Value *Pointer, uint64_t Size, return AliasSets.back(); } -void AliasSetTracker::add(Value *Ptr, uint64_t Size, const AAMDNodes &AAInfo) { +void AliasSetTracker::add(Value *Ptr, LocationSize Size, + const AAMDNodes &AAInfo) { addPointer(Ptr, Size, AAInfo, AliasSet::NoAccess); } @@ -589,7 +591,7 @@ AliasSet &AliasSetTracker::mergeAllAliasSets() { return *AliasAnyAS; } -AliasSet &AliasSetTracker::addPointer(Value *P, uint64_t Size, +AliasSet &AliasSetTracker::addPointer(Value *P, LocationSize Size, const AAMDNodes &AAInfo, AliasSet::AccessLattice E) { AliasSet &AS = getAliasSetForPointer(P, Size, AAInfo); diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index c1582b6e298..c7839bcf67b 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -992,9 +992,9 @@ ModRefInfo BasicAAResult::getModRefInfo(ImmutableCallSite CS1, /// Provide ad-hoc rules to disambiguate accesses through two GEP operators, /// both having the exact same pointer operand. static AliasResult aliasSameBasePointerGEPs(const GEPOperator *GEP1, - uint64_t V1Size, + LocationSize V1Size, const GEPOperator *GEP2, - uint64_t V2Size, + LocationSize V2Size, const DataLayout &DL) { assert(GEP1->getPointerOperand()->stripPointerCastsAndInvariantGroups() == GEP2->getPointerOperand()->stripPointerCastsAndInvariantGroups() && @@ -1169,8 +1169,8 @@ static AliasResult aliasSameBasePointerGEPs(const GEPOperator *GEP1, // the highest %f1 can be is (%alloca + 3). This means %random can not be higher // than (%alloca - 1), and so is not inbounds, a contradiction. bool BasicAAResult::isGEPBaseAtNegativeOffset(const GEPOperator *GEPOp, - const DecomposedGEP &DecompGEP, const DecomposedGEP &DecompObject, - uint64_t ObjectAccessSize) { + const DecomposedGEP &DecompGEP, const DecomposedGEP &DecompObject, + LocationSize ObjectAccessSize) { // If the object access size is unknown, or the GEP isn't inbounds, bail. if (ObjectAccessSize == MemoryLocation::UnknownSize || !GEPOp->isInBounds()) return false; @@ -1204,11 +1204,11 @@ bool BasicAAResult::isGEPBaseAtNegativeOffset(const GEPOperator *GEPOp, /// We know that V1 is a GEP, but we don't know anything about V2. /// UnderlyingV1 is GetUnderlyingObject(GEP1, DL), UnderlyingV2 is the same for /// V2. -AliasResult BasicAAResult::aliasGEP(const GEPOperator *GEP1, uint64_t V1Size, - const AAMDNodes &V1AAInfo, const Value *V2, - uint64_t V2Size, const AAMDNodes &V2AAInfo, - const Value *UnderlyingV1, - const Value *UnderlyingV2) { +AliasResult +BasicAAResult::aliasGEP(const GEPOperator *GEP1, LocationSize V1Size, + const AAMDNodes &V1AAInfo, const Value *V2, + LocationSize V2Size, const AAMDNodes &V2AAInfo, + const Value *UnderlyingV1, const Value *UnderlyingV2) { DecomposedGEP DecompGEP1, DecompGEP2; bool GEP1MaxLookupReached = DecomposeGEPExpression(GEP1, DecompGEP1, DL, &AC, DT); @@ -1437,9 +1437,10 @@ static AliasResult MergeAliasResults(AliasResult A, AliasResult B) { /// Provides a bunch of ad-hoc rules to disambiguate a Select instruction /// against another. -AliasResult BasicAAResult::aliasSelect(const SelectInst *SI, uint64_t SISize, +AliasResult BasicAAResult::aliasSelect(const SelectInst *SI, + LocationSize SISize, const AAMDNodes &SIAAInfo, - const Value *V2, uint64_t V2Size, + const Value *V2, LocationSize V2Size, const AAMDNodes &V2AAInfo, const Value *UnderV2) { // If the values are Selects with the same condition, we can do a more precise @@ -1472,9 +1473,10 @@ AliasResult BasicAAResult::aliasSelect(const SelectInst *SI, uint64_t SISize, /// Provide a bunch of ad-hoc rules to disambiguate a PHI instruction against /// another. -AliasResult BasicAAResult::aliasPHI(const PHINode *PN, uint64_t PNSize, +AliasResult BasicAAResult::aliasPHI(const PHINode *PN, LocationSize PNSize, const AAMDNodes &PNAAInfo, const Value *V2, - uint64_t V2Size, const AAMDNodes &V2AAInfo, + LocationSize V2Size, + const AAMDNodes &V2AAInfo, const Value *UnderV2) { // Track phi nodes we have visited. We use this information when we determine // value equivalence. @@ -1579,9 +1581,9 @@ AliasResult BasicAAResult::aliasPHI(const PHINode *PN, uint64_t PNSize, /// Provides a bunch of ad-hoc rules to disambiguate in common cases, such as /// array references. -AliasResult BasicAAResult::aliasCheck(const Value *V1, uint64_t V1Size, +AliasResult BasicAAResult::aliasCheck(const Value *V1, LocationSize V1Size, AAMDNodes V1AAInfo, const Value *V2, - uint64_t V2Size, AAMDNodes V2AAInfo, + LocationSize V2Size, AAMDNodes V2AAInfo, const Value *O1, const Value *O2) { // If either of the memory references is empty, it doesn't matter what the // pointer values are. @@ -1805,8 +1807,8 @@ void BasicAAResult::GetIndexDifference( } bool BasicAAResult::constantOffsetHeuristic( - const SmallVectorImpl &VarIndices, uint64_t V1Size, - uint64_t V2Size, int64_t BaseOffset, AssumptionCache *AC, + const SmallVectorImpl &VarIndices, LocationSize V1Size, + LocationSize V2Size, int64_t BaseOffset, AssumptionCache *AC, DominatorTree *DT) { if (VarIndices.size() != 2 || V1Size == MemoryLocation::UnknownSize || V2Size == MemoryLocation::UnknownSize) diff --git a/lib/Analysis/CFLAndersAliasAnalysis.cpp b/lib/Analysis/CFLAndersAliasAnalysis.cpp index ef7e95ffb1f..194983418b0 100644 --- a/lib/Analysis/CFLAndersAliasAnalysis.cpp +++ b/lib/Analysis/CFLAndersAliasAnalysis.cpp @@ -337,7 +337,7 @@ public: FunctionInfo(const Function &, const SmallVectorImpl &, const ReachabilitySet &, const AliasAttrMap &); - bool mayAlias(const Value *, uint64_t, const Value *, uint64_t) const; + bool mayAlias(const Value *, LocationSize, const Value *, LocationSize) const; const AliasSummary &getAliasSummary() const { return Summary; } }; @@ -516,9 +516,9 @@ CFLAndersAAResult::FunctionInfo::getAttrs(const Value *V) const { } bool CFLAndersAAResult::FunctionInfo::mayAlias(const Value *LHS, - uint64_t LHSSize, + LocationSize LHSSize, const Value *RHS, - uint64_t RHSSize) const { + LocationSize RHSSize) const { assert(LHS && RHS); // Check if we've seen LHS and RHS before. Sometimes LHS or RHS can be created diff --git a/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp b/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp index 8b22d35cf9c..ebc5420d5ef 100644 --- a/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp +++ b/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp @@ -1970,7 +1970,7 @@ mayLoopAccessLocation(Value *Ptr, ModRefInfo Access, Loop *L, // 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. - uint64_t AccessSize = MemoryLocation::UnknownSize; + LocationSize AccessSize = MemoryLocation::UnknownSize; // 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