[PATCH] D37445: [globalisel][tablegen] Map ld and st to G_LOAD and G_STORE. NFC

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 14:21:48 PDT 2017


qcolombet accepted this revision.
qcolombet added a comment.
This revision is now accepted and ready to land.

LGTM with the previous nitpicks fixed.



================
Comment at: utils/TableGen/GlobalISelEmitter.cpp:1996
   /// This is defined using 'GINodeEquiv' in the target description.
-  DenseMap<Record *, const CodeGenInstruction *> NodeEquivs;
+  DenseMap<Record *, Record *> NodeEquivs;
 
----------------
dsanders wrote:
> qcolombet wrote:
> > I don't get why this change is required yet. G_LOAD and G_STORE records are still CodeGenInstruction, aren't they? (I haven't checked)
> I think this is another confusing comment. It's still technically correct but it makes it sound like it's a DenseMap<SDNode, Instruction> when it's now DenseMap<SDNode, GINodeEquiv>. I had to change the values of the map to the GINodeEquiv so I could access the new CheckMMOIsNonAtomic field.
Make sense.
I thought we could have kept CodeGenInstruction and then access the definition of the record to read the CheckMMOIsNonAtomic field, but that wouldn't work given the record would give us the instruction, not the GINodeEquiv.

Thanks for the clarifications.


https://reviews.llvm.org/D37445





More information about the llvm-commits mailing list