<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/mir-opt/const_debuginfo.main.ConstDebugInfo.diff, branch 1.51.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.51.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.51.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-12-07T01:48:25+00:00</updated>
<entry>
<title>[mir-opt] Allow debuginfo to be generated for a constant or a Place</title>
<updated>2020-12-07T01:48:25+00:00</updated>
<author>
<name>Wesley Wiser</name>
<email>wwiser@gmail.com</email>
</author>
<published>2020-05-30T19:02:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=01aec8d18556be5e8d498c2f331b9015b7befde2'/>
<id>urn:sha1:01aec8d18556be5e8d498c2f331b9015b7befde2</id>
<content type='text'>
Prior to this commit, debuginfo was always generated by mapping a name
to a Place. This has the side-effect that `SimplifyLocals` cannot remove
locals that are only used for debuginfo because their other uses have
been const-propagated.

To allow these locals to be removed, we now allow debuginfo to point to
a constant value. The `ConstProp` pass detects when debuginfo points to
a local with a known constant value and replaces it with the value. This
allows the later `SimplifyLocals` pass to remove the local.
</content>
</entry>
</feed>
