Page MenuHomePhabricator
Feed Advanced Search

Yesterday

shafik added a comment to D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs.

The difference between those two cases would be based on their usage - the types are the same (kinda, basically). In one case there's an anonymous member of the anonymous type (so it's transparent/all the nested names are as-if they were names of members in the outer type) and in the other case there's a named variable of the anonymous type (so the named members are members of that outer member variable).

Mon, Aug 19, 9:11 PM · debug-info
aganea updated the diff for D66328: [DebugInfo] Add debug location to dynamic atexit destructor.

As requested.

Mon, Aug 19, 7:46 PM · debug-info, Restricted Project
aprantl added inline comments to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..
Mon, Aug 19, 5:21 PM · Restricted Project, debug-info
dblaikie added a comment to D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs.

The difference between those two cases would be based on their usage - the types are the same (kinda, basically). In one case there's an anonymous member of the anonymous type (so it's transparent/all the nested names are as-if they were names of members in the outer type) and in the other case there's a named variable of the anonymous type (so the named members are members of that outer member variable).

Mon, Aug 19, 4:24 PM · debug-info
shafik added a comment to D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs.

Eh, I think it's still pretty unnecessary (& the DWARF spec is only suggestive, doesn't tend to have requirements in this regard) and so I'd probably suggest waiting until some consumer really wants this (& I'd still want to have a discussion with the consumer about why they find this to be needed). But it's really cheap (especially in DWARFv5 where it can use a const_value form & cost no bytes in debug_info (if/when that sort of thing is implemented in LLVM, if it isn't already).

@shafik, Can you outline the problem Clang has differentiating anonymous structs and lambdas that made this patch necessary?

Mon, Aug 19, 4:09 PM · debug-info
aprantl added a comment to D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs.

Eh, I think it's still pretty unnecessary (& the DWARF spec is only suggestive, doesn't tend to have requirements in this regard) and so I'd probably suggest waiting until some consumer really wants this (& I'd still want to have a discussion with the consumer about why they find this to be needed). But it's really cheap (especially in DWARFv5 where it can use a const_value form & cost no bytes in debug_info (if/when that sort of thing is implemented in LLVM, if it isn't already).

Mon, Aug 19, 3:57 PM · debug-info
dblaikie added a comment to D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs.

I'm not sure I agree with the DWARF issue here - name handling is necessarily language-specific, and there's no ambiguity about what an anonymous struct means in C or C++, there's only one way to do name resolution correctly there, and that's by treating them as transparent.

So I'd say rather than requiring all producers to put DW_AT_export_symbols on every anonymous struct in C or C++, consumers should assume its presence (if they want to model this name lookup this way - of course they don't need to model this in terms of DWARF concepts at all) for C and C++.

While the link quoted is a DWARF issue, that issue did actually make it into DWARF 5, (cf. 5.7.1 line 28ff). In case you were already aware of this, are you suggesting we should ignore the DWARF spec in LLVM here?

Mon, Aug 19, 3:47 PM · debug-info
aprantl added a comment to D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs.

I'm not sure I agree with the DWARF issue here - name handling is necessarily language-specific, and there's no ambiguity about what an anonymous struct means in C or C++, there's only one way to do name resolution correctly there, and that's by treating them as transparent.

So I'd say rather than requiring all producers to put DW_AT_export_symbols on every anonymous struct in C or C++, consumers should assume its presence (if they want to model this name lookup this way - of course they don't need to model this in terms of DWARF concepts at all) for C and C++.

Mon, Aug 19, 3:37 PM · debug-info
dblaikie added a comment to D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs.

I'm not sure I agree with the DWARF issue here - name handling is necessarily language-specific, and there's no ambiguity about what an anonymous struct means in C or C++, there's only one way to do name resolution correctly there, and that's by treating them as transparent.

Mon, Aug 19, 3:05 PM · debug-info
aprantl added inline comments to D66328: [DebugInfo] Add debug location to dynamic atexit destructor.
Mon, Aug 19, 2:43 PM · debug-info, Restricted Project
avl added inline comments to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..
Mon, Aug 19, 2:18 PM · Restricted Project, debug-info
avl added inline comments to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..
Mon, Aug 19, 2:08 PM · Restricted Project, debug-info
avl added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

OK, I will modify testcase to be single pass.

Mon, Aug 19, 1:49 PM · Restricted Project, debug-info
rnk added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..
In D64595#1621077, @avl wrote:

Thus, for the current moment I think to implement your original suggestion with avoiding dbg.declare lowering in instcombiner for aggregates.

Mon, Aug 19, 1:43 PM · Restricted Project, debug-info
rnk added a comment to D66328: [DebugInfo] Add debug location to dynamic atexit destructor.

I'd be happy to take this patch, address the comments, and land it, if you don't want to deal with all the nits.

Mon, Aug 19, 1:17 PM · debug-info, Restricted Project
dstenb added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

(A bit related to aprantl's latest comment.)

Mon, Aug 19, 12:10 PM · Restricted Project, debug-info
probinson added a comment to D66328: [DebugInfo] Add debug location to dynamic atexit destructor.

"debug-info-no-location.cpp" is an extremely generic name for a very specific case. "debug-info-atexit-stub.cpp" would be better.

Mon, Aug 19, 11:19 AM · debug-info, Restricted Project
aprantl added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

Looking good, and this produces the ~3% increase in variable locations in clang-3.4 builds like the previous revisions did too. It looks like the two xfailed tests are testing for the behaviour you're explicitly disabling: it's probably better to just delete them, as this is a deliberate decision to change that behaviour.

Paging @aprantl and @rnk : this patch sounds great to me (avoids dropping struct locations after SROA of inlined functions, increases variable location coverage) by not lower dbg.declare of structs, which IMHO the comment in LowerDbgDeclare indicates wasn't supposed to happen anyway. However, this plays into the wider "escaped variables in memory" problem of PR34136... would either of you feel strongly that this shouldn't happen?

Mon, Aug 19, 9:45 AM · Restricted Project, debug-info
dstenb added inline comments to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..
Mon, Aug 19, 9:38 AM · Restricted Project, debug-info
jmorse added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

Looking good, and this produces the ~3% increase in variable locations in clang-3.4 builds like the previous revisions did too. It looks like the two xfailed tests are testing for the behaviour you're explicitly disabling: it's probably better to just delete them, as this is a deliberate decision to change that behaviour.

Mon, Aug 19, 9:17 AM · Restricted Project, debug-info
aprantl added a comment to D66415: [DebugInfo@O2] Fix PR41992: LiveDebugVariables can drop DBG_VALUEs through misinterpreting fragments.

I think you may need at least one more test that involves fragments. Two non-overlapping fragments should be handled like DBG_VALUEs that describe different variables. Two (partially) overlapping fragments should be handled as if they are describing the same variable.

Mon, Aug 19, 9:12 AM · Restricted Project, debug-info
aprantl added a comment to D66415: [DebugInfo@O2] Fix PR41992: LiveDebugVariables can drop DBG_VALUEs through misinterpreting fragments.

The testcase makes perfect sense and that sounds like a good bug to fix!
I do wonder wonder why the patch goes out of its way to save fragment infos when fragments don't appear in the test at all?

Mon, Aug 19, 9:10 AM · Restricted Project, debug-info
Orlando created D66415: [DebugInfo@O2] Fix PR41992: LiveDebugVariables can drop DBG_VALUEs through misinterpreting fragments.
Mon, Aug 19, 5:44 AM · Restricted Project, debug-info
dstenb closed D66145: [DebugInfo] Allow bundled calls in the MIR's call site info.
Mon, Aug 19, 5:40 AM · Restricted Project, debug-info

Fri, Aug 16

avl updated the diff for D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

I implemented the solution which avoids lowering dbg.declare for structures. Please check updated patch. Note, I marked two tests as XFAIL since they check for lowering which is not done with this patch. Though it looks to me that it would be better to make dbg.addr to work. I am thinking of changing LowerDbgDeclare in such a way that it would produce dbg.addr and dbg.value instead of dbg.value only. i.e. dbg.addr would be generated for cases when dbg.value with memory operand is generated currently...

Fri, Aug 16, 9:58 AM · Restricted Project, debug-info
shafik updated the diff for D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs.

Deleting some lines from the test as requested.

Fri, Aug 16, 9:17 AM · debug-info
aprantl added a project to D66328: [DebugInfo] Add debug location to dynamic atexit destructor: debug-info.
Fri, Aug 16, 9:11 AM · debug-info, Restricted Project
aprantl added inline comments to D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs.
Fri, Aug 16, 8:18 AM · debug-info
aprantl added reviewers for D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs: probinson, dblaikie.
Fri, Aug 16, 8:10 AM · debug-info
jmorse added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

Sorry for the long delay --

Fri, Aug 16, 7:01 AM · Restricted Project, debug-info

Thu, Aug 15

dstenb added a comment to D66145: [DebugInfo] Allow bundled calls in the MIR's call site info.

Thanks for the reviews! I can let this sit in Phabricator for a few more days to see if there are any more comments before landing it.

Thu, Aug 15, 12:57 AM · Restricted Project, debug-info

Wed, Aug 14

twoh closed D66187: [DebugInfo] Consider debug label scope has an extra lexical block file.
Wed, Aug 14, 10:58 AM · debug-info, Restricted Project
aprantl added a comment to D66187: [DebugInfo] Consider debug label scope has an extra lexical block file.

(I'm approaching this from the point of "if the verifier accepts the IR, the backend has to deal with it", but David is right in pointing out that there may be a bug further up the pipeline and that perhaps it should be fixed and made illegal in IR.)

Wed, Aug 14, 10:56 AM · debug-info, Restricted Project
aprantl accepted D66187: [DebugInfo] Consider debug label scope has an extra lexical block file.

Seems reasonable to me.

Wed, Aug 14, 10:47 AM · debug-info, Restricted Project
aprantl accepted D66145: [DebugInfo] Allow bundled calls in the MIR's call site info.

I don't know enough about VLIW bundle handling to really decide, but mechanically, this seems good.

Wed, Aug 14, 8:55 AM · Restricted Project, debug-info
dstenb updated the diff for D66145: [DebugInfo] Allow bundled calls in the MIR's call site info.

Update test case according to comments.

Wed, Aug 14, 1:30 AM · Restricted Project, debug-info

Tue, Aug 13

djtodoro added a comment to D66145: [DebugInfo] Allow bundled calls in the MIR's call site info.

Thanks a lot for this! It looks reasonable to me.
(I am not sure if I can approve it, so please wait for @aprantl and @vsk too)

Tue, Aug 13, 11:30 PM · Restricted Project, debug-info
twoh added a comment to D66187: [DebugInfo] Consider debug label scope has an extra lexical block file.

@dblaikie Thank you for the comment. I encountered this problem while manipulating LLVM IR, and not sure how realistic the code can be if I synthesize one to reproduce this problem. Still, I think this is worth fixing unless we can guarantee that debug label scope won't have a DILexicalBlockFile.

Tue, Aug 13, 6:19 PM · debug-info, Restricted Project
dblaikie added a comment to D66187: [DebugInfo] Consider debug label scope has an extra lexical block file.

Might be helpful to have (at least for the review, doesn't necessarily need to be formalized into a lit test and checked in) a minimal source reproduction so we can more readily see what's happening here?

Tue, Aug 13, 5:05 PM · debug-info, Restricted Project
dblaikie added a project to D66187: [DebugInfo] Consider debug label scope has an extra lexical block file: debug-info.
Tue, Aug 13, 5:05 PM · debug-info, Restricted Project
rjmccall added inline comments to D66121: Debug Info: Nest Objective-C property function decls inside their container..
Tue, Aug 13, 2:29 PM · debug-info
vsk edited reviewers for D66121: Debug Info: Nest Objective-C property function decls inside their container., added: ahatanak, erik.pilkington; removed: vsk.
Tue, Aug 13, 2:06 PM · debug-info
aprantl added inline comments to D66121: Debug Info: Nest Objective-C property function decls inside their container..
Tue, Aug 13, 1:53 PM · debug-info
rjmccall added inline comments to D66121: Debug Info: Nest Objective-C property function decls inside their container..
Tue, Aug 13, 11:26 AM · debug-info
aprantl added inline comments to D66121: Debug Info: Nest Objective-C property function decls inside their container..
Tue, Aug 13, 10:48 AM · debug-info
arsenm added inline comments to D66145: [DebugInfo] Allow bundled calls in the MIR's call site info.
Tue, Aug 13, 9:02 AM · Restricted Project, debug-info
dstenb created D66145: [DebugInfo] Allow bundled calls in the MIR's call site info.
Tue, Aug 13, 8:43 AM · Restricted Project, debug-info
lisa6jones6 added a project to rL368639: Removed builders: llvm-clang-lld-x86_64-debian-fast, ubuntu-gcc7.1-werror.: debug-info.
Tue, Aug 13, 5:53 AM

Mon, Aug 12

rjmccall added inline comments to D66121: Debug Info: Nest Objective-C property function decls inside their container..
Mon, Aug 12, 11:30 PM · debug-info
vsk added a comment to D66121: Debug Info: Nest Objective-C property function decls inside their container..

Looks reasonable to me.

Mon, Aug 12, 4:56 PM · debug-info
aprantl added a reviewer for D66121: Debug Info: Nest Objective-C property function decls inside their container.: davide.
Mon, Aug 12, 4:44 PM · debug-info
aprantl created D66121: Debug Info: Nest Objective-C property function decls inside their container..
Mon, Aug 12, 4:44 PM · debug-info
dstenb closed D64500: [DebugInfo] Remove call sites when eliminating unreachable blocks.
Mon, Aug 12, 6:24 AM · Restricted Project, debug-info
dstenb added a comment to D64500: [DebugInfo] Remove call sites when eliminating unreachable blocks.

Thanks for the reviews, and sorry for taking some time to land this!

Mon, Aug 12, 6:20 AM · Restricted Project, debug-info

Thu, Aug 8

avl added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

NB, I haven't forgotten this (adding self as reviewer to keep track of it), but am out of office for a while. I think this hits a wider LLVM problem of values going in and out of memory (see discussion in [0] for example) and our ability to describe those circumstances.

[0] https://bugs.llvm.org/show_bug.cgi?id=34136

Thu, Aug 8, 7:04 AM · Restricted Project, debug-info

Wed, Aug 7

vsk added a comment to D65585: WIP: [llvm-locstats] Add the llvm-locstats tool.

@aprantl, @vsk,
IIUC, I can abandon this patch and make a separate patch(es) for adding additional fields into the llvm-dwarfdump stats output, and then make a script (and put into the utils/) parsing the fields by doing the locstats job?

Wed, Aug 7, 10:54 AM · Restricted Project, debug-info
djtodoro added a comment to D65585: WIP: [llvm-locstats] Add the llvm-locstats tool.

@aprantl, @vsk,
IIUC, I can abandon this patch and make a separate patch(es) for adding additional fields into the llvm-dwarfdump stats output, and then make a script (and put into the utils/) parsing the fields by doing the locstats job?

Wed, Aug 7, 2:30 AM · Restricted Project, debug-info
djtodoro added a comment to D65585: WIP: [llvm-locstats] Add the llvm-locstats tool.

@MaskRay Thanks for your review! We are still discussing on the llvm-dev mailing list how we should continue with this. As soon as we finished, I will start cleaning up the code and addressing comments.

Wed, Aug 7, 2:16 AM · Restricted Project, debug-info

Sun, Aug 4

MaskRay added a reviewer for D65585: WIP: [llvm-locstats] Add the llvm-locstats tool: MaskRay.
Sun, Aug 4, 11:46 PM · Restricted Project, debug-info
MaskRay added inline comments to D65585: WIP: [llvm-locstats] Add the llvm-locstats tool.
Sun, Aug 4, 11:46 PM · Restricted Project, debug-info
jmorse added a reviewer for D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass.: jmorse.

NB, I haven't forgotten this (adding self as reviewer to keep track of it), but am out of office for a while. I think this hits a wider LLVM problem of values going in and out of memory (see discussion in [0] for example) and our ability to describe those circumstances.

Sun, Aug 4, 10:20 AM · Restricted Project, debug-info

Thu, Aug 1

djtodoro added a comment to D65585: WIP: [llvm-locstats] Add the llvm-locstats tool.

@aprantl Thanks for your comment. WDYT about implementing this as a llvm-dwarfdump subtool?

Thu, Aug 1, 10:39 AM · Restricted Project, debug-info
djtodoro added a reviewer for D65585: WIP: [llvm-locstats] Add the llvm-locstats tool: dblaikie.
Thu, Aug 1, 10:26 AM · Restricted Project, debug-info
aprantl added a comment to D65585: WIP: [llvm-locstats] Add the llvm-locstats tool.

As David said, this does look like it could fit into dwarfdump --statistics (tools/llvm-dwarfdump/Statistics.cpp).

Thu, Aug 1, 10:11 AM · Restricted Project, debug-info
djtodoro created D65585: WIP: [llvm-locstats] Add the llvm-locstats tool.
Thu, Aug 1, 9:07 AM · Restricted Project, debug-info

Wed, Jul 31

djtodoro closed D60716: [DwarfDebug] Dump call site debug info into DWARF.
Wed, Jul 31, 9:54 AM · Restricted Project, debug-info
djtodoro added a comment to D60716: [DwarfDebug] Dump call site debug info into DWARF.

@vsk Thanks a lot!

Wed, Jul 31, 8:27 AM · Restricted Project, debug-info
vsk accepted D60716: [DwarfDebug] Dump call site debug info into DWARF.

Thanks, lgtm.

Wed, Jul 31, 8:24 AM · Restricted Project, debug-info
djtodoro updated the diff for D60716: [DwarfDebug] Dump call site debug info into DWARF.

-Addressing comments

Wed, Jul 31, 4:28 AM · Restricted Project, debug-info
djtodoro added a comment to D60716: [DwarfDebug] Dump call site debug info into DWARF.

@vsk Thanks for the comments!

Wed, Jul 31, 4:26 AM · Restricted Project, debug-info

Mon, Jul 29

vsk added inline comments to D60716: [DwarfDebug] Dump call site debug info into DWARF.
Mon, Jul 29, 1:57 PM · Restricted Project, debug-info
djtodoro updated the diff for D60716: [DwarfDebug] Dump call site debug info into DWARF.

-Addressing comments

Mon, Jul 29, 7:36 AM · Restricted Project, debug-info
djtodoro added a comment to D60716: [DwarfDebug] Dump call site debug info into DWARF.

@vsk Thanks a lot for such nice review!

Mon, Jul 29, 7:36 AM · Restricted Project, debug-info

Fri, Jul 26

StephenTozer accepted D57145: [DebugInfo] Remove redundant initialization of DbgVariable's MInsn, NFC.

Looks like a sensible straightforward change.

Fri, Jul 26, 5:55 AM · Restricted Project, debug-info

Thu, Jul 25

vsk added a comment to D60716: [DwarfDebug] Dump call site debug info into DWARF.

This has been sitting on my review queue for too long, I'm really sorry for the delay here. I've still only gotten 2/3 of the way through this patch but will make time to finish the rest soon. Thanks for working on this!

Thu, Jul 25, 6:55 PM · Restricted Project, debug-info

Mon, Jul 22

rnk added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

There's a lot of text here, I'm sorry I haven't read it all, but I think we should try to avoid getting in this situation where dbg.value points to an alloca in the first place. In Chromium, we use -instcombine-lower-dbg-declare to prevent instcombine from conservatively demoting from the "high availability" dbg.declare to the "always accurate but often missing" dbg.value. I don't really have time to work on this or participate in the discussion, so I'll just drop my two cents in and run away... =S

Mon, Jul 22, 11:39 AM · Restricted Project, debug-info
avl added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

Converting a dbg.value into a dbg.declare implicitly extends the duration ("lifetime" in the docs [0]) of the variable location from "until the next dbg.value" to "the entire scope". Consider what happens if we make the modifications here [1] to your test case. Imagine an IR producer that wants to temporarily bind some variable to a field of 'result' (the dbg.value added with DW_OP_deref), and later assigns '1' to the variable with the second dbg.value, to cover the rest of the function.

Mon, Jul 22, 1:32 AM · Restricted Project, debug-info
avl updated the diff for D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

added check for aggregate dbg.value.

Mon, Jul 22, 1:27 AM · Restricted Project, debug-info

Jul 18 2019

jmorse added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

Probably, it is OK if dbg.value was not originally _supposed_ to be a dbg.declare but was converted in this place.

Jul 18 2019, 5:55 AM · Restricted Project, debug-info

Jul 16 2019

avl added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

@jmorse Thank you for this case and explanations. I will evaluate it more and adapt fix accordingly.

Jul 16 2019, 2:29 PM · Restricted Project, debug-info

Jul 15 2019

phosek added a comment to D64774: [DebugInfo] Move function from line table to the prologue (NFC).

This change broke lld:

/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:323:28: error: conversion function from 'nullptr_t' to 'llvm::StringRef' invokes a deleted function
          it->second.file, nullptr,
                           ^~~~~~~
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:1637:21: note: in instantiation of member function 'lld::elf::ObjFile<llvm::object::ELFType<llvm::support::little, false> >::getVariableLoc' requested here
template class elf::ObjFile<ELF32LE>;
                    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/ADT/StringRef.h:79:5: note: 'StringRef' has been explicitly marked deleted here
    StringRef(std::nullptr_t) = delete;
    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:263:59: note: passing argument to parameter 'CompDir' here
    bool getFileNameByIndex(uint64_t FileIndex, StringRef CompDir,
                                                          ^
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:323:28: error: conversion function from 'nullptr_t' to 'llvm::StringRef' invokes a deleted function
          it->second.file, nullptr,
                           ^~~~~~~
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:1638:21: note: in instantiation of member function 'lld::elf::ObjFile<llvm::object::ELFType<llvm::support::big, false> >::getVariableLoc' requested here
template class elf::ObjFile<ELF32BE>;
                    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/ADT/StringRef.h:79:5: note: 'StringRef' has been explicitly marked deleted here
    StringRef(std::nullptr_t) = delete;
    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:263:59: note: passing argument to parameter 'CompDir' here
    bool getFileNameByIndex(uint64_t FileIndex, StringRef CompDir,
                                                          ^
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:323:28: error: conversion function from 'nullptr_t' to 'llvm::StringRef' invokes a deleted function
          it->second.file, nullptr,
                           ^~~~~~~
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:1639:21: note: in instantiation of member function 'lld::elf::ObjFile<llvm::object::ELFType<llvm::support::little, true> >::getVariableLoc' requested here
template class elf::ObjFile<ELF64LE>;
                    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/ADT/StringRef.h:79:5: note: 'StringRef' has been explicitly marked deleted here
    StringRef(std::nullptr_t) = delete;
    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:263:59: note: passing argument to parameter 'CompDir' here
    bool getFileNameByIndex(uint64_t FileIndex, StringRef CompDir,
                                                          ^
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:323:28: error: conversion function from 'nullptr_t' to 'llvm::StringRef' invokes a deleted function
          it->second.file, nullptr,
                           ^~~~~~~
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:1640:21: note: in instantiation of member function 'lld::elf::ObjFile<llvm::object::ELFType<llvm::support::big, true> >::getVariableLoc' requested here
template class elf::ObjFile<ELF64BE>;
                    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/ADT/StringRef.h:79:5: note: 'StringRef' has been explicitly marked deleted here
    StringRef(std::nullptr_t) = delete;
    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:263:59: note: passing argument to parameter 'CompDir' here
    bool getFileNameByIndex(uint64_t FileIndex, StringRef CompDir,
                                                          ^
4 errors generated.
Jul 15 2019, 5:56 PM · Restricted Project, Restricted Project, debug-info
JDevlieghere closed D64774: [DebugInfo] Move function from line table to the prologue (NFC).
Jul 15 2019, 5:37 PM · Restricted Project, Restricted Project, debug-info
dblaikie accepted D64774: [DebugInfo] Move function from line table to the prologue (NFC).
Jul 15 2019, 3:07 PM · Restricted Project, Restricted Project, debug-info
JDevlieghere created D64774: [DebugInfo] Move function from line table to the prologue (NFC).
Jul 15 2019, 2:55 PM · Restricted Project, Restricted Project, debug-info
jmorse added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

This is a great bug find -- I'd no idea SROA ran twice! Applying this patch gives a ~3% increase in variable locations covered on a clang-3.4 build.

Jul 15 2019, 9:15 AM · Restricted Project, debug-info
NikolaPrica accepted D64500: [DebugInfo] Remove call sites when eliminating unreachable blocks.

The reason why I think it's hard to see that call site information has been removed is that, as far as I can tell there is no way to print the function attributes when doing something like -print-{before,after}-all, so it can be hard to to see where in the pass pipeline the callSites information was dropped. You could of course analyze the MIR and see where the information is likely to have been dropped, but I guess that can be difficult/annoying for larger programs.

Oh, I thought r364506 (D61061) implemented MIR printer support for call site metadata. If not, it's probably worth adding.

This dumps the CallSitesInfo when we producing a ".mir" file. The CallSitesInfo describes an internal state of the MF like the fixedStack, frameInfo etc. I'm not sure how we could make it recognizable in -print-{before,after}-all. Maybe like some metadata extension of call instruction. However, it should be part of another patch.

Jul 15 2019, 4:32 AM · Restricted Project, debug-info
avl updated the diff for D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

addressed style issues. created empty expression for dbg.value case.

Jul 15 2019, 4:04 AM · Restricted Project, debug-info

Jul 13 2019

yurydelendik added a comment to D52634: [WebAssembly] Add DBG_VALUE with local operands location in WebAssemblyExplicitLocals pass.

Let's work toward getting this landed!
@yurydelendik Your note mentioned that you reverted the breg version based on some kind of incompatibility, can you say more about that?

Jul 13 2019, 7:00 AM · Restricted Project, debug-info

Jul 12 2019

dschuff added a comment to D52634: [WebAssembly] Add DBG_VALUE with local operands location in WebAssemblyExplicitLocals pass.

Let's work toward getting this landed!
@yurydelendik Your note mentioned that you reverted the breg version based on some kind of incompatibility, can you say more about that?

Jul 12 2019, 5:25 PM · Restricted Project, debug-info
yurydelendik updated the diff for D52634: [WebAssembly] Add DBG_VALUE with local operands location in WebAssemblyExplicitLocals pass.

Rebase

Jul 12 2019, 4:08 PM · Restricted Project, debug-info
vsk accepted D64500: [DebugInfo] Remove call sites when eliminating unreachable blocks.

I just want to add that I was a bit hesitant about generalizing the removal as I think it can be quite hard to tell when call site information has been removed, so I thought it would be better to have asserts trigger for each individual case, so that we can detect and assess what to do there, rather than dropping the information silently at the risk of false negatives.

Jul 12 2019, 11:25 AM · Restricted Project, debug-info
JDevlieghere added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

Few nits inline

Jul 12 2019, 8:01 AM · Restricted Project, debug-info
Herald added a project to D52634: [WebAssembly] Add DBG_VALUE with local operands location in WebAssemblyExplicitLocals pass: Restricted Project.
Jul 12 2019, 7:39 AM · Restricted Project, debug-info
djtodoro added a comment to D60716: [DwarfDebug] Dump call site debug info into DWARF.

@uweigand Thanks for the note and comment!

Jul 12 2019, 6:37 AM · Restricted Project, debug-info
avl added inline comments to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..
Jul 12 2019, 6:15 AM · Restricted Project, debug-info
uweigand added a comment to D60716: [DwarfDebug] Dump call site debug info into DWARF.

Thanks for the quick revert! The new patch looks reasonable to me.

Jul 12 2019, 5:42 AM · Restricted Project, debug-info
djtodoro added a comment to D60716: [DwarfDebug] Dump call site debug info into DWARF.

@dstenb Thanks a lot, that seems useful!

Jul 12 2019, 5:04 AM · Restricted Project, debug-info
dstenb added a comment to D60716: [DwarfDebug] Dump call site debug info into DWARF.

@dstenb Thanks a lot!

That seems like a good catch and we should support such scenario.

I think that it will be expensive to return a MachineOperand object.

Jul 12 2019, 4:48 AM · Restricted Project, debug-info
djtodoro updated the diff for D60716: [DwarfDebug] Dump call site debug info into DWARF.

-Make a wrapper around the getCallPreservedMask() and use it in order to avoid changes in generated code

Jul 12 2019, 4:35 AM · Restricted Project, debug-info
djtodoro reopened D60716: [DwarfDebug] Dump call site debug info into DWARF.

@uweigand Thanks for that! The commit is reverted with the rL365886.

Jul 12 2019, 4:31 AM · Restricted Project, debug-info