Skip to content

Commit

Permalink
[PseudoProbe] Mix block and call probe ID in lexical order (#75092)
Browse files Browse the repository at this point in the history
Before all the call probe ids are after block ids, in this change, it
mixed the call probe and block probe by reordering them in
lexical(line-number) order. For example:
```
main():
BB1
if(...) 
  BB2 foo(..);   
else 
  BB3 bar(...);
BB4
```
Before the profile is
```
main
 1: ..
 2: ..
 3: ...
 4: ...
 5: foo ...
 6: bar ...
 ```
 Now the new order is
```
 main
 1: ..
 2: ..
 3: foo ...
 4: ...
 5: bar ...
 6: ...
```
This can potentially make it more tolerant of profile mismatch, either from stale profile or frontend change. e.g. before if we add one block, even the block is the last one, all the call probes are shifted and mismatched. Moreover, this makes better use of call-anchor based stale profile matching. Blocks are matched based on the closest anchor, there would be more anchors used for the matching, reduce the mismatch scope.
  • Loading branch information
wlei-llvm committed Apr 3, 2024
1 parent 42c7bc0 commit 5bbce06
Show file tree
Hide file tree
Showing 13 changed files with 71 additions and 79 deletions.
8 changes: 4 additions & 4 deletions clang/test/CodeGen/pseudo-probe-emit.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ void foo(int x) {
// CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 1, i32 0, i64 -1)
if (x == 0)
// CHECK: call void @llvm.pseudoprobe(i64 [[#GUID]], i64 2, i32 0, i64 -1)
bar();
bar(); // probe id : 3
else
// CHECK: call void @llvm.pseudoprobe(i64 [[#GUID]], i64 3, i32 0, i64 -1)
go();
// CHECK: call void @llvm.pseudoprobe(i64 [[#GUID]], i64 4, i32 0, i64 -1)
// CHECK: call void @llvm.pseudoprobe(i64 [[#GUID]], i64 4, i32 0, i64 -1)
go(); // probe id : 5
// CHECK: call void @llvm.pseudoprobe(i64 [[#GUID]], i64 6, i32 0, i64 -1)
}
4 changes: 2 additions & 2 deletions llvm/include/llvm/ProfileData/SampleProf.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ struct SampleContextFrame {
LineLocation Location;

SampleContextFrame() : Location(0, 0) {}

SampleContextFrame(FunctionId Func, LineLocation Location)
: Func(Func), Location(Location) {}

Expand Down Expand Up @@ -527,7 +527,7 @@ class SampleContext {
: Func(Name), State(UnknownContext), Attributes(ContextNone) {
assert(!Name.empty() && "Name is empty");
}

SampleContext(FunctionId Func)
: Func(Func), State(UnknownContext), Attributes(ContextNone) {}

Expand Down
6 changes: 2 additions & 4 deletions llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,12 @@ class SampleProfileProber {
void findInvokeNormalDests(DenseSet<BasicBlock *> &InvokeNormalDests);
void computeBlocksToIgnore(DenseSet<BasicBlock *> &BlocksToIgnore,
DenseSet<BasicBlock *> &BlocksAndCallsToIgnore);
void computeProbeIdForCallsites(
const DenseSet<BasicBlock *> &BlocksAndCallsToIgnore);
const Instruction *
getOriginalTerminator(const BasicBlock *Head,
const DenseSet<BasicBlock *> &BlocksToIgnore);
void computeCFGHash(const DenseSet<BasicBlock *> &BlocksToIgnore);
void computeProbeIdForBlocks(const DenseSet<BasicBlock *> &BlocksToIgnore);
void computeProbeIdForCallsites();
void computeProbeId(const DenseSet<BasicBlock *> &BlocksToIgnore,
const DenseSet<BasicBlock *> &BlocksAndCallsToIgnore);

Function *F;

Expand Down
22 changes: 7 additions & 15 deletions llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ SampleProfileProber::SampleProfileProber(Function &Func,
DenseSet<BasicBlock *> BlocksAndCallsToIgnore;
computeBlocksToIgnore(BlocksToIgnore, BlocksAndCallsToIgnore);

computeProbeIdForBlocks(BlocksToIgnore);
computeProbeIdForCallsites(BlocksAndCallsToIgnore);
computeProbeId(BlocksToIgnore, BlocksAndCallsToIgnore);
computeCFGHash(BlocksToIgnore);
}

Expand Down Expand Up @@ -300,27 +299,20 @@ void SampleProfileProber::computeCFGHash(
<< ", Hash = " << FunctionHash << "\n");
}

void SampleProfileProber::computeProbeIdForBlocks(
const DenseSet<BasicBlock *> &BlocksToIgnore) {
for (auto &BB : *F) {
if (BlocksToIgnore.contains(&BB))
continue;
BlockProbeIds[&BB] = ++LastProbeId;
}
}

void SampleProfileProber::computeProbeIdForCallsites(
void SampleProfileProber::computeProbeId(
const DenseSet<BasicBlock *> &BlocksToIgnore,
const DenseSet<BasicBlock *> &BlocksAndCallsToIgnore) {
LLVMContext &Ctx = F->getContext();
Module *M = F->getParent();

for (auto &BB : *F) {
if (!BlocksToIgnore.contains(&BB))
BlockProbeIds[&BB] = ++LastProbeId;

if (BlocksAndCallsToIgnore.contains(&BB))
continue;
for (auto &I : BB) {
if (!isa<CallBase>(I))
continue;
if (isa<IntrinsicInst>(&I))
if (!isa<CallBase>(I) || isa<IntrinsicInst>(&I))
continue;

// The current implementation uses the lower 16 bits of the discriminator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
foo:3200:13
1: 13
2: 7
3: 6
4: 13
5: 7 _Z3barv:2 _Z3foov:5
6: 6 _Z3barv:4 _Z3foov:2
4: 6
6: 13
3: 7 _Z3barv:2 _Z3foov:5
5: 6 _Z3barv:4 _Z3foov:2
!CFGChecksum: 563022570642068
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
foo:3200:13
1: 13
2: 7
3: 6
4: 13
5: 7
6: 6
4: 6
6: 13
7: 7
9: 6
!CFGChecksum: 844530426352218
12 changes: 6 additions & 6 deletions llvm/test/Transforms/SampleProfile/pseudo-probe-dangle.ll
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ Merge:
; JT-LABEL-NO: T
; JT-LABEL-NO: F
; JT-LABEL: Merge
; JT-NOT: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4
; JT-NOT: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 3
; JT-NOT: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 2
; JT: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 -1)
; JT: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 5, i32 0, i64 -1)
; ASM-NOT: .pseudoprobe 6699318081062747564 4
; ASM-NOT: .pseudoprobe 6699318081062747564 3
; ASM-NOT: .pseudoprobe 6699318081062747564 2
; ASM: .pseudoprobe 6699318081062747564 4 0 0
; ASM: .pseudoprobe 6699318081062747564 5 0 0
ret i32 %call
}

;; Check block T and F are gone, and their probes (probe 2 and 3) are gone too.
; MIR-tail: bb.0
; MIR-tail: PSEUDO_PROBE [[#GUID:]], 1, 0, 0
; MIR-tail-NOT: PSEUDO_PROBE [[#GUID:]], 2
; MIR-tail-NOT: PSEUDO_PROBE [[#GUID:]], 3
; MIR-tail: PSEUDO_PROBE [[#GUID:]], 4, 0, 0
; MIR-tail-NOT: PSEUDO_PROBE [[#GUID:]], 4
; MIR-tail: PSEUDO_PROBE [[#GUID:]], 5, 0, 0


define i32 @test(i32 %a, i32 %b, i32 %c) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "fra
; DEBUG: ![[INST]] = !DILocation(line: 4, column: 15, scope: ![[INSTBLOCK:[0-9]+]])
; DEBUG: ![[INSTBLOCK]] = !DILexicalBlockFile({{.*}} discriminator: 4)


; PROBE: ![[CALL1]] = !DILocation(line: 4, column: 3, scope: ![[CALL1BLOCK:[0-9]+]])
; PROBE: ![[CALL1BLOCK]] = !DILexicalBlockFile({{.*}} discriminator: 186646575)
; PROBE: ![[CALL1BLOCK]] = !DILexicalBlockFile({{.*}} discriminator: 186646559)
; PROBE: ![[CALL2]] = !DILocation(line: 4, column: 9, scope: ![[CALL2BLOCK:[0-9]+]])
; PROBE: ![[CALL2BLOCK]] = !DILexicalBlockFile({{.*}} discriminator: 186646583)
; PROBE: ![[CALL2BLOCK]] = !DILexicalBlockFile({{.*}} discriminator: 186646567)
; PROBE: ![[INST]] = !DILocation(line: 4, column: 15, scope: ![[INSTBLOCK:[0-9]+]])
; PROBE: ![[INSTBLOCK]] = !DILexicalBlockFile({{.*}} discriminator: 4)
12 changes: 8 additions & 4 deletions llvm/test/Transforms/SampleProfile/pseudo-probe-invoke.ll
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ entry:

if.then: ; preds = %entry
; CHECK: call void @llvm.pseudoprobe(i64 -1069303473483922844, i64 2
; callsite probe 3
invoke void @_Z3foov()
to label %invoke.cont unwind label %terminate.lpad, !dbg !24

invoke.cont: ; preds = %if.then
; callsite probe 4
; CHECK-NOT: call void @llvm.pseudoprobe(i64 -1069303473483922844,
invoke void @_Z3bazv()
to label %invoke.cont1 unwind label %terminate.lpad, !dbg !26
Expand All @@ -31,7 +33,8 @@ invoke.cont1: ; preds = %invoke.cont
br label %if.end, !dbg !27

if.else: ; preds = %entry
; CHECK: call void @llvm.pseudoprobe(i64 -1069303473483922844, i64 3
; CHECK: call void @llvm.pseudoprobe(i64 -1069303473483922844, i64 5
; callsite probe 6
invoke void @_Z3foov()
to label %invoke.cont2 unwind label %terminate.lpad, !dbg !28

Expand All @@ -40,7 +43,8 @@ invoke.cont2: ; preds = %if.else
br label %if.end

if.end: ; preds = %invoke.cont2, %invoke.cont1
; CHECK: call void @llvm.pseudoprobe(i64 -1069303473483922844, i64 4
; CHECK: call void @llvm.pseudoprobe(i64 -1069303473483922844, i64 7
; callsite probe 8
invoke void @_Z3foov()
to label %invoke.cont3 unwind label %terminate.lpad, !dbg !29

Expand All @@ -51,14 +55,14 @@ invoke.cont3: ; preds = %if.end
br i1 %tobool4, label %if.then5, label %if.end6, !dbg !32

if.then5: ; preds = %invoke.cont3
; CHECK: call void @llvm.pseudoprobe(i64 -1069303473483922844, i64 5
; CHECK: call void @llvm.pseudoprobe(i64 -1069303473483922844, i64 9
%2 = load volatile i32, ptr @x, align 4, !dbg !33, !tbaa !19
%inc = add nsw i32 %2, 1, !dbg !33
store volatile i32 %inc, ptr @x, align 4, !dbg !33, !tbaa !19
br label %if.end6, !dbg !35

if.end6: ; preds = %if.then5, %invoke.cont3
; CHECK: call void @llvm.pseudoprobe(i64 -1069303473483922844, i64 6
; CHECK: call void @llvm.pseudoprobe(i64 -1069303473483922844, i64 10
ret void, !dbg !36

terminate.lpad: ; preds = %if.end, %if.else, %invoke.cont, %if.then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if.else:
br label %return

return:
call void @llvm.pseudoprobe(i64 6699318081062747564, i64 4, i32 0, i64 -1)
call void @llvm.pseudoprobe(i64 6699318081062747564, i64 6, i32 0, i64 -1)
%1 = load i32, ptr %retval, align 4
ret i32 %1
}
Expand All @@ -55,13 +55,12 @@ attributes #0 = {"use-sample-profile"}
!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !5, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
!10 = !{!"function_entry_count", i64 14}
!11 = !{!"branch_weights", i32 100, i32 0}
;; A discriminator of 186646575 which is 0x6f80057 in hexdecimal, stands for an indirect call probe
;; with an index of 5 and probe factor of 1.0.
!12 = !DILexicalBlockFile(scope: !4, file: !5, discriminator: 186646575)
;; A discriminator of 186646559 which is 0xB20001F in hexdecimal, stands for an indirect call probe
;; with an index of 3 and probe factor of 1.0.
!12 = !DILexicalBlockFile(scope: !4, file: !5, discriminator: 186646559)
!13 = distinct !DILocation(line: 10, column: 11, scope: !12)
;; A discriminator of 134217775 which is 0x6f80057 in hexdecimal, stands for an indirect call probe
;; with an index of 5 and probe factor of 0.
!14 = !DILexicalBlockFile(scope: !4, file: !5, discriminator: 134217775)
;; A discriminator of 134217759 which is 0x800001F in hexdecimal, stands for an indirect call probe
;; with an index of 3 and probe factor of 0.
!14 = !DILexicalBlockFile(scope: !4, file: !5, discriminator: 134217759)
!15 = distinct !DILocation(line: 10, column: 11, scope: !14)
!16 = !{!"VP", i32 0, i64 7, i64 9191153033785521275, i64 5, i64 -1069303473483922844, i64 2}

22 changes: 11 additions & 11 deletions llvm/test/Transforms/SampleProfile/pseudo-probe-profile.ll
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ if.then:
if.else:
; CHECK: call {{.*}}, !dbg ![[#PROBE2:]], !prof ![[PROF2:[0-9]+]]
call void %f(i32 2)
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 3, i32 0, i64 -1)
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 -1)
store i32 2, ptr %retval, align 4
br label %return

return:
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 -1)
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 6, i32 0, i64 -1)
%1 = load i32, ptr %retval, align 4
ret i32 %1
}
Expand All @@ -36,14 +36,14 @@ attributes #0 = {"use-sample-profile"}

; CHECK: ![[PD1]] = !{!"branch_weights", i32 8, i32 7}
; CHECK: ![[#PROBE1]] = !DILocation(line: 0, scope: ![[#SCOPE1:]])
;; A discriminator of 119537695 which is 0x720001f in hexdecimal, stands for an indirect call probe
;; with an index of 3.
; CHECK: ![[#SCOPE1]] = !DILexicalBlockFile(scope: ![[#]], file: ![[#]], discriminator: 119537695)
; CHECK: ![[PROF1]] = !{!"VP", i32 0, i64 7, i64 9191153033785521275, i64 5, i64 -1069303473483922844, i64 2}
;; A discriminator of 119537711 which is 0x720002f in hexdecimal, stands for an indirect call probe
;; with an index of 5.
; CHECK: ![[#SCOPE1]] = !DILexicalBlockFile(scope: ![[#]], file: ![[#]], discriminator: 119537711)
; CHECK: ![[PROF1]] = !{!"VP", i32 0, i64 7, i64 9191153033785521275, i64 5, i64 -1069303473483922844, i64 2}
;; A discriminator of 119537719 which is 0x7200037 in hexdecimal, stands for an indirect call probe
;; with an index of 6.
; CHECK: ![[#PROBE2]] = !DILocation(line: 0, scope: ![[#SCOPE2:]])
; CHECK: ![[#SCOPE2]] = !DILexicalBlockFile(scope: ![[#]], file: ![[#]], discriminator: 119537719)
; CHECK: ![[#SCOPE2]] = !DILexicalBlockFile(scope: ![[#]], file: ![[#]], discriminator: 119537711)
; CHECK: ![[PROF2]] = !{!"VP", i32 0, i64 6, i64 -1069303473483922844, i64 4, i64 9191153033785521275, i64 2}

!llvm.module.flags = !{!9, !10}
Expand Down Expand Up @@ -83,7 +83,7 @@ attributes #0 = {"use-sample-profile"}
;YAML-NEXT: - String: 'Applied '
;YAML-NEXT: - NumSamples: '7'
;YAML-NEXT: - String: ' samples from profile (ProbeId='
;YAML-NEXT: - ProbeId: '5'
;YAML-NEXT: - ProbeId: '3'
;YAML-NEXT: - String: ', Factor='
;YAML-NEXT: - Factor: '1.000000e+00'
;YAML-NEXT: - String: ', OriginalSamples='
Expand Down Expand Up @@ -113,7 +113,7 @@ attributes #0 = {"use-sample-profile"}
;YAML-NEXT: - String: 'Applied '
;YAML-NEXT: - NumSamples: '6'
;YAML-NEXT: - String: ' samples from profile (ProbeId='
;YAML-NEXT: - ProbeId: '6'
;YAML-NEXT: - ProbeId: '5'
;YAML-NEXT: - String: ', Factor='
;YAML-NEXT: - Factor: '1.000000e+00'
;YAML-NEXT: - String: ', OriginalSamples='
Expand All @@ -128,7 +128,7 @@ attributes #0 = {"use-sample-profile"}
;YAML-NEXT: - String: 'Applied '
;YAML-NEXT: - NumSamples: '6'
;YAML-NEXT: - String: ' samples from profile (ProbeId='
;YAML-NEXT: - ProbeId: '3'
;YAML-NEXT: - ProbeId: '4'
;YAML-NEXT: - String: ', Factor='
;YAML-NEXT: - Factor: '1.000000e+00'
;YAML-NEXT: - String: ', OriginalSamples='
Expand All @@ -143,7 +143,7 @@ attributes #0 = {"use-sample-profile"}
;YAML-NEXT: - String: 'Applied '
;YAML-NEXT: - NumSamples: '13'
;YAML-NEXT: - String: ' samples from profile (ProbeId='
;YAML-NEXT: - ProbeId: '4'
;YAML-NEXT: - ProbeId: '6'
;YAML-NEXT: - String: ', Factor='
;YAML-NEXT: - Factor: '1.000000e+00'
;YAML-NEXT: - String: ', OriginalSamples='
Expand Down
11 changes: 5 additions & 6 deletions llvm/test/Transforms/SampleProfile/pseudo-probe-update.ll
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,31 @@ T1:
%v1 = call i32 @f1()
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 2, i32 0, i64 -1)
;; The distribution factor -8513881372706734080 stands for 53.85%, whic is from 7/6+7.
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 -8513881372706734080)
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 6, i32 0, i64 -8513881372706734080)
%cond3 = icmp eq i32 %v1, 412
br label %Merge
F1:
; CHECK: %v2 = call i32 @f2(), !prof ![[#PROF2:]]
%v2 = call i32 @f2()
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 3, i32 0, i64 -1)
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 -1)
;; The distribution factor 8513881922462547968 stands for 46.25%, which is from 6/6+7.
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 8513881922462547968)
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 6, i32 0, i64 8513881922462547968)
br label %Merge
Merge:

%A = phi i1 [%cond3, %T1], [%cond2, %F1]
%B = phi i32 [%v1, %T1], [%v2, %F1]
br i1 %A, label %T2, label %F2
T2:
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 5, i32 0, i64 -1)
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 7, i32 0, i64 -1)
call void @f3()
ret i32 %B
F2:
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 6, i32 0, i64 -1)
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 9, i32 0, i64 -1)
ret i32 %B
}

; CHECK: ![[#PROF1]] = !{!"branch_weights", i32 7}
; CHECK: ![[#PROF2]] = !{!"branch_weights", i32 6}

attributes #0 = {"use-sample-profile"}

16 changes: 8 additions & 8 deletions llvm/test/Transforms/SampleProfile/pseudo-probe-verify.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

; VERIFY: *** Pseudo Probe Verification After LoopFullUnrollPass ***
; VERIFY: Function foo:
; VERIFY-DAG: Probe 6 previous factor 1.00 current factor 5.00
; VERIFY-DAG: Probe 5 previous factor 1.00 current factor 5.00
; VERIFY-DAG: Probe 4 previous factor 1.00 current factor 5.00

declare void @foo2() nounwind
Expand All @@ -27,15 +27,15 @@ bb7.preheader:

bb10:
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 -1)
; CHECK: call void @foo2(), !dbg ![[#PROBE6:]]
; CHECK: call void @foo2(), !dbg ![[#PROBE6:]]
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 -1)
; CHECK: call void @foo2(), !dbg ![[#PROBE6:]]
; CHECK: call void @foo2(), !dbg ![[#PROBE6:]]
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 -1)
; CHECK: call void @foo2(), !dbg ![[#PROBE6:]]
; CHECK: call void @foo2(), !dbg ![[#PROBE6:]]
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 -1)
; CHECK: call void @foo2(), !dbg ![[#PROBE6:]]
; CHECK: call void @foo2(), !dbg ![[#PROBE6:]]
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 4, i32 0, i64 -1)
; CHECK: call void @foo2(), !dbg ![[#PROBE6:]]
; CHECK: call void @foo2(), !dbg ![[#PROBE6:]]
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 2, i32 0, i64 -1)
%indvars.iv = phi i64 [ 0, %bb7.preheader ], [ %indvars.iv.next, %bb10 ]
%tmp1.14 = phi i32 [ %tmp1.06, %bb7.preheader ], [ %spec.select, %bb10 ]
Expand All @@ -50,14 +50,14 @@ bb10:
br i1 %exitcond.not, label %bb3.loopexit, label %bb10, !llvm.loop !13

bb24:
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 5, i32 0, i64 -1)
; CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 6, i32 0, i64 -1)
ret void
}

;; A discriminator of 186646583 which is 0xb200037 in hexdecimal, stands for a direct call probe
;; with an index of 6 and a scale of -1%.
; CHECK: ![[#PROBE6]] = !DILocation(line: 2, column: 20, scope: ![[#SCOPE:]])
; CHECK: ![[#SCOPE]] = !DILexicalBlockFile(scope: ![[#]], file: ![[#]], discriminator: 186646583)
; CHECK: ![[#SCOPE]] = !DILexicalBlockFile(scope: ![[#]], file: ![[#]], discriminator: 186646575)

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!9, !10}
Expand Down

0 comments on commit 5bbce06

Please sign in to comment.