<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/rustllvm/RustWrapper.cpp, branch 1.22.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.22.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.22.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2017-09-30T07:22:15+00:00</updated>
<entry>
<title>rustc: Enable LTO and multiple codegen units</title>
<updated>2017-09-30T07:22:15+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2017-07-23T15:14:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ded38dbfc258f8e253ab61d1bca08b21efa2bf3d'/>
<id>urn:sha1:ded38dbfc258f8e253ab61d1bca08b21efa2bf3d</id>
<content type='text'>
This commit is a refactoring of the LTO backend in Rust to support compilations
with multiple codegen units. The immediate result of this PR is to remove the
artificial error emitted by rustc about `-C lto -C codegen-units-8`, but longer
term this is intended to lay the groundwork for LTO with incremental compilation
and ultimately be the underpinning of ThinLTO support.

The problem here that needed solving is that when rustc is producing multiple
codegen units in one compilation LTO needs to merge them all together.
Previously only upstream dependencies were merged and it was inherently relied
on that there was only one local codegen unit. Supporting this involved
refactoring the optimization backend architecture for rustc, namely splitting
the `optimize_and_codegen` function into `optimize` and `codegen`. After an LLVM
module has been optimized it may be blocked and queued up for LTO, and only
after LTO are modules code generated.

Non-LTO compilations should look the same as they do today backend-wise, we'll
spin up a thread for each codegen unit and optimize/codegen in that thread. LTO
compilations will, however, send the LLVM module back to the coordinator thread
once optimizations have finished. When all LLVM modules have finished optimizing
the coordinator will invoke the LTO backend, producing a further list of LLVM
modules. Currently this is always a list of one LLVM module. The coordinator
then spawns further work to run LTO and code generation passes over each module.

In the course of this refactoring a number of other pieces were refactored:

* Management of the bytecode encoding in rlibs was centralized into one module
  instead of being scattered across LTO and linking.
* Some internal refactorings on the link stage of the compiler was done to work
  directly from `CompiledModule` structures instead of lists of paths.
* The trans time-graph output was tweaked a little to include a name on each
  bar and inflate the size of the bars a little
</content>
</entry>
<entry>
<title>update attributes API usage</title>
<updated>2017-07-21T17:09:10+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2017-07-21T16:15:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b022d54641586ae1de72cd6325eb09aee7753cca'/>
<id>urn:sha1:b022d54641586ae1de72cd6325eb09aee7753cca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustllvm: split DebugLoc in UnpackOptimizationDiagnostic</title>
<updated>2017-07-21T17:09:10+00:00</updated>
<author>
<name>Tim Neumann</name>
<email>mail@timnn.me</email>
</author>
<published>2017-07-21T12:29:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1ee87b3765b4cc0ab78aec25009e4e5295024f93'/>
<id>urn:sha1:1ee87b3765b4cc0ab78aec25009e4e5295024f93</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustllvm: update to SyncScope::ID</title>
<updated>2017-07-21T12:32:00+00:00</updated>
<author>
<name>Tim Neumann</name>
<email>mail@timnn.me</email>
</author>
<published>2017-07-21T12:02:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a53676762bbe492154926393b187f0ee49df6e98'/>
<id>urn:sha1:a53676762bbe492154926393b187f0ee49df6e98</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustllvm: adjust usage of createNameSpace</title>
<updated>2017-07-21T12:31:54+00:00</updated>
<author>
<name>Tim Neumann</name>
<email>mail@timnn.me</email>
</author>
<published>2017-07-21T11:31:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=48424c97490b3a449c57d8540529af4971386c4a'/>
<id>urn:sha1:48424c97490b3a449c57d8540529af4971386c4a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustllvm: adjust usage of createPointerType</title>
<updated>2017-07-21T12:31:51+00:00</updated>
<author>
<name>Tim Neumann</name>
<email>mail@timnn.me</email>
</author>
<published>2017-07-21T11:26:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5f9e432534d54aebc2fa45f83becd13bccafa2d7'/>
<id>urn:sha1:5f9e432534d54aebc2fa45f83becd13bccafa2d7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustllvm: use LLVMMetadataRef</title>
<updated>2017-07-21T12:31:46+00:00</updated>
<author>
<name>Tim Neumann</name>
<email>mail@timnn.me</email>
</author>
<published>2017-07-21T11:15:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2c9c8dc5f46bd2db5a5b81acca72a23de75502ec'/>
<id>urn:sha1:2c9c8dc5f46bd2db5a5b81acca72a23de75502ec</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'profiling' of github.com:whitequark/rust into profiling</title>
<updated>2017-06-04T14:54:39+00:00</updated>
<author>
<name>Marco Castelluccio</name>
<email>mcastelluccio@mozilla.com</email>
</author>
<published>2017-06-04T14:54:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ecba8d6a23d8bafd6296d619180a5f3e09bb21b1'/>
<id>urn:sha1:ecba8d6a23d8bafd6296d619180a5f3e09bb21b1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add NullOp::SizeOf and BinOp::Offset</title>
<updated>2017-05-28T07:43:24+00:00</updated>
<author>
<name>Ariel Ben-Yehuda</name>
<email>ariel.byd@gmail.com</email>
</author>
<published>2017-05-18T15:43:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7b295eea4296eedf7858a001297eadfaace253d3'/>
<id>urn:sha1:7b295eea4296eedf7858a001297eadfaace253d3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add profiling support, through the rustc -Z profile flag.</title>
<updated>2017-05-01T09:16:20+00:00</updated>
<author>
<name>whitequark</name>
<email>whitequark@whitequark.org</email>
</author>
<published>2017-02-13T09:57:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=42754ce710a777b38402b12728daf54d68ea2b50'/>
<id>urn:sha1:42754ce710a777b38402b12728daf54d68ea2b50</id>
<content type='text'>
When -Z profile is passed, the GCDAProfiling LLVM pass is added
to the pipeline, which uses debug information to instrument the IR.
After compiling with -Z profile, the $(OUT_DIR)/$(CRATE_NAME).gcno
file is created, containing initial profiling information.
After running the program built, the $(OUT_DIR)/$(CRATE_NAME).gcda
file is created, containing branch counters.

The created *.gcno and *.gcda files can be processed using
the "llvm-cov gcov" and "lcov" tools. The profiling data LLVM
generates does not faithfully follow the GCC's format for *.gcno
and *.gcda files, and so it will probably not work with other tools
(such as gcov itself) that consume these files.
</content>
</entry>
</feed>
