This is an archive of the discontinued LLVM Phabricator instance.

[not for review][lld-macho] Simple cstring literal implementation
AbandonedPublic

Authored by int3 on Jun 11 2021, 4:33 PM.

Details

Reviewers
gkm
Group Reviewers
Restricted Project
Summary

This is just an experiment to see if not creating heavyweight
InputSections for literals is worth it. The answer seems to be "yes".
This diff only creates the additional InputSections w/o deduplicating
them, and it's a 3.6% regression when linking chromium_framework. In
contrast, the StringPiece-based implementation in D102964 (which
includes deduplication) is only a 2.2% regression.

    N           Min           Max        Median           Avg        Stddev
x  20          3.98          4.09         4.025         4.032   0.035629674
+  20          4.14          4.22         4.175         4.177   0.019493589
Difference at 95.0% confidence
        0.145 +/- 0.018381
        3.59623% +/- 0.455877%
        (Student's t, pooled s = 0.0287182)

Diff Detail