[PATCH] D78291: [NFC][DAGCombine] Adding three helper functions and change the getNegatedExpression to negateExpression
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 24 10:48:35 PDT 2020
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM - cheers
================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:3547
+ virtual SDValue negateExpression(SDValue Op, SelectionDAG &DAG, bool LegalOps,
+ bool OptForSize, unsigned Depth = 0) const;
+
----------------
steven.zhang wrote:
> RKSimon wrote:
> > Its annoying that we're introducing negateExpression that will then go away again in D77319 - is there anyway to avoid creating negateExpression?
> Old getNegatedExpression means always negate the expr and never fail. We are changing the sematics to allow it failing if return null. And we need both the old getNegatedExpression and new one in this nfc patch. So I have to rename it. The negateExpression is only called inside target lowering,and merged with getNegatibleCost into getNegatedExpression in D77319. I don't have good idea not to rename it. Do you have any idea ?
No good ideas - hence my vague "its annoying" comment :-)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78291/new/
https://reviews.llvm.org/D78291
More information about the llvm-commits
mailing list