-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Allow codegen backends to opt-out of parallel codegen #116791
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
I did changes against quite an old version and now it does not work, should have checked... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @SparrowLii
@@ -383,6 +383,12 @@ impl<B: WriteBackendMethods> CodegenContext<B> { | |||
} | |||
} | |||
|
|||
impl<B: CodegenBackend + WriteBackendMethods> CodegenContext<B> { | |||
pub fn parallel(&self) -> bool { | |||
self.backend.supports_parallel() && !self.opts.unstable_opts.no_parallel_llvm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name about llvm
seems suboptimal (or should only be checked in codegen_llvm)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe no_parallel_backend
?
And backend
is one of parameters of start_executing_work
so we can call supports_parallel
inside it
(for reference, the problem with the build is that |
@WaffleLapkin any updates on this? |
@Dylan-DPC I still need to figure a way to fix conflicts |
23b0c96
to
f368922
Compare
Ok, this was easier than I thought. Dunno why I procrastinated fixing conflicts for so long 😅 |
r? @oli-obk |
@bors r+ rollup |
…r=oli-obk Allow codegen backends to opt-out of parallel codegen This makes it a bit easier to write cursed codegen backends.
…kingjubilee Rollup of 15 pull requests Successful merges: - rust-lang#116791 (Allow codegen backends to opt-out of parallel codegen) - rust-lang#116793 (Allow targets to override default codegen backend) - rust-lang#117458 (LLVM Bitcode Linker: A self contained linker for nvptx and other targets) - rust-lang#119385 (Fix type resolution of associated const equality bounds (take 2)) - rust-lang#121438 (std support for wasm32 panic=unwind) - rust-lang#121893 (Add tests (and a bit of cleanup) for interior mut handling in promotion and const-checking) - rust-lang#122080 (Clarity improvements to `DropTree`) - rust-lang#122152 (Improve diagnostics for parenthesized type arguments) - rust-lang#122166 (Remove the unused `field_remapping` field from `TypeLowering`) - rust-lang#122249 (interpret: do not call machine read hooks during validation) - rust-lang#122299 (Store backtrace for `must_produce_diag`) - rust-lang#122318 (Revision-related tweaks for next-solver tests) - rust-lang#122320 (Use ptradd for vtable indexing) - rust-lang#122328 (unix_sigpipe: Replace `inherit` with `sig_dfl` in syntax tests) - rust-lang#122330 (bootstrap readme: fix, improve, update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#116791 - WaffleLapkin:unparallel-backends, r=oli-obk Allow codegen backends to opt-out of parallel codegen This makes it a bit easier to write cursed codegen backends.
This was renamed by rust-lang/rust#116791.
This was renamed by rust-lang/rust#116791.
This makes it a bit easier to write cursed codegen backends.