summary refs log tree commit diff
path: root/src/test/mir-opt/const_debuginfo.rs
AgeCommit message (Collapse)AuthorLines
2020-12-14Disable the constant debuginfo promotion pass by defaultWesley Wiser-1/+1
It doesn't work correctly on *-pc-windows-gnu
2020-12-06[mir-opt] Allow debuginfo to be generated for a constant or a PlaceWesley Wiser-0/+24
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.