[all-commits] [llvm/llvm-project] 095c52: [lld/mac] Propagate -(un)exported_symbol(s_list) t...

Nico Weber via All-commits all-commits at lists.llvm.org
Tue May 18 04:43:54 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 095c520fb436103c9800de0ac15fed83a86f3a43
      https://github.com/llvm/llvm-project/commit/095c520fb436103c9800de0ac15fed83a86f3a43
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-05-18 (Tue, 18 May 2021)

  Changed paths:
    M lld/MachO/Driver.cpp
    M lld/MachO/SyntheticSections.cpp

  Log Message:
  -----------
  [lld/mac] Propagate -(un)exported_symbol(s_list) to privateExtern in Driver

That way, it's done only once instead of every time shouldExportSymbol() is
called.

Possibly a bit faster:

    % ministat at_main at_symtodo
    x at_main
    + at_symtodo
        N           Min           Max        Median           Avg        Stddev
    x  30     3.9732189      4.114846      4.024621     4.0304692   0.037022865
    +  30       3.93766     4.0510042     3.9973931      3.991469   0.028472565
    Difference at 95.0% confidence
            -0.0390002 +/- 0.0170714
            -0.967635% +/- 0.423559%
            (Student's t, pooled s = 0.0330256)

In other runs with n=30 it makes no perf difference, so maybe it's just noise.
But being able to quickly and conveniently answer "is this symbol exported?"
is useful for fixing PR50373 and for implementing -dead_strip, so this seems
like a good change regardless.

No behavior change.

Differential Revision: https://reviews.llvm.org/D102661




More information about the All-commits mailing list