File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3827,6 +3827,8 @@ bool MoveOnlyAddressCheckerPImpl::performSingleCheck(
3827
3827
3828
3828
CopiedLoadBorrowEliminationState state (markedAddress->getFunction ());
3829
3829
CopiedLoadBorrowEliminationVisitor copiedLoadBorrowEliminator (state);
3830
+ // FIXME: should check AddressUseKind::NonEscaping != walk() to handle
3831
+ // PointerEscape.
3830
3832
if (AddressUseKind::Unknown ==
3831
3833
std::move (copiedLoadBorrowEliminator).walk (markedAddress)) {
3832
3834
LLVM_DEBUG (llvm::dbgs () << " Failed copied load borrow eliminator visit: "
@@ -3869,6 +3871,8 @@ bool MoveOnlyAddressCheckerPImpl::performSingleCheck(
3869
3871
RAIILLVMDebug l (" main use gathering visitor" );
3870
3872
3871
3873
visitor.reset (markedAddress);
3874
+ // FIXME: should check walkResult != AddressUseKind::NonEscaping to handle
3875
+ // PointerEscape.
3872
3876
if (AddressUseKind::Unknown == std::move (visitor).walk (markedAddress)) {
3873
3877
LLVM_DEBUG (llvm::dbgs ()
3874
3878
<< " Failed access path visit: " << *markedAddress);
Original file line number Diff line number Diff line change @@ -583,6 +583,7 @@ bool siloptimizer::eliminateTemporaryAllocationsFromLet(
583
583
};
584
584
FindCopyAddrWalker walker (copiesToVisit);
585
585
std::move (walker).walk (markedInst);
586
+ // FIXME: should check walk() == AddressUseKind::NonEscaping.
586
587
587
588
bool madeChange = false ;
588
589
@@ -612,6 +613,8 @@ bool siloptimizer::eliminateTemporaryAllocationsFromLet(
612
613
nextCAI = nullptr ;
613
614
SimpleTemporaryAllocStackElimVisitor visitor (state, cai, nextCAI);
614
615
616
+ // FIXME: should check AddressUseKind::NonEscaping != walk() to handle
617
+ // PointerEscape.
615
618
if (AddressUseKind::Unknown == std::move (visitor).walk (cai->getDest ()))
616
619
return false ;
617
620
Original file line number Diff line number Diff line change @@ -211,6 +211,8 @@ inferIsolationInfoForTempAllocStack(AllocStackInst *asi) {
211
211
AddressWalker walker (state);
212
212
213
213
// If we fail to walk, emit an unknown patten error.
214
+ //
215
+ // FIXME: check AddressUseKind::NonEscaping != walk().
214
216
if (AddressUseKind::Unknown == std::move (walker).walk (asi)) {
215
217
return SILIsolationInfo ();
216
218
}
You can’t perform that action at this time.
0 commit comments