[PATCH] Enforce that the SDNode inside SDUse is not null
Pete Cooper
peter_cooper at apple.com
Thu Jun 25 17:34:37 PDT 2015
Hi Hal
This is a spin off from http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150622/284125.html <http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150622/284125.html>.
Although an SDValue can contain a null SDNode*, it is useful for defining iterators to know that SDNode’s operands cannot be null SDNode’s. Specifically, this patch ensures that the SDUse’s used as operands are never set to point to a null SDNode*.
The only situation where this is allowed is immediately prior to deleting a node when we need to clear the node operands. For this i introduced a reset method on SDUse with a note to say when it should be used.
Cheers
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150625/1c6ba1c6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: null-sdnodes.patch
Type: application/octet-stream
Size: 5157 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150625/1c6ba1c6/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150625/1c6ba1c6/attachment-0001.html>
More information about the llvm-commits
mailing list