[PATCH] WIP: DI: Fold constant arguments into a single MDString

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Sep 19 17:29:45 PDT 2014


> This patch addresses the first stage of PR17891 by folding constant
> arguments together into a single MDString.  Integers are stringified and
> a `\0` character is used as a separator.

I've attached updated LLVM and clang patches, rebased this afternoon
with all tests in `check-all` passing.  I believe it addresses David's
comments as well.

There are an insane number of changes in the testcases, but changing the
schema of the dwarf tags makes that inevitable -- almost every line of
metadata had to change.  I look forward to "stage 2" of PR17891, which
can be more incremental.

Let me know if the updated patches look good.

Two caveats that came to mind while writing this:

  - I haven't updated `docs/SourceLevelDebugging.rst`.  I'll send a
    patch for that Monday-ish.

  - I haven't bumped the "Debug Info Version".  Should I?

> Any size measurements/test results (does this bootstrap?) on this?

Before committing, I'll use a release+asserts clang to build:

  - opt with `-g -flto`
  - clang with `-g`

With the LTO link of opt, I'll confirm that there's a drop in memory
usage due to fewer MDNodeOperands and look out for time regressions.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-DI-Header-MDString-llvm.patch
Type: application/octet-stream
Size: 2133948 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140919/6e817e1b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-DI-Header-MDString-clang.patch
Type: application/octet-stream
Size: 93100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140919/6e817e1b/attachment-0001.obj>


More information about the llvm-commits mailing list