<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp, branch 1.74.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.74.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.74.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-09-08T14:45:29+00:00</updated>
<entry>
<title>debuginfo: add compiler option to allow compressed debuginfo sections</title>
<updated>2023-09-08T14:45:29+00:00</updated>
<author>
<name>Augie Fackler</name>
<email>augie@google.com</email>
</author>
<published>2023-07-12T21:07:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=af9e55068c2e38b1f7afc7f7374a5a53c59b2001'/>
<id>urn:sha1:af9e55068c2e38b1f7afc7f7374a5a53c59b2001</id>
<content type='text'>
LLVM already supports emitting compressed debuginfo. In debuginfo=full
builds, the debug section is often a large amount of data, and it
typically compresses very well (3x is not unreasonable.) We add a new
knob to allow debuginfo to be compressed when the matching LLVM
functionality is present. Like clang, if a known-but-disabled
compression mechanism is requested, we disable compression and emit
uncompressed debuginfo sections.

The API is different enough on older LLVMs we just pretend the support
is missing on LLVM older than 16.
</content>
</entry>
<entry>
<title>Rollup merge of #113593 - rcvalle:rust-cfi-fix-90546, r=wesleywiser</title>
<updated>2023-08-08T19:44:43+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2023-08-08T19:44:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c097e48082e3453bf7670c79bb1b282a9e900e1d'/>
<id>urn:sha1:c097e48082e3453bf7670c79bb1b282a9e900e1d</id>
<content type='text'>
CFI: Fix error compiling core with LLVM CFI enabled

Fix #90546 by filtering out global value function pointer types from the type tests, and adding the LowerTypeTests pass to the rustc LTO optimization pipelines.
</content>
</entry>
<entry>
<title>Only enable hotness information when PGO is available</title>
<updated>2023-08-08T13:36:55+00:00</updated>
<author>
<name>Jakub Beránek</name>
<email>berykubik@gmail.com</email>
</author>
<published>2023-08-07T15:56:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9d417d7c86259498855fc50ba0e853edbb13320d'/>
<id>urn:sha1:9d417d7c86259498855fc50ba0e853edbb13320d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>CFI: Fix error compiling core with LLVM CFI enabled</title>
<updated>2023-08-07T22:59:15+00:00</updated>
<author>
<name>Ramon de C Valle</name>
<email>rcvalle@users.noreply.github.com</email>
</author>
<published>2023-07-11T23:19:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f837c48f0d8da1a205b7ab97846bc90f8d497271'/>
<id>urn:sha1:f837c48f0d8da1a205b7ab97846bc90f8d497271</id>
<content type='text'>
Fix #90546 by filtering out global value function pointer types from the
type tests, and adding the LowerTypeTests pass to the rustc LTO
optimization pipelines.
</content>
</entry>
<entry>
<title>Add hotness data to LLVM remarks</title>
<updated>2023-08-04T08:31:00+00:00</updated>
<author>
<name>Jakub Beránek</name>
<email>berykubik@gmail.com</email>
</author>
<published>2023-08-03T21:24:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=93bdc01adf7091e473e36620d3f748ce0481f880'/>
<id>urn:sha1:93bdc01adf7091e473e36620d3f748ce0481f880</id>
<content type='text'>
This makes sure that if PGO is used, remarks generated using `-Zremark-dir` will include the `Hotness` attribute.
</content>
</entry>
<entry>
<title>Auto merge of #113339 - lqd:respect-filters, r=tmiasko</title>
<updated>2023-08-01T23:15:20+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2023-08-01T23:15:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f77c624c03065298ac76051a4c1c5c2cfeafc0e0'/>
<id>urn:sha1:f77c624c03065298ac76051a4c1c5c2cfeafc0e0</id>
<content type='text'>
Filter out short-lived LLVM diagnostics before they reach the rustc handler

During profiling I saw remark passes being unconditionally enabled: for example `Machine Optimization Remark Emitter`.

The diagnostic remarks enabled by default are [from missed optimizations and opt analyses](https://github.com/rust-lang/rust/pull/113339#discussion_r1259480303). They are created by LLVM, passed to the diagnostic handler on the C++ side, emitted to rust, where they are unpacked, C++ strings are converted to rust, etc.

Then they are discarded in the vast majority of the time (i.e. unless some kind of `-Cremark` has enabled some of these passes' output to be printed).

These unneeded allocations are very short-lived, basically only lasting between the LLVM pass emitting them and the rust handler where they are discarded. So it doesn't hugely impact max-rss, and is only a slight reduction in instruction count (cachegrind reports a reduction between 0.3% and 0.5%) _on linux_. It's possible that targets without `jemalloc` or with a worse allocator, may optimize these less.

It is however significant in the aggregate, looking at the total number of allocated bytes:
- it's the biggest source of allocations according to dhat, on the benchmarks I've tried e.g. `syn` or `cargo`
- allocations on `syn` are reduced by 440MB, 17% (from 2440722647 bytes total, to 2030461328 bytes)
- allocations on `cargo` are reduced by 6.6GB, 19% (from 35371886402 bytes total, to 28723987743 bytes)

Some of these diagnostics objects [are allocated in LLVM](https://github.com/rust-lang/rust/pull/113339#discussion_r1252387484) *before* they're emitted to our diagnostic handler, where they'll be filtered out. So we could remove those in the future, but that will require changing a few LLVM call-sites upstream, so I left a FIXME.
</content>
</entry>
<entry>
<title>filter LLVM diagnostics before crossing the rust bridge</title>
<updated>2023-08-01T21:01:20+00:00</updated>
<author>
<name>Rémy Rakic</name>
<email>remy.rakic+github@gmail.com</email>
</author>
<published>2023-07-14T14:26:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=77d01103a3b6d4cd0c1713d2f17233c620c7747d'/>
<id>urn:sha1:77d01103a3b6d4cd0c1713d2f17233c620c7747d</id>
<content type='text'>
this will eliminate many short-lived allocations (e.g. 20% of the memory used
building cargo) when unpacking the diagnostic and converting its various
C++ strings into rust strings, just to be filtered out most of the time.
</content>
</entry>
<entry>
<title>Update the minimum external LLVM to 15</title>
<updated>2023-07-27T21:07:08+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2023-07-27T21:07:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=190ded84434f435b9626a07278b9ed0e7603bd11'/>
<id>urn:sha1:190ded84434f435b9626a07278b9ed0e7603bd11</id>
<content type='text'>
</content>
</entry>
<entry>
<title>address feedback from nikic and oli-obk https://github.com/rust-lang/rust/pull/113723/files</title>
<updated>2023-07-20T07:53:06+00:00</updated>
<author>
<name>khei4</name>
<email>kk.asano.luxy@gmail.com</email>
</author>
<published>2023-07-19T08:00:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c7bf20dfdcbedbba05445035bcabd4f706ba9e42'/>
<id>urn:sha1:c7bf20dfdcbedbba05445035bcabd4f706ba9e42</id>
<content type='text'>
use slice memcpy rather than strcpy and write it on stdout

use println on failure

Co-authored-by: Oli Scherer &lt;github35764891676564198441@oli-obk.de&gt;
</content>
</entry>
<entry>
<title>print on rustc_codegen_llvm and rename malloc and cpy c_char</title>
<updated>2023-07-16T15:37:52+00:00</updated>
<author>
<name>khei4</name>
<email>kk.asano.luxy@gmail.com</email>
</author>
<published>2023-07-16T15:37:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4d307c482271ea3575a13b6c04222911e7706189'/>
<id>urn:sha1:4d307c482271ea3575a13b6c04222911e7706189</id>
<content type='text'>
</content>
</entry>
</feed>
