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

[LLVM 4.0] Update AlwaysInliner pass header and constructor #37861

Merged
merged 1 commit into from
Nov 20, 2016

Conversation

shepmaster
Copy link
Member

No description provided.

@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@shepmaster shepmaster mentioned this pull request Nov 18, 2016
23 tasks
@alexcrichton
Copy link
Member

Out of curiosity, do you know if there's an easily available "not legacy" version that we should be migrating towards?

@shepmaster
Copy link
Member Author

an easily available "not legacy" version

A good point, @alexcrichton! Here's what the header has to say:

/// Inlines functions marked as "always_inline".
///
/// Note that this does not inline call sites marked as always_inline and does
/// not delete the functions even when all users are inlined. The normal
/// inliner should be used to handle call site inlining, this pass's goal is to
/// be the simplest possible pass to remove always_inline function definitions'
/// uses by inlining them. The \c GlobalDCE pass can be used to remove these
/// functions once all users are gone.

It looks like it was introduced in llvm-mirror/llvm@b699f7b:

Notably things this doesn't support:

  • Array alloca merging
    • To support the above, bottom-up inlining with careful history
      tracking and call graph updates
  • DCE of the functions that become dead after this inlining.
  • Inlining through call instructions with the always_inline attribute.
    Instead, it focuses on inlining functions with that attribute.

Do you know if the intended Rust usage of this pass includes any of those?

@hanna-kruppe
Copy link
Contributor

hanna-kruppe commented Nov 18, 2016

The "legacy" part refers to the legacy pass manager as opposed to the new pass manager, so I don't think we can migrate without switching to the new pass manager wholesale, which seems (1) difficult and (2) premature since the new pass manager doesn't have feature parity yet AFAIK.

@alexcrichton
Copy link
Member

Oh ok if this is just related to that infrastructure seems fine!

@bors: r+

I fear the day the legacy pass manager goes away, but presumably we'll deal with that then.

@bors
Copy link
Contributor

bors commented Nov 18, 2016

📌 Commit acc9efa has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Nov 20, 2016

⌛ Testing commit acc9efa with merge 8f8944e...

bors added a commit that referenced this pull request Nov 20, 2016
[LLVM 4.0] Update AlwaysInliner pass header and constructor
@bors bors merged commit acc9efa into rust-lang:master Nov 20, 2016
@shepmaster shepmaster deleted the llvm-4.0-inline-pass branch April 25, 2018 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants