[PATCH] D31165: [SDAG] Add AllowContract to SNodeFlags
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 15:03:26 PDT 2017
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
In https://reviews.llvm.org/D31165#712564, @anemet wrote:
> @spatel, @arsenm, this is a trivial patch to expose the new FMF to SDAG. Since you guys looked at the rest of the LLVM patches in the set, would you mind reviewing this too?
I actually haven't looked at all of the patches. Can you add me to those?
This patch LGTM. I made a couple of small suggestions for follow-ups.
I don't know if this is addressed in one of the other patches, but we'll want to extend FMF to more than binops...or we won't be able to propagate the contract flag to FMA nodes.
================
Comment at: include/llvm/CodeGen/SelectionDAGNodes.h:396
NoSignedZeros &= Flags->NoSignedZeros;
AllowReciprocal &= Flags->AllowReciprocal;
+ AllowContract &= Flags->AllowContract;
----------------
VectorReduction is missing. It's an independent change from this patch of course, but since you're here...
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:2589
Flags.setVectorReduction(vec_redux);
if (EnableFMFInDAG) {
Flags.setAllowReciprocal(FMF.allowReciprocal());
----------------
I hid these behind a flag, so it would be easier to test, but it should be safe to remove this now. It's an independent change from this patch of course, but since you're here... :)
https://reviews.llvm.org/D31165
More information about the llvm-commits
mailing list