File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -455,6 +455,9 @@ bool swift::mayAccessPointer(SILInstruction *instruction) {
455455}
456456
457457bool swift::mayLoadWeakOrUnowned (SILInstruction *instruction) {
458+ if (isa<BuiltinInst>(instruction)) {
459+ return instruction->mayReadOrWriteMemory ();
460+ }
458461 return isa<LoadWeakInst>(instruction)
459462 || isa<LoadUnownedInst>(instruction)
460463 || isa<StrongCopyUnownedValueInst>(instruction)
@@ -464,6 +467,9 @@ bool swift::mayLoadWeakOrUnowned(SILInstruction *instruction) {
464467// / Conservatively, whether this instruction could involve a synchronization
465468// / point like a memory barrier, lock or syscall.
466469bool swift::maySynchronize (SILInstruction *instruction) {
470+ if (isa<BuiltinInst>(instruction)) {
471+ return instruction->mayReadOrWriteMemory ();
472+ }
467473 return FullApplySite::isa (instruction)
468474 || isa<EndApplyInst>(instruction)
469475 || isa<AbortApplyInst>(instruction)
You can’t perform that action at this time.
0 commit comments