1
Fork 0

Auto merge of #82727 - oli-obk:shrinkmem, r=pnkfelix

Test the effect of shrinking the size of Rvalue by 16 bytes

r? `@ghost`
This commit is contained in:
bors 2021-03-08 08:39:24 +00:00
commit 27885a94c6
29 changed files with 94 additions and 66 deletions

View file

@ -463,7 +463,7 @@ impl CloneShimBuilder<'tcx> {
let cond = self.make_place(Mutability::Mut, tcx.types.bool);
let compute_cond = self.make_statement(StatementKind::Assign(box (
cond,
Rvalue::BinaryOp(BinOp::Ne, Operand::Copy(end), Operand::Copy(beg)),
Rvalue::BinaryOp(BinOp::Ne, box (Operand::Copy(end), Operand::Copy(beg))),
)));
// `if end != beg { goto loop_body; } else { goto loop_end; }`
@ -536,8 +536,7 @@ impl CloneShimBuilder<'tcx> {
Place::from(beg),
Rvalue::BinaryOp(
BinOp::Add,
Operand::Copy(Place::from(beg)),
Operand::Constant(self.make_usize(1)),
box (Operand::Copy(Place::from(beg)), Operand::Constant(self.make_usize(1))),
),
)))];
self.block(statements, TerminatorKind::Goto { target: BasicBlock::new(1) }, false);
@ -590,8 +589,7 @@ impl CloneShimBuilder<'tcx> {
Place::from(beg),
Rvalue::BinaryOp(
BinOp::Add,
Operand::Copy(Place::from(beg)),
Operand::Constant(self.make_usize(1)),
box (Operand::Copy(Place::from(beg)), Operand::Constant(self.make_usize(1))),
),
)));
self.block(vec![statement], TerminatorKind::Goto { target: BasicBlock::new(6) }, true);