Add a distinct OperandValue::ZeroSized variant for ZSTs#111318
Add a distinct OperandValue::ZeroSized variant for ZSTs#111318bors merged 1 commit intorust-lang:masterfrom
OperandValue::ZeroSized variant for ZSTs#111318Conversation
|
Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo |
ebcd632 to
f315f57
Compare
There was a problem hiding this comment.
Could this be an assert instead?
There was a problem hiding this comment.
It could. I wrote it this way for structural similarity with the other arms.
Maybe I should have made this be match (operand.val, operand_kind) instead? Unsure.
There was a problem hiding this comment.
Itś not that big of a deal, both branches are pretty short
There was a problem hiding this comment.
Itś not that big of a deal, both branches are pretty short
|
@bors r+ |
|
📌 Commit f315f57db8721e0993d9866c2cd5c3cae0fb6700 has been approved by It is now in the queue for this repository. |
|
⌛ Testing commit f315f57db8721e0993d9866c2cd5c3cae0fb6700 with merge 28d692dccbadccb687ae571daf3591510a451529... |
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
|
Looks like a legit failure; I'll dig in. @bors r- |
b95bfa5 to
9495095
Compare
4e90953 to
9495095
Compare
|
Ah, so we do need to pass ZSTs in some ABIs. Fix: https://github.com/rust-lang/rust/compare/b95bfa5b2db64d5e985e8a6fa83358df3df345aa..9495095fe68b737254a20e39b3c744ca41e66d6f @bors r=compiler-errors |
…ompiler-errors Add a distinct `OperandValue::ZeroSized` variant for ZSTs These tend to have special handling in a bunch of places anyway, so the variant helps remember that. And I think it's easier to grok than `Aggregate`s sometimes being `Immediates` (after all, I previously got that wrong and caused rust-lang#109992). As a minor bonus, it means we don't need to generate poison LLVM values for ZSTs to pass around in `OperandValue::Immediate`s. Inspired by rust-lang#110021 (comment), so r? `@compiler-errors`
…ompiler-errors Add a distinct `OperandValue::ZeroSized` variant for ZSTs These tend to have special handling in a bunch of places anyway, so the variant helps remember that. And I think it's easier to grok than `Aggregate`s sometimes being `Immediates` (after all, I previously got that wrong and caused rust-lang#109992). As a minor bonus, it means we don't need to generate poison LLVM values for ZSTs to pass around in `OperandValue::Immediate`s. Inspired by rust-lang#110021 (comment), so r? ``@compiler-errors``
…ompiler-errors Add a distinct `OperandValue::ZeroSized` variant for ZSTs These tend to have special handling in a bunch of places anyway, so the variant helps remember that. And I think it's easier to grok than `Aggregate`s sometimes being `Immediates` (after all, I previously got that wrong and caused rust-lang#109992). As a minor bonus, it means we don't need to generate poison LLVM values for ZSTs to pass around in `OperandValue::Immediate`s. Inspired by rust-lang#110021 (comment), so r? ```@compiler-errors```
This comment has been minimized.
This comment has been minimized.
These tend to have special handling in a bunch of places anyway, so the variant helps remember that. And I think it's easier to grok than non-Scalar Aggregates sometimes being `Immediates` (like I got wrong and caused 109992). As a minor bonus, it means we don't need to generate poison LLVM values for them to pass around in `OperandValue::Immediate`s.
9495095 to
bf36193
Compare
Rollup of 7 pull requests Successful merges: - rust-lang#108459 (rustdoc: Fix LinkReplacer link matching) - rust-lang#111318 (Add a distinct `OperandValue::ZeroSized` variant for ZSTs) - rust-lang#111892 (rustdoc: add interaction delays for tooltip popovers) - rust-lang#111980 (Preserve substs in opaques recorded in typeck results) - rust-lang#112024 (Don't suggest break through nested items) - rust-lang#112128 (Don't compute inlining status of mono items in advance.) - rust-lang#112141 (remove reference to Into in ? operator core/std docs, fix rust-lang#111655) Failed merges: - rust-lang#112071 (Group rfcs tests) r? `@ghost` `@rustbot` modify labels: rollup
These tend to have special handling in a bunch of places anyway, so the variant helps remember that. And I think it's easier to grok than
Aggregates sometimes beingImmediates(after all, I previously got that wrong and caused #109992). As a minor bonus, it means we don't need to generate poison LLVM values for ZSTs to pass around inOperandValue::Immediates.Inspired by #110021 (comment), so
r? @compiler-errors