@@ -310,8 +310,7 @@ std::pair<MemoryLocationRange, bool> aggregate(
310310 int64_t Offset;
311311 auto *BasePtr = GetPointerBaseWithConstantOffset (
312312 Loc.Ptr , Offset, Fwk->getDataLayout ());
313- auto *GV{dyn_cast<GlobalValue>(GetUnderlyingObject (Loc.Ptr ,
314- Fwk->getDataLayout (), 0 ))};
313+ auto *GV{dyn_cast<GlobalValue>(getUnderlyingObject (Loc.Ptr , 0 ))};
315314 if (Fwk->getDataLayout ().getTypeStoreSize (ElemType).isScalable () ||
316315 LocInfo.second ->Subscripts .size () != ArrayPtr->getNumberOfDims () ||
317316 !Loc.LowerBound .hasValue () || !Loc.UpperBound .hasValue () ||
@@ -1145,11 +1144,10 @@ void ReachDFFwk::collapse(DFRegion *R) {
11451144 const LocationSet &LS) -> bool {
11461145 bool AreAllCollapsedOrAuxiliary = true ;
11471146 bool HasCollapsed = false ;
1148- auto *GV{dyn_cast<GlobalValue>(
1149- GetUnderlyingObject (Loc.Ptr , getDataLayout (), 0 ))};
1147+ auto *GV{dyn_cast<GlobalValue>(getUnderlyingObject (Loc.Ptr , 0 ))};
11501148 for (auto &OtherLoc : LS) {
11511149 auto *OtherGV{dyn_cast<GlobalValue>(
1152- GetUnderlyingObject (OtherLoc.Ptr , getDataLayout () , 0 ))};
1150+ getUnderlyingObject (OtherLoc.Ptr , 0 ))};
11531151 if (GV == OtherGV) {
11541152 if ((OtherLoc.Kind & MemoryLocationRange::LocKind::Collapsed) &&
11551153 !(OtherLoc.Kind & MemoryLocationRange::LocKind::Auxiliary))
@@ -1215,7 +1213,7 @@ void ReachDFFwk::collapse(DFRegion *R) {
12151213 for (auto &Loc : NewUses) {
12161214 // Check if the location is strictly default, not collapsable.
12171215 auto *GV{dyn_cast<GlobalValue>(
1218- GetUnderlyingObject (Loc.Ptr , getDataLayout () , 0 ))};
1216+ getUnderlyingObject (Loc.Ptr , 0 ))};
12191217 bool SkipExcessUse = false ;
12201218 LLVM_DEBUG (
12211219 dbgs () << " Check location: " ;
@@ -1231,7 +1229,7 @@ void ReachDFFwk::collapse(DFRegion *R) {
12311229 bool AreAllCollapsed = true ;
12321230 for (auto &OtherLoc : NewUses) {
12331231 auto *OtherGV{dyn_cast<GlobalValue>(
1234- GetUnderlyingObject (OtherLoc.Ptr , getDataLayout () , 0 ))};
1232+ getUnderlyingObject (OtherLoc.Ptr , 0 ))};
12351233 if (GV == OtherGV) {
12361234 SameUnderlyingObjCount++;
12371235 if (Loc.Ptr != OtherLoc.Ptr ) {
@@ -1248,7 +1246,7 @@ void ReachDFFwk::collapse(DFRegion *R) {
12481246 auto MaySkipNonCollapsable = true ;
12491247 for (auto &OtherLoc : NewUses) {
12501248 auto *OtherGV{dyn_cast<GlobalValue>(
1251- GetUnderlyingObject (OtherLoc.Ptr , getDataLayout () , 0 ))};
1249+ getUnderlyingObject (OtherLoc.Ptr , 0 ))};
12521250 if (GV == OtherGV) {
12531251 if (!(OtherLoc.Kind & MemoryLocationRange::LocKind::Auxiliary) &&
12541252 !(OtherLoc.Kind & MemoryLocationRange::LocKind::Collapsed) &&
0 commit comments