Page MenuHomePhabricator

alok (Alok Kumar Sharma)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 13 2019, 9:52 PM (25 w, 23 h)

Recent Activity

Mar 1 2020

alok updated the diff for D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.

Updated for the comments from @vsk . Deleted definition and usage of function LdStHasDebugValue.

Mar 1 2020, 10:18 PM · Restricted Project, debug-info
alok added a comment to D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.
In D74030#1892727, @vsk wrote:
In D74030#1889750, @vsk wrote:

Now,

  1. Avoid insertion of duplicate dbg.value if immediate next instruction is identical dbg.value. (avoids generating duplicates for same load/store, forward scan is not done)

Why is it necessary to do (1)? If the goal is to have cleaner IR after LowerDbgDeclare, it seems like (2) achieves that.

Yes for me also it seems a bit difficult decision. There were few reasons which made me think to keep 1)

a) It looks clearer to avoid generating than first let it generate and later delete when there is no performance penalty. In case of avoiding generation of dbg.value for same load/store again and again there is a pattern (immediate previous/next instruction in question).

I'm not sure I understand how the IR could look clearer. It shouldn't make any difference if the redundant instructions are eliminated after all insertions occur. Unless there's some kind of significant compile time reduction to be had by keeping LdStHasDebugValue, I think we should get rid of it, as it'd just be adding unnecessary complexity.

b) There is existing functionality for avoiding generation in function named "LdStHasDebugValue", though the name suggests covering both load and store both but it had handling only for store, adding the case for load justifies its name and completes the functionality. Either we should remove this function completely or complete it.

Agreed! Strong +1 to this, it's just that I suspect deleting LdStHasDebugValue is the simpler way to go.

Mar 1 2020, 10:09 PM · Restricted Project, debug-info

Feb 25 2020

alok added a comment to D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.
In D74030#1889750, @vsk wrote:

Now,

  1. Avoid insertion of duplicate dbg.value if immediate next instruction is identical dbg.value. (avoids generating duplicates for same load/store, forward scan is not done)

Why is it necessary to do (1)? If the goal is to have cleaner IR after LowerDbgDeclare, it seems like (2) achieves that.

Feb 25 2020, 7:24 AM · Restricted Project, debug-info

Feb 23 2020

alok updated the diff for D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.

This is updated to re-base and addressing common concern about performance and suggestion form @vsk to use RemoveRedundantDbgInstrs.

Feb 23 2020, 11:21 PM · Restricted Project, debug-info
alok added a comment to D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.
In D74030#1888527, @vsk wrote:

@alok I had a quick stab at this to see what it would take, and the result turned out to be relatively clean: https://github.com/vedantk/llvm-project/commit/85d7fe06810fa7f6166508be73eef80f676b0fc6.diff. This handles the situation in your 'duplicate_dbgvalue.ll' test case. Lmk what you think. Feel free to commandeer the patch if you'd like, or if you don't have the bandwidth for that I can kick off a fresh review. Thanks!

Feb 23 2020, 9:21 PM · Restricted Project, debug-info

Feb 11 2020

alok updated the diff for D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.

Updated to incorporate review comments from Adrian (@aprantl) .

Feb 11 2020, 9:51 PM · Restricted Project, debug-info
alok added a comment to D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.

Thanks! No further comments from me.

I'll leave a chance for others that are more familiar with this code to have their say though.

Feb 11 2020, 8:22 PM · Restricted Project, debug-info
alok updated the diff for D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.

This version is updated to incorporate comments from David (@dstenb ).

Feb 11 2020, 2:33 AM · Restricted Project, debug-info
alok added inline comments to D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.
Feb 11 2020, 2:10 AM · Restricted Project, debug-info

Feb 10 2020

alok added a comment to D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.

Hi David (@dstenb), I have incorporated all your comments. I have also added you as reviewer. Kindly give your feedback.

Feb 10 2020, 10:00 PM · Restricted Project, debug-info

Feb 6 2020

alok updated the diff for D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.

Updated to incorporate comments from @dstenb

Feb 6 2020, 9:49 PM · Restricted Project, debug-info
alok added inline comments to D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.
Feb 6 2020, 8:46 PM · Restricted Project, debug-info
alok added a reviewer for D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value: dstenb.
Feb 6 2020, 8:42 PM · Restricted Project, debug-info

Feb 5 2020

alok created D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value.
Feb 5 2020, 2:12 AM · Restricted Project, debug-info

Jan 9 2020

alok updated the diff for D72055: [DebugInfo] Support for DW_OP_implicit_pointer (for temp references & dynamic allocations).

Re-based and cleanup.

Jan 9 2020, 8:30 PM · debug-info, Restricted Project
alok updated the diff for D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN).

Re-based and some cleanup.

Jan 9 2020, 8:30 PM · debug-info, Restricted Project

Jan 6 2020

alok updated the diff for D70643: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_implicit_pointer).

Updated to re-base and include a test case as suggested by @aprantl.

Jan 6 2020, 8:51 PM · debug-info, Restricted Project
alok added a comment to D70643: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_implicit_pointer).

Can you please add an assembler round-trip test to test/IR that runs llvm-as | llvm-dis | llvm-as - | llvm-dis ? There are a bunch of examples in that directory.

Jan 6 2020, 8:43 PM · debug-info, Restricted Project

Jan 3 2020

alok updated the diff for D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN).

This is re-based and updated to apply LLVM_arg0 to existing DWARF operator and to upgrade for older styled DWARF expressions. This is done as suggested by @aprantl .

Jan 3 2020, 3:37 AM · debug-info, Restricted Project

Jan 2 2020

alok updated the diff for D72055: [DebugInfo] Support for DW_OP_implicit_pointer (for temp references & dynamic allocations).

Re-based and updated.

Jan 2 2020, 12:03 PM · debug-info, Restricted Project
alok updated the diff for D70644: [DebugInfo] Support for DW_OP_implicit_pointer (llvm.dbg_derefval).

Rebased and updated.

Jan 2 2020, 12:03 PM · Restricted Project, debug-info, Restricted Project

Jan 1 2020

alok added a parent revision for D72055: [DebugInfo] Support for DW_OP_implicit_pointer (for temp references & dynamic allocations): D70419: [DebugInfo] Support for DW_OP_implicit_pointer (for InstComb optimization).
Jan 1 2020, 10:30 AM · debug-info, Restricted Project
alok added a child revision for D70419: [DebugInfo] Support for DW_OP_implicit_pointer (for InstComb optimization): D72055: [DebugInfo] Support for DW_OP_implicit_pointer (for temp references & dynamic allocations).
Jan 1 2020, 10:30 AM · debug-info, Restricted Project
alok created D72055: [DebugInfo] Support for DW_OP_implicit_pointer (for temp references & dynamic allocations).
Jan 1 2020, 10:24 AM · debug-info, Restricted Project
alok updated the diff for D70644: [DebugInfo] Support for DW_OP_implicit_pointer (llvm.dbg_derefval).

Update to re-base and minor correction.

Jan 1 2020, 10:14 AM · Restricted Project, debug-info, Restricted Project

Dec 18 2019

alok updated the diff for D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).

Updated to re-base and included some changes separated from D70644 to keep similar changes together as suggested by @jmorse.

Dec 18 2019, 4:24 AM · debug-info, Restricted Project
alok updated the diff for D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).

Updated to re-base and incorporated comments from @StephenTozer

Dec 18 2019, 4:21 AM · debug-info, Restricted Project
alok added inline comments to D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).
Dec 18 2019, 3:26 AM · debug-info, Restricted Project

Dec 17 2019

alok updated the diff for D70644: [DebugInfo] Support for DW_OP_implicit_pointer (llvm.dbg_derefval).

This version is updated to rebase and to incorporate comments from @jmorse and @StephenTozer.

Dec 17 2019, 12:01 PM · Restricted Project, debug-info, Restricted Project
alok added inline comments to D70644: [DebugInfo] Support for DW_OP_implicit_pointer (llvm.dbg_derefval).
Dec 17 2019, 2:32 AM · Restricted Project, debug-info, Restricted Project

Dec 12 2019

alok created D71450: Modification of bad code in Reassociate.cpp to avoid potential bug..
Dec 12 2019, 10:02 PM · Restricted Project

Dec 5 2019

alok added a comment to D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN).

Thanks. This part looks good, but the bitcode upgrade is still missing.

Sorry as I could not include that in first set of modifications. I was just thinking about which operations can be upgraded. One candidate for this was new expression DW_OP_LLVM_implicit_pointer which comes later that the current patch so escapes the need for upgrade. Should I look for existing operations for potential candidates for upgrade. or should i re-arrange the DW_OP_LLVM_implicit_pointer patch such as first it should not use DW_OP_LLVM_arg0 and then after current patch it needs upgrade. Could you please clear my doubt here ?

The upgrade I was thinking about here is reading old bitcode that contains

llvm.dbg.value(%foo, DILocalVariable(...), DIExpression(DW_OP_deref))

and upgrades it to

llvm.dbg.value(%foo, DILocalVariable(...), DIExpression(DW_OP_arg0, DW_OP_deref))

However, for this to work, we also need to implement support for DW_OP_argN to AsmPrinter to interpret the new operands and DIBuilder.

My assumption is that after this change DIExpression() is illegal and should be replaced by DIExpression(DW_OP_LLVM_arg0).
This transformation will cause a lot of churn in the Clang and LLVM testsuite (most of which you will be able to fix with a a sed script), but it will allow to resolve the ambiguity between:

!DIGlobalVariableExpression(!DIGlobalVariable("a"), !DIExpression())
!DIGlobalVariableExpression(!DIGlobalVariable("a"), !DIExpression(DW_OP_constu 42, DW_OP_stack_value))
!DIGlobalVariableExpression(!DIGlobalVariable("a"), !DIExpression(DW_OP_constu 42, DW_OP_plus, DW_OP_stack_value))

in the new scheme, these expressions would be

!DIExpression(DW_OP_LLVM_arg0)
!DIExpression(DW_OP_constu 42, DW_OP_stack_value) # constant, no arg!
!DIExpression(DW_OP_LLVM_arg0, DW_OP_constu 42, DW_OP_plus, DW_OP_stack_value))

respectively. We currently disambiguate between these cases by context: if the DIGlobalVariableExpression is a !dbg attachment of an llvm::Global, the global is the implicit arg0, otherwise there is no implict argument.

Since this is going to be a lot of work, we could also opt for a smaller, incremental change first that introduces only DW_OP_LLVM_arg1..DW_OP_LLVM_arg7 and keep the DW_OP_LLVM_arg0 implicit. Then we don't need to worry about bitcode upgrades now.

Dec 5 2019, 8:24 PM · debug-info, Restricted Project

Dec 4 2019

alok added a comment to D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN).

Thanks. This part looks good, but the bitcode upgrade is still missing.

Dec 4 2019, 8:55 AM · debug-info, Restricted Project

Dec 3 2019

alok updated the diff for D70833: [DebugInfo] Support for DW_OP_LLVM_explicit_pointer (temp2reg)..

Updated to rename proposed LLVM Dwarf extension to DW_OP_LLVM_explicit_pointer.

Dec 3 2019, 11:39 PM · Restricted Project, debug-info
alok updated the diff for D70643: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_implicit_pointer).

Update includes comments from @jmorse.

Dec 3 2019, 9:48 PM · debug-info, Restricted Project
alok added inline comments to D70643: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_implicit_pointer).
Dec 3 2019, 9:40 PM · debug-info, Restricted Project
alok updated the diff for D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN).

This is updated to incorporate comments from @aprantl.

Dec 3 2019, 3:27 AM · debug-info, Restricted Project
alok added a comment to D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN).

Thanks! This will need some bitcode-compatibility planning as well:

We'll need to bump the version number, and then in MetadataLoader.cpp / upradeDIExpression() add an a DW_OP_LLVM_arg0 at the beginning for all older versions.
This should be tested with a .bc file that contains an old-form DIExpression, run through llvm-dis | llvm-as | llvm-dis and checked that the expression is upgraded correctly.

Dec 3 2019, 3:18 AM · debug-info, Restricted Project

Nov 28 2019

alok added a parent revision for D70833: [DebugInfo] Support for DW_OP_LLVM_explicit_pointer (temp2reg).: D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).
Nov 28 2019, 11:36 AM · Restricted Project, debug-info
alok added a child revision for D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase): D70833: [DebugInfo] Support for DW_OP_LLVM_explicit_pointer (temp2reg)..
Nov 28 2019, 11:36 AM · debug-info, Restricted Project
alok created D70833: [DebugInfo] Support for DW_OP_LLVM_explicit_pointer (temp2reg)..
Nov 28 2019, 11:25 AM · Restricted Project, debug-info

Nov 26 2019

alok updated the diff for D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).

This is updated to incorporate review comments from @Orlando .

Nov 26 2019, 1:47 AM · debug-info, Restricted Project
alok added a comment to D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).

Hi @alok,

Adrian said:

Thanks! Let's cycle back to this after the llvm-dev thread that @dblaikie started has been resolved.

Reading the thread I'm not sure if it counts as having been 'resolved', so hopefully these comments are not out of place.
To help keep things running smoothly please make sure:
a) variable names are capitalised, and
b) comments are written as sentences (capitals, punctuation),

Nov 26 2019, 1:38 AM · debug-info, Restricted Project

Nov 25 2019

alok updated the diff for D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN).

Updated to incorporated review comment.

Nov 25 2019, 2:16 AM · debug-info, Restricted Project
alok added inline comments to D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN).
Nov 25 2019, 2:15 AM · debug-info, Restricted Project

Nov 24 2019

alok updated the diff for D70419: [DebugInfo] Support for DW_OP_implicit_pointer (for InstComb optimization).

Updated to rebase due to change in parent patch D70260.

Nov 24 2019, 10:18 PM · debug-info, Restricted Project
alok updated the diff for D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement)..

Updated to incorporate comments from @Orlando .

Nov 24 2019, 10:10 PM · Restricted Project, debug-info
alok added a comment to D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement)..

Hi @alok. I haven't been following the DW_OP_implicit_pointer discussion too closely, so just some inline nitpick comments/questions from me.

Thanks,
Orlando

Nov 24 2019, 10:08 PM · Restricted Project, debug-info
alok added a reviewer for D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement).: Orlando.
Nov 24 2019, 9:25 PM · Restricted Project, debug-info
alok updated the diff for D70419: [DebugInfo] Support for DW_OP_implicit_pointer (for InstComb optimization).

Updated to rebase due to changes in trunk and parent patches.

Nov 24 2019, 10:37 AM · debug-info, Restricted Project
alok updated the diff for D70385: [DebugInfo] Support for DW_OP_implicit_pointer (for mem2reg optimization).

Updated to rebase due to changes in trunk and parent patches.

Nov 24 2019, 10:37 AM · debug-info, Restricted Project
alok updated the diff for D70384: [DebugInfo] Support for DW_OP_implicit_pointer (for SROA optimization).

Updated to rebase due to changes in trunk and parent patches.

Nov 24 2019, 10:37 AM · debug-info, Restricted Project
alok updated the diff for D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement)..

Updated to re-base due to changes in trunk and parent patches.

Nov 24 2019, 10:28 AM · Restricted Project, debug-info
alok updated the diff for D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).

updated to re-base this due to changes in trunk and parent patches.

Nov 24 2019, 10:19 AM · debug-info, Restricted Project
alok updated the diff for D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).

Updated after splitting out versions for DW_OP_LLVM_implicit_pointer, DW_OP_LLVM_argN and llvm.dbg.derefval intrinsic.

Nov 24 2019, 10:10 AM · debug-info, Restricted Project
alok added a parent revision for D70643: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_implicit_pointer): D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN).
Nov 24 2019, 10:01 AM · debug-info, Restricted Project
alok added a child revision for D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN): D70643: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_implicit_pointer).
Nov 24 2019, 10:01 AM · debug-info, Restricted Project
alok added a parent revision for D70644: [DebugInfo] Support for DW_OP_implicit_pointer (llvm.dbg_derefval): D70643: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_implicit_pointer).
Nov 24 2019, 10:01 AM · Restricted Project, debug-info, Restricted Project
alok added a child revision for D70643: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_implicit_pointer): D70644: [DebugInfo] Support for DW_OP_implicit_pointer (llvm.dbg_derefval).
Nov 24 2019, 10:01 AM · debug-info, Restricted Project
alok added a parent revision for D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode): D70644: [DebugInfo] Support for DW_OP_implicit_pointer (llvm.dbg_derefval).
Nov 24 2019, 10:01 AM · debug-info, Restricted Project
alok added a child revision for D70644: [DebugInfo] Support for DW_OP_implicit_pointer (llvm.dbg_derefval): D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).
Nov 24 2019, 10:01 AM · Restricted Project, debug-info, Restricted Project
alok created D70644: [DebugInfo] Support for DW_OP_implicit_pointer (llvm.dbg_derefval).
Nov 24 2019, 10:01 AM · Restricted Project, debug-info, Restricted Project
alok created D70643: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_implicit_pointer).
Nov 24 2019, 9:51 AM · debug-info, Restricted Project
alok created D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN).
Nov 24 2019, 9:42 AM · debug-info, Restricted Project

Nov 18 2019

alok added a child revision for D70385: [DebugInfo] Support for DW_OP_implicit_pointer (for mem2reg optimization): D70419: [DebugInfo] Support for DW_OP_implicit_pointer (for InstComb optimization).
Nov 18 2019, 8:54 PM · debug-info, Restricted Project
alok added a parent revision for D70419: [DebugInfo] Support for DW_OP_implicit_pointer (for InstComb optimization): D70385: [DebugInfo] Support for DW_OP_implicit_pointer (for mem2reg optimization).
Nov 18 2019, 8:54 PM · debug-info, Restricted Project
alok created D70419: [DebugInfo] Support for DW_OP_implicit_pointer (for InstComb optimization).
Nov 18 2019, 8:47 PM · debug-info, Restricted Project
alok added a parent revision for D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase): D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).
Nov 18 2019, 3:50 AM · debug-info, Restricted Project
alok added a parent revision for D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement).: D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).
Nov 18 2019, 3:50 AM · Restricted Project, debug-info
alok added a child revision for D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode): D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).
Nov 18 2019, 3:50 AM · debug-info, Restricted Project
alok added a child revision for D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase): D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement)..
Nov 18 2019, 3:50 AM · debug-info, Restricted Project
alok added a child revision for D70384: [DebugInfo] Support for DW_OP_implicit_pointer (for SROA optimization): D70385: [DebugInfo] Support for DW_OP_implicit_pointer (for mem2reg optimization).
Nov 18 2019, 3:50 AM · debug-info, Restricted Project
alok added a parent revision for D70385: [DebugInfo] Support for DW_OP_implicit_pointer (for mem2reg optimization): D70384: [DebugInfo] Support for DW_OP_implicit_pointer (for SROA optimization).
Nov 18 2019, 3:50 AM · debug-info, Restricted Project
alok added a parent revision for D70384: [DebugInfo] Support for DW_OP_implicit_pointer (for SROA optimization): D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement)..
Nov 18 2019, 3:50 AM · debug-info, Restricted Project
alok added a child revision for D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement).: D70384: [DebugInfo] Support for DW_OP_implicit_pointer (for SROA optimization).
Nov 18 2019, 3:50 AM · Restricted Project, debug-info
alok created D70385: [DebugInfo] Support for DW_OP_implicit_pointer (for mem2reg optimization).
Nov 18 2019, 3:41 AM · debug-info, Restricted Project
alok created D70384: [DebugInfo] Support for DW_OP_implicit_pointer (for SROA optimization).
Nov 18 2019, 3:41 AM · debug-info, Restricted Project
alok updated the diff for D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).

Updated to

  • Rebase
  • To remove trailing space
  • typecasted return value of getData to uint8_t
Nov 18 2019, 3:33 AM · debug-info, Restricted Project
alok updated the diff for D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement)..

-Updated to use "git show" in place of "git diff" used earlier

Nov 18 2019, 3:24 AM · Restricted Project, debug-info

Nov 14 2019

alok added a comment to D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).

Review comments from @aprantl have been incorporated.

Nov 14 2019, 11:29 AM · debug-info, Restricted Project
alok updated the summary of D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement)..
Nov 14 2019, 11:20 AM · Restricted Project, debug-info
alok created D70260: [DebugInfo] Support for DW_OP_implicit_pointer (salvagDebugInfo improvement)..
Nov 14 2019, 11:11 AM · Restricted Project, debug-info

Nov 12 2019

alok updated the diff for D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).

Review comments from @aprantl have been incorporated.

Nov 12 2019, 11:11 PM · debug-info, Restricted Project
alok added a comment to D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).

My first thought was that this might be an opportunity to finally implement explicit dbg.value arguments. (There is prior discussion of this online somewhere but I couldn't find it in my mailbox).

The idea behind a explicit dbg.value arguments is to move away from the implicit first argument of dbg.value to a format where that makes them explicit and thus more flexible.

For example, currently we would write:

call @llvm.dbg.value(%1, !DILocalVariable(name: "x"), !DIExpression(DW_OP_uconst, 4, DW_OP_plus)

which (assuming %1 compiles to reg0) may generate something like

DW_TAG_variable
  DW_AT_name("x")
  DW_AT_location(DW_OP_reg0, DW_OP_uconst, 4, DW_OP_plus)

Note the implicit first element in the DIExpression.

An explicit notation would be something like:

call @llvm.dbg.value(%1, !DILocalVariable(name: "x"), !DIExpression(DW_OP_LLVM_arg0, DW_OP_uconst, 4, DW_OP_plus)

which has the advantage that we could put DW_OP_LLVM_arg0 into places other than just the beginning of the expression.

Similarly, we could then further extend it to allow referring to more than one LLVM SSA value within an expression, using a variadic dbg.value. For example:

call @llvm.dbg.value(%1, %2, !DILocalVariable(name: "x"), !DIExpression(DW_OP_LLVM_arg0 /* %1 */ , DW_OP_uconst, DW_OP_LLVM_arg1 /* %2 */, DW_OP_plus)

This mechanism seems to apply nicely to DW_OP_implicit_pointer — applied to your testcase we'd write:

call @llvm.dbg.value(!DILocalVariable(name: "arr"), !DILocalVariable(name: "ptr"), !DIExpression(DW_OP_LLVM_implicit_pointer, DW_OP_LLVM_arg0, 4)

I think this would make the handling of DW_OP_LLVM_implicit_pointer less magic in LLVM IR and would open the door to future features, such as the variadic dbg.value.
What do you think?

Nov 12 2019, 10:52 PM · debug-info, Restricted Project
alok added a watcher for debug-info: alok.
Nov 12 2019, 2:42 AM

Nov 10 2019

alok updated the diff for D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).

This patch is updated post split. part of it went to D69999, which is also the dependency for current patch. (for current patch to work, D69999 is needed)

Nov 10 2019, 10:11 PM · debug-info, Restricted Project
alok updated the diff for D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).

Updated for comments from @aprantl (Adrian Prantl)

Nov 10 2019, 10:59 AM · debug-info, Restricted Project
alok added inline comments to D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).
Nov 10 2019, 10:52 AM · debug-info, Restricted Project
alok added a comment to D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).
  • Can you update LangRef.rst / SourceLevelDebugging.rst to document the semantics of the DW_OP_implicit_pointer in LLVM IR. Specifically what the two arguments mean while in LLVM IR?
Nov 10 2019, 10:41 AM · debug-info, Restricted Project

Nov 8 2019

alok added a comment to D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).

Could you please split off a patch just adds the IR, Bitcode and verifier support from this review into a separate one? That one should be very straightforward to review & land and it will make the rest easier.

Nov 8 2019, 3:01 AM · debug-info, Restricted Project
alok removed a parent revision for D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode): D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).
Nov 8 2019, 2:49 AM · debug-info, Restricted Project
alok removed a child revision for D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase): D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).
Nov 8 2019, 2:49 AM · debug-info, Restricted Project
alok removed a parent revision for D69787: [DebugInfo] Support for DW_OP_implicit_pointer.: D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).
Nov 8 2019, 2:49 AM · Restricted Project
alok removed a child revision for D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase): D69787: [DebugInfo] Support for DW_OP_implicit_pointer..
Nov 8 2019, 2:49 AM · debug-info, Restricted Project
alok added a parent revision for D69787: [DebugInfo] Support for DW_OP_implicit_pointer.: D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).
Nov 8 2019, 2:40 AM · Restricted Project
alok added a child revision for D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase): D69787: [DebugInfo] Support for DW_OP_implicit_pointer..
Nov 8 2019, 2:40 AM · debug-info, Restricted Project
alok added a child revision for D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase): D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).
Nov 8 2019, 2:40 AM · debug-info, Restricted Project
alok added a parent revision for D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode): D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).
Nov 8 2019, 2:40 AM · debug-info, Restricted Project
alok created D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode).
Nov 8 2019, 2:40 AM · debug-info, Restricted Project

Nov 7 2019

alok added a comment to D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).
In D69886#1736182, @vsk wrote:

Hey @alok, thanks for working on this.

Nov 7 2019, 9:12 PM · debug-info, Restricted Project