Provide a switch option 'newscope' to determine whether different Bas…#5
Provide a switch option 'newscope' to determine whether different Bas…#5RonxBulld wants to merge 1 commit intovaivaswatha:masterfrom
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.