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

Trans should use LLVM in a threadsafe fashion #6511

Closed
alexcrichton opened this issue May 15, 2013 · 1 comment
Closed

Trans should use LLVM in a threadsafe fashion #6511

alexcrichton opened this issue May 15, 2013 · 1 comment
Labels
A-codegen Area: Code generation

Comments

@alexcrichton
Copy link
Member

I recently wrote some unit tests for rusti, and because unit tests are by default run in parallel, it exercised the trans stage of the compiler in parallel. Things quickly fell apart and this never worked.

It would be nice to be able to invoke the compiler in parallel from within one process. This may just entail throwing a huge lock around trans for now, but it would also be awesome to use LLVM in a threadsafe way

bors added a commit that referenced this issue Jun 11, 2013
…=graydon

This is a reopening of #6570, and almost fixes #6511.

Note that this doesn't actually enable building a threadsafe LLVM, because that will require an LLVM rebuild which will be bundled with the upgrades in #6713.

What this does do, however, is removes all thread-unsafe usage of LLVM from the compiler.
bors added a commit that referenced this issue Jun 11, 2013
…=graydon

This is a reopening of #6570, and almost fixes #6511.

Note that this doesn't actually enable building a threadsafe LLVM, because that will require an LLVM rebuild which will be bundled with the upgrades in #6713.

What this does do, however, is removes all thread-unsafe usage of LLVM from the compiler.
@alexcrichton
Copy link
Member Author

Closing in favor of #7071

flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 30, 2021
…-by-byte-size, r=flip1995

size_of_in_element_count: Disable lint on division by byte-size

Fixes rust-lang#6511

It is fairly common to divide some length in bytes by the byte-size of a single element before creating a `from_raw_parts` slice or similar operation. This lint would erroneously disallow such expressions.

Just in case, instead of simply disabling this lint in the RHS of a division, keep track of the inversion and enable it again on recursive division.

---

changelog: Do not trigger size_of_in_element_count when dividing by element size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation
Projects
None yet
Development

No branches or pull requests

1 participant