Skip to content

Commit 3de8c96

Browse files
Remove unwanted changes
1 parent c7b65eb commit 3de8c96

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

llvm/include/llvm/Support/ModRef.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,6 @@ template <typename LocationEnum> class MemoryEffectsBase {
158158
return MemoryEffectsBase(Location::Other, MR);
159159
}
160160

161-
/// Checks if only target-specific memory locations are set.
162-
/// Ignores standard locations like ArgMem or InaccessibleMem.
163-
/// Needed because `Data` may be non-zero by default unless explicitly
164-
/// cleared.
165-
bool onlyAccessTargetMemoryLocation() {
166-
MemoryEffectsBase ME = *this;
167-
for (unsigned I = static_cast<int>(LocationEnum::FirstTarget);
168-
I <= static_cast<int>(LocationEnum::Last); I++)
169-
ME = ME.getWithoutLoc(static_cast<IRMemLocation>(I));
170-
return ME.doesNotAccessMemory();
171-
}
172-
173161
/// Create MemoryEffectsBase that can only access inaccessible or argument
174162
/// memory.
175163
static MemoryEffectsBase

llvm/lib/Transforms/IPO/FunctionAttrs.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ static void addMemoryAttrs(const SCCNodeSet &SCCNodes, AARGetterT &&AARGetter,
285285
checkFunctionMemoryAccess(*F, F->hasExactDefinition(), AAR, SCCNodes);
286286
ME |= FnME;
287287
RecursiveArgME |= FnRecursiveArgME;
288+
// Reached bottom of the lattice, we will not be able to improve the result.
288289
if (ME == MemoryEffects::unknown())
289290
return;
290291
}

0 commit comments

Comments
 (0)