<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_ssa/src/mir/operand.rs, branch 1.80.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.80.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.80.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-05-28T16:28:51+00:00</updated>
<entry>
<title>Add an intrinsic for `ptr::metadata`</title>
<updated>2024-05-28T16:28:51+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2024-04-21T23:11:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=459ce3f6bb5d8827835ed9b9f916eb189420b38a'/>
<id>urn:sha1:459ce3f6bb5d8827835ed9b9f916eb189420b38a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `#[macro_use] extern crate tracing` from `rustc_codegen_ssa`.</title>
<updated>2024-05-23T08:02:40+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-05-22T05:08:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8ae0694fcb5887958580145f051bce852f4c8c50'/>
<id>urn:sha1:8ae0694fcb5887958580145f051bce852f4c8c50</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Unify `Rvalue::Aggregate` paths in cg_ssa</title>
<updated>2024-05-12T04:22:51+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2024-05-11T05:00:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dcab06d7d206a1e061233c0e251deb06ef0c1300'/>
<id>urn:sha1:dcab06d7d206a1e061233c0e251deb06ef0c1300</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactoring after the `PlaceValue` addition</title>
<updated>2024-05-11T03:09:37+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2024-04-13T02:11:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9be16ebe89122d4d9f169bfe6358779e1b917c77'/>
<id>urn:sha1:9be16ebe89122d4d9f169bfe6358779e1b917c77</id>
<content type='text'>
I added `PlaceValue` in 123775, but kept that one line-by-line simple because it touched so many places.

This goes through to add more helpers &amp; docs, and change some `PlaceRef` to `PlaceValue` where the type didn't need to be included.

No behaviour changes.
</content>
</entry>
<entry>
<title>Auto merge of #123886 - scottmcm:more-rvalue-operands, r=matthewjasper</title>
<updated>2024-05-10T20:17:22+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-05-10T20:17:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6e1d94708a0a4a35ca7e46c6cac98adf62fe800e'/>
<id>urn:sha1:6e1d94708a0a4a35ca7e46c6cac98adf62fe800e</id>
<content type='text'>
Avoid `alloca`s in codegen for simple `mir::Aggregate` statements

The core idea here is to remove the abstraction penalty of simple newtypes in codegen.

Even something simple like constructing a
```rust
#[repr(transparent)] struct Foo(u32);
```
forces an `alloca` to be generated in nightly right now.

Certainly LLVM can optimize that away, but it would be nice if it didn't have to.

Quick example:
```rust
#[repr(transparent)]
pub struct Transparent32(u32);

#[no_mangle]
pub fn make_transparent(x: u32) -&gt; Transparent32 {
    let a = Transparent32(x);
    a
}
```
on nightly we produce &lt;https://rust.godbolt.org/z/zcvoM79ae&gt;
```llvm
define noundef i32 `@make_transparent(i32` noundef %x) unnamed_addr #0 {
  %a = alloca i32, align 4
  store i32 %x, ptr %a, align 4
  %0 = load i32, ptr %a, align 4, !noundef !3
  ret i32 %0
}
```
but after this PR we produce
```llvm
define noundef i32 `@make_transparent(i32` noundef %x) unnamed_addr #0 {
start:
  ret i32 %x
}
```
(even before the optimizer runs).
</content>
</entry>
<entry>
<title>Make builtin_deref just return a Ty</title>
<updated>2024-05-10T02:55:00+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-05-10T02:45:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d50c2b0a52f31fbbf6e6bfa27c129b513fdddb0b'/>
<id>urn:sha1:d50c2b0a52f31fbbf6e6bfa27c129b513fdddb0b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make SSA aggregates without needing an alloca</title>
<updated>2024-05-09T03:38:04+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2024-04-14T07:51:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c38f75c21f016bffbf841ed5abce338f94201bde'/>
<id>urn:sha1:c38f75c21f016bffbf841ed5abce338f94201bde</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `extern crate rustc_middle` from numerous crates.</title>
<updated>2024-04-29T04:50:45+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-04-29T03:56:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=99e036bd21a542a06a58f8867186b38157e25b66'/>
<id>urn:sha1:99e036bd21a542a06a58f8867186b38157e25b66</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #122053 - erikdesjardins:alloca, r=nikic</title>
<updated>2024-04-24T03:00:44+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-04-24T03:00:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=29a56a3b1c06a624c0c06728c0af756d09df6b1b'/>
<id>urn:sha1:29a56a3b1c06a624c0c06728c0af756d09df6b1b</id>
<content type='text'>
Stop using LLVM struct types for alloca

The alloca type has no semantic meaning, only the size (and alignment, but we specify it explicitly) matter. Using `[N x i8]` is a more direct way to specify that we want `N` bytes, and avoids relying on LLVM's struct layout. It is likely that a future LLVM version will change to an untyped alloca representation.

Split out from #121577.

r? `@ghost`
</content>
</entry>
<entry>
<title>use [N x i8] for alloca types</title>
<updated>2024-04-12T01:42:35+00:00</updated>
<author>
<name>Erik Desjardins</name>
<email>erikdesjardins@users.noreply.github.com</email>
</author>
<published>2024-02-24T05:48:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f4426c189f2587fc5e8f48bf518cc75a37d93d0f'/>
<id>urn:sha1:f4426c189f2587fc5e8f48bf518cc75a37d93d0f</id>
<content type='text'>
</content>
</entry>
</feed>
