We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents babee8b + 58cc7b0 commit a57dee1Copy full SHA for a57dee1
lib/SILOptimizer/Mandatory/PredictableMemOpt.cpp
@@ -930,6 +930,12 @@ void AvailableValueDataflowContext::explodeCopyAddr(CopyAddrInst *CAI) {
930
// something else), track it as an access.
931
if (StoreUse.isValid()) {
932
StoreUse.Inst = NewInst;
933
+ // If our store use by the copy_addr is an assign, then we know that
934
+ // before we store the new value, we loaded the old value implying that
935
+ // our store is technically initializing memory when it occurs. So
936
+ // change the kind to Initialization.
937
+ if (StoreUse.Kind == Assign)
938
+ StoreUse.Kind = Initialization;
939
NonLoadUses[NewInst] = Uses.size();
940
Uses.push_back(StoreUse);
941
}
0 commit comments