Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ThinLTO] Handle variable with twice promoted name (Rust) #33

Merged
merged 1 commit into from
Jan 17, 2020

Commits on Jan 17, 2020

  1. [ThinLTO] Handle variable with twice promoted name (Rust)

    Summary:
    Ensure that we can internalize values produced from two rounds of
    promotion.
    
    Note that this cannot happen currently via clang, but in other use cases
    such as the Rust compiler which does a first round of ThinLTO on library
    code, producing bitcode, and a second round on the final binary.
    
    In particular this can happen if a function is exported and promoted,
    ending up with a ".llvm.${hash}" suffix, and then goes through a round
    of optimization creating an internal switch table expansion variable
    that is internal and contains the promoted name of the enclosing
    function. This variable will be promoted in the second round of ThinLTO
    if @foo is imported again, and therefore ends up with two
    ".llvm.${hash}" suffixes. Only the final one should be stripped when
    consulting the index to locate the summary.
    
    Reviewers: wmi
    
    Subscribers: mehdi_amini, inglorion, hiraditya, JDevlieghere, steven_wu, dexonsmith, arphaman, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D72711
    teresajohnson authored and tmandry committed Jan 17, 2020
    Configuration menu
    Copy the full SHA
    8201770 View commit details
    Browse the repository at this point in the history