This is an archive of the discontinued LLVM Phabricator instance.

TableGen: Allow setting SDNodeProperties on intrinsics
ClosedPublic

Authored by arsenm on Dec 7 2017, 11:51 AM.

Details

Summary

Allows preserving MachineMemOperands on intrinsics
through selection. For reasons I don't understand, this
is a static property of the pattern and the selector
deliberately goes out of its way to drop if not present.

Intrinsics already inherit from SDPatternOperator allowing
them to be used directly in instruction patterns. SDPatternOperator
has a list of SDNodeProperty, but you currently can't set them on
the intrinsic. Without SDNPMemOperand, when the node is selected
any memory operands are always dropped. Allowing setting this
on the intrinsics avoids needing to introduce another equivalent
target node just to have SDNPMemOperand set.

Diff Detail

Event Timeline

arsenm created this revision.Dec 7 2017, 11:51 AM
arsenm updated this revision to Diff 126019.Dec 7 2017, 12:33 PM

Update tablegen tests

hfinkel added inline comments.
utils/TableGen/CodeGenDAGPatterns.cpp
2078

What does "3 intrinsic node type" mean? Can you please clarify this comment.

arsenm updated this revision to Diff 127376.Dec 18 2017, 9:12 AM

Change comment

hfinkel accepted this revision.Dec 19 2017, 9:28 PM

LGTM

This revision is now accepted and ready to land.Dec 19 2017, 9:28 PM
arsenm closed this revision.Dec 20 2017, 11:37 AM

r321212