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

Unify validity checks into a single query #108364

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

Noratrieb
Copy link
Member

Previously, there were two queries to check whether a type allows the 0x01 or zeroed bitpattern.

I am planning on adding a further initness to check in #100423, truly uninit for MaybeUninit, which would make this three queries. This seems overkill for such a small feature, so this PR unifies them into one.

I am not entirely happy with the naming and key type and open for improvements.

r? oli-obk

@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 Feb 22, 2023
@rustbot
Copy link
Collaborator

rustbot commented Feb 22, 2023

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@rust-log-analyzer

This comment has been minimized.

Previously, there were two queries to check whether a type allows the
0x01 or zeroed bitpattern.

I am planning on adding a further initness to check, truly uninit for
MaybeUninit, which would make this three queries. This seems overkill
for such a small feature, so this PR unifies them into one.
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 23, 2023

📌 Commit 025d2a1 has been approved by compiler-errors

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 Feb 23, 2023
@compiler-errors
Copy link
Member

@bors rollup queue is backed up, shouldn't affect perf (much)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 26, 2023
…, r=compiler-errors

Unify validity checks into a single query

Previously, there were two queries to check whether a type allows the 0x01 or zeroed bitpattern.

I am planning on adding a further initness to check in rust-lang#100423, truly uninit for MaybeUninit, which would make this three queries. This seems overkill for such a small feature, so this PR unifies them into one.

I am not entirely happy with the naming and key type and open for improvements.

r? oli-obk
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Feb 26, 2023
…, r=compiler-errors

Unify validity checks into a single query

Previously, there were two queries to check whether a type allows the 0x01 or zeroed bitpattern.

I am planning on adding a further initness to check in rust-lang#100423, truly uninit for MaybeUninit, which would make this three queries. This seems overkill for such a small feature, so this PR unifies them into one.

I am not entirely happy with the naming and key type and open for improvements.

r? oli-obk
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 27, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#108319 (Don't project specializable RPITIT projection)
 - rust-lang#108364 (Unify validity checks into a single query)
 - rust-lang#108463 (bootstrap: Update the output of the `check` descriptions)
 - rust-lang#108477 (Make `match` arm comma suggestion more clear)
 - rust-lang#108486 (Merge diagnostic_items duplicate diagnostics)
 - rust-lang#108494 (Clean up JS files code a bit)
 - rust-lang#108500 (update Miri)
 - rust-lang#108502 (Don't trigger error for ReError when other region is empty.)
 - rust-lang#108513 (Remove `@nagisa` from review rotation)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3fcc79f into rust-lang:master Feb 27, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 27, 2023
@Noratrieb Noratrieb deleted the validity-checks-refactor branch February 27, 2023 10:22
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 1, 2023
…ntrinsics, r=michaelwoerister

Further unify validity intrinsics

Also merges the inhabitedness check into the query to further unify the
code paths.

Depends on rust-lang#108364
qinheping added a commit to qinheping/kani that referenced this pull request Mar 10, 2023
Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
Unify validity checks into a single query rust-lang/rust#108364
s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
Switch to EarlyBinder for type_of query rust-lang/rust#107753
Rename interner funcs rust-lang/rust#108250
Optimize mk_region rust-lang/rust#108020
Clarify iterator interners rust-lang/rust#108112
qinheping added a commit to qinheping/kani that referenced this pull request Mar 10, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Mar 15, 2023
…, r=compiler-errors

Unify validity checks into a single query

Previously, there were two queries to check whether a type allows the 0x01 or zeroed bitpattern.

I am planning on adding a further initness to check in rust-lang#100423, truly uninit for MaybeUninit, which would make this three queries. This seems overkill for such a small feature, so this PR unifies them into one.

I am not entirely happy with the naming and key type and open for improvements.

r? oli-obk
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Apr 17, 2023
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
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.

6 participants