[PATCH] D26469: Improve DWARF parsing and attribute retrieval speed by improving DWARF abbreviation declarations.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 9 21:47:05 PST 2016
On Wed, Nov 9, 2016 at 9:40 PM Paul Robinson <paul.robinson at sony.com> wrote:
> probinson added subscribers: beanz, probinson.
> probinson added a comment.
>
> I agree with Adrian, this is way too big to review.
>
> So, following test-first practice, let's talk about the
> DWARF-test-case-generator first. There are already 3 different ways it
> could go.
>
> - A standalone generator like you've done here.
> - A driver for LLVM's DWARF generator, as @dblaikie suggested.
> - A DWARF-speaking yaml2obj, which @beanz is proposing on cfe-dev.
>
Guess I should go check to understand better what/why that's being
proposed...
>
> The standalone generator looks like it would work well for unittests but
> not so much for more traditional LIT tests, unless you also want to produce
> a tool that can parse some textual representation and produce DWARF from it.
>
> A driver for LLVM's DwarfDebug would get nice code re-use, but limit the
> test space to what DwarfDebug knows how to produce. I think it would be
> more robust to make sure we had confidence in a reader/dumper before
> starting to persuade the compiler to emit some of the more finicky bits of
> DWARF 5. And, I personally would want a WAY nicer input syntax than having
> to hand-write IR metadata (oy, what a headache).
>
Sorry for the confusion, but to clarify: I wasn't intending to suggest that
this would work by using IR to generate DWARF, but by using the APIs that
lib/CodeGen/AsmPrinter uses to generate DWARF (see the DIE class, etc, in
there - fully general purpose for producing whatever DIEs and attributes
you might be so inclined).
>
> Speaking of generating binary files from text input, isn't that exactly
> what yaml2obj does? I don't know whether people like it or hate it, but it
> does appear to have worked examples of emitting objects that get used for
> tests. Teaching it a convenient DWARF syntax and how to emit DWARF
> sections into an object file seems like a more fruitful avenue than
> confining the generator to unittests. (Maybe you could repurpose the code
> here, save a lot of typing.)
>
I thought yaml2obj was mostly used for testing in lld and that it was a bit
disused now as the non-Darwin side of things wasn't using it anymore
(perhaps I'm mistaken - I know there was also a yaml lld 'native' format,
perhaps I'm confusing the two)
- Dave
>
>
> https://reviews.llvm.org/D26469
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161110/cc6d06b9/attachment.html>
More information about the llvm-commits
mailing list