[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-30 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D152017#4462263 , @probinson wrote: >> we might emit member function declarations for call sites in DWARF, for >> instance > > So are you now leaning more toward wanting to emit the "used" declarations as > well? I'm sure

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-29 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. > we might emit member function declarations for call sites in DWARF, for > instance So are you now leaning more toward wanting to emit the "used" declarations as well? I'm sure you don't want to implement it the way we did... I *think* the template parameter thing

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-22 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Basing this on "defined" or "undefined" member functions isn't /perfectly/ correct (though might be correct enough for this flag - though I do prefer something about "canonicality" of types, but perhaps it's too inside-baseball for the average user - though these

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-07 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Could always go with `-gsuppress-undefined-methods` if you're not happy about default-on options. I don't have a strong opinion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152017/new/ https://reviews.llvm.org/D152017

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D152017#4401075 , @dblaikie wrote: > Yeah, mixed feelings about a default-on flag, so you have to use `-gno-*`. > Though one name in that form, might be `-gno-canonical-types`. > (pedantically C++ calls these things "member

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-06 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D152017#4400735 , @probinson wrote: > Oh, `-fstandalone-debug` should override this? In the Sony implementation, it > does. (Sorry for not remembering that sooner.) I'd think of this as orthogonal to that, potentially. by

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Oh, `-fstandalone-debug` should override this? In the Sony implementation, it does. (Sorry for not remembering that sooner.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152017/new/ https://reviews.llvm.org/D152017

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I tend to think that enabled-by-default options which have names that you are supposed to prefix with no are awkward[1], but the compiler ecosystem (GCC & Clang) has lots of those, and perhaps we should lean into it. I like `-g[no-]undefined-methods` the best of Paul's

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. I have to say I'm not super excited about "-gincomplete-types" given that "incomplete type" means something different to a C++ user. "-gdefined-methods-only" ? reads awkwardly in the no- form. "-gsuppress-undefined-methods" ? which is similar to what we called it.

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-06 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D152017#4399989 , @probinson wrote: > My debugger guy says "this shouldn't be a problem." > > Given that, my request is that `-gincomplete-types` should be default-true > for `DebuggerTuning == SCE` if you want to commit

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. My debugger guy says "this shouldn't be a problem." Given that, my request is that `-gincomplete-types` should be default-true for `DebuggerTuning == SCE` if you want to commit this; otherwise I'll redo our downstream patch to match yours. Repository: rG LLVM

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D152017#4397113 , @dblaikie wrote: > What's the particular goal/value in including called-but-not-defined > functions? Are your users generally building only parts of their program with > debug info & you want it to be

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. oh, side note: We don't emit DWARF descriptions of called non-member functions, generally (well, more often these days with optimized debug info call_site info we do need to emit function declarations for called functions) - so by analogy I'd have thought doing

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D152017#4396906 , @probinson wrote: > I experimented with this. Looks like it emits info only for //defined// > methods, and not //used// methods. That is, if you change the test to say > `void t1::f1() { f2(); }` > you get

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-05 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. I experimented with this. Looks like it emits info only for //defined// methods, and not //used// methods. That is, if you change the test to say `void t1::f1() { f2(); }` you get DWARF for f1 but not f2. The way Sony does it, you get DWARF for f1 and f2. (Neither

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. This is pretty cool, even if it's just for data gathering. It's interesting that 29% of .debug_info and .debug_str is for describing class methods, that's pretty significant, even if it's only a 13% reduction across all debug info sections. Repository: rG LLVM Github

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-02 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. I'm traveling but will look at this on Monday. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152017/new/ https://reviews.llvm.org/D152017 ___ cfe-commits mailing list

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 527920. dblaikie added a comment. Updating commit message with extra details Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152017/new/ https://reviews.llvm.org/D152017 Files:

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie created this revision. dblaikie added a reviewer: probinson. Herald added a project: All. dblaikie requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Complete C++ type information can be quite expensive - and there's limited