Stream: t-compiler/wg-mir-opt

Topic: merge `Operand::Move` and `::Copy`

oli (May 17 2019 at 13:41, on Zulip):

These are used identically almost everywhere. There's just a few places that actually care. I think it may be simpler to just have a single variant Use which has both a Place and a enum UseKind { Move, Copy }. Not sure if that's too dangerous for the cases that care, but the cases that don't would become so much more readable

Santiago Pastorino (May 18 2019 at 00:57, on Zulip):

I guess I could work on this, I'm around that code often :)

Santiago Pastorino (May 18 2019 at 00:58, on Zulip):

at the same time, happy to give the opportunity to somebody else and even to help them if needed

scottmcm (May 18 2019 at 01:34, on Zulip):

Would it make the object bigger? Or would it just get packed into existing padding next to the discriminant?

Conceptually it's probably fine, though, and I don't see any discussion of the form in

oli (May 18 2019 at 08:02, on Zulip):

Some experiments show that the size does not change:

oli (May 18 2019 at 08:02, on Zulip):

although there's general room for improvement

Saleem Jaffer (Jul 23 2019 at 10:34, on Zulip):

@oli @Santiago Pastorino I can take this up :)

oli (Jul 23 2019 at 13:03, on Zulip):

Uh, talk to @eddyb first they split up Operand::Consume to begin with

Saleem Jaffer (Jul 29 2019 at 12:32, on Zulip):

@eddyb Can I pick this up?

eddyb (Jul 30 2019 at 04:22, on Zulip):

I did it for @nikomatsakis, because the MIR borrowck wanted to know that distinction

eddyb (Jul 30 2019 at 04:22, on Zulip):

I don't have a strong preference as long as the infrmation is still there

eddyb (Jul 30 2019 at 04:22, on Zulip):

but do talk to niko

Last update: Sep 27 2020 at 14:15UTC