Render const pointers in MIR more compactly

This commit is contained in:
Oliver Scherer 2019-12-23 17:41:06 +01:00
parent dee12bb2b7
commit 9a2d5e87d6
4 changed files with 13 additions and 7 deletions

View file

@ -14,7 +14,7 @@ fn main() {}
// START rustc.FOO.PromoteTemps.before.mir
// bb0: {
// ...
// _5 = const Scalar(AllocId(1).0x0) : &i32;
// _5 = const Scalar(alloc1+0) : &i32;
// _4 = &(*_5);
// _3 = [move _4];
// _2 = &_3;
@ -31,7 +31,7 @@ fn main() {}
// START rustc.BAR.PromoteTemps.before.mir
// bb0: {
// ...
// _5 = const Scalar(AllocId(0).0x0) : &i32;
// _5 = const Scalar(alloc0+0) : &i32;
// _4 = &(*_5);
// _3 = [move _4];
// _2 = &_3;

View file

@ -10,10 +10,10 @@ fn main() {
// START rustc.main.ConstProp.before.mir
// bb0: {
// ...
// _3 = const Scalar(AllocId(0).0x0) : &u8;
// _3 = const Scalar(alloc0+0) : &u8;
// _2 = (*_3);
// ...
// _5 = const Scalar(AllocId(0).0x0) : &u8;
// _5 = const Scalar(alloc0+0) : &u8;
// _4 = (*_5);
// _1 = Add(move _2, move _4);
// ...