Auto merge of #68516 - oli-obk:spaces, r=eddyb

Render const pointers in MIR more compactly

Split out from #67133 to make that PR simpler

cc @RalfJung

r? @eddyb
This commit is contained in:
bors 2020-01-25 13:14:59 +00:00
commit 3bf71b3d5c
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);
// ...