[PATCH] SDAG: Remove OPC_MarkGlueResults and associated logic. NFC

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 18:12:47 PDT 2016


I noticed a funny thing while trying to refactor some parts of
SelectionDAG to avoid undefined behaviour on my way to fixing
llvm.org/PR26808.

The OPC_MarkGlueResults node isn't ever generated for any of the
backends. This in turn means that the very questionable use of
GlueResultNodesMatched where we peer into deleted SDNodes isn't ever
hit, which is nice since that would be horrible undefined behaviour.

The attached patch just removes the opcode and related baggage. Sound
good?

Note that I did keep the logic we have for handling the case where a
root node is Glue, but I moved it out of UpdateChainsAndGlue to the one
place it happens. This code is also never reached and I think we should
change it to an assert, but it's harder to prove that it's unreachable
so I think it makes sense to remove as a separate change.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: no-markglueresults.patch
Type: text/x-patch
Size: 15128 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160428/844a878a/attachment.bin>


More information about the llvm-commits mailing list