MVT::ValueType VT3) {
return getVTList(VT1, VT2, VT3).VTs;
}
- const MVT::ValueType *getNodeValueTypes(std::vector<MVT::ValueType> &VTList) {
- return getVTList(&VTList[0], VTList.size()).VTs;
+ const MVT::ValueType *getNodeValueTypes(std::vector<MVT::ValueType> &vtList) {
+ return getVTList(&vtList[0], (unsigned)vtList.size()).VTs;
}
Ops.push_back(Op2);
Ops.push_back(InFlag);
return getNode(ISD::CALLSEQ_END, NodeTys, &Ops[0],
- Ops.size() - (InFlag.Val == 0 ? 1 : 0));
+ (unsigned)Ops.size() - (InFlag.Val == 0 ? 1 : 0));
}
/// getNode - Gets or creates the specified node.
SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4,
SDOperand N5);
SDOperand getNode(unsigned Opcode, MVT::ValueType VT,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
SDOperand getNode(unsigned Opcode, std::vector<MVT::ValueType> &ResultTys,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
SDOperand getNode(unsigned Opcode, const MVT::ValueType *VTs, unsigned NumVTs,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
SDOperand getNode(unsigned Opcode, SDVTList VTs);
SDOperand getNode(unsigned Opcode, SDVTList VTs, SDOperand N);
SDOperand getNode(unsigned Opcode, SDVTList VTs,
SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4,
SDOperand N5);
SDOperand getNode(unsigned Opcode, SDVTList VTs,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
SDOperand getMemcpy(SDOperand Chain, SDOperand Dst, SDOperand Src,
SDOperand Size, unsigned Align,
bool AlwaysInline,
- Value *DstSV, uint64_t DstOff,
- Value *SrcSV, uint64_t SrcOff);
+ const Value *DstSV, uint64_t DstSVOff,
+ const Value *SrcSV, uint64_t SrcSVOff);
SDOperand getMemmove(SDOperand Chain, SDOperand Dst, SDOperand Src,
- SDOperand Size, unsigned Align,
- Value *DstSV, uint64_t DstOff,
- Value *SrcSV, uint64_t SrcOff);
+ SDOperand Size, unsigned Align,
+ const Value *DstSV, uint64_t DstOSVff,
+ const Value *SrcSV, uint64_t SrcSVOff);
SDOperand getMemset(SDOperand Chain, SDOperand Dst, SDOperand Src,
SDOperand Size, unsigned Align,
- Value *DstSV, uint64_t DstOff);
+ const Value *DstSV, uint64_t DstSVOff);
/// getSetCC - Helper function to make it easier to build SetCC's if you just
/// have an ISD::CondCode instead of an SDOperand.
return getNode(ISD::SETCC, VT, LHS, RHS, getCondCode(Cond));
}
+ /// getVSetCC - Helper function to make it easier to build VSetCC's nodes
+ /// if you just have an ISD::CondCode instead of an SDOperand.
+ ///
+ SDOperand getVSetCC(MVT::ValueType VT, SDOperand LHS, SDOperand RHS,
+ ISD::CondCode Cond) {
+ return getNode(ISD::VSETCC, VT, LHS, RHS, getCondCode(Cond));
+ }
+
/// getSelectCC - Helper function to make it easier to build SelectCC's if you
/// just have an ISD::CondCode instead of an SDOperand.
///
SDOperand Op3, SDOperand Op4);
SDOperand UpdateNodeOperands(SDOperand N, SDOperand Op1, SDOperand Op2,
SDOperand Op3, SDOperand Op4, SDOperand Op5);
- SDOperand UpdateNodeOperands(SDOperand N, SDOperand *Ops, unsigned NumOps);
+ SDOperand UpdateNodeOperands(SDOperand N, SDOperandPtr Ops, unsigned NumOps);
/// SelectNodeTo - These are used for target selectors to *mutate* the
/// specified node to have the specified return type, Target opcode, and
SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
SDOperand Op1, SDOperand Op2, SDOperand Op3);
SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2);
SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT,
SDOperand Op1, SDOperand Op2, SDOperand Op3);
SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT1,
MVT::ValueType VT2);
SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT1,
SDOperand Op3);
SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT1,
MVT::ValueType VT2,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT1,
MVT::ValueType VT2, MVT::ValueType VT3,
SDOperand Op1, SDOperand Op2);
SDOperand Op1, SDOperand Op2, SDOperand Op3);
SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT1,
MVT::ValueType VT2, MVT::ValueType VT3,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
SDNode *getTargetNode(unsigned Opcode, MVT::ValueType VT1,
MVT::ValueType VT2, MVT::ValueType VT3,
MVT::ValueType VT4,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
SDNode *getTargetNode(unsigned Opcode, std::vector<MVT::ValueType> &ResultTys,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
/// getNodeIfExists - Get the specified node if it's already available, or
/// else return NULL.
SDNode *getNodeIfExists(unsigned Opcode, SDVTList VTs,
- const SDOperand *Ops, unsigned NumOps);
+ SDOperandPtr Ops, unsigned NumOps);
/// DAGUpdateListener - Clients of various APIs that cause global effects on
/// the DAG can optionally implement this interface. This allows the clients
DAGUpdateListener *UpdateListener = 0);
void ReplaceAllUsesWith(SDNode *From, SDNode *To,
DAGUpdateListener *UpdateListener = 0);
- void ReplaceAllUsesWith(SDNode *From, const SDOperand *To,
+ void ReplaceAllUsesWith(SDNode *From, SDOperandPtr To,
DAGUpdateListener *UpdateListener = 0);
/// ReplaceAllUsesOfValueWith - Replace any uses of From with To, leaving
/// isVerifiedDebugInfoDesc - Returns true if the specified SDOperand has
/// been verified as a debug information descriptor.
bool isVerifiedDebugInfoDesc(SDOperand Op) const;
+
+ /// getShuffleScalarElt - Returns the scalar element that will make up the ith
+ /// element of the result of the vector shuffle.
+ SDOperand getShuffleScalarElt(const SDNode *N, unsigned Idx);
private:
void RemoveNodeFromCSEMaps(SDNode *N);
SDNode *FindModifiedNodeSlot(SDNode *N, SDOperand Op, void *&InsertPos);
SDNode *FindModifiedNodeSlot(SDNode *N, SDOperand Op1, SDOperand Op2,
void *&InsertPos);
- SDNode *FindModifiedNodeSlot(SDNode *N, const SDOperand *Ops, unsigned NumOps,
+ SDNode *FindModifiedNodeSlot(SDNode *N, SDOperandPtr Ops, unsigned NumOps,
void *&InsertPos);
void DeleteNodeNotInCSEMaps(SDNode *N);