Skip to content

Square bracket numbers (lines of asm) doesn't correspond with what is actually generated #343

Answered by pacak
pozix604 asked this question in Q&A
Discussion options

You must be logged in to vote

They are calculated from the actual lines llvm produces. Those lines contain a bunch of redundant things that cargo-show-asm strips - labels that aren't used (pass -K to see those) and some of the debug info - location directives, etc. You can pass -vvv to see everything.

I could make it so numbers correspond to what the size that will be printed, but removing redundant labels is not linear in cost and can slow things down if your file is super chonky.

Main goal for those numbers is to get you a high level overview where most of the code is and to indicate that there can be several functions with the same name.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pacak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #342 on November 29, 2024 12:28.