<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/back/write.rs, branch 1.61.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.61.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.61.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-02-28T23:57:25+00:00</updated>
<entry>
<title>Querify `global_backend_features`</title>
<updated>2022-02-28T23:57:25+00:00</updated>
<author>
<name>Simonas Kazlauskas</name>
<email>git@kazlauskas.me</email>
</author>
<published>2021-09-24T15:02:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=df701a292ce552fddad2048cfcb6edaf90222d85'/>
<id>urn:sha1:df701a292ce552fddad2048cfcb6edaf90222d85</id>
<content type='text'>
At the very least this serves to deduplicate the diagnostics that are
output about unknown target features provided via CLI.
</content>
</entry>
<entry>
<title>Adopt let else in more places</title>
<updated>2022-02-19T16:27:43+00:00</updated>
<author>
<name>est31</name>
<email>MTest31@outlook.com</email>
</author>
<published>2022-02-18T23:48:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2ef8af66196f7cc270a0532ea989f2fc6bc6885d'/>
<id>urn:sha1:2ef8af66196f7cc270a0532ea989f2fc6bc6885d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sess/cg: re-introduce split dwarf kind</title>
<updated>2022-01-06T09:32:42+00:00</updated>
<author>
<name>David Wood</name>
<email>david.wood@huawei.com</email>
</author>
<published>2021-10-08T16:10:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=08ed338f561b000ce5672b55c0545fa7f3f13591'/>
<id>urn:sha1:08ed338f561b000ce5672b55c0545fa7f3f13591</id>
<content type='text'>
In #79570, `-Z split-dwarf-kind={none,single,split}` was replaced by `-C
split-debuginfo={off,packed,unpacked}`. `-C split-debuginfo`'s packed
and unpacked aren't exact parallels to single and split, respectively.

On Unix, `-C split-debuginfo=packed` will put debuginfo into object
files and package debuginfo into a DWARF package file (`.dwp`) and
`-C split-debuginfo=unpacked` will put debuginfo into dwarf object files
and won't package it.

In the initial implementation of Split DWARF, split mode wrote sections
which did not require relocation into a DWARF object (`.dwo`) file which
was ignored by the linker and then packaged those DWARF objects into
DWARF packages (`.dwp`). In single mode, sections which did not require
relocation were written into object files but ignored by the linker and
were not packaged. However, both split and single modes could be
packaged or not, the primary difference in behaviour was where the
debuginfo sections that did not require link-time relocation were
written (in a DWARF object or the object file).

This commit re-introduces a `-Z split-dwarf-kind` flag, which can be
used to pick between split and single modes when `-C split-debuginfo` is
used to enable Split DWARF (either packed or unpacked).

Signed-off-by: David Wood &lt;david.wood@huawei.com&gt;
</content>
</entry>
<entry>
<title>Auto merge of #91125 - eskarn:llvm-passes-plugin-support, r=nagisa</title>
<updated>2021-12-30T02:53:09+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2021-12-30T02:53:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1b3a5f29dd9f9ba9de0d501857d4603a54e15707'/>
<id>urn:sha1:1b3a5f29dd9f9ba9de0d501857d4603a54e15707</id>
<content type='text'>
Allow loading LLVM plugins with both legacy and new pass manager

Opening a draft PR to get feedback and start discussion on this feature. There is already a codegen option `passes` which allow giving a list of LLVM pass names, however we currently can't use a LLVM pass plugin (as described here : https://llvm.org/docs/WritingAnLLVMPass.html), the only available passes are the LLVM built-in ones.

The proposed modification would be to add another codegen option `pass-plugins`, which can be set with a list of paths to shared library files. These libraries are loaded using the LLVM function `PassPlugin::Load`, which calls the expected symbol `lvmGetPassPluginInfo`, and register the pipeline parsing and optimization callbacks.

An example usage with a single plugin and 3 passes would look like this in the `.cargo/config`:

```toml
rustflags = [
    "-C", "pass-plugins=/tmp/libLLVMPassPlugin",
    "-C", "passes=pass1 pass2 pass3",
]
```
This would give the same functionality as the opt LLVM tool directly integrated in rust build system.

Additionally, we can also not specify the `passes` option, and use a plugin which inserts passes in the optimization pipeline, as one could do using clang.
</content>
</entry>
<entry>
<title>rustc_codegen_llvm: move should_use_new_llvm_pass_manager function to llvm_util</title>
<updated>2021-12-20T13:49:04+00:00</updated>
<author>
<name>Axel Cohen</name>
<email>axel.cohen@eshard.com</email>
</author>
<published>2021-12-20T13:49:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=052961b0138b38a9da26e88e3db6aac19e8c070c'/>
<id>urn:sha1:052961b0138b38a9da26e88e3db6aac19e8c070c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #91931 - LegionMammal978:less-inband-codegen_llvm, r=davidtwco</title>
<updated>2021-12-18T13:49:40+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2021-12-18T13:49:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ca3d129ee38fc73085f7ad5b525e5245f7ad59f1'/>
<id>urn:sha1:ca3d129ee38fc73085f7ad5b525e5245f7ad59f1</id>
<content type='text'>
Remove `in_band_lifetimes` from `rustc_codegen_llvm`

See #91867 for more information.

This one took a while. This crate has dozens of functions not associated with any type, and most of them were using in-band lifetimes for `'ll` and `'tcx`.
</content>
</entry>
<entry>
<title>Rollup merge of #91566 - cbeuw:remap-dwo-name, r=davidtwco</title>
<updated>2021-12-18T13:49:38+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2021-12-18T13:49:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1c42199c8f62a4b4df6c71a047b28d1cbb075c7f'/>
<id>urn:sha1:1c42199c8f62a4b4df6c71a047b28d1cbb075c7f</id>
<content type='text'>
Apply path remapping to DW_AT_GNU_dwo_name when producing split DWARF

`--remap-path-prefix` doesn't apply to paths to `.o` (in case of packed) or `.dwo` (in case of unpacked) files in `DW_AT_GNU_dwo_name`. GCC also has this bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91888
</content>
</entry>
<entry>
<title>Remove `in_band_lifetimes` from `rustc_codegen_llvm`</title>
<updated>2021-12-16T19:43:32+00:00</updated>
<author>
<name>LegionMammal978</name>
<email>mattlloydhouse@gmail.com</email>
</author>
<published>2021-12-14T18:49:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4937a55dfb19e804c3c974e5341b70dcd76192d4'/>
<id>urn:sha1:4937a55dfb19e804c3c974e5341b70dcd76192d4</id>
<content type='text'>
See #91867 for more information.
</content>
</entry>
<entry>
<title>Revert "Produce .dwo file for Packed as well"</title>
<updated>2021-12-13T11:40:59+00:00</updated>
<author>
<name>Andy Wang</name>
<email>cbeuw.andy@gmail.com</email>
</author>
<published>2021-12-13T11:40:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=707f72c1dffc33f2980945371aa4fb2d9f77af6d'/>
<id>urn:sha1:707f72c1dffc33f2980945371aa4fb2d9f77af6d</id>
<content type='text'>
This reverts commit 32810223c6b743de889eda96b442f621c293a848.
</content>
</entry>
<entry>
<title>Auto merge of #91654 - nikic:llvmbc-section-flags, r=nagisa</title>
<updated>2021-12-13T10:35:28+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2021-12-13T10:35:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a737592a3d8f0f5ec76524c880d226f28bef2c84'/>
<id>urn:sha1:a737592a3d8f0f5ec76524c880d226f28bef2c84</id>
<content type='text'>
Use module inline assembly to embed bitcode

In LLVM 14, our current method of setting section flags to avoid
embedding the `.llvmbc` section into final compilation artifacts
will no longer work, see issue #90326. The upstream recommendation
is to instead embed the entire bitcode using module-level inline
assembly, which is what this change does.

I've kept the existing code for platforms where we do not need to
set section flags, but possibly we should always be using the
inline asm approach (which would have to look a bit different for MachO).

r? `@nagisa`
</content>
</entry>
</feed>
