-
Notifications
You must be signed in to change notification settings - Fork 18
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
Provide a switch option 'newscope' to determine whether different Bas… #5
base: master
Are you sure you want to change the base?
Conversation
…icBlocks of the same Subprogram have different DIScopes.
Sorry I somehow missed the notification for this PR. It looks fine to me, but I'm curious as to how this makes a difference. Can you provide a small example for understanding? (here in the PR, not in the code). Thank you for the contribution. |
In previous versions of the code, each unseen BasicBlock was assigned a Scope, which caused some variables to be invisible in complex control flow. The modified program allows assigning a Scope to each Subprogram, so different BasicBlocks share the same Scope and variables across blocks will be seen.
|
Do you have an example of such a complex control flow? I'm curious to see how this happens. |
In your example, without using the new feature, when the program runs to: |
Thank you. That helped. This doesn't seem correct to me though.
|
Consider this example: |
Sorry that I'm being persistent, but I still don't understand. Can you post an LLVM-IR example? (because this pass is supposed to add debug information to LLVM-IR as if that were the source itself), and mention which variable should've been "printable" but is not, and at which line. |
Provide a switch option 'newscope' to determine whether different BasicBlocks of the same Subprogram have different DIScopes.