<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/builder, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-07-18T23:30:42+00:00</updated>
<entry>
<title>gpu host code generation</title>
<updated>2025-07-18T23:30:42+00:00</updated>
<author>
<name>Manuel Drehwald</name>
<email>git@manuel.drehwald.info</email>
</author>
<published>2025-07-02T23:36:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4a1a5a42952d05533fd4309ad0f3fe290abbf57c'/>
<id>urn:sha1:4a1a5a42952d05533fd4309ad0f3fe290abbf57c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #143388 - bjorn3:lto_refactors, r=compiler-errors</title>
<updated>2025-07-17T01:58:28+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2025-07-17T01:58:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=be5f8f299dce5c04e2a644546e780d8a07b0b14f'/>
<id>urn:sha1:be5f8f299dce5c04e2a644546e780d8a07b0b14f</id>
<content type='text'>
Various refactors to the LTO handling code

In particular reducing the sharing of code paths between fat and thin-LTO and making the fat LTO implementation more self-contained. This also moves some autodiff handling out of cg_ssa into cg_llvm given that Enzyme only works with LLVM anyway and an implementation for another backend may do things entirely differently. This will also make it a bit easier to split LTO handling out of the coordinator thread main loop into a separate loop, which should reduce the complexity of the coordinator thread.
</content>
</entry>
<entry>
<title>Eliminate all direct uses of LLVMMDStringInContext2</title>
<updated>2025-07-14T08:27:08+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>github333195615777966@oli-obk.de</email>
</author>
<published>2025-07-09T09:48:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7f95f042677f86df55da58cdebe9ce31a1e928a8'/>
<id>urn:sha1:7f95f042677f86df55da58cdebe9ce31a1e928a8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge `typeid_metadata` and `create_metadata`</title>
<updated>2025-07-14T08:27:08+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>github333195615777966@oli-obk.de</email>
</author>
<published>2025-07-09T09:31:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b9baf63f99bbdf69571e26fca907af032c416591'/>
<id>urn:sha1:b9baf63f99bbdf69571e26fca907af032c416591</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make some "safe" llvm ops actually sound</title>
<updated>2025-07-10T07:27:41+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>github333195615777966@oli-obk.de</email>
</author>
<published>2025-07-10T07:27:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=84eeca2e2fc40bb8d6641846f18af9d8fc6a9681'/>
<id>urn:sha1:84eeca2e2fc40bb8d6641846f18af9d8fc6a9681</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove unused config param from WriteBackendMethods::autodiff</title>
<updated>2025-07-03T16:13:25+00:00</updated>
<author>
<name>bjorn3</name>
<email>17426603+bjorn3@users.noreply.github.com</email>
</author>
<published>2025-07-03T16:09:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8d63c7a1d68cd30383dceb03a76499c658fa7f40'/>
<id>urn:sha1:8d63c7a1d68cd30383dceb03a76499c658fa7f40</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add and use generic get_const_int function</title>
<updated>2025-06-16T21:23:06+00:00</updated>
<author>
<name>Manuel Drehwald</name>
<email>git@manuel.drehwald.info</email>
</author>
<published>2025-06-16T21:23:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6359123d25e8ff38c6fbf280559d5f829bec691f'/>
<id>urn:sha1:6359123d25e8ff38c6fbf280559d5f829bec691f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add custom enzyme markers to target methods</title>
<updated>2025-04-25T05:39:52+00:00</updated>
<author>
<name>bit-aloo</name>
<email>sshourya17@gmail.com</email>
</author>
<published>2025-04-20T10:18:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9bc04016e6dffd6398ea62f05b9320e0198ab0be'/>
<id>urn:sha1:9bc04016e6dffd6398ea62f05b9320e0198ab0be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #139700 - EnzymeAD:autodiff-flags, r=oli-obk</title>
<updated>2025-04-24T15:19:44+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-04-24T15:19:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c3f811f02ff3fe52d7ceaa7aa15f44059221a48d'/>
<id>urn:sha1:c3f811f02ff3fe52d7ceaa7aa15f44059221a48d</id>
<content type='text'>
Autodiff flags

Interestingly, it seems that some other projects have conflicts with exactly the same LLVM optimization passes as autodiff.
At least `LLVMRustOptimize` has exactly the flags that we need to disable problematic opt passes.

This PR enables us to compile code where users differentiate two identical functions in the same module. This has been especially common in test cases, but it's not impossible to encounter in the wild.

It also enables two new flags for testing/debugging. I consider writing an MCP to upgrade PrintPasses to be a standalone -Z flag, since it is *not* the same as `-Z print-llvm-passes`, which IMHO gives less useful output. A discussion can be found here: [#t-compiler/llvm &gt; Print llvm passes. @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/187780-t-compiler.2Fllvm/topic/Print.20llvm.20passes.2E/near/511533038)

Finally, it improves `PrintModBefore` and `PrintModAfter`. They used to work reliable, but now we just schedule enzyme as part of an existing ModulePassManager (MPM). Since Enzyme is last in the MPM scheduling, PrintModBefore became very inaccurate. It used to print the input module, which we gave to the Enzyme and was great to create llvm-ir reproducer. However, lately the MPM would run the whole `default&lt;O3&gt;` pipeline, which heavily modifies the llvm module, before we pass it to Enzyme. That made it impossible to use the flag to create llvm-ir reproducers for Enzyme bugs. We now schedule a PrintModule pass just before Enzyme, solving this problem.

Based on the PrintPass output, it also _seems_ like changing `registerEnzymeAndPassPipeline(PB, true);` to `registerEnzymeAndPassPipeline(PB, false);` has no effect. In theory, the bool should tell Enzyme to schedule some helpful passes in the PassBuilder. However, since it doesn't do anything and I'm not 100% sure anymore on whether we really need it, I'll just disable it for now and postpone investigations.

r? ``@oli-obk``

closes #139471

Tracking:

- https://github.com/rust-lang/rust/issues/124509
</content>
</entry>
<entry>
<title>working dupv and dupvonly for fwd mode</title>
<updated>2025-04-16T21:13:31+00:00</updated>
<author>
<name>Manuel Drehwald</name>
<email>git@manuel.drehwald.info</email>
</author>
<published>2025-04-05T07:10:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a68ae0cbc1d923b69ef690f32b651ecf583ff27f'/>
<id>urn:sha1:a68ae0cbc1d923b69ef690f32b651ecf583ff27f</id>
<content type='text'>
</content>
</entry>
</feed>
