mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SideEffectAnalysis: don't assume the worst side-effects for a release instruction
Instead let the client decide what to do with this. Sometimes the client knows what side effect a release instruction really has.
This commit is contained in:
@@ -72,6 +72,7 @@ static bool mayWriteTo(AliasAnalysis *AA, SideEffectAnalysis *SEA,
|
||||
|
||||
for (unsigned Idx = 0, End = AI->getNumArguments(); Idx < End; ++Idx) {
|
||||
auto &ArgEffect = E.getParameterEffects()[Idx];
|
||||
assert(!ArgEffect.mayRelease() && "apply should only read from memory");
|
||||
if (!ArgEffect.mayRead())
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user