This is an archive of the discontinued LLVM Phabricator instance.

Make DW_AT_[MIPS]linkage_name optional, and off by default for SCE.
ClosedPublic

Authored by probinson on Jul 20 2015, 4:03 PM.

Details

Summary

Mangled "linkage" names can be huge, and if the debugger (or other
tools) have no use for them, the size savings can be very impressive
(on the order of 40%).

Add one test for controlling behavior, and modify a number of tests to
either stop using linkage names, or make llc emit them (so these tests
will still run when the default triple is for PS4).

Diff Detail

Repository
rL LLVM

Event Timeline

probinson updated this revision to Diff 30207.Jul 20 2015, 4:03 PM
probinson retitled this revision from to Make DW_AT_[MIPS]linkage_name optional, and off by default for SCE..
probinson updated this object.
probinson added reviewers: echristo, dblaikie, aprantl.
probinson added a subscriber: llvm-commits.
echristo edited edge metadata.Jul 27 2015, 3:45 PM

One inline comment that probably applies to most of the test cases in the patch.

-eric

test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll
16 ↗(On Diff #30207)

Why this change? Probably want to change the RUN line if you want to make this clean to run on sce.

probinson added inline comments.Jul 30 2015, 3:40 PM
test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll
16 ↗(On Diff #30207)

In this case it looked like the linkage-name was not inherently interesting, but just a way to validate that the CHECK stream was in the correct DIE. By using the unmangled name instead, it preserves the purpose of the check while being debugger-feature-neutral.
I did something similar in cases like recursive_inlining.ll, where the mangled name was just a lazy way to verify that the cross-DIE references were pointing to the right places; verifying the actual references rather than the names seemed like an improvement on its own, as well as avoiding a dependence on having mangled names.
In other tests, the mangled name was either inherently part of the test, or not so easy to find a substitute for, and in those cases I added the command-line option.

echristo accepted this revision.Aug 3 2015, 10:16 AM
echristo edited edge metadata.

OK, inline response, if you could verify that the change I mentioned doesn't make the testcase more fragile I'd appreciate it. OK otherwise.

-eric

test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll
16 ↗(On Diff #30207)

OK, as long as there's only a single foo I guess it makes sense. Seems a bit fragile which is what I was worried about.

This revision is now accepted and ready to land.Aug 3 2015, 10:16 AM

Thanks for the review! Will commit after I've refreshed to current trunk (two weeks sees a lot of commits).

test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll
16 ↗(On Diff #30207)

There is nothing else named "foo" in this test.
We'd all be happier if the test had the original C++ source as commentary, but at least there is a comment saying that "foo" is a function within class "A" (see lines 5-6) so we don't have to worry about it being a ctor or anything like that.

This revision was automatically updated to reflect the committed changes.