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