<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/rustllvm/PassWrapper.cpp, branch 1.45.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.45.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.45.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-05-21T19:05:19+00:00</updated>
<entry>
<title>rustllvm: Fix warnings about unused function parameters</title>
<updated>2020-05-21T19:05:19+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-05-21T17:53:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d0a48d19f5e10869ea4a137d4bb3b84d62966e31'/>
<id>urn:sha1:d0a48d19f5e10869ea4a137d4bb3b84d62966e31</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #72248 - petrochenkov:codemodel, r=Amanieu</title>
<updated>2020-05-17T21:22:48+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2020-05-17T21:22:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5f472813dfa3f4c380a7a24e350d3e6a5a66ae7c'/>
<id>urn:sha1:5f472813dfa3f4c380a7a24e350d3e6a5a66ae7c</id>
<content type='text'>
Cleanup and document `-C code-model`

r? @Amanieu
</content>
</entry>
<entry>
<title>rustc_target: Stop using "string typing" for code models</title>
<updated>2020-05-16T09:02:11+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-05-07T00:34:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=55a94bdc384673fe2ae7bc2b0275a5777c830b52'/>
<id>urn:sha1:55a94bdc384673fe2ae7bc2b0275a5777c830b52</id>
<content type='text'>
Introduce `enum CodeModel` instead.
</content>
</entry>
<entry>
<title>Consistently use LLVM lifetime markers during codegen</title>
<updated>2020-05-14T13:23:24+00:00</updated>
<author>
<name>Tomasz Miąsko</name>
<email>tomasz.miasko@gmail.com</email>
</author>
<published>2020-05-13T00:00:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bbb63d4554b03feee481bc799a04f183abaff1d4'/>
<id>urn:sha1:bbb63d4554b03feee481bc799a04f183abaff1d4</id>
<content type='text'>
Ensure that inliner inserts lifetime markers if they have been emitted during
codegen. Otherwise if allocas from inlined functions are merged together,
lifetime markers from one function might invalidate load &amp; stores performed
by the other one.
</content>
</entry>
<entry>
<title>Rollup merge of #71234 - maurer:init-array, r=cuviper</title>
<updated>2020-05-09T11:36:32+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2020-05-09T11:36:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ce05553c62689bd58184970cf58e59a663cc4658'/>
<id>urn:sha1:ce05553c62689bd58184970cf58e59a663cc4658</id>
<content type='text'>
rustllvm: Use .init_array rather than .ctors

LLVM TargetMachines default to using the (now-legacy) .ctors
representation of init functions. Mixing .ctors and .init_array
representations can cause issues when linking with lld.

This happens in practice for:

* Our profiling runtime which is currently implicitly built with
  .init_array since it is built by clang, which sets this field.
* External C/C++ code that may be linked into the same process.

Fixes: #71233
</content>
</entry>
<entry>
<title>Auto merge of #71528 - alexcrichton:no-more-bitcode, r=nnethercote</title>
<updated>2020-04-29T23:47:27+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2020-04-29T23:47:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1357af3a55e24c7d28abb5eda258662f2307fadd'/>
<id>urn:sha1:1357af3a55e24c7d28abb5eda258662f2307fadd</id>
<content type='text'>
Store LLVM bitcode in object files, not compressed

This commit is an attempted resurrection of #70458 where LLVM bitcode
emitted by rustc into rlibs is stored into object file sections rather
than in a separate file. The main rationale for doing this is that when
rustc emits bitcode it will no longer use a custom compression scheme
which makes it both easier to interoperate with existing tools and also
cuts down on compile time since this compression isn't happening.

The blocker for this in #70458 turned out to be that native linkers
didn't handle the new sections well, causing the sections to either
trigger bugs in the linker or actually end up in the final linked
artifact. This commit attempts to address these issues by ensuring that
native linkers ignore the new sections by inserting custom flags with
module-level inline assembly.

Note that this does not currently change the API of the compiler at all.
The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate
whether the bitcode should be present in the object file or not.

Finally, note that an important consequence of this commit, which is also
one of its primary purposes, is to enable rustc's `-Clto` bitcode
loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here
is that when you're building with LTO Cargo will tell rustc to skip
codegen of all intermediate crates and only generate LLVM IR. Today
rustc will generate both object code and LLVM IR, but the object code is
later simply thrown away, wastefully.
</content>
</entry>
<entry>
<title>Use .init_array rather than .ctors</title>
<updated>2020-04-29T20:38:59+00:00</updated>
<author>
<name>Matthew Maurer</name>
<email>matthew.r.maurer@gmail.com</email>
</author>
<published>2020-04-17T02:40:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0e7d5be4b808bd7ccb1d45aa8f7e5026a15aee93'/>
<id>urn:sha1:0e7d5be4b808bd7ccb1d45aa8f7e5026a15aee93</id>
<content type='text'>
LLVM TargetMachines default to using the (now-legacy) .ctors
representation of init functions. Mixing .ctors and .init_array
representations can cause issues when linking with lld.

This happens in practice for:

* Our profiling runtime which is currently implicitly built with
  .init_array since it is built by clang, which sets this field.
* External C/C++ code that may be linked into the same process.

To support legacy systems which may use .ctors, targets may now specify
that they use .ctors via the use_ctors attribute which defaults to
false.

For debugging and manual control, -Z use-ctors-section=yes/no will allow
manual override.

Fixes: #71233
</content>
</entry>
<entry>
<title>Store LLVM bitcode in object files, not compressed</title>
<updated>2020-04-29T18:57:26+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2020-04-23T18:45:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ef89cc8f042a980e72e9d0262c267bfffd9e75fe'/>
<id>urn:sha1:ef89cc8f042a980e72e9d0262c267bfffd9e75fe</id>
<content type='text'>
This commit is an attempted resurrection of #70458 where LLVM bitcode
emitted by rustc into rlibs is stored into object file sections rather
than in a separate file. The main rationale for doing this is that when
rustc emits bitcode it will no longer use a custom compression scheme
which makes it both easier to interoperate with existing tools and also
cuts down on compile time since this compression isn't happening.

The blocker for this in #70458 turned out to be that native linkers
didn't handle the new sections well, causing the sections to either
trigger bugs in the linker or actually end up in the final linked
artifact. This commit attempts to address these issues by ensuring that
native linkers ignore the new sections by inserting custom flags with
module-level inline assembly.

Note that this does not currently change the API of the compiler at all.
The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate
whether the bitcode should be present in the object file or not.

Finally, note that an important consequence of this commit, which is also
one of its primary purposes, is to enable rustc's `-Clto` bitcode
loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here
is that when you're building with LTO Cargo will tell rustc to skip
codegen of all intermediate crates and only generate LLVM IR. Today
rustc will generate both object code and LLVM IR, but the object code is
later simply thrown away, wastefully.
</content>
</entry>
<entry>
<title>codegen_llvm: `RelocMode` -&gt; `RelocModel`</title>
<updated>2020-04-26T08:18:48+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-04-23T17:49:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=045272558309a7600cb4618db5a2c52384f1d14e'/>
<id>urn:sha1:045272558309a7600cb4618db5a2c52384f1d14e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_target: Stop using "string typing" for relocation models</title>
<updated>2020-04-26T08:18:47+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-04-22T21:46:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fb91e5ed2fe72c6ce38abe0ec2ca47cbeac78d8d'/>
<id>urn:sha1:fb91e5ed2fe72c6ce38abe0ec2ca47cbeac78d8d</id>
<content type='text'>
Introduce `enum RelocModel` instead.
</content>
</entry>
</feed>
