<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/codegen/placement-new.rs, branch try-perf</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try-perf</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try-perf'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-07-22T12:28:48+00:00</updated>
<entry>
<title>Rename `tests/codegen` into `tests/codegen-llvm`</title>
<updated>2025-07-22T12:28:48+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2025-07-21T12:34:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a27f3e3fd1e4d16160f8885b6b06665b5319f56c'/>
<id>urn:sha1:a27f3e3fd1e4d16160f8885b6b06665b5319f56c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/codegen: use -Copt-level=3 instead of -O</title>
<updated>2025-02-11T21:41:35+00:00</updated>
<author>
<name>Jubilee Young</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2025-02-09T03:45:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3c0c9b6770f1ac0324be91580f52b6f45346e47b'/>
<id>urn:sha1:3c0c9b6770f1ac0324be91580f52b6f45346e47b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add codegen test</title>
<updated>2024-10-22T09:25:38+00:00</updated>
<author>
<name>Slanterns</name>
<email>slanterns.w@gmail.com</email>
</author>
<published>2024-10-22T08:33:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7782401c520ab1e744dbcf58d0f0254672da9026'/>
<id>urn:sha1:7782401c520ab1e744dbcf58d0f0254672da9026</id>
<content type='text'>
</content>
</entry>
<entry>
<title>allocate before calling T::default in &lt;Arc&lt;T&gt;&gt;::default()</title>
<updated>2024-10-10T13:50:35+00:00</updated>
<author>
<name>Joshua Wong</name>
<email>joshuawong@anticentri.st</email>
</author>
<published>2024-10-09T18:24:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5e474f7d83fc931f355cfdadf394313e57290050'/>
<id>urn:sha1:5e474f7d83fc931f355cfdadf394313e57290050</id>
<content type='text'>
Same rationale as in the previous commit.
</content>
</entry>
<entry>
<title>allocate before calling T::default in &lt;Box&lt;T&gt;&gt;::default()</title>
<updated>2024-10-10T13:49:24+00:00</updated>
<author>
<name>Joshua Wong</name>
<email>joshuawong@anticentri.st</email>
</author>
<published>2024-10-09T18:24:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dd0620b86721ae8cae86736443acd3f72ba6fc32'/>
<id>urn:sha1:dd0620b86721ae8cae86736443acd3f72ba6fc32</id>
<content type='text'>
The `Box&lt;T: Default&gt;` impl currently calls `T::default()` before allocating
the `Box`.

Most `Default` impls are trivial, which should in theory allow
LLVM to construct `T: Default` directly in the `Box` allocation when calling
`&lt;Box&lt;T&gt;&gt;::default()`.

However, the allocation may fail, which necessitates calling `T's` destructor if it has one.
If the destructor is non-trivial, then LLVM has a hard time proving that it's
sound to elide, which makes it construct `T` on the stack first, and then copy it into the allocation.

Create an uninit `Box` first, and then write `T::default` into it, so that LLVM now only needs to prove
that the `T::default` can't panic, which should be trivial for most `Default` impls.
</content>
</entry>
<entry>
<title>add initial tests for placement new changes</title>
<updated>2024-10-10T13:47:26+00:00</updated>
<author>
<name>Joshua Wong</name>
<email>joshuawong@anticentri.st</email>
</author>
<published>2024-10-09T18:24:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8a1462265f839607f96acea4bed183736598422d'/>
<id>urn:sha1:8a1462265f839607f96acea4bed183736598422d</id>
<content type='text'>
</content>
</entry>
</feed>
