[PATCH] D93441: [DebugInfo] Fix crash with -fdebug-info-for-profiling and split dwarf

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 14:26:55 PST 2020


dblaikie added a comment.

In D93441#2461547 <https://reviews.llvm.org/D93441#2461547>, @rupprecht wrote:

> In D93441#2461344 <https://reviews.llvm.org/D93441#2461344>, @dblaikie wrote:
>
>> Yeah - would you be able to see if rather than making changes to support debug-info-for-profiling further in split-dwarf-inlining, we could go the other way and support it less/not at all? (it's going to be a bit annoying, now splitting hairs of having gmlt-without-profiling and gmlt-with-profiling, but hopefully not too drastic *fingers crossed*)
>
> Do you mean `clang -fsplit-dwarf-inlining -fdebug-info-for-profiling` should fail during command line parsing? Or something else?

Nah - I mean that debug-info-for-profiling would apply to the split DWARF info (stuff in the dwo file) when using split DWARF, not to the split-dwarf-inlining info.

(this /might/ mean that debug-info-for-profiling would be a no-op with -g2+split-dwarf-inlining - I'm not 100% sure/don't remember whether -g2 and above are a strict superset of split-dwarf-inlining or not. And -g1/-gmlt+split-dwarf-inlining+split-dwarf actually resolves to "not split DWARF" because they'd be totally redundant - whereas with this proposed direction they wouldn't necessarily be totally redundant, since the gmlt-in-dwo-with-debug-info-for-profiling would be more verbose/expressive than the split-dwarf-inlining... there's a lot of slices here and it's hard to explain succinctly. If this isn't making sense, I can try to write up something more verbose/clearer)



================
Comment at: llvm/test/DebugInfo/X86/debug-info-for-profiling-crash.ll:4-8
+; struct b {
+;   template <typename c>
+;   void d(c e) { d(e); }
+; };
+; void f() { b a; a.d(0); }
----------------
rupprecht wrote:
> dblaikie wrote:
> > A slightly simpler/more canonical test that seems to reproduce the crash would be:
> > ```
> > void f1();
> > __attribute__((always_inline)) inline void f2() { f1(); }
> > void f3() { f2(); }
> > ```
> > This is the smallest/simplest example of inlining, reproduces without extra instructions at -O0, etc.
> Looks like that runs into the second crash I'm looking at, but isn't dwarf-5 specific, so I'll take a look at that :)
ah, fair enough - maybe there's a common fix, especially if we move in the direction of debug-info-for-profiling not applying to split-dwarf-inlining info.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93441/new/

https://reviews.llvm.org/D93441



More information about the llvm-commits mailing list