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) {
455
455
}
456
456
457
457
bool swift::mayLoadWeakOrUnowned (SILInstruction *instruction) {
458
+ if (isa<BuiltinInst>(instruction)) {
459
+ return instruction->mayReadOrWriteMemory ();
460
+ }
458
461
return isa<LoadWeakInst>(instruction)
459
462
|| isa<LoadUnownedInst>(instruction)
460
463
|| isa<StrongCopyUnownedValueInst>(instruction)
@@ -464,6 +467,9 @@ bool swift::mayLoadWeakOrUnowned(SILInstruction *instruction) {
464
467
// / Conservatively, whether this instruction could involve a synchronization
465
468
// / point like a memory barrier, lock or syscall.
466
469
bool swift::maySynchronize (SILInstruction *instruction) {
470
+ if (isa<BuiltinInst>(instruction)) {
471
+ return instruction->mayReadOrWriteMemory ();
472
+ }
467
473
return FullApplySite::isa (instruction)
468
474
|| isa<EndApplyInst>(instruction)
469
475
|| isa<AbortApplyInst>(instruction)
You can’t perform that action at this time.
0 commit comments