[llvm] r294993 - GlobalISel: represent atomic loads & stores via the MachineMemOperand.

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 07:20:14 PST 2017


On 14 February 2017 at 21:49, Tim Northover via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> On 14 Feb 2017, at 12:41, Ahmed Bougacha <ahmed.bougacha at gmail.com> wrote:
>> In existing Machine passes, it's always correct to drop the MMO,
>> right?  I'm worried relying on it for semantic meaning could cause
>> weird miscompiles if we ever try to use them.
>
> Bother. The information it contains is almost identical to what we actually need for ISel, so I'd prefer not to reinvent it.
>
> It seems like we could either tighten up the constraints on generic instructions: one MemOperand, which must not be dropped. It'd be pretty easy to verify that (except in the face of a pass mangling-without-dropping it, which seems unlikely).
>
> Otherwise, we could add an official MachineOperand kind that just wraps a MachineMemOperand somehow. That'd definitely not be droppable (because nothing else knows about it yet and we'd stomp on anyone that tries), though it'd bake the MachineInstr interface substantially more confusing IMO.

Do we have a way to "stomp on anyone that tries" automatically?
Because otherwise checking in the verifier that we still have a
MemOperand around sounds like the better option.

>
> I *think* I favour the first. Thoughts?
>
> Tim.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list