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

Make the TLV public and a pointer for provenance reasons #10

Closed
wants to merge 11 commits into from

Conversation

Zoxc
Copy link

@Zoxc Zoxc commented Feb 17, 2023

Making the TLV public simplifies the conditional logic in rustc. It also uses the new faster const thread locals.

@cuviper
Copy link
Member

cuviper commented Feb 20, 2023

Do you have a rustc branch to show the improvement there?

@Zoxc
Copy link
Author

Zoxc commented Feb 21, 2023

Not yet.

@cuviper
Copy link
Member

cuviper commented Mar 7, 2023

Hmm, I see how this makes it easier for #[cfg(parallel_compiler)] or not(), but I think it moves even farther away from an API that we would want to add to rayon proper. It's ok for now in the fork though.

I recently released new versions of rayon and rayon-core -- maybe now would be a good time to rebase this fork?

@Zoxc
Copy link
Author

Zoxc commented Mar 9, 2023

I recently released new versions of rayon and rayon-core -- maybe now would be a good time to rebase this fork?

Sure. Are you volunteering me?

@cuviper
Copy link
Member

cuviper commented Mar 9, 2023

It was a suggestion to gauge interest, especially since you've expressed a preference for this fork to have a clean commit-per-feature history over upstream rayon. Here, I'll meet you partway:

rayon-rs/rayon@master...cuviper:rayon:rustc-0.5

Please check that I didn't mess that up... then would you like to revamp the TLV patch in that series? If so, feel free to rebase/rewrite the commit series as you see fit.

@Zoxc
Copy link
Author

Zoxc commented Mar 11, 2023

I merged the commits and included this PR. Here's the branch.

I also tested that rustc still works with it and looked over the commits.

@cuviper cuviper force-pushed the rustc branch 3 times, most recently from 4b5faff to f192a48 Compare March 24, 2023 17:41
@cuviper
Copy link
Member

cuviper commented Mar 24, 2023

I merged the commits and included this PR. Here's the branch.

Thanks! I further tweaked this to add [lib] name back to the regular names, so CI actually works without renaming every use. That should let you drop the dependency renaming in the rust repo too. I've force-pushed this to the rustc branch here, so if you're happy with that I'll publish it. I'll also update indexmap for 0.5.

@Zoxc
Copy link
Author

Zoxc commented Mar 24, 2023

Yeah, that looks fine.

@cuviper
Copy link
Member

cuviper commented Mar 24, 2023

Published, should be all set!

@cuviper cuviper closed this Mar 24, 2023
Noratrieb added a commit to Noratrieb/rust that referenced this pull request Mar 28, 2023
Use Rayon's TLV directly

This accesses Rayon's `TLV` thread local directly avoiding wrapper functions. This makes rustc work with rust-lang/rustc-rayon#10.

r? `@cuviper`
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Mar 30, 2023
Use Rayon's TLV directly

This accesses Rayon's `TLV` thread local directly avoiding wrapper functions. This makes rustc work with rust-lang/rustc-rayon#10.

r? `@cuviper`
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.

3 participants