[PATCH] D55281: debuginfo: Use symbol difference for CU length to simplify assembly reading/editing

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 17 13:06:54 PST 2018


ABataev added a comment.

In D55281#1333464 <https://reviews.llvm.org/D55281#1333464>, @dblaikie wrote:

> In D55281#1333451 <https://reviews.llvm.org/D55281#1333451>, @ABataev wrote:
>
> > In D55281#1333445 <https://reviews.llvm.org/D55281#1333445>, @dblaikie wrote:
> >
> > > Hey Alexey - thanks for taking a look!
> > >
> > > In D55281#1333365 <https://reviews.llvm.org/D55281#1333365>, @ABataev wrote:
> > >
> > > > NVPTX does not support labels in the debug info sections. All these new labels must be created/emitted only if `DwarfDebug::useSectionsAsReferences()` is `false`.
> > >
> > >
> > > Is that the right name for the flag? If you reckon so - though I'm not sure it means a lot to me, personally. (
> > >
> > > Also, a few places in lib/CodeGen/AsmPrinter/* use isNVPTX directly, not UseSectionsAsReferences - are they correct? (eg: UseRangeSection, UseInlineStrings, UseLocSection, some test for physical registers in updateSubprogramScopeDIE) What's the difference between these two things?
> >
> >
> > `useSectionsAsReferences()` does not allow to define inner symbols in the debug sections and force using the section names itself as references in other debug info sections (if it is supported). You need to use this one. Other flags are also required for the NVPTX debug info, but they control different format features.
>
>
> Fair enough & I'll work on that (want to reproduce the internal failure first to then test this approach works there too)
>
> But I'd still like to understand the difference between these choices - given Google encountered an internal failure where testing NVPTX was insufficient but it looked like it was still related to LLVM's assembly being passed to ptxas - wouldn't these other conditions be incorrect in that case? (ie: assuming there's some non-NVPTX target that uses ptxas, and anything using ptxas needs to disable all these features (ranges, inline strings, etc, etc) - I would've thought these cases testing NVPTX directly would be bugs? Or are there different/varied reasons these things are disabled in some situations but not others?)


I need to make those tests more strict. Currently, they are using `CHECK` in all places, though we need `CHECK-NEXT` to catch the situation you ran into. It seems to me, you emitted the label somewhere in the debug info sections and the checks for NVPTX debug info missed this label.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55281





More information about the llvm-commits mailing list