Remove warnings about unused parameters and shadowed variables.
[oota-llvm.git] / include / llvm / CodeGen / SelectionDAG.h
index 8ea14a5dfdd9200120a30ffbf7b21c92a5649daf..5094f023f5b271966e7cac5feffa3d06d38bdd59 100644 (file)
@@ -162,8 +162,8 @@ public:
                                           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;
   }
   
   
@@ -287,7 +287,7 @@ public:
     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.
@@ -304,11 +304,11 @@ public:
                     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,
@@ -321,22 +321,22 @@ public:
                     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.
@@ -346,6 +346,14 @@ public:
     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.
   ///
@@ -420,7 +428,7 @@ public:
                                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
@@ -435,7 +443,7 @@ public:
   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,
@@ -457,7 +465,7 @@ public:
   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,
@@ -469,7 +477,7 @@ public:
                         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);
@@ -478,18 +486,18 @@ public:
                         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
@@ -519,7 +527,7 @@ public:
                           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
@@ -599,6 +607,10 @@ public:
   /// 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);
@@ -606,7 +618,7 @@ private:
   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);