-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
LoopUnroll fails to unroll forced loop due to inlinable calls, leading to linker errors #88141
Labels
Comments
gburgessiv
added a commit
to gburgessiv/llvm-project
that referenced
this issue
Apr 9, 2024
`NumInlineCandidates` counts candidates that are _very likely_ to be inlined. This is a useful metric, but causes linker warnings if: - the loop to be unrolled has had unrolling forced by the user, and - the inliner fails to inline the call (e.g., because it's considered a very cold callsite)
gburgessiv
added a commit
to gburgessiv/llvm-project
that referenced
this issue
May 10, 2024
`NumInlineCandidates` counts candidates that are _very likely_ to be inlined. This is a useful metric, but causes linker warnings if: - the loop to be unrolled has had unrolling forced by the user, and - the inliner fails to inline the call (e.g., because it's considered a very cold callsite) Fixes llvm#88141
gburgessiv
added a commit
to gburgessiv/llvm-project
that referenced
this issue
May 20, 2024
`NumInlineCandidates` counts candidates that are _very likely_ to be inlined. This is a useful metric, but causes linker warnings if: - the loop to be unrolled has had unrolling forced by the user, and - the inliner fails to inline the call (e.g., because it's considered a very cold callsite) Fixes llvm#88141
4 tasks
hello everyone.
the strange thing is that relaunching the build, on the second start-up then, the error disappears. |
gburgessiv
added a commit
to gburgessiv/llvm-project
that referenced
this issue
Nov 18, 2024
`NumInlineCandidates` counts candidates that are _very likely_ to be inlined. This is a useful metric, but causes linker warnings if: - the loop to be unrolled has had unrolling forced by the user, and - the inliner fails to inline the call (e.g., because it's considered a very cold callsite) Fixes llvm#88141
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An AFDO profile roll broke Chromium's build with ThinLTO enabled by introducing linker warnings - which were promoted to errors - about
llvm.loop.unroll.enable
d loops not being unrolled:Unfortunately, I can't provide an 'easy' reproducer of the original breakage, as it only occurs with ThinLTO and a specific AutoFDO profile on a very large program.
What I can provide is some information about investigating this locally:
llvm.loop.unroll.enable
metadata on them.UnrollCostEstimator
. Moreover, the following criteria were met for at least one call per loop (PrepareForLTO
wasfalse
):and unrolling is currently always skipped if that's detected in a loop:
I can totally understand the desire to facilitate the inlining of calls like this, but if a user asks for forced unrolling, IMO that should be respected regardless.
I have a potential fix that I'll upload soon.
The text was updated successfully, but these errors were encountered: