-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Sync rustc_codegen_cranelift #80408
Merged
Merged
Sync rustc_codegen_cranelift #80408
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Complement to rust-lang#78863
This includes bytecodealliance/wasmtime#2403 which enables hotswapping with SimpleJIT
This can happen in generic code
Directly use raw pointers in `AtomicPtr` store/load I was unable to find any reason for this limitation in the latest source of LLVM or in the documentation [here](http://llvm.org/docs/Atomics.html#libcalls-atomic). fixes rust-lang/miri#1574
LICM in Cranelift has been fixed recently
This commit makes minor changes to the cranelift backend so that it can build given changes in cg_ssa for Split DWARF. Signed-off-by: David Wood <[email protected]>
…omatsakis Move binder for dyn to each list item This essentially changes `ty::Binder<&'tcx List<ExistentialTraitRef>>` to `&'tcx List<ty::Binder<ExistentialTraitRef>>`. This is a first step in moving the `dyn Trait` representation closer to Chalk, which we've talked about in `@rust-lang/wg-traits.` r? `@nikomatsakis`
Lazy compilation has the potential to significantly improve the startup time of a program. While functions have to be codegened when called, it is expected that a significant amount of all code is only required when an error occurs or only when the program is used in certain ways. The basic approach is to first codegen a shim for each function. This shim calls the `__cg_clif_jit` function of cg_clif with a pointer to the `Instance` corresponding to the function for which it is a shim. `__cg_clif_jit` function then codegens this function and uses the hot code swapping support of SimpleJIT to redirect future calls to the function to the real version. Finally it calls the newly codegened function.
Lazy compilation in jit mode
rustbot
added
A-codegen
Area: Code generation
A-cranelift
Things relevant to the [future] cranelift backend
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Dec 27, 2020
@bors r+ |
📌 Commit 52cf01c has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Dec 27, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Dec 28, 2020
…jorn3 Sync rustc_codegen_cranelift The highlight of this sync are two JIT mode improvements. The first is that it is now possible to use JIT mode when using `-Zcodegen-backend` instead of the custom driver using `-Cllvm-args=mode=jit`. The second one is a new JIT mode that lazily compiles functions when they are called the first time: https://github.com/bjorn3/rustc_codegen_cranelift/pull/1120 In addition this includes a few small runtime performance improvements and various fixes for rustc changes that didn't cause compilation to fail. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
This was referenced Dec 28, 2020
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 28, 2020
Rollup of 11 pull requests Successful merges: - rust-lang#79662 (Move some more code out of CodegenBackend::{codegen_crate,link}) - rust-lang#79815 (Update RELEASES.md for 1.49.0) - rust-lang#80284 (Suggest fn ptr rather than fn item and suggest to use `Fn` trait bounds rather than the unique closure type in E0121) - rust-lang#80331 (Add more comments to trait queries) - rust-lang#80344 (use matches!() macro in more places) - rust-lang#80353 (BTreeMap: test split_off (and append) more thoroughly) - rust-lang#80362 (Document rustc_macros on nightly-rustc) - rust-lang#80399 (Remove FIXME in rustc_privacy) - rust-lang#80408 (Sync rustc_codegen_cranelift) - rust-lang#80411 (rustc_span: Remove `Symbol::with`) - rust-lang#80434 (bootstrap: put the component name in the tarball temp dir path) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-codegen
Area: Code generation
A-cranelift
Things relevant to the [future] cranelift backend
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The highlight of this sync are two JIT mode improvements. The first is that it is now possible to use JIT mode when using
-Zcodegen-backend
instead of the custom driver using-Cllvm-args=mode=jit
. The second one is a new JIT mode that lazily compiles functions when they are called the first time: https://github.com/bjorn3/rustc_codegen_cranelift/pull/1120In addition this includes a few small runtime performance improvements and various fixes for rustc changes that didn't cause compilation to fail.
r? @ghost
@rustbot label +A-codegen +A-cranelift +T-compiler