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.
Declared in <llvm/CodeGen/TargetLowering.h>
virtual
SDValue
getNegatedExpression(
SDValue Op,
SelectionDAG& DAG,
bool LegalOps,
bool OptForSize,
NegatibleCost& Cost,
unsigned int Depth = 0) const;
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.
| Name | Description |
|---|---|
| Op | SDNode or value being queried. |
| DAG | SelectionDAG providing context. |
| LegalOps | Restrict results to legal operations. |
| OptForSize | Optimize the negation for size. |
| Cost | Maximum acceptable negation cost. |
| Depth | Recursion depth limit for the analysis. |