<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_session/src, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-10-03T15:02:37+00:00</updated>
<entry>
<title>Auto merge of #143613 - Enselic:panic-abort-uwtables, r=petrochenkov</title>
<updated>2025-10-03T15:02:37+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-10-03T15:02:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f437c86ef829e43c6aa27641f53040a999a092af'/>
<id>urn:sha1:f437c86ef829e43c6aa27641f53040a999a092af</id>
<content type='text'>
Fix backtraces with `-C panic=abort` on linux; emit unwind tables by default

The linux backtrace unwinder relies on unwind tables to work properly, and generating and printing a backtrace is done by for example the default panic hook.

Begin emitting unwind tables by default again with `-C panic=abort` (see history below) so that backtraces work.

Closes https://github.com/rust-lang/rust/issues/81902 which is **regression-from-stable-to-stable**
Closes https://github.com/rust-lang/rust/issues/94815

### History

Backtraces with `-C panic=abort` used to work in Rust 1.22 but broke in Rust 1.23, because in 1.23 we stopped emitting unwind tables with `-C panic=abort` (see https://github.com/rust-lang/rust/pull/45031 and https://github.com/rust-lang/rust/issues/81902#issuecomment-3046487084).

In 1.45 a workaround in the form of `-C force-unwind-tables=yes` was added (see https://github.com/rust-lang/rust/pull/69984).

`-C panic=abort` was added in [Rust 1.10](https://blog.rust-lang.org/2016/07/07/Rust-1.10/#what-s-in-1-10-stable) and the motivation was binary size and compile time. But given how confusing that behavior has turned out to be, it is better to make binary size optimization opt-in with `-C force-unwind-tables=no` rather than default since the current default breaks backtraces.

Besides, if binary size is a primary concern, there are many other tricks that can be used that has a higher impact.

# Release Note Entry Draft:

## Compatibility Notes

* [Fix backtraces with `-C panic=abort` on Linux by generating unwind tables by default](https://github.com/rust-lang/rust/pull/143613). Build with `-C force-unwind-tables=no` to keep omitting unwind tables.

try-job: aarch64-apple
try-job: armhf-gnu
try-job: aarch64-msvc-1
</content>
</entry>
<entry>
<title>Fix backtraces with `-C panic=abort` on linux; emit unwind tables by default</title>
<updated>2025-10-02T17:46:41+00:00</updated>
<author>
<name>Martin Nordholts</name>
<email>martin.nordholts@codetale.se</email>
</author>
<published>2025-07-07T20:36:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fe66eaa67acc47525db6f13cf97d54780d87b805'/>
<id>urn:sha1:fe66eaa67acc47525db6f13cf97d54780d87b805</id>
<content type='text'>
The linux backtrace unwinder relies on unwind tables to work properly,
and generating and printing a backtrace is done by for example the
default panic hook.

Begin emitting unwind tables by default again with `-C panic=abort` (see
history below) so that backtraces work.

History
=======

Backtraces with `-C panic=abort` used to work in Rust 1.22 but broke in
Rust 1.23, because in 1.23 we stopped emitting unwind tables with `-C
panic=abort` (see 24cc38e3b00).

In 1.45 (see cda994633ee) a workaround in the form
of `-C force-unwind-tables=yes` was added.

`-C panic=abort` was added in [Rust
1.10](https://blog.rust-lang.org/2016/07/07/Rust-1.10/#what-s-in-1-10-stable)
and the motivation was binary size and compile time. But given how
confusing that behavior has turned out to be, it is better to make
binary size optimization opt-in with `-C force-unwind-tables=no` rather
than default since the current default breaks backtraces.

Besides, if binary size is a primary concern, there are many other
tricks that can be used that has a higher impact.
</content>
</entry>
<entry>
<title>Auto merge of #146376 - durin42:dwo-specify-path, r=davidtwco</title>
<updated>2025-09-29T15:06:55+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-09-29T15:06:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dc2c3564d273cf8ccce32dc4f47eaa27063bceb9'/>
<id>urn:sha1:dc2c3564d273cf8ccce32dc4f47eaa27063bceb9</id>
<content type='text'>
debuginfo: add an unstable flag to write split DWARF to an explicit directory

Bazel requires knowledge of outputs from actions at analysis time, including file or directory name. In order to work around the lack of predictable output name for dwo files, we group the dwo files in a subdirectory of --out-dir as a post-processing step before returning control to bazel. Unfortunately some debugging workflows rely on directly opening the dwo file rather than loading the merged dwp file, and our trick of moving the files breaks those users. We can't just hardlink the file or copy it, because with remote build execution we wouldn't end up with the un-moved file copied back to the developer's workstation. As a fix, we add this unstable flag that causes dwo files to be written to a build-system-controllable location, which then lets bazel hoover up the dwo files, but the objects also have the correct path for the dwo files.

r? `@davidtwco`
</content>
</entry>
<entry>
<title>Rollup merge of #147116 - workingjubilee:remove-tdl-abialign, r=Zalathar</title>
<updated>2025-09-29T05:44:54+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-29T05:44:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6c40c16d83e1c239c05602c7127dc64f1033bf3c'/>
<id>urn:sha1:6c40c16d83e1c239c05602c7127dc64f1033bf3c</id>
<content type='text'>
compiler: remove AbiAlign inside TargetDataLayout

AbiAlign is a thin wrapper around Align, extant mostly because we used to track a separate quasi-notion of alignment that was never a real notion of alignment and removing all of it at once was too churny. This PR maintains AbiAlign usage in public API and most of the compiler, but direct access of these fields for TargetDataLayout is now in terms of Align only.
</content>
</entry>
<entry>
<title>Rollup merge of #144197 - KMJ-007:type-tree, r=ZuseZ4</title>
<updated>2025-09-28T16:13:11+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-28T16:13:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c29fb2e57ed0578c9051cc9314b0225f847de710'/>
<id>urn:sha1:c29fb2e57ed0578c9051cc9314b0225f847de710</id>
<content type='text'>
TypeTree support in autodiff

# TypeTrees for Autodiff

## What are TypeTrees?
Memory layout descriptors for Enzyme. Tell Enzyme exactly how types are structured in memory so it can compute derivatives efficiently.

## Structure
```rust
TypeTree(Vec&lt;Type&gt;)

Type {
    offset: isize,  // byte offset (-1 = everywhere)
    size: usize,    // size in bytes
    kind: Kind,     // Float, Integer, Pointer, etc.
    child: TypeTree // nested structure
}
```

## Example: `fn compute(x: &amp;f32, data: &amp;[f32]) -&gt; f32`

**Input 0: `x: &amp;f32`**
```rust
TypeTree(vec![Type {
    offset: -1, size: 8, kind: Pointer,
    child: TypeTree(vec![Type {
        offset: -1, size: 4, kind: Float,
        child: TypeTree::new()
    }])
}])
```

**Input 1: `data: &amp;[f32]`**
```rust
TypeTree(vec![Type {
    offset: -1, size: 8, kind: Pointer,
    child: TypeTree(vec![Type {
        offset: -1, size: 4, kind: Float,  // -1 = all elements
        child: TypeTree::new()
    }])
}])
```

**Output: `f32`**
```rust
TypeTree(vec![Type {
    offset: -1, size: 4, kind: Float,
    child: TypeTree::new()
}])
```

## Why Needed?
- Enzyme can't deduce complex type layouts from LLVM IR
- Prevents slow memory pattern analysis
- Enables correct derivative computation for nested structures
- Tells Enzyme which bytes are differentiable vs metadata

## What Enzyme Does With This Information:

Without TypeTrees (current state):
```llvm
; Enzyme sees generic LLVM IR:
define float ``@distance(ptr*`` %p1, ptr* %p2) {
; Has to guess what these pointers point to
; Slow analysis of all memory operations
; May miss optimization opportunities
}
```

With TypeTrees (our implementation):
```llvm
define "enzyme_type"="{[]:Float@float}" float ``@distance(``
    ptr "enzyme_type"="{[]:Pointer}" %p1,
    ptr "enzyme_type"="{[]:Pointer}" %p2
) {
; Enzyme knows exact type layout
; Can generate efficient derivative code directly
}
```

# TypeTrees - Offset and -1 Explained

## Type Structure

```rust
Type {
    offset: isize, // WHERE this type starts
    size: usize,   // HOW BIG this type is
    kind: Kind,    // WHAT KIND of data (Float, Int, Pointer)
    child: TypeTree // WHAT'S INSIDE (for pointers/containers)
}
```

## Offset Values

### Regular Offset (0, 4, 8, etc.)
**Specific byte position within a structure**

```rust
struct Point {
    x: f32, // offset 0, size 4
    y: f32, // offset 4, size 4
    id: i32, // offset 8, size 4
}
```

TypeTree for `&amp;Point` (internal representation):
```rust
TypeTree(vec![
    Type { offset: 0, size: 4, kind: Float },   // x at byte 0
    Type { offset: 4, size: 4, kind: Float },   // y at byte 4
    Type { offset: 8, size: 4, kind: Integer }  // id at byte 8
])
```

Generates LLVM:
```llvm
"enzyme_type"="{[]:Float@float}"
```

### Offset -1 (Special: "Everywhere")
**Means "this pattern repeats for ALL elements"**

#### Example 1: Array `[f32; 100]`
```rust
TypeTree(vec![Type {
    offset: -1, // ALL positions
    size: 4,    // each f32 is 4 bytes
    kind: Float, // every element is float
}])
```

Instead of listing 100 separate Types with offsets `0,4,8,12...396`

#### Example 2: Slice `&amp;[i32]`
```rust
// Pointer to slice data
TypeTree(vec![Type {
    offset: -1, size: 8, kind: Pointer,
    child: TypeTree(vec![Type {
        offset: -1, // ALL slice elements
        size: 4,    // each i32 is 4 bytes
        kind: Integer
    }])
}])
```

#### Example 3: Mixed Structure
```rust
struct Container {
    header: i64,        // offset 0
    data: [f32; 1000],  // offset 8, but elements use -1
}
```

```rust
TypeTree(vec![
    Type { offset: 0, size: 8, kind: Integer }, // header
    Type { offset: 8, size: 4000, kind: Pointer,
        child: TypeTree(vec![Type {
            offset: -1, size: 4, kind: Float // ALL array elements
        }])
    }
])
```
</content>
</entry>
<entry>
<title>compiler: remove AbiAlign inside TargetDataLayout</title>
<updated>2025-09-28T05:13:53+00:00</updated>
<author>
<name>Jubilee Young</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2025-09-28T03:00:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b3f3e36c72952736be5b9e0360ee5b86148f2c29'/>
<id>urn:sha1:b3f3e36c72952736be5b9e0360ee5b86148f2c29</id>
<content type='text'>
This maintains AbiAlign usage in public API and most of the compiler,
but direct access of these fields is now in terms of Align only.
</content>
</entry>
<entry>
<title>debuginfo: add an unstable flag to write split DWARF to an explicit directory</title>
<updated>2025-09-26T17:34:40+00:00</updated>
<author>
<name>Augie Fackler</name>
<email>augie@google.com</email>
</author>
<published>2025-03-07T03:10:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=77c6acc74ecd44ba7eb5a73c934dffdff7340133'/>
<id>urn:sha1:77c6acc74ecd44ba7eb5a73c934dffdff7340133</id>
<content type='text'>
Bazel requires knowledge of outputs from actions at analysis time,
including file or directory name. In order to work around the lack of
predictable output name for dwo files, we group the dwo files in a
subdirectory of --out-dir as a post-processing step before returning
control to bazel. Unfortunately some debugging workflows rely on
directly opening the dwo file rather than loading the merged dwp file,
and our trick of moving the files breaks those users. We can't just
hardlink the file or copy it, because with remote build execution we
wouldn't end up with the un-moved file copied back to the developer's
workstation. As a fix, we add this unstable flag that causes dwo files
to be written to a build-system-controllable location, which then lets
bazel hoover up the dwo files, but the objects also have the correct
path for the dwo files.
</content>
</entry>
<entry>
<title>Auto merge of #146338 - CrooseGit:dev/reucru01/AArch64-enable-GCS, r=Urgau,davidtwco</title>
<updated>2025-09-24T13:04:19+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-09-24T13:04:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=15283f6fe95e5b604273d13a428bab5fc0788f5a'/>
<id>urn:sha1:15283f6fe95e5b604273d13a428bab5fc0788f5a</id>
<content type='text'>
Extends AArch64 branch protection support to include GCS

Extends existing support for AArch64 branch protection to include support for [Guarded Control Stacks](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022#guarded-control-stack-gcs:~:text=Extraction%20or%20tracking.-,Guarded%20Control%20Stack%20(GCS),-With%20the%202022).
</content>
</entry>
<entry>
<title>Explain tests and setting cfgs</title>
<updated>2025-09-21T17:28:01+00:00</updated>
<author>
<name>Ben Kimock</name>
<email>kimockb@gmail.com</email>
</author>
<published>2025-09-21T17:04:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=aef02fb864349a249207cbd14b51b9fe5f5691ca'/>
<id>urn:sha1:aef02fb864349a249207cbd14b51b9fe5f5691ca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add panic=immediate-abort</title>
<updated>2025-09-21T17:12:18+00:00</updated>
<author>
<name>Ben Kimock</name>
<email>kimockb@gmail.com</email>
</author>
<published>2025-09-07T16:31:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=888679013d1f424adef06267f3630069b4cabd40'/>
<id>urn:sha1:888679013d1f424adef06267f3630069b4cabd40</id>
<content type='text'>
</content>
</entry>
</feed>
