Skip to content

Commit 1c3859f

Browse files
committed
[BasicAA] Don't consider Argument as escape source (NFCI)
The case of an Argument and an identified function local is already handled earlier, because we don't care about captures in that case. As such, we don't need to additionally consider the combination of an Argument with a non-escaping identified function local. This ensures that isEscapeSource() only returns true for instructions, which is necessary for D110368.
1 parent 897eb57 commit 1c3859f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

llvm/lib/Analysis/BasicAliasAnalysis.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ static bool isEscapeSource(const Value *V) {
120120
if (isa<CallBase>(V))
121121
return true;
122122

123-
if (isa<Argument>(V))
124-
return true;
125-
126123
// The load case works because isNonEscapingLocalObject considers all
127124
// stores to be escapes (it passes true for the StoreCaptures argument
128125
// to PointerMayBeCaptured).

0 commit comments

Comments
 (0)