[PATCH] D24577: [RFC] Move synchronization scope and atomic orderings from SDNode to MachineMemOperand

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 14 10:48:05 PDT 2016


jlebar accepted this revision.
jlebar added a reviewer: jlebar.
jlebar added a comment.
This revision is now accepted and ready to land.

In https://reviews.llvm.org/D24577#570544, @kzhuravl wrote:

> Alternatively, we can introduce a new class, which will describe atomic information and will be derived from MachineMemOperand (MachineAtomicOperand?). Make atomic accessor functions in MachineMemOperand virtual, and override them in the derived class. This way only 4 byte increase for atomic operations. Any thoughts on this?


This would necessarily add a vptr to every MMO object, increasing its size by one word.  So that would be just as bad from a memory perspective (and substantially worse from a CPU perspective).

I think I'm OK with this as-is.  I agree it makes sense for these fields to live on MMO.


https://reviews.llvm.org/D24577





More information about the llvm-commits mailing list