targets to register custom legalizers for ConstantFP in case there isn't a
fixed list of constants that can be generated. On some architectures (ia64?)
all fp immediates are legal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25769
91177308-0d34-0410-b5e6-
96231b3b80d8
/// handleVirtualRegisterDef)
void handleRegisterDef(MachineBasicBlock* mbb,
MachineBasicBlock::iterator mi,
- unsigned reg);
+ unsigned reg,
+ std::map<std::pair<unsigned,unsigned>,
+ unsigned> &PhysRegValueMap);
/// handleVirtualRegisterDef - update intervals for a virtual
/// register def
MachineBasicBlock::iterator mi,
LiveInterval& interval,
unsigned SrcReg, unsigned DestReg,
+ std::map<std::pair<unsigned,unsigned>,
+ unsigned> *PhysRegValueMap,
bool isLiveIn = false);
/// Return true if the two specified registers belong to different
SDOperand getConstant(uint64_t Val, MVT::ValueType VT);
SDOperand getTargetConstant(uint64_t Val, MVT::ValueType VT);
SDOperand getConstantFP(double Val, MVT::ValueType VT);
+ SDOperand getTargetConstantFP(double Val, MVT::ValueType VT);
SDOperand getGlobalAddress(const GlobalValue *GV, MVT::ValueType VT,
int offset = 0);
SDOperand getTargetGlobalAddress(const GlobalValue *GV, MVT::ValueType VT,
std::map<std::pair<uint64_t, MVT::ValueType>, SDNode*> Constants;
std::map<std::pair<uint64_t, MVT::ValueType>, SDNode*> TargetConstants;
std::map<std::pair<uint64_t, MVT::ValueType>, SDNode*> ConstantFPs;
+ std::map<std::pair<uint64_t, MVT::ValueType>, SDNode*> TargetConstantFPs;
std::map<int, SDNode*> FrameIndices, TargetFrameIndices;
std::map<Constant *, SDNode*> ConstantPoolIndices;
std::map<Constant *, SDNode*> TargetConstantPoolIndices;
// leaf node. All operands are either Constant or ConstantFP nodes.
ConstantVec,
- // TargetConstant - Like Constant, but the DAG does not do any folding or
- // simplification of the constant. This is used by the DAG->DAG selector.
+ // TargetConstant* - Like Constant*, but the DAG does not do any folding or
+ // simplification of the constant.
TargetConstant,
+ TargetConstantFP,
+ TargetConstantVec,
// TargetGlobalAddress - Like GlobalAddress, but the DAG does no folding or
// anything else with this node, and this is valid in the target-specific
double Value;
protected:
friend class SelectionDAG;
- ConstantFPSDNode(double val, MVT::ValueType VT)
- : SDNode(ISD::ConstantFP, VT), Value(val) {
+ ConstantFPSDNode(bool isTarget, double val, MVT::ValueType VT)
+ : SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, VT),
+ Value(val) {
}
public:
static bool classof(const ConstantFPSDNode *) { return true; }
static bool classof(const SDNode *N) {
- return N->getOpcode() == ISD::ConstantFP;
+ return N->getOpcode() == ISD::ConstantFP ||
+ N->getOpcode() == ISD::TargetConstantFP;
}
};