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

Prevent the start_bx basic block in codegen from having two Builders at the same time #108739

Merged
merged 2 commits into from
Mar 11, 2023
Merged

Conversation

823984418
Copy link
Contributor

@823984418 823984418 commented Mar 4, 2023

Here, at the same time, there are two start_llbb builder, this should be unexpected.

@rustbot
Copy link
Collaborator

rustbot commented Mar 4, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cjgillot (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 4, 2023
@cjgillot
Copy link
Contributor

cjgillot commented Mar 4, 2023

Could you elaborate what is the bug you are fixing, how does your patch fix it, and maybe add a test?

@bjorn3
Copy link
Member

bjorn3 commented Mar 4, 2023

I like to work towards using a single builder for the entire function. This PR is a step in this direction, however there are other places where multiple builders exist at the same time. In addition I don't think this PR on it's own is actually useful. A PR that makes it such that only a single builder is used will changes this anyway except rather than dropping the builder here is would switch the current basic block of the builder later in this function.

@823984418
Copy link
Contributor Author

823984418 commented Mar 5, 2023

If someone wants to through rustc_codegen_ssa write a codegen backend of pure Rust, this may cause trouble to the internal variability (For example: RefCell::borrow_mut()) of the BasicBlock.

But now there are no bugs. This is just a problem I met on the way to study and try.

@cjgillot
Copy link
Contributor

cjgillot commented Mar 5, 2023

r? @bjorn3

@rustbot rustbot assigned bjorn3 and unassigned cjgillot Mar 5, 2023
@bjorn3
Copy link
Member

bjorn3 commented Mar 5, 2023

I'm currently quite busy with among other things uni work. I'm going to re-assign it to you, but if you want to assign it to someone else that is fine too.

r? @cjgillot

@rustbot rustbot assigned cjgillot and unassigned bjorn3 Mar 5, 2023
@cjgillot
Copy link
Contributor

cjgillot commented Mar 7, 2023

If someone wants to through rustc_codegen_ssa write a codegen backend of pure Rust, this may cause trouble to the internal variability (For example: RefCell::borrow_mut()) of the BasicBlock.

But now there are no bugs. This is just a problem I met on the way to study and try.

Then, could you add a comment explaining why there is this statement.
r=me with the comment

@cjgillot
Copy link
Contributor

cjgillot commented Mar 8, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Mar 8, 2023

📌 Commit 871b4fe has been approved by cjgillot

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 8, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 8, 2023
Prevent the `start_bx` basic block in codegen from having two `Builder`s at the same time

Here, at the same time, there are two `start_llbb` builder, this should be unexpected.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 9, 2023
Prevent the `start_bx` basic block in codegen from having two `Builder`s at the same time

Here, at the same time, there are two `start_llbb` builder, this should be unexpected.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 10, 2023
Prevent the `start_bx` basic block in codegen from having two `Builder`s at the same time

Here, at the same time, there are two `start_llbb` builder, this should be unexpected.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 11, 2023
Prevent the `start_bx` basic block in codegen from having two `Builder`s at the same time

Here, at the same time, there are two `start_llbb` builder, this should be unexpected.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 11, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#104363 (Make `unused_allocation` lint against `Box::new` too)
 - rust-lang#106633 (Stabilize `nonzero_min_max`)
 - rust-lang#106844 (allow negative numeric literals in `concat!`)
 - rust-lang#108071 (Implement goal caching with the new solver)
 - rust-lang#108542 (Force parentheses around `match` expression in binary expression)
 - rust-lang#108690 (Place size limits on query keys and values)
 - rust-lang#108708 (Prevent overflow through Arc::downgrade)
 - rust-lang#108739 (Prevent the `start_bx` basic block in codegen from having two `Builder`s at the same time)
 - rust-lang#108806 (Querify register_tools and post-expansion early lints)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d7372a1 into rust-lang:master Mar 11, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants