Page MenuHomePhabricator
Feed Advanced Search

Fri, Aug 23

aprantl updated subscribers of D66663: [DebugInfo] LiveDebugValues should always revisit backedges if it skips them.

LiveDebugValues currently ignores loop backedges on the first iteration -- this is because any variable locations that are live-through a loop need to be propagated in regardless. Otherwise, the unvisited backedge would always invalidate any potential live-through variable locations.

Fri, Aug 23, 3:39 PM · Restricted Project
aprantl committed rGf869ec8d4981: Upstream support for macCatalyst Mach-O binaries. (authored by aprantl).
Upstream support for macCatalyst Mach-O binaries.
Fri, Aug 23, 2:33 PM
aprantl added inline comments to D66667: Debug Info: Support for DW_AT_export_symbols for anonymous structs.
Fri, Aug 23, 11:03 AM · debug-info
aprantl added a comment to D66656: [DebugInfo][NFCI] Refactor LiveDebugValues containers to be pass fields.

I'm not a big fan of this approach unless there is a performance aspect that would motivate it.

Fri, Aug 23, 8:28 AM · Restricted Project
aprantl added a comment to D66643: [DWARF] Support DWARF64 in DWARFListTableHeader..

Seems reasonable.

Fri, Aug 23, 8:28 AM · Restricted Project, debug-info
aprantl accepted D66599: [DebugInfo] Remove invalidated locations during LiveDebugValues.
Fri, Aug 23, 8:21 AM · Restricted Project

Thu, Aug 22

aprantl added a reviewer for D66626: Upstream support for macCatalyst Mach-O binaries.: davide.
Thu, Aug 22, 5:27 PM · Restricted Project
aprantl created D66626: Upstream support for macCatalyst Mach-O binaries..
Thu, Aug 22, 5:21 PM · Restricted Project
aprantl committed rG40360407d88c: Add missing dot. (authored by aprantl).
Add missing dot.
Thu, Aug 22, 3:34 PM
aprantl committed rGaa97a89d832b: Extend FindTypes with CompilerContext to allow filtering by language. (authored by aprantl).
Extend FindTypes with CompilerContext to allow filtering by language.
Thu, Aug 22, 2:49 PM
aprantl added a comment to D66605: Debug Info: Support for DW_AT_export_symbols for anonymous structs.

LGMT!

Thu, Aug 22, 2:14 PM · debug-info
aprantl added a comment to D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

Turns out I accidentally deleted the constructor of LanguageSet in my very last refactoring.

Thu, Aug 22, 2:01 PM · Restricted Project
aprantl committed rGb041602e3fe3: Revert Extend FindTypes with CompilerContext to allow filtering by language. (authored by aprantl).
Revert Extend FindTypes with CompilerContext to allow filtering by language.
Thu, Aug 22, 1:42 PM
aprantl added a comment to D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

Looks like this also broke other platforms, which is good because I can debug it! I reverted the patch for now.

Thu, Aug 22, 1:42 PM · Restricted Project
aprantl added a comment to D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

Yeah, I'm trying to get behind what happened there, but I may need some help later on.

Thu, Aug 22, 1:42 PM · Restricted Project
aprantl accepted D66605: Debug Info: Support for DW_AT_export_symbols for anonymous structs.
Thu, Aug 22, 1:42 PM · debug-info
aprantl committed rG83108e7556f0: Rename lldb/source/Interpreter/OptionValueFileSpecListTmp.cpp to… (authored by aprantl).
Rename lldb/source/Interpreter/OptionValueFileSpecListTmp.cpp to…
Thu, Aug 22, 1:10 PM
aprantl committed rG06d778f00ae4: Rename lldb/source/Interpreter/OptionValueFileSpecLIst.cpp to… (authored by aprantl).
Rename lldb/source/Interpreter/OptionValueFileSpecLIst.cpp to…
Thu, Aug 22, 1:10 PM
aprantl committed rGdf5c04e1cdf3: Add missing include (authored by aprantl).
Add missing include
Thu, Aug 22, 12:32 PM
aprantl committed rGa90eb1ee9f7d: Add missing include (authored by aprantl).
Add missing include
Thu, Aug 22, 12:31 PM
aprantl committed rGaa3a564efa6b: Extend FindTypes with CompilerContext to allow filtering by language. (authored by aprantl).
Extend FindTypes with CompilerContext to allow filtering by language.
Thu, Aug 22, 12:25 PM
aprantl added inline comments to D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.
Thu, Aug 22, 12:13 PM · Restricted Project
aprantl added a comment to D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

No, the most "expensive" function is ClangASTContext::GetSupportedLanguagesForTypes() which is called once by the ClangASTContext constructor.

Thu, Aug 22, 11:07 AM · Restricted Project
aprantl added inline comments to D66605: Debug Info: Support for DW_AT_export_symbols for anonymous structs.
Thu, Aug 22, 11:06 AM · debug-info
aprantl added inline comments to D66605: Debug Info: Support for DW_AT_export_symbols for anonymous structs.
Thu, Aug 22, 11:06 AM · debug-info
aprantl added inline comments to D66600: Add encode and decode methods to InlineInfo and document encoding format to the GSYM file format.
Thu, Aug 22, 11:06 AM
aprantl added a comment to D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

Sounds good about LanguageSet being cheap to pass by value. Are there any paths that will call this over and over where we still will be calculating the LangaugeSet over and over in a type system? We might benefit from using llvm::once and a static LanguageSet in the static functions that return LanguageSets if that is the case?

Thu, Aug 22, 11:06 AM · Restricted Project
aprantl added a comment to D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

Looks good overall. Just a question of it we want to return "const LanguageSet &" to avoid copies. Also switch static functions that currently return "LanguageSet" over to use static variables and llvm::once to init them and then return "const LanguageSet &".

The point of the static_assert in TypeSystem.cpp is to make sure that a LanguageSet is exactly 64 bits in size so it is cheap to pass it by value.

Thu, Aug 22, 10:47 AM · Restricted Project
aprantl added a comment to D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

Looks good overall. Just a question of it we want to return "const LanguageSet &" to avoid copies. Also switch static functions that currently return "LanguageSet" over to use static variables and llvm::once to init them and then return "const LanguageSet &".

Thu, Aug 22, 10:46 AM · Restricted Project
aprantl added inline comments to D66599: [DebugInfo] Remove invalidated locations during LiveDebugValues.
Thu, Aug 22, 10:34 AM · Restricted Project
aprantl added inline comments to D66600: Add encode and decode methods to InlineInfo and document encoding format to the GSYM file format.
Thu, Aug 22, 10:23 AM
aprantl committed rG9a0f124f2643: Remove redundant curly braces. (authored by aprantl).
Remove redundant curly braces.
Thu, Aug 22, 9:59 AM
aprantl committed rG7be93589c4b5: Doxygenify comments. (authored by aprantl).
Doxygenify comments.
Thu, Aug 22, 9:55 AM
aprantl updated the diff for D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

Here's an improved version:

  • got rid of the completely unnecessary optimization that use memcpy
  • made the struct have a SmallBitVector member instead of inheriting from it.
Thu, Aug 22, 9:32 AM · Restricted Project

Wed, Aug 21

aprantl updated the diff for D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

More feedback from Jonas.

Wed, Aug 21, 4:22 PM · Restricted Project
aprantl updated the diff for D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

Address review feedback.

Wed, Aug 21, 3:44 PM · Restricted Project
aprantl accepted D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs.
Wed, Aug 21, 3:29 PM · Restricted Project, debug-info
aprantl added a comment to D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.

I also just discovered void ClangASTContext::EnumerateSupportedLanguages() and will incorporate that into the next revision, too.

Wed, Aug 21, 2:13 PM · Restricted Project
aprantl created D66546: Extend FindTypes w/ CompilerContext to allow filtering by language.
Wed, Aug 21, 11:20 AM · Restricted Project
aprantl committed rG330ae19a1a56: Generalize FindTypes with CompilerContext to support fuzzy lookup (authored by aprantl).
Generalize FindTypes with CompilerContext to support fuzzy lookup
Wed, Aug 21, 11:15 AM
aprantl updated the diff for D66507: Generalize FindTypes with CompilerContext to support fuzzy lookup.

Address feedback from Pavel.

Wed, Aug 21, 10:06 AM · Restricted Project
aprantl added inline comments to D37932: [DebugInfo] Correctly coalesce DBG_VALUEs that mix direct and indirect values.
Wed, Aug 21, 8:48 AM · Restricted Project
aprantl added inline comments to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..
Wed, Aug 21, 8:38 AM · Restricted Project, debug-info
aprantl added inline comments to D66510: Fix for "DICompileUnit not listed in llvm.dbg.cu" verification error after cloning a function from a different module.
Wed, Aug 21, 8:29 AM · Restricted Project
aprantl added a comment to D66510: Fix for "DICompileUnit not listed in llvm.dbg.cu" verification error after cloning a function from a different module.

At a first glance, this seems reasonable, I'm just wondering why this hasn't come up before. @rtereshin, any ideas?

Wed, Aug 21, 8:29 AM · Restricted Project

Tue, Aug 20

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

Could you please also document the new flag in LangRef.rst under DIFlags?

Tue, Aug 20, 5:16 PM · Restricted Project, debug-info
aprantl created D66507: Generalize FindTypes with CompilerContext to support fuzzy lookup.
Tue, Aug 20, 4:44 PM · Restricted Project
aprantl added a comment to D66102: [Symbol] Decouple clang from CompilerType.

Let's pick some random examples:

Tue, Aug 20, 4:23 PM · Restricted Project, Restricted Project
aprantl added a comment to D66102: [Symbol] Decouple clang from CompilerType.

... or a method ClangASTContext::wrapClangType()?

Tue, Aug 20, 3:51 PM · Restricted Project, Restricted Project
aprantl added a comment to D66102: [Symbol] Decouple clang from CompilerType.

Should we add some sort of convenience function or a ClangCompilerType subclass of CompilerType that reduces the amount of boilerplate needed on the RHS?

Tue, Aug 20, 3:51 PM · Restricted Project, Restricted Project
aprantl added inline comments to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..
Tue, Aug 20, 3:14 PM · Restricted Project, debug-info
aprantl accepted D66328: [DebugInfo] Add debug location to dynamic atexit destructor.
Tue, Aug 20, 2:11 PM · Restricted Project, debug-info, Restricted Project
aprantl added inline comments to D37932: [DebugInfo] Correctly coalesce DBG_VALUEs that mix direct and indirect values.
Tue, Aug 20, 11:21 AM · Restricted Project
aprantl committed rG260aa0f0f3a6: Make the FindTypes(std::vector<CompilerContext>, ...) API testable in lldb-test (authored by aprantl).
Make the FindTypes(std::vector<CompilerContext>, ...) API testable in lldb-test
Tue, Aug 20, 9:48 AM
aprantl added inline comments to D37932: [DebugInfo] Correctly coalesce DBG_VALUEs that mix direct and indirect values.
Tue, Aug 20, 9:47 AM · Restricted Project
aprantl accepted D66412: [DebugInfo][LiveDebugValues] Don't drop variable location tracking data across block boundaries.
Tue, Aug 20, 9:24 AM · Restricted Project
aprantl added inline comments to D66453: Make the FindTypes(std::vector<CompilerContext>, ...) API testable in lldb-test.
Tue, Aug 20, 9:15 AM · Restricted Project
aprantl updated the diff for D66453: Make the FindTypes(std::vector<CompilerContext>, ...) API testable in lldb-test.

Address Pavel's comments.

Tue, Aug 20, 9:15 AM · Restricted Project
aprantl added inline comments to D37932: [DebugInfo] Correctly coalesce DBG_VALUEs that mix direct and indirect values.
Tue, Aug 20, 8:56 AM · Restricted Project
aprantl added inline comments to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..
Tue, Aug 20, 8:48 AM · Restricted Project, debug-info
aprantl added a comment to D64595: [Debuginfo][SROA] Need to handle dbg.value in SROA pass..

Adrian wrote:

Stepping back a bit: Is the result of SROA multiple smaller allocas?

If SROA is only creating new allocas, then describing them with dbg.declares should do no harm, since a later call to LowerDbgDeclare would truncate their range by inserting new dbg.values at every load. But if SROA is inserting the load, we do need to make sure that the loaded value is tracked by a dbg.value (potentially in addition to tracking the alloca with a dbg.declare). So I guess my question is, where are loads for the SROAed allocas generated?

My understanding of SROA is that no new loads are generated, instead existing ones using GEPs and bitcasts are rewritten to use the smaller allocas. Any dbg.declare get fragmented into the smaller allocas in the usual way, then mem2reg / LowerDbgDeclare promotes in the usual way. In some circumstances the same load might get duplicated to enable promotion, such as:

Tue, Aug 20, 8:33 AM · Restricted Project, debug-info

Mon, Aug 19

aprantl added inline comments to D66453: Make the FindTypes(std::vector<CompilerContext>, ...) API testable in lldb-test.
Mon, Aug 19, 5:33 PM · 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
aprantl created D66453: Make the FindTypes(std::vector<CompilerContext>, ...) API testable in lldb-test.
Mon, Aug 19, 4:42 PM · Restricted Project
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 · Restricted Project, 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 · Restricted Project, debug-info
aprantl added inline comments to D63828: Add FileWriter to GSYM and encode/decode functions to AddressRange and AddressRanges.
Mon, Aug 19, 3:27 PM · Restricted Project
aprantl accepted D63828: Add FileWriter to GSYM and encode/decode functions to AddressRange and AddressRanges.

All of my comments have been addressed.

Mon, Aug 19, 3:27 PM · Restricted Project
aprantl added inline comments to D66328: [DebugInfo] Add debug location to dynamic atexit destructor.
Mon, Aug 19, 2:43 PM · Restricted Project, debug-info, Restricted Project
aprantl added inline comments to D63828: Add FileWriter to GSYM and encode/decode functions to AddressRange and AddressRanges.
Mon, Aug 19, 12:28 PM · 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
aprantl added inline comments to D66412: [DebugInfo][LiveDebugValues] Don't drop variable location tracking data across block boundaries.
Mon, Aug 19, 9:19 AM · Restricted Project
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
aprantl accepted D66421: [DWARF] Fix DWARFUnit::getDebugInfoSize() for 64-bit DWARF..
Mon, Aug 19, 9:05 AM · Restricted Project
aprantl added inline comments to D63828: Add FileWriter to GSYM and encode/decode functions to AddressRange and AddressRanges.
Mon, Aug 19, 9:00 AM · Restricted Project

Fri, Aug 16

aprantl committed rG69cef325a337: Simplify code (NFC). (authored by aprantl).
Simplify code (NFC).
Fri, Aug 16, 5:40 PM
aprantl committed rG43c8b19546ae: Add LLDB dataformatters for llvm::StringRef and lldb_private::ConstString (authored by aprantl).
Add LLDB dataformatters for llvm::StringRef and lldb_private::ConstString
Fri, Aug 16, 4:50 PM
aprantl added a comment to D66370: [dotest] Add a dotest flag `--force-dwarf` to override the tested DWARF version..

This is definitely more elegant than the current solution!

Fri, Aug 16, 4:22 PM · Restricted Project, Restricted Project
aprantl added a comment to D66354: Add LLDB dataformatters for llvm::StringRef and lldb_private::ConstString.

It's not quite obvious to me how to write a test for this. The test would need to live in LLDB, and it would need to compile a program linking against a variant of libSupport that was compiled with debug info. I'm not sure how to best do this.

Fri, Aug 16, 3:31 PM · Restricted Project
aprantl added a comment to D61184: [Salvage] Change salvage debug info implementation to use new DW_OP_LLVM_convert where needed.

What was the fix for the regression and is it also tested?

Fri, Aug 16, 1:58 PM · Restricted Project
aprantl created D66354: Add LLDB dataformatters for llvm::StringRef and lldb_private::ConstString.
Fri, Aug 16, 9:51 AM · Restricted Project
aprantl accepted D66347: [DebugInfo] Test that LiveDebugVariables un-coalesces ranges over block boundaries.
Fri, Aug 16, 9:13 AM · Restricted Project
aprantl added a project to D66328: [DebugInfo] Add debug location to dynamic atexit destructor: debug-info.
Fri, Aug 16, 9:11 AM · Restricted Project, debug-info, Restricted Project
aprantl requested changes to D66328: [DebugInfo] Add debug location to dynamic atexit destructor.
Fri, Aug 16, 9:11 AM · Restricted Project, debug-info, Restricted Project
aprantl added inline comments to D66249: [JIT][Breakpoint] Add "BreakpointInjectedSite" and FCB Trampoline.
Fri, Aug 16, 8:44 AM · 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 · Restricted Project, 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 · Restricted Project, debug-info

Thu, Aug 15

aprantl committed rG69ec60d821be: Change test to use uint64_t to support compiling for 32-bit architectures. (authored by aprantl).
Change test to use uint64_t to support compiling for 32-bit architectures.
Thu, Aug 15, 11:40 AM
aprantl added a comment to D65368: [DebugInfo] Handle complex expressions of spilt locations in LiveDebugValues.

Thanks!

Thu, Aug 15, 9:44 AM · Restricted Project
aprantl accepted D65368: [DebugInfo] Handle complex expressions of spilt locations in LiveDebugValues.

This is patch 2. LGTM

Thu, Aug 15, 9:44 AM · Restricted Project
aprantl accepted D66284: [DebugInfo] Avoid crash from dropped fragments in LiveDebugValues.

This is patch 1. LGTM.

Thu, Aug 15, 9:44 AM · Restricted Project

Wed, Aug 14

aprantl accepted D66175: Improve anonymous class heuristic in ClangASTContext::CreateRecordType .
Wed, Aug 14, 2:27 PM · Restricted Project
aprantl added inline comments to D66175: Improve anonymous class heuristic in ClangASTContext::CreateRecordType .
Wed, Aug 14, 1:57 PM · Restricted Project
aprantl added inline comments to D66175: Improve anonymous class heuristic in ClangASTContext::CreateRecordType .
Wed, Aug 14, 1:57 PM · Restricted Project
aprantl added inline comments to D66175: Improve anonymous class heuristic in ClangASTContext::CreateRecordType .
Wed, Aug 14, 1:44 PM · 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 added a comment to D65368: [DebugInfo] Handle complex expressions of spilt locations in LiveDebugValues.

I like the new patch! It looks like you discovered a few more pre-existing bugs though, so I'd suggest to do the following:

  1. Create a patch that disables spill-recognition for complex parameters, cherry-pick it to the release. Should be obviously correct.
  2. Create a patch that implements *restoring* of complex expressions (e.g., by pointing to the unspilt DBG_VALUE) and potentially cherry-pick. (Should also be obviously correct.)
  3. Create a patch to enable describing the spilt location of complex expressions and iterate until all bugs are fixed (possibly lands after the release).

Sounds like a plan; I'll open another phab review for patch 1, which should be straight-forwards; the current patch on this review should be sufficient for patch 2; and I'll think about patch 3,

Wed, Aug 14, 10:52 AM · 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 D66227: [DebugLine] Improve path handling..

LGTM with some minor details addressed, thanks!

Wed, Aug 14, 9:49 AM · Restricted Project, Restricted Project