Skip to content

Commit 3ffe5c5

Browse files
committed
[region-isolation] Add increment_profiler_counter support.
1 parent 86ef555 commit 3ffe5c5

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/SILOptimizer/Analysis/RegionAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2346,6 +2346,7 @@ CONSTANT_TRANSLATION(MetatypeInst, Ignored)
23462346
CONSTANT_TRANSLATION(EndApplyInst, Ignored)
23472347
CONSTANT_TRANSLATION(AbortApplyInst, Ignored)
23482348
CONSTANT_TRANSLATION(DebugStepInst, Ignored)
2349+
CONSTANT_TRANSLATION(IncrementProfilerCounterInst, Ignored)
23492350

23502351
//===---
23512352
// Require
@@ -2451,7 +2452,6 @@ CONSTANT_TRANSLATION(DeinitExistentialValueInst, Unhandled)
24512452
CONSTANT_TRANSLATION(UnconditionalCheckedCastAddrInst, Unhandled)
24522453
CONSTANT_TRANSLATION(UncheckedRefCastAddrInst, Unhandled)
24532454
CONSTANT_TRANSLATION(PackElementSetInst, Unhandled)
2454-
CONSTANT_TRANSLATION(IncrementProfilerCounterInst, Unhandled)
24552455
CONSTANT_TRANSLATION(BeginCOWMutationInst, Unhandled)
24562456

24572457
//===---

test/Concurrency/transfernonsendable_instruction_matching.sil

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,4 +1180,11 @@ bb0:
11801180
destroy_value %1 : $KlassContainingKlasses
11811181
%9999 = tuple ()
11821182
return %9999 : $()
1183-
}
1183+
}
1184+
1185+
sil [ossa] @increment_profiler_counter_test : $@convention(thin) @async () -> () {
1186+
bb0:
1187+
increment_profiler_counter 1, "$foo", num_counters 3, hash 0
1188+
%9999 = tuple ()
1189+
return %9999 : $()
1190+
}

0 commit comments

Comments
 (0)