getNegatedExpression overloads
Declared in <llvm/CodeGen/TargetLowering.h>
This is the helper function to return the newly negated expression if the cost is not expensive.
SDValue
getNegatedExpression(
SDValue Op,
SelectionDAG& DAG,
bool LegalOps,
bool OptForSize,
unsigned int Depth = 0) const;
» more...
Return the newly negated expression if the cost is not expensive and set the cost in Cost to indicate that if it is cheaper or neutral to do the negation.
virtual
SDValue
getNegatedExpression(
SDValue Op,
SelectionDAG& DAG,
bool LegalOps,
bool OptForSize,
NegatibleCost& Cost,
unsigned int Depth = 0) const;
» more...
Cost to indicate that if it is cheaper or neutral to do the negation.| Name | Description |
|---|---|
| Op | SDNode or value being queried. |
| DAG | SelectionDAG providing context. |
| LegalOps | Restrict results to legal operations. |
| OptForSize | Optimize the negation for size. |
| Depth | Recursion depth limit for the analysis. |
| Cost | Maximum acceptable negation cost. |