You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CSSPGO] Honor preinliner decision for ThinLTO importing
When pre-inliner decision is used for CSSPGO, we should take that into account for ThinLTO importing as well, so post-link sample loader inliner can favor that decision. This is handled by a small tweak in this patch. It also includes a change to transfer preinliner decision when merging context.
Differential Revision: https://reviews.llvm.org/D109088
Copy file name to clipboardExpand all lines: llvm/test/Transforms/SampleProfile/csspgo-use-preinliner.ll
+4-1
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,12 @@
8
8
; DEFAULT-NOT: inlined into
9
9
10
10
; PREINLINE-NOT: inlined into
11
+
; `[main:3 @ _Z5funcAi]` does not have preinline decision, so it's up for loader inliner to decided.
11
12
; PREINLINE: '_Z5funcAi' inlined into 'main'
13
+
; `[main:3 @ _Z5funcAi:1 @ _Z8funcLeafi]` is inlined according to preinline decision.
12
14
; PREINLINE: '_Z8funcLeafi' inlined into 'main'
13
-
; PREINLINE: '_Z8funcLeafi' inlined into '_Z5funcBi'
15
+
; Even though `[main:3.1 @ _Z5funcBi]` context is marked should inline, `_Z5funcBi` is a noinline function, so we honor that and don't inline.
16
+
; When _Z5funcBi is promoted to be top level context-less profile, `[_Z5funcBi:1 @ _Z8funcLeafi]` becomes synthetic context, so preinline decision is ignored and we don't inline `_Z8funcLeafi`.
0 commit comments