<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src, branch 1.77.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.77.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.77.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-02-09T02:48:51+00:00</updated>
<entry>
<title>[Beta 1.77] Fix bootstrapping from 1.76</title>
<updated>2024-02-09T02:48:51+00:00</updated>
<author>
<name>Eric Huss</name>
<email>eric@huss.org</email>
</author>
<published>2024-02-09T02:48:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0e89228bd7c3a8bde4ddd3b3f480f55286c4382d'/>
<id>urn:sha1:0e89228bd7c3a8bde4ddd3b3f480f55286c4382d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #120495 - clubby789:remove-amdgpu-kernel, r=oli-obk</title>
<updated>2024-01-31T11:10:53+00:00</updated>
<author>
<name>Nadrieril</name>
<email>Nadrieril@users.noreply.github.com</email>
</author>
<published>2024-01-31T11:10:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=573e7f181dc1a9c4fe0dbd669e38fc4ac1baa644'/>
<id>urn:sha1:573e7f181dc1a9c4fe0dbd669e38fc4ac1baa644</id>
<content type='text'>
Remove the `abi_amdgpu_kernel` feature

The tracking issue (#51575) has been closed for 3 years, with no activity for 5.
</content>
</entry>
<entry>
<title>Remove the `abi_amdgpu_kernel` feature</title>
<updated>2024-01-30T15:46:40+00:00</updated>
<author>
<name>clubby789</name>
<email>jamie@hill-daniel.co.uk</email>
</author>
<published>2024-01-30T15:39:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f6b21e90d1ec01081bc2619efb68af6788a63d65'/>
<id>urn:sha1:f6b21e90d1ec01081bc2619efb68af6788a63d65</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add missing potential_query_instability for keys and values in hashmap</title>
<updated>2024-01-30T04:43:10+00:00</updated>
<author>
<name>yukang</name>
<email>moorekang@gmail.com</email>
</author>
<published>2024-01-30T04:42:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ad526d831e295facc198610a27350076aa5aa438'/>
<id>urn:sha1:ad526d831e295facc198610a27350076aa5aa438</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #120062 - davidtwco:llvm-data-layout-check, r=wesleywiser</title>
<updated>2024-01-27T12:19:41+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-01-27T12:19:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8af70c7a189195363d1786fcb6578451f890db81'/>
<id>urn:sha1:8af70c7a189195363d1786fcb6578451f890db81</id>
<content type='text'>
llvm: change data layout bug to an error and make it trigger more

Fixes #33446.

Don't skip the inconsistent data layout check for custom LLVMs or non-built-in targets.

With #118708, all targets will have a simple test that would trigger this error if LLVM's data layouts do change - so data layouts would be corrected during the LLVM upgrade. Therefore, with builtin targets, this error won't happen with our LLVM because each target will have been confirmed to work. With non-builtin targets, this error is probably useful to have because you can change the data layout in your target and if it is wrong then that could lead to bugs.

When using a custom LLVM, the same justification makes sense for non-builtin targets as with our LLVM, the user can update their target to match their LLVM and that's probably a good thing to do. However, with a custom LLVM, the user cannot change the builtin target data layouts if they don't match - though given that the compiler's data layout is used for layout computation and a bunch of other things - you could get some bugs because of the mismatch and probably want to know about that. I'm not sure if this is something that people do and is okay, but I doubt it?

`CFG_LLVM_ROOT` was also always set during local development with `download-ci-llvm` so this bug would never trigger locally.

In #33446, two points are raised:

- In the issue itself, changing this from a `bug!` to a proper error is what is suggested, by using `isCompatibleDataLayout` from LLVM, but that function still just does the same thing that we do and check for equality, so I've avoided the additional code necessary to do that FFI call.
- `@Mark-Simulacrum` suggests a different check is necessary to maintain backwards compatibility with old LLVM versions. I don't know how often this comes up, but we can do that with some simple string manipulation + LLVM version checks as happens already for LLVM 17 just above this diff.
</content>
</entry>
<entry>
<title>Remove unused features</title>
<updated>2024-01-25T14:01:33+00:00</updated>
<author>
<name>clubby789</name>
<email>jamie@hill-daniel.co.uk</email>
</author>
<published>2024-01-14T20:08:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fd29f74ff8d787f707a40bc5dbcd8f7827100f5e'/>
<id>urn:sha1:fd29f74ff8d787f707a40bc5dbcd8f7827100f5e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #119911 - NCGThompson:is-statically-known, r=oli-obk</title>
<updated>2024-01-25T05:16:53+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-01-25T05:16:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=039d887928361df98ca530471b609378be93983a'/>
<id>urn:sha1:039d887928361df98ca530471b609378be93983a</id>
<content type='text'>
Replacement of #114390: Add new intrinsic `is_var_statically_known` and optimize pow for powers of two

This adds a new intrinsic `is_val_statically_known` that lowers to [``@llvm.is.constant.*`](https://llvm.org/docs/LangRef.html#llvm-is-constant-intrinsic).` It also applies the intrinsic in the int_pow methods to recognize and optimize the idiom `2isize.pow(x)`. See #114390 for more discussion.

While I have extended the scope of the power of two optimization from #114390, I haven't added any new uses for the intrinsic. That can be done in later pull requests.

Note: When testing or using the library, be sure to use `--stage 1` or higher. Otherwise, the intrinsic will be a noop and the doctests will be skipped. If you are trying out edits, you may be interested in [`--keep-stage 0`](https://rustc-dev-guide.rust-lang.org/building/suggested.html#faster-builds-with---keep-stage).

Fixes #47234
Resolves #114390
`@Centri3`
</content>
</entry>
<entry>
<title>Add new intrinsic `is_constant` and optimize `pow`</title>
<updated>2024-01-19T18:46:27+00:00</updated>
<author>
<name>Catherine Flores</name>
<email>catherine.3.flores@gmail.com</email>
</author>
<published>2023-08-01T15:35:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5a4561749a18fa96691f9cf79699e6ab2f1f7b2c'/>
<id>urn:sha1:5a4561749a18fa96691f9cf79699e6ab2f1f7b2c</id>
<content type='text'>
Fix overflow check

Make MIRI choose the path randomly and rename the intrinsic

Add back test

Add miri test and make it operate on `ptr`

Define `llvm.is.constant` for primitives

Update MIRI comment and fix test in stage2

Add const eval test

Clarify that both branches must have the same side effects

guaranteed non guarantee

use immediate type instead

Co-Authored-By: Ralf Jung &lt;post@ralfj.de&gt;
</content>
</entry>
<entry>
<title>LLVM 18 x86 data layout update</title>
<updated>2024-01-19T09:52:01+00:00</updated>
<author>
<name>Matthew Maurer</name>
<email>mmaurer@google.com</email>
</author>
<published>2023-10-12T17:36:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dbff90c2a7c751cf9d6843cd585429beb100c17d'/>
<id>urn:sha1:dbff90c2a7c751cf9d6843cd585429beb100c17d</id>
<content type='text'>
With https://reviews.llvm.org/D86310 LLVM now has i128 aligned to
16-bytes on x86 based platforms. This will be in LLVM-18. This patch
updates all our spec targets to be 16-byte aligned, and removes the
alignment when speaking to older LLVM.

This results in Rust overaligning things relative to LLVM on older LLVMs.

This alignment change was discussed in rust-lang/compiler-team#683

See #54341 for additional information about why this is happening and
where this will be useful in the future.

This *does not* stabilize `i128`/`u128` for FFI.
</content>
</entry>
<entry>
<title>llvm: simplify data layout check</title>
<updated>2024-01-18T10:46:03+00:00</updated>
<author>
<name>David Wood</name>
<email>david.wood@huawei.com</email>
</author>
<published>2024-01-17T14:26:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=46652dd254bc9c413d14cec637c7f21ac6601e05'/>
<id>urn:sha1:46652dd254bc9c413d14cec637c7f21ac6601e05</id>
<content type='text'>
Don't skip the inconsistent data layout check for custom LLVMs.

With #118708, all targets will have a simple test that would trigger this
check if LLVM's data layouts do change - so data layouts would be
corrected during the LLVM upgrade. Therefore, with builtin targets, this
check won't trigger with our LLVM because each target will have been
confirmed to work. With non-builtin targets, this check is probably
useful to have because you can change the data layout in your target and
if its wrong then that could lead to bugs.

When using a custom LLVM, the same justification makes sense for
non-builtin targets as with our LLVM, the user can update their target to
match their LLVM and that's probably a good thing to do. However, with
a custom LLVM, the user cannot change the builtin target data layouts if
they don't match - though given that the compiler's data layout is used
for layout computation and a bunch of other things - you could get some
bugs because of the mismatch and probably want to know about that.

`CFG_LLVM_ROOT` was also always set during local development with
`download-ci-llvm` so this bug would never trigger locally.

Signed-off-by: David Wood &lt;david@davidtw.co&gt;
</content>
</entry>
</feed>
