-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[ctx_prof] Fix the pre-thinlink "use" case #102511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5 | ||
; There is no profile, but that's OK because the prelink does not care about | ||
; the content of the profile, just that we intend to use one. | ||
; There is no scenario currently of doing ctx profile use without thinlto. | ||
|
@@ -7,19 +7,22 @@ | |
|
||
declare void @bar() | ||
|
||
;. | ||
; CHECK: @__profn_foo = private constant [3 x i8] c"foo" | ||
;. | ||
define void @foo(i32 %a, ptr %fct) { | ||
; CHECK-LABEL: define void @foo( | ||
; CHECK-SAME: i32 [[A:%.*]], ptr [[FCT:%.*]]) local_unnamed_addr { | ||
; CHECK-NEXT: call void @llvm.instrprof.increment(ptr @__profn_foo, i64 728453322856651412, i32 2, i32 0) | ||
; CHECK-NEXT: [[T:%.*]] = icmp eq i32 [[A]], 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did this get hoisted out from the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's the changes in PGOInstrumentation that do that. |
||
; CHECK-NEXT: br i1 [[T]], label %[[YES:.*]], label %[[NO:.*]] | ||
; CHECK: [[YES]]: | ||
; CHECK-NEXT: call void @llvm.instrprof.increment(ptr @__profn_foo, i64 728453322856651412, i32 2, i32 1) | ||
; CHECK-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[FCT]] to i64 | ||
; CHECK-NEXT: call void @llvm.instrprof.value.profile(ptr @__profn_foo, i64 728453322856651412, i64 [[TMP1]], i32 0, i32 0) | ||
; CHECK-NEXT: call void @llvm.instrprof.callsite(ptr @__profn_foo, i64 728453322856651412, i32 2, i32 0, ptr [[FCT]]) | ||
; CHECK-NEXT: call void [[FCT]](i32 0) | ||
; CHECK-NEXT: br label %[[EXIT:.*]] | ||
; CHECK: [[NO]]: | ||
; CHECK-NEXT: call void @llvm.instrprof.increment(ptr @__profn_foo, i64 728453322856651412, i32 2, i32 0) | ||
; CHECK-NEXT: call void @llvm.instrprof.callsite(ptr @__profn_foo, i64 728453322856651412, i32 2, i32 1, ptr @bar) | ||
; CHECK-NEXT: call void @bar() | ||
; CHECK-NEXT: br label %[[EXIT]] | ||
; CHECK: [[EXIT]]: | ||
|
@@ -36,3 +39,6 @@ no: | |
exit: | ||
ret void | ||
} | ||
;. | ||
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nounwind } | ||
;. |
Uh oh!
There was an error while loading. Please reload this page.