LLVM API Documentation
#include <TargetLowering.h>
Public Member Functions | |
| TargetLoweringOpt (SelectionDAG &InDAG) | |
| bool | CombineTo (SDValue O, SDValue N) |
| bool | ShrinkDemandedConstant (SDValue Op, const APInt &Demanded) |
| bool | ShrinkDemandedOp (SDValue Op, unsigned BitWidth, const APInt &Demanded, DebugLoc dl) |
Public Attributes | |
| SelectionDAG & | DAG |
| SDValue | Old |
| SDValue | New |
Definition at line 770 of file TargetLowering.h.
| llvm::TargetLowering::TargetLoweringOpt::TargetLoweringOpt | ( | SelectionDAG & | InDAG | ) | [inline, explicit] |
Definition at line 775 of file TargetLowering.h.
Definition at line 777 of file TargetLowering.h.
Referenced by ShrinkDemandedConstant(), ShrinkDemandedOp(), and llvm::TargetLowering::SimplifyDemandedBits().
| bool TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant | ( | SDValue | Op, | |
| const APInt & | Demanded | |||
| ) |
ShrinkDemandedConstant - Check to see if the specified operand of the specified instruction is a constant integer. If so, check to see if there are any bits set in the constant that are not demanded. If so, shrink the constant and return true.
ShrinkDemandedConstant - Check to see if the specified operand of the specified instruction is a constant integer. If so, check to see if there are any bits set in the constant that are not demanded. If so, shrink the constant and return true.
Definition at line 825 of file TargetLowering.cpp.
References llvm::ISD::AND, llvm::CallingConv::C, CombineTo(), DAG, llvm::dyn_cast(), llvm::ConstantSDNode::getAPIntValue(), llvm::SelectionDAG::getConstant(), llvm::SDValue::getDebugLoc(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::getValueType(), llvm::APInt::intersects(), New, llvm::ISD::OR, VT, and llvm::ISD::XOR.
Referenced by PerformBTCombine(), and llvm::TargetLowering::SimplifyDemandedBits().
| bool TargetLowering::TargetLoweringOpt::ShrinkDemandedOp | ( | SDValue | Op, | |
| unsigned | BitWidth, | |||
| const APInt & | Demanded, | |||
| DebugLoc | dl | |||
| ) |
ShrinkDemandedOp - Convert x+y to (VT)((SmallVT)x+(SmallVT)y) if the casts are free. This uses isZExtFree and ZERO_EXTEND for the widening cast, but it could be generalized for targets with other types of implicit widening casts.
ShrinkDemandedOp - Convert x+y to (VT)((SmallVT)x+(SmallVT)y) if the casts are free. This uses isZExtFree and ZERO_EXTEND for the widening cast, but it could be generalized for targets with other types of implicit widening casts.
Definition at line 864 of file TargetLowering.cpp.
References CombineTo(), llvm::APInt::countLeadingZeros(), DAG, llvm::SelectionDAG::getContext(), llvm::EVT::getIntegerVT(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDValue::getNumOperands(), llvm::SDNode::getNumValues(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SDValue::getValueType(), llvm::SDNode::hasOneUse(), llvm::isPowerOf2_32(), llvm::TargetLowering::isTruncateFree(), llvm::TargetLowering::isZExtFree(), llvm::NextPowerOf2(), TLI, llvm::ISD::TRUNCATE, llvm::X, Z, and llvm::ISD::ZERO_EXTEND.
Definition at line 771 of file TargetLowering.h.
Referenced by ShrinkDemandedConstant(), ShrinkDemandedOp(), and llvm::TargetLowering::SimplifyDemandedBits().
Definition at line 773 of file TargetLowering.h.
Referenced by CombineTo(), and ShrinkDemandedConstant().