[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-06-28 Thread Dan Gohman


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.193 - 1.194
---
Log message:

Add new TargetLowering code to provide the final register type that an
illegal value type will be transformed to, for code that needs the
register type after all transformations instead of just after the first
transformation.

Factor out the code that uses this information to do copy-from-regs and
copy-to-regs for various purposes into separate functions so that they
are done consistently.


---
Diffs of the changes:  (+1 -1)

 SelectionDAGNodes.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.193 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.194
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.193 Mon Jun 25 11:23:39 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu Jun 28 18:29:44 2007
@@ -253,7 +253,7 @@
 /// CONCAT_VECTORS(VECTOR0, VECTOR1, ...) - Given a number of values of
 /// vector type with the same length and element type, this produces a
 /// concatenated vector result value, with length equal to the sum of the
-/// input vectors.
+/// lengths of the input vectors.
 CONCAT_VECTORS,
 
 /// EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR (an



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-05-24 Thread Dan Gohman


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.190 - 1.191
---
Log message:

Minor comment cleanups.


---
Diffs of the changes:  (+1 -1)

 SelectionDAGNodes.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.190 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.191
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.190 Mon May 14 19:20:13 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu May 24 09:36:03 2007
@@ -249,7 +249,7 @@
 
 /// VINSERT_VECTOR_ELT(VECTOR, VAL, IDX,  COUNT,TYPE) - Given a vector
 /// VECTOR, an element ELEMENT, and a (potentially variable) index IDX,
-/// return an vector with the specified element of VECTOR replaced with 
VAL.
+/// return a vector with the specified element of VECTOR replaced with VAL.
 /// COUNT and TYPE specify the type of vector, as is standard for V* nodes.
 VINSERT_VECTOR_ELT,
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-05-14 Thread Dan Gohman


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.189 - 1.190
---
Log message:

Correct a comment.


---
Diffs of the changes:  (+1 -1)

 SelectionDAGNodes.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.189 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.190
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.189 Sun Apr 22 18:15:29 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Mon May 14 19:20:13 2007
@@ -302,7 +302,7 @@
 /// Simple abstract vector operators.  Unlike the integer and floating 
point
 /// binary operators, these nodes also take two additional operands:
 /// a constant element count, and a value type node indicating the type of
-/// the elements.  The order is count, type, op0, op1.  All vector opcodes,
+/// the elements.  The order is op0, op1, count, type.  All vector opcodes,
 /// including VLOAD and VConstant must currently have count and type as
 /// their last two operands.
 VADD, VSUB, VMUL, VSDIV, VUDIV,



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h SelectionDAG.h

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.188 - 1.189
SelectionDAG.h updated: 1.149 - 1.150
---
Log message:

PR400: http://llvm.org/PR400  phase 2. Propagate attributed load/store 
information through DAGs.


---
Diffs of the changes:  (+10 -5)

 SelectionDAG.h  |   11 +++
 SelectionDAGNodes.h |4 +++-
 2 files changed, 10 insertions(+), 5 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.188 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.189
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.188 Sat Apr 21 15:56:26 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Apr 22 18:15:29 2007
@@ -1438,7 +1438,7 @@
   friend class SelectionDAG;
   LoadSDNode(SDOperand *ChainPtrOff, SDVTList VTs,
  ISD::MemIndexedMode AM, ISD::LoadExtType ETy, MVT::ValueType LVT,
- const Value *SV, int O=0, unsigned Align=1, bool Vol=false)
+ const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
 : SDNode(ISD::LOAD, VTs),
   AddrMode(AM), ExtType(ETy), LoadedVT(LVT), SrcValue(SV), SVOffset(O),
   Alignment(Align), IsVolatile(Vol) {
@@ -1446,6 +1446,7 @@
 Ops[1] = ChainPtrOff[1]; // Ptr
 Ops[2] = ChainPtrOff[2]; // Off
 InitOperands(Ops, 3);
+assert(Align != 0  Loads should have non-zero aligment);
 assert((getOffset().getOpcode() == ISD::UNDEF ||
 AddrMode != ISD::UNINDEXED) 
Only indexed load has a non-undef offset operand);
@@ -1508,6 +1509,7 @@
 Ops[2] = ChainValuePtrOff[2]; // Ptr
 Ops[3] = ChainValuePtrOff[3]; // Off
 InitOperands(Ops, 4);
+assert(Align != 0  Stores should have non-zero aligment);
 assert((getOffset().getOpcode() == ISD::UNDEF || 
 AddrMode != ISD::UNINDEXED) 
Only indexed store has a non-undef offset operand);


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.149 
llvm/include/llvm/CodeGen/SelectionDAG.h:1.150
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.149  Sat Apr 21 13:36:27 2007
+++ llvm/include/llvm/CodeGen/SelectionDAG.hSun Apr 22 18:15:29 2007
@@ -311,10 +311,12 @@
   /// determined by their operands, and they produce a value AND a token chain.
   ///
   SDOperand getLoad(MVT::ValueType VT, SDOperand Chain, SDOperand Ptr,
-const Value *SV, int SVOffset, bool isVolatile=false);
+const Value *SV, int SVOffset, bool isVolatile=false,
+unsigned Alignment=0);
   SDOperand getExtLoad(ISD::LoadExtType ExtType, MVT::ValueType VT,
SDOperand Chain, SDOperand Ptr, const Value *SV,
-   int SVOffset, MVT::ValueType EVT, bool 
isVolatile=false);
+   int SVOffset, MVT::ValueType EVT, bool isVolatile=false,
+   unsigned Alignment=0);
   SDOperand getIndexedLoad(SDOperand OrigLoad, SDOperand Base,
SDOperand Offset, ISD::MemIndexedMode AM);
   SDOperand getVecLoad(unsigned Count, MVT::ValueType VT, SDOperand Chain, 
@@ -323,10 +325,11 @@
   /// getStore - Helper function to build ISD::STORE nodes.
   ///
   SDOperand getStore(SDOperand Chain, SDOperand Val, SDOperand Ptr,
- const Value *SV, int SVOffset, bool isVolatile=false);
+ const Value *SV, int SVOffset, bool isVolatile=false,
+ unsigned Alignment=0);
   SDOperand getTruncStore(SDOperand Chain, SDOperand Val, SDOperand Ptr,
   const Value *SV, int SVOffset, MVT::ValueType TVT,
-  bool isVolatile=false);
+  bool isVolatile=false, unsigned Alignment=0);
   SDOperand getIndexedStore(SDOperand OrigStoe, SDOperand Base,
SDOperand Offset, ISD::MemIndexedMode AM);
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-04-21 Thread Lauro Ramos Venancio


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.187 - 1.188
---
Log message:

X86 TLS: Implement review feedback.


---
Diffs of the changes:  (+1 -11)

 SelectionDAGNodes.h |   12 +---
 1 files changed, 1 insertion(+), 11 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.187 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.188
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.187 Sat Apr 21 13:36:27 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Apr 21 15:56:26 2007
@@ -19,7 +19,6 @@
 #ifndef LLVM_CODEGEN_SELECTIONDAGNODES_H
 #define LLVM_CODEGEN_SELECTIONDAGNODES_H
 
-#include llvm/GlobalVariable.h
 #include llvm/Value.h
 #include llvm/ADT/FoldingSet.h
 #include llvm/ADT/GraphTraits.h
@@ -1166,16 +1165,7 @@
 protected:
   friend class SelectionDAG;
   GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT,
-  int o = 0)
-: SDNode(dyn_castGlobalVariable(GA) 
- dyn_castGlobalVariable(GA)-isThreadLocal() ?
- // Thread Local
- (isTarget ? ISD::TargetGlobalTLSAddress : ISD::GlobalTLSAddress) :
- // Non Thread Local
- (isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress),
- getSDVTList(VT)), Offset(o) {
-TheGlobal = const_castGlobalValue*(GA);
-  }
+  int o = 0);
 public:
 
   GlobalValue *getGlobal() const { return TheGlobal; }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-04-01 Thread Reid Spencer


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.182 - 1.183
---
Log message:

For PR1297: http://llvm.org/PR1297 :
Intrinsic functions might need to be generated (if they are overloaded) so
returning a const char* is no longer possible. Change getOperationName to
return a std::string instead.


---
Diffs of the changes:  (+1 -1)

 SelectionDAGNodes.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.182 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.183
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.182 Fri Mar 23 13:44:11 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Apr  1 02:28:37 2007
@@ -911,7 +911,7 @@
 
   /// getOperationName - Return the opcode of this operation for printing.
   ///
-  const char* getOperationName(const SelectionDAG *G = 0) const;
+  std::string getOperationName(const SelectionDAG *G = 0) const;
   static const char* getIndexedModeName(ISD::MemIndexedMode AM);
   void dump() const;
   void dump(const SelectionDAG *G) const;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-03-07 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.179 - 1.180
---
Log message:

Add a utility function to test whether a load is unindexed.

---
Diffs of the changes:  (+7 -0)

 SelectionDAGNodes.h |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.179 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.180
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.179 Sun Mar  4 14:40:06 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Wed Mar  7 02:04:41 2007
@@ -1620,6 +1620,13 @@
   castLoadSDNode(N)-getExtensionType() == ISD::ZEXTLOAD;
   }
 
+  /// isUNINDEXEDLoad - Returns true if the specified node is a unindexed load.
+  ///
+  inline bool isUNINDEXEDLoad(const SDNode *N) {
+return N-getOpcode() == ISD::LOAD 
+  castLoadSDNode(N)-getAddressingMode() == ISD::UNINDEXED;
+  }
+
   /// isNON_TRUNCStore - Returns true if the specified node is a non-truncating
   /// store.
   inline bool isNON_TRUNCStore(const SDNode *N) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-03-04 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.178 - 1.179
---
Log message:

add a new node


---
Diffs of the changes:  (+4 -0)

 SelectionDAGNodes.h |4 
 1 files changed, 4 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.178 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.179
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.178 Wed Feb 21 16:37:22 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Mar  4 14:40:06 2007
@@ -192,6 +192,10 @@
 // Simple integer binary arithmetic operators.
 ADD, SUB, MUL, SDIV, UDIV, SREM, UREM,
 
+// CARRY_FALSE - This node is used when folding other nodes,
+// like ADDC/SUBC, which indicate the carry result is always false.
+CARRY_FALSE,
+
 // Carry-setting nodes for multiple precision addition and subtraction.
 // These nodes take two operands of the same value type, and produce two
 // results.  The first result is the normal add or sub result, the second



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-21 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.177 - 1.178
---
Log message:

Add new instructions for handling data passed into eh landing pad.

---
Diffs of the changes:  (+9 -1)

 SelectionDAGNodes.h |   10 +-
 1 files changed, 9 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.177 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.178
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.177 Wed Feb 14 21:39:17 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Wed Feb 21 16:37:22 2007
@@ -91,6 +91,14 @@
 // to the current function's frame or return address, an index of one to 
the
 // parent's frame or return address, and so on.
 FRAMEADDR, RETURNADDR,
+
+// RESULT, OUTCHAIN = EXCEPTIONADDR(INCHAIN) - This node represents the
+// address of the exception block on entry to an landing pad block.
+EXCEPTIONADDR,
+
+// RESULT, OUTCHAIN = EHSELECTION(INCHAIN, EXCEPTION) - This node 
represents
+// the selection index of the exception thrown.
+EHSELECTION,
 
 // TargetConstant* - Like Constant*, but the DAG does not do any folding or
 // simplification of the constant.
@@ -457,7 +465,7 @@
 //   Operand #0 : input chain.
 //   Operand #1 : module unique number use to identify the label.
 LABEL,
-
+
 // STACKSAVE - STACKSAVE has one operand, an input chain.  It produces a
 // value, the same type as the pointer type for the system, and an output
 // chain.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-14 Thread Reid Spencer


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.176 - 1.177
---
Log message:

For PR1195: http://llvm.org/PR1195 :
Change use of packed term to vector in comments, strings, variable
names, etc.


---
Diffs of the changes:  (+1 -1)

 SelectionDAGNodes.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.176 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.177
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.176 Tue Feb 13 11:57:38 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Wed Feb 14 21:39:17 2007
@@ -234,7 +234,7 @@
 VEXTRACT_VECTOR_ELT,
 
 /// EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR
-/// (a legal packed type vector) identified by the (potentially variable)
+/// (a legal vector type vector) identified by the (potentially variable)
 /// element number IDX.
 EXTRACT_VECTOR_ELT,
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-13 Thread Lauro Ramos Venancio


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.175 - 1.176
---
Log message:

Add comment about original function argument alignment. 


---
Diffs of the changes:  (+2 -0)

 SelectionDAGNodes.h |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.175 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.176
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.175 Sun Feb  4 02:35:21 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Tue Feb 13 11:57:38 2007
@@ -159,6 +159,8 @@
 /// Bit 0 - signness
 /// Bit 1 - 'inreg' attribute
 /// Bit 2 - 'sret' attribute
+/// Bits 31:27 - argument ABI alignment in the first argument piece and
+/// alignment '1' in other argument pieces.
 CALL,
 
 // EXTRACT_ELEMENT - This is used to get the first or second (determined by



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-04 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.173 - 1.174
---
Log message:

Add a new SDNode ctor and InitOperands method.  This allows the operands for
an SDNode to be allocated as part of the node itself, instead of being a 
separate new[]'d object.  Switch HandleSDNode, LoadSDNode, and StoreSDNode
to use this mechanism.  This saves one heap allocation and free for each node
of this type that is allocated.  This reduces isel time from 2.7638 to 2.6164s
on kc++, which is a 5.6% speedup.



---
Diffs of the changes:  (+69 -37)

 SelectionDAGNodes.h |  106 +---
 1 files changed, 69 insertions(+), 37 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.173 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.174
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.173 Sun Feb  4 01:37:24 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Feb  4 02:13:53 2007
@@ -908,18 +908,39 @@
 : NodeType(Opc), NodeId(-1) {
 OperandsNeedDelete = true;
 NumOperands = NumOps;
-OperandList = new SDOperand[NumOperands];
+OperandList = NumOps ? new SDOperand[NumOperands] : 0;
 
-for (unsigned i = 0, e = NumOps; i != e; ++i) {
+for (unsigned i = 0; i != NumOps; ++i) {
   OperandList[i] = Ops[i];
-  SDNode *N = OperandList[i].Val;
-  N-Uses.push_back(this);
+  Ops[i].Val-Uses.push_back(this);
 }
+
 ValueList = VTs.VTs;
 NumValues = VTs.NumVTs;
 Prev = 0; Next = 0;
   }
-
+  SDNode(unsigned Opc, SDVTList VTs) : NodeType(Opc), NodeId(-1) {
+OperandsNeedDelete = false;  // Operands set with InitOperands.
+NumOperands = 0;
+OperandList = 0;
+
+ValueList = VTs.VTs;
+NumValues = VTs.NumVTs;
+Prev = 0; Next = 0;
+  }
+  
+  /// InitOperands - Initialize the operands list of this node with the
+  /// specified values, which are part of the node (thus they don't need to be
+  /// copied in or allocated).
+  void InitOperands(SDOperand *Ops, unsigned NumOps) {
+assert(OperandList == 0  Operands already set!);
+NumOperands = NumOps;
+OperandList = Ops;
+
+for (unsigned i = 0; i != NumOps; ++i)
+  Ops[i].Val-Uses.push_back(this);
+  }
+  
   /// MorphNodeTo - This frees the operands of the current node, resets the
   /// opcode, types, and operands to the specified value.  This should only be
   /// used by the SelectionDAG class.
@@ -980,11 +1001,14 @@
 /// the AllNodes list.
 class HandleSDNode : public SDNode {
   virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
+  SDOperand Op;
 public:
-  HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, getSDVTList(MVT::Other),
- X, 1) {}
+  HandleSDNode(SDOperand X)
+: SDNode(ISD::HANDLENODE, getSDVTList(MVT::Other)), Op(X) {
+InitOperands(Op, 1);
+  }
   ~HandleSDNode();  
-  SDOperand getValue() const { return getOperand(0); }
+  SDOperand getValue() const { return Op; }
 };
 
 class StringSDNode : public SDNode {
@@ -993,7 +1017,7 @@
 protected:
   friend class SelectionDAG;
   StringSDNode(const std::string val)
-: SDNode(ISD::STRING, getSDVTList(MVT::Other), 0, 0), Value(val) {
+: SDNode(ISD::STRING, getSDVTList(MVT::Other)), Value(val) {
   }
 public:
   const std::string getValue() const { return Value; }
@@ -1009,8 +1033,8 @@
 protected:
   friend class SelectionDAG;
   ConstantSDNode(bool isTarget, uint64_t val, MVT::ValueType VT)
-: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, getSDVTList(VT),
- 0, 0), Value(val) {
+: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, getSDVTList(VT)),
+  Value(val) {
   }
 public:
 
@@ -1040,8 +1064,7 @@
   friend class SelectionDAG;
   ConstantFPSDNode(bool isTarget, double val, MVT::ValueType VT)
 : SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP,
- getSDVTList(VT), 0, 0), 
-  Value(val) {
+ getSDVTList(VT)), Value(val) {
   }
 public:
 
@@ -1067,10 +1090,9 @@
 protected:
   friend class SelectionDAG;
   GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT,
-  int o=0)
+  int o = 0)
 : SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress,
- getSDVTList(VT), 0, 0),
-  Offset(o) {
+ getSDVTList(VT)), Offset(o) {
 TheGlobal = const_castGlobalValue*(GA);
   }
 public:
@@ -1092,8 +1114,8 @@
 protected:
   friend class SelectionDAG;
   FrameIndexSDNode(int fi, MVT::ValueType VT, bool isTarg)
-: SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex, getSDVTList(VT),
- 0, 0), FI(fi) {
+: SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex, 
getSDVTList(VT)),
+  FI(fi) {
   }
 public:
 
@@ -1112,8 +1134,8 @@
 protected:
   friend class SelectionDAG;
   JumpTableSDNode(int jti, 

[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-04 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.174 - 1.175
---
Log message:

Introduce new UnarySDNode/BinarySDNode/TernarySDNode nodes, which coallocate
their operands with the node itself.  This reduces malloc traffic for operand
lists.  This reduces isel time on kc++ from 2.6164 to 2.5570s, about 2.3%.


---
Diffs of the changes:  (+43 -0)

 SelectionDAGNodes.h |   43 +++
 1 files changed, 43 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.174 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.175
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.174 Sun Feb  4 02:13:53 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Feb  4 02:35:21 2007
@@ -995,6 +995,49 @@
   return Val-hasNUsesOfValue(1, ResNo);
 }
 
+/// UnarySDNode - This class is used for single-operand SDNodes.  This is 
solely
+/// to allow co-allocation of node operands with the node itself.
+class UnarySDNode : public SDNode {
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
+  SDOperand Op;
+public:
+  UnarySDNode(unsigned Opc, SDVTList VTs, SDOperand X)
+: SDNode(Opc, VTs), Op(X) {
+InitOperands(Op, 1);
+  }
+};
+
+/// BinarySDNode - This class is used for two-operand SDNodes.  This is solely
+/// to allow co-allocation of node operands with the node itself.
+class BinarySDNode : public SDNode {
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
+  SDOperand Ops[2];
+public:
+  BinarySDNode(unsigned Opc, SDVTList VTs, SDOperand X, SDOperand Y)
+: SDNode(Opc, VTs) {
+Ops[0] = X;
+Ops[1] = Y;
+InitOperands(Ops, 2);
+  }
+};
+
+/// TernarySDNode - This class is used for three-operand SDNodes. This is 
solely
+/// to allow co-allocation of node operands with the node itself.
+class TernarySDNode : public SDNode {
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
+  SDOperand Ops[3];
+public:
+  TernarySDNode(unsigned Opc, SDVTList VTs, SDOperand X, SDOperand Y,
+SDOperand Z)
+: SDNode(Opc, VTs) {
+Ops[0] = X;
+Ops[1] = Y;
+Ops[2] = Z;
+InitOperands(Ops, 3);
+  }
+};
+
+
 /// HandleSDNode - This class is used to form a handle around another node that
 /// is persistant and is updated across invocations of replaceAllUsesWith on 
its
 /// operand.  This node should be directly created by end-users and not added 
to



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-03 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.167 - 1.168
---
Log message:

Give each selectiondag node class a home for it's vtable and rtti info


---
Diffs of the changes:  (+18 -0)

 SelectionDAGNodes.h |   18 ++
 1 files changed, 18 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.167 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.168
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.167 Mon Jan 29 16:58:52 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Feb  3 20:23:32 2007
@@ -1080,6 +1080,7 @@
 /// operand.  This node should be directly created by end-users and not added 
to
 /// the AllNodes list.
 class HandleSDNode : public SDNode {
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 public:
   HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, X) {}
   ~HandleSDNode() {
@@ -1091,6 +1092,7 @@
 
 class StringSDNode : public SDNode {
   std::string Value;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   StringSDNode(const std::string val)
@@ -1106,6 +1108,7 @@
 
 class ConstantSDNode : public SDNode {
   uint64_t Value;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   ConstantSDNode(bool isTarget, uint64_t val, MVT::ValueType VT)
@@ -1134,6 +1137,7 @@
 
 class ConstantFPSDNode : public SDNode {
   double Value;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   ConstantFPSDNode(bool isTarget, double val, MVT::ValueType VT)
@@ -1160,6 +1164,7 @@
 class GlobalAddressSDNode : public SDNode {
   GlobalValue *TheGlobal;
   int Offset;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT,
@@ -1183,6 +1188,7 @@
 
 class FrameIndexSDNode : public SDNode {
   int FI;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   FrameIndexSDNode(int fi, MVT::ValueType VT, bool isTarg)
@@ -1200,6 +1206,7 @@
 
 class JumpTableSDNode : public SDNode {
   int JTI;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   JumpTableSDNode(int jti, MVT::ValueType VT, bool isTarg)
@@ -1223,6 +1230,7 @@
   } Val;
   int Offset;  // It's a MachineConstantPoolValue if top bit is set.
   unsigned Alignment;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT,
@@ -1290,6 +1298,7 @@
 
 class BasicBlockSDNode : public SDNode {
   MachineBasicBlock *MBB;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   BasicBlockSDNode(MachineBasicBlock *mbb)
@@ -1307,6 +1316,7 @@
 class SrcValueSDNode : public SDNode {
   const Value *V;
   int offset;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   SrcValueSDNode(const Value* v, int o)
@@ -1325,6 +1335,7 @@
 
 class RegisterSDNode : public SDNode {
   unsigned Reg;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   RegisterSDNode(unsigned reg, MVT::ValueType VT)
@@ -1341,6 +1352,7 @@
 
 class ExternalSymbolSDNode : public SDNode {
   const char *Symbol;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   ExternalSymbolSDNode(bool isTarget, const char *Sym, MVT::ValueType VT)
@@ -1360,6 +1372,7 @@
 
 class CondCodeSDNode : public SDNode {
   ISD::CondCode Condition;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   CondCodeSDNode(ISD::CondCode Cond)
@@ -1379,6 +1392,7 @@
 /// to parameterize some operations.
 class VTSDNode : public SDNode {
   MVT::ValueType ValueType;
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 protected:
   friend class SelectionDAG;
   VTSDNode(MVT::ValueType VT)
@@ -1396,6 +1410,8 @@
 /// LoadSDNode - This class is used to represent ISD::LOAD nodes.
 ///
 class LoadSDNode : public SDNode {
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
+
   // AddrMode - unindexed, pre-indexed, post-indexed.
   ISD::MemIndexedMode AddrMode;
 
@@ -1449,6 +1465,8 @@
 /// StoreSDNode - This class is used to represent ISD::STORE nodes.
 ///
 class StoreSDNode : public SDNode {
+  virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
+
   

[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-03 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.168 - 1.169
---
Log message:

eliminate some extraneous methods in SDNode


---
Diffs of the changes:  (+0 -25)

 SelectionDAGNodes.h |   25 -
 1 files changed, 25 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.168 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.169
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.168 Sat Feb  3 20:23:32 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Feb  3 20:32:44 2007
@@ -990,31 +990,6 @@
 NumValues = L.NumVTs;
   }
   
-  void setOperands(SDOperand Op0) {
-assert(NumOperands == 0  Should not have operands yet!);
-OperandList = new SDOperand[1];
-OperandList[0] = Op0;
-NumOperands = 1;
-Op0.Val-Uses.push_back(this);
-  }
-  void setOperands(SDOperand Op0, SDOperand Op1) {
-assert(NumOperands == 0  Should not have operands yet!);
-OperandList = new SDOperand[2];
-OperandList[0] = Op0;
-OperandList[1] = Op1;
-NumOperands = 2;
-Op0.Val-Uses.push_back(this); Op1.Val-Uses.push_back(this);
-  }
-  void setOperands(SDOperand Op0, SDOperand Op1, SDOperand Op2) {
-assert(NumOperands == 0  Should not have operands yet!);
-OperandList = new SDOperand[3];
-OperandList[0] = Op0;
-OperandList[1] = Op1;
-OperandList[2] = Op2;
-NumOperands = 3;
-Op0.Val-Uses.push_back(this); Op1.Val-Uses.push_back(this);
-Op2.Val-Uses.push_back(this);
-  }
   void setOperands(const SDOperand *Ops, unsigned NumOps) {
 assert(NumOperands == 0  Should not have operands yet!);
 NumOperands = NumOps;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-03 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.169 - 1.170
---
Log message:

simplify MorphNodeTo to take a VTList operand.


---
Diffs of the changes:  (+4 -7)

 SelectionDAGNodes.h |   11 ---
 1 files changed, 4 insertions(+), 7 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.169 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.170
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.169 Sat Feb  3 20:32:44 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Feb  3 20:41:42 2007
@@ -970,10 +970,10 @@
   /// MorphNodeTo - This clears the return value and operands list, and sets 
the
   /// opcode of the node to the specified value.  This should only be used by
   /// the SelectionDAG class.
-  void MorphNodeTo(unsigned Opc) {
+  void MorphNodeTo(unsigned Opc, SDVTList L) {
 NodeType = Opc;
-ValueList = 0;
-NumValues = 0;
+ValueList = L.VTs;
+NumValues = L.NumVTs;
 
 // Clear the operands list, updating used nodes to remove this from their
 // use list.
@@ -1058,10 +1058,7 @@
   virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 public:
   HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, X) {}
-  ~HandleSDNode() {
-MorphNodeTo(ISD::HANDLENODE);  // Drops operand uses.
-  }
-  
+  ~HandleSDNode();  
   SDOperand getValue() const { return getOperand(0); }
 };
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-03 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.170 - 1.171
---
Log message:

move MorphNode to out of line and merge setNodeOperands into it.  There is
no behavior or performance change here.


---
Diffs of the changes:  (+5 -28)

 SelectionDAGNodes.h |   33 +
 1 files changed, 5 insertions(+), 28 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.170 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.171
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.170 Sat Feb  3 20:41:42 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Feb  3 20:49:29 2007
@@ -967,22 +967,11 @@
 Prev = 0; Next = 0;
   }
 
-  /// MorphNodeTo - This clears the return value and operands list, and sets 
the
-  /// opcode of the node to the specified value.  This should only be used by
-  /// the SelectionDAG class.
-  void MorphNodeTo(unsigned Opc, SDVTList L) {
-NodeType = Opc;
-ValueList = L.VTs;
-NumValues = L.NumVTs;
-
-// Clear the operands list, updating used nodes to remove this from their
-// use list.
-for (op_iterator I = op_begin(), E = op_end(); I != E; ++I)
-  I-Val-removeUser(this);
-delete [] OperandList;
-OperandList = 0;
-NumOperands = 0;
-  }
+  /// MorphNodeTo - This frees the operands of the current node, resets the
+  /// opcode, types, and operands to the specified value.  This should only be
+  /// used by the SelectionDAG class.
+  void MorphNodeTo(unsigned Opc, SDVTList L,
+   const SDOperand *Ops, unsigned NumOps);
   
   void setValueTypes(SDVTList L) {
 assert(NumValues == 0  Should not have values yet!);
@@ -990,18 +979,6 @@
 NumValues = L.NumVTs;
   }
   
-  void setOperands(const SDOperand *Ops, unsigned NumOps) {
-assert(NumOperands == 0  Should not have operands yet!);
-NumOperands = NumOps;
-OperandList = new SDOperand[NumOperands];
-
-for (unsigned i = 0, e = NumOps; i != e; ++i) {
-  OperandList[i] = Ops[i];
-  SDNode *N = OperandList[i].Val;
-  N-Uses.push_back(this);
-}
-  }
-
   void addUser(SDNode *User) {
 Uses.push_back(User);
   }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-03 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.171 - 1.172
---
Log message:

eliminate a bunch of duplicate ctors and helper functions.


---
Diffs of the changes:  (+60 -83)

 SelectionDAGNodes.h |  143 +---
 1 files changed, 60 insertions(+), 83 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.171 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.172
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.171 Sat Feb  3 20:49:29 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Feb  4 01:28:00 2007
@@ -764,6 +764,10 @@
   /// NodeType - The operation that this node performs.
   ///
   unsigned short NodeType;
+  
+  /// OperandsNeedDelete - This is true if OperandList was new[]'d.  If true,
+  /// then they will be delete[]'d when the node is destroyed.
+  bool OperandsNeedDelete : 1;
 
   /// NodeId - Unique id per SDNode in the DAG.
   int NodeId;
@@ -895,65 +899,14 @@
   /// getValueTypeList - Return a pointer to the specified value type.
   ///
   static MVT::ValueType *getValueTypeList(MVT::ValueType VT);
-
-  SDNode(unsigned NT, MVT::ValueType VT) : NodeType(NT), NodeId(-1) {
-OperandList = 0; NumOperands = 0;
-ValueList = getValueTypeList(VT);
-NumValues = 1;
-Prev = 0; Next = 0;
-  }
-  SDNode(unsigned NT, SDOperand Op)
-: NodeType(NT), NodeId(-1) {
-OperandList = new SDOperand[1];
-OperandList[0] = Op;
-NumOperands = 1;
-Op.Val-Uses.push_back(this);
-ValueList = 0;
-NumValues = 0;
-Prev = 0; Next = 0;
-  }
-  SDNode(unsigned NT, SDOperand N1, SDOperand N2)
-: NodeType(NT), NodeId(-1) {
-OperandList = new SDOperand[2];
-OperandList[0] = N1;
-OperandList[1] = N2;
-NumOperands = 2;
-N1.Val-Uses.push_back(this); N2.Val-Uses.push_back(this);
-ValueList = 0;
-NumValues = 0;
-Prev = 0; Next = 0;
-  }
-  SDNode(unsigned NT, SDOperand N1, SDOperand N2, SDOperand N3)
-: NodeType(NT), NodeId(-1) {
-OperandList = new SDOperand[3];
-OperandList[0] = N1;
-OperandList[1] = N2;
-OperandList[2] = N3;
-NumOperands = 3;
-
-N1.Val-Uses.push_back(this); N2.Val-Uses.push_back(this);
-N3.Val-Uses.push_back(this);
-ValueList = 0;
-NumValues = 0;
-Prev = 0; Next = 0;
-  }
-  SDNode(unsigned NT, SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4)
-: NodeType(NT), NodeId(-1) {
-OperandList = new SDOperand[4];
-OperandList[0] = N1;
-OperandList[1] = N2;
-OperandList[2] = N3;
-OperandList[3] = N4;
-NumOperands = 4;
-
-N1.Val-Uses.push_back(this); N2.Val-Uses.push_back(this);
-N3.Val-Uses.push_back(this); N4.Val-Uses.push_back(this);
-ValueList = 0;
-NumValues = 0;
-Prev = 0; Next = 0;
+  static SDVTList getSDVTList(MVT::ValueType VT) {
+SDVTList Ret = { getValueTypeList(VT), 1 };
+return Ret;
   }
+
   SDNode(unsigned Opc, const SDOperand *Ops, unsigned NumOps)
 : NodeType(Opc), NodeId(-1) {
+OperandsNeedDelete = true;
 NumOperands = NumOps;
 OperandList = new SDOperand[NumOperands];
 
@@ -1034,7 +987,7 @@
 class HandleSDNode : public SDNode {
   virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 public:
-  HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, X) {}
+  HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, X, 1) {}
   ~HandleSDNode();  
   SDOperand getValue() const { return getOperand(0); }
 };
@@ -1045,7 +998,8 @@
 protected:
   friend class SelectionDAG;
   StringSDNode(const std::string val)
-: SDNode(ISD::STRING, MVT::Other), Value(val) {
+: SDNode(ISD::STRING, 0, 0), Value(val) {
+setValueTypes(getSDVTList(MVT::Other));
   }
 public:
   const std::string getValue() const { return Value; }
@@ -1061,7 +1015,8 @@
 protected:
   friend class SelectionDAG;
   ConstantSDNode(bool isTarget, uint64_t val, MVT::ValueType VT)
-: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, VT), Value(val) {
+: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, 0, 0), Value(val) 
{
+setValueTypes(getSDVTList(VT));
   }
 public:
 
@@ -1090,8 +1045,9 @@
 protected:
   friend class SelectionDAG;
   ConstantFPSDNode(bool isTarget, double val, MVT::ValueType VT)
-: SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, VT), 
+: SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, 0, 0), 
   Value(val) {
+setValueTypes(getSDVTList(VT));
   }
 public:
 
@@ -1118,8 +1074,9 @@
   friend class SelectionDAG;
   GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT,
   int o=0)
-: SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress, VT),
+: SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress, 0, 0),
   Offset(o) {
+setValueTypes(getSDVTList(VT));
 TheGlobal = const_castGlobalValue*(GA);
   }
 

[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-02-03 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.172 - 1.173
---
Log message:

eliminate the SDNode::setValueTypes method.


---
Diffs of the changes:  (+37 -53)

 SelectionDAGNodes.h |   90 +---
 1 files changed, 37 insertions(+), 53 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.172 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.173
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.172 Sun Feb  4 01:28:00 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Feb  4 01:37:24 2007
@@ -904,7 +904,7 @@
 return Ret;
   }
 
-  SDNode(unsigned Opc, const SDOperand *Ops, unsigned NumOps)
+  SDNode(unsigned Opc, SDVTList VTs, const SDOperand *Ops, unsigned NumOps)
 : NodeType(Opc), NodeId(-1) {
 OperandsNeedDelete = true;
 NumOperands = NumOps;
@@ -915,8 +915,8 @@
   SDNode *N = OperandList[i].Val;
   N-Uses.push_back(this);
 }
-ValueList = 0;
-NumValues = 0;
+ValueList = VTs.VTs;
+NumValues = VTs.NumVTs;
 Prev = 0; Next = 0;
   }
 
@@ -926,12 +926,6 @@
   void MorphNodeTo(unsigned Opc, SDVTList L,
const SDOperand *Ops, unsigned NumOps);
   
-  void setValueTypes(SDVTList L) {
-assert(NumValues == 0  Should not have values yet!);
-ValueList = L.VTs;
-NumValues = L.NumVTs;
-  }
-  
   void addUser(SDNode *User) {
 Uses.push_back(User);
   }
@@ -987,7 +981,8 @@
 class HandleSDNode : public SDNode {
   virtual void ANCHOR();  // Out-of-line virtual method to give class a home.
 public:
-  HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, X, 1) {}
+  HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, getSDVTList(MVT::Other),
+ X, 1) {}
   ~HandleSDNode();  
   SDOperand getValue() const { return getOperand(0); }
 };
@@ -998,8 +993,7 @@
 protected:
   friend class SelectionDAG;
   StringSDNode(const std::string val)
-: SDNode(ISD::STRING, 0, 0), Value(val) {
-setValueTypes(getSDVTList(MVT::Other));
+: SDNode(ISD::STRING, getSDVTList(MVT::Other), 0, 0), Value(val) {
   }
 public:
   const std::string getValue() const { return Value; }
@@ -1015,8 +1009,8 @@
 protected:
   friend class SelectionDAG;
   ConstantSDNode(bool isTarget, uint64_t val, MVT::ValueType VT)
-: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, 0, 0), Value(val) 
{
-setValueTypes(getSDVTList(VT));
+: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, getSDVTList(VT),
+ 0, 0), Value(val) {
   }
 public:
 
@@ -1045,9 +1039,9 @@
 protected:
   friend class SelectionDAG;
   ConstantFPSDNode(bool isTarget, double val, MVT::ValueType VT)
-: SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, 0, 0), 
+: SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP,
+ getSDVTList(VT), 0, 0), 
   Value(val) {
-setValueTypes(getSDVTList(VT));
   }
 public:
 
@@ -1074,9 +1068,9 @@
   friend class SelectionDAG;
   GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT,
   int o=0)
-: SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress, 0, 0),
+: SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress,
+ getSDVTList(VT), 0, 0),
   Offset(o) {
-setValueTypes(getSDVTList(VT));
 TheGlobal = const_castGlobalValue*(GA);
   }
 public:
@@ -1098,8 +1092,8 @@
 protected:
   friend class SelectionDAG;
   FrameIndexSDNode(int fi, MVT::ValueType VT, bool isTarg)
-: SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex, 0, 0), FI(fi) {
-setValueTypes(getSDVTList(VT));
+: SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex, getSDVTList(VT),
+ 0, 0), FI(fi) {
   }
 public:
 
@@ -1118,8 +1112,8 @@
 protected:
   friend class SelectionDAG;
   JumpTableSDNode(int jti, MVT::ValueType VT, bool isTarg)
-: SDNode(isTarg ? ISD::TargetJumpTable : ISD::JumpTable, 0, 0), JTI(jti) {
-setValueTypes(getSDVTList(VT));
+: SDNode(isTarg ? ISD::TargetJumpTable : ISD::JumpTable, getSDVTList(VT),
+ 0, 0), JTI(jti) {
   }
 public:
 
@@ -1144,35 +1138,32 @@
   friend class SelectionDAG;
   ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT,
  int o=0)
-: SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, 0, 0),
-  Offset(o), Alignment(0) {
+: SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool,
+ getSDVTList(VT), 0, 0), Offset(o), Alignment(0) {
 assert((int)Offset = 0  Offset is too large);
-setValueTypes(getSDVTList(VT));
 Val.ConstVal = c;
   }
   ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT, int o,
  unsigned Align)
-: SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, 0, 0),
+: SDNode(isTarget ? ISD::TargetConstantPool : 

[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-01-29 Thread Nate Begeman


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.166 - 1.167
---
Log message:

Finish off bug 680: http://llvm.org/PR680 , allowing targets to custom lower 
frame and return
address nodes.


---
Diffs of the changes:  (+7 -0)

 SelectionDAGNodes.h |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.166 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.167
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.166 Sun Jan 28 07:31:35 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Mon Jan 29 16:58:52 2007
@@ -84,6 +84,13 @@
 
 // The address of the GOT
 GLOBAL_OFFSET_TABLE,
+
+// FRAMEADDR, RETURNADDR - These nodes represent llvm.frameaddress and
+// llvm.returnaddress on the DAG.  These nodes take one operand, the index
+// of the frame or return address to return.  An index of zero corresponds
+// to the current function's frame or return address, an index of one to 
the
+// parent's frame or return address, and so on.
+FRAMEADDR, RETURNADDR,
 
 // TargetConstant* - Like Constant*, but the DAG does not do any folding or
 // simplification of the constant.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-01-28 Thread Anton Korobeynikov


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.165 - 1.166
---
Log message:

Propagate changes from my local tree. This patch includes:
1. New parameter attribute called 'inreg'. It has meaning place this 
parameter in registers, if possible. This is some generalization of 
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend. 
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each 
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in 
on first attribute has meaning 'This is hidden pointer to structure 
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to 
FunctionExtraction pass, which relinks all internal-linkaged callees 
from deleted function to external linkage. This will allow further 
linking everything together.

NOTEs: 1. Documentation will be updated soon. 
   2. llvm-upgrade should be improved to translate csret = sret. 
  Before this, there will be some unexpected test fails.


---
Diffs of the changes:  (+14 -9)

 SelectionDAGNodes.h |   23 ++-
 1 files changed, 14 insertions(+), 9 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.165 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.166
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.165 Fri Jan 26 15:22:28 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Jan 28 07:31:35 2007
@@ -133,20 +133,25 @@
 // UNDEF - An undefined node
 UNDEF,
 
-/// FORMAL_ARGUMENTS(CHAIN, CC#, ISVARARG) - This node represents the 
formal
-/// arguments for a function.  CC# is a Constant value indicating the
-/// calling convention of the function, and ISVARARG is a flag that
-/// indicates whether the function is varargs or not.  This node has one
-/// result value for each incoming argument, plus one for the output chain.
-/// It must be custom legalized.
+/// FORMAL_ARGUMENTS(CHAIN, CC#, ISVARARG, FLAG0, ..., FLAGn) - This node
+/// represents the formal arguments for a function.  CC# is a Constant 
value
+/// indicating the calling convention of the function, and ISVARARG is a
+/// flag that indicates whether the function is varargs or not. This node
+/// has one result value for each incoming argument, plus one for the 
output
+/// chain. It must be custom legalized. See description of CALL node for
+/// FLAG argument contents explanation.
 /// 
 FORMAL_ARGUMENTS,
 
 /// RV1, RV2...RVn, CHAIN = CALL(CHAIN, CC#, ISVARARG, ISTAILCALL, CALLEE,
-///  ARG0, SIGN0, ARG1, SIGN1, ... ARGn, SIGNn)
+///  ARG0, FLAG0, ARG1, FLAG1, ... ARGn, FLAGn)
 /// This node represents a fully general function call, before the 
legalizer
-/// runs.  This has one result value for each argument / signness pair, 
plus
-/// a chain result. It must be custom legalized.
+/// runs.  This has one result value for each argument / flag pair, plus
+/// a chain result. It must be custom legalized. Flag argument indicates
+/// misc. argument attributes. Currently:
+/// Bit 0 - signness
+/// Bit 1 - 'inreg' attribute
+/// Bit 2 - 'sret' attribute
 CALL,
 
 // EXTRACT_ELEMENT - This is used to get the first or second (determined by



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-01-28 Thread Chris Lattner
 +/// runs.  This has one result value for each argument / flag  
 pair, plus
 +/// a chain result. It must be custom legalized. Flag argument  
 indicates
 +/// misc. argument attributes. Currently:
 +/// Bit 0 - signness
 +/// Bit 1 - 'inreg' attribute
 +/// Bit 2 - 'sret' attribute
  CALL,

Is there any reason not to use the parameter attribute enum directly?

-Chris
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-01-28 Thread Anton Korobeynikov
Hello, Chris.

 Is there any reason not to use the parameter attribute enum directly?
Well. Actually not all attributes should be propagated to lowering
stage. Also, there can be possible another attributes. Maybe it's worth
to make just new enum for this?

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics  Mechanics, Saint Petersburg State University.


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-12-15 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.162 - 1.163
---
Log message:

Typo.

---
Diffs of the changes:  (+1 -1)

 SelectionDAGNodes.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.162 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.163
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.162 Thu Nov  9 11:53:01 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Dec 16 00:21:55 2006
@@ -1481,7 +1481,7 @@
   unsigned getAlignment() const { return Alignment; }
   bool isVolatile() const { return IsVolatile; }
 
-  static bool classof(const LoadSDNode *) { return true; }
+  static bool classof(const StoreSDNode *) { return true; }
   static bool classof(const SDNode *N) {
 return N-getOpcode() == ISD::STORE;
   }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-11-02 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.159 - 1.160
---
Log message:

Add isPredecessor to check whether a node is another's predecessor.

---
Diffs of the changes:  (+3 -0)

 SelectionDAGNodes.h |3 +++
 1 files changed, 3 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.159 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.160
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.159 Mon Oct 30 01:57:41 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu Nov  2 21:02:18 2006
@@ -815,6 +815,9 @@
   // isOperand - Return true if this node is an operand of N.
   bool isOperand(SDNode *N) const;
 
+  // isPredecessor - Return true if this node is a predecessor of N.
+  bool isPredecessor(SDNode *N) const;
+
   /// getNumOperands - Return the number of values used by this operation.
   ///
   unsigned getNumOperands() const { return NumOperands; }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-11-02 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.160 - 1.161
---
Log message:

Fix comments.

---
Diffs of the changes:  (+8 -3)

 SelectionDAGNodes.h |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.160 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.161
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.160 Thu Nov  2 21:02:18 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Fri Nov  3 01:29:55 2006
@@ -809,13 +809,18 @@
   /// operation.
   bool hasNUsesOfValue(unsigned NUses, unsigned Value) const;
 
-  // isOnlyUse - Return true if this node is the only use of N.
+  /// isOnlyUse - Return true if this node is the only use of N.
+  ///
   bool isOnlyUse(SDNode *N) const;
 
-  // isOperand - Return true if this node is an operand of N.
+  /// isOperand - Return true if this node is an operand of N.
+  ///
   bool isOperand(SDNode *N) const;
 
-  // isPredecessor - Return true if this node is a predecessor of N.
+  /// isPredecessor - Return true if this node is a predecessor of N. This node
+  /// is either an operand of N or it can be reached by recursively traversing
+  /// up the operands.
+  /// NOTE: this is an expensive method. Use it carefully.
   bool isPredecessor(SDNode *N) const;
 
   /// getNumOperands - Return the number of values used by this operation.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-10-29 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.158 - 1.159
---
Log message:

Added a new SDNode type: BR_JT for jumptable branch.

---
Diffs of the changes:  (+4 -0)

 SelectionDAGNodes.h |4 
 1 files changed, 4 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.158 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.159
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.158 Fri Oct 27 20:34:21 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Mon Oct 30 01:57:41 2006
@@ -406,6 +406,10 @@
 // is the value to branch to, which must be of the same type as the 
target's
 // pointer type.
 BRIND,
+
+// BR_JT - Jumptable branch. The first operand is the chain, the second
+// is the jumptable index, the last one is the jumptable entry index.
+BR_JT,
 
 // BRCOND - Conditional branch.  The first operand is the chain,
 // the second is the condition, the third is the block to branch



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-10-11 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.152 - 1.153
---
Log message:

Naming consistency.

---
Diffs of the changes:  (+6 -6)

 SelectionDAGNodes.h |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.152 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.153
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.152 Tue Oct 10 23:29:42 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Wed Oct 11 02:08:53 2006
@@ -1383,8 +1383,8 @@
   // ExtType - non-ext, anyext, sext, zext.
   ISD::LoadExtType ExtType;
 
-  // LoadVT - VT of loaded value before extension.
-  MVT::ValueType LoadVT;
+  // LoadedVT - VT of loaded value before extension.
+  MVT::ValueType LoadedVT;
 
   // SrcValue - Memory location for alias analysis.
   const Value *SrcValue;
@@ -1403,7 +1403,7 @@
  ISD::MemOpAddrMode AM, ISD::LoadExtType ETy, MVT::ValueType LVT,
  const Value *SV, int O=0, unsigned Align=1, bool Vol=false)
 : SDNode(ISD::LOAD, Chain, Ptr, Off),
-  AddrMode(AM), ExtType(ETy), LoadVT(LVT), SrcValue(SV), SVOffset(O),
+  AddrMode(AM), ExtType(ETy), LoadedVT(LVT), SrcValue(SV), SVOffset(O),
   Alignment(Align), IsVolatile(Vol) {
 assert((Off.getOpcode() == ISD::UNDEF || AddrMode == ISD::POST_INDEXED) 
Only post-indexed load has a non-undef offset operand);
@@ -1412,7 +1412,7 @@
  ISD::LoadExtType ETy, MVT::ValueType LVT,
  const Value *SV, int O=0, unsigned Align=1, bool Vol=false)
 : SDNode(ISD::LOAD, Chain, Ptr, Off),
-  AddrMode(ISD::UNINDEXED), ExtType(ETy), LoadVT(LVT), SrcValue(SV),
+  AddrMode(ISD::UNINDEXED), ExtType(ETy), LoadedVT(LVT), SrcValue(SV),
   SVOffset(O), Alignment(Align), IsVolatile(Vol) {
 assert((Off.getOpcode() == ISD::UNDEF || AddrMode == ISD::POST_INDEXED) 
Only post-indexed load has a non-undef offset operand);
@@ -1424,7 +1424,7 @@
   const SDOperand getOffset() const { return getOperand(2); }
   ISD::MemOpAddrMode getAddressingMode() const { return AddrMode; }
   ISD::LoadExtType getExtensionType() const { return ExtType; }
-  MVT::ValueType getLoadVT() const { return LoadVT; }
+  MVT::ValueType getLoadedVT() const { return LoadedVT; }
   const Value *getSrcValue() const { return SrcValue; }
   int getSrcValueOffset() const { return SVOffset; }
   unsigned getAlignment() const { return Alignment; }
@@ -1445,7 +1445,7 @@
   // IsTruncStore - True is the op does a truncation before store.
   bool IsTruncStore;
 
-  // StoreVT - VT of the value after truncation.
+  // StoredVT - VT of the value after truncation.
   MVT::ValueType StoredVT;
 
   // SrcValue - Memory location for alias analysis.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-10-10 Thread Andrew Lenharth


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.151 - 1.152
---
Log message:

Jimptables working again on alpha.

As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.



---
Diffs of the changes:  (+2 -2)

 SelectionDAGNodes.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.151 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.152
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.151 Mon Oct  9 20:44:58 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Tue Oct 10 23:29:42 2006
@@ -82,8 +82,8 @@
 Constant, ConstantFP,
 GlobalAddress, FrameIndex, JumpTable, ConstantPool, ExternalSymbol,
 
-// The relocation value to add to the value loaded from a jump table
-JumpTableRelocBase,
+// The address of the GOT
+GLOBAL_OFFSET_TABLE,
 
 // TargetConstant* - Like Constant*, but the DAG does not do any folding or
 // simplification of the constant.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-10-09 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.150 - 1.151
---
Log message:

Comments; getChain(), getBasePtr(), etc. should return a SDOperand by value.

---
Diffs of the changes:  (+51 -23)

 SelectionDAGNodes.h |   74 +++-
 1 files changed, 51 insertions(+), 23 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.150 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.151
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.150 Mon Oct  9 15:55:20 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Mon Oct  9 20:44:58 2006
@@ -524,26 +524,28 @@
   ///
   /// UNINDEXEDNormal load / store. The effective address is already
   ///  computed and is available in the base pointer. The offset
-  ///  operand is always undefined. An unindexed load produces one
-  ///  value (result of the load); an unindexed store does not
-  ///  produces a value.
+  ///  operand is always undefined. In addition to producing a
+  ///  chain, an unindexed load produces one value (result of the
+  ///  load); an unindexed store does not produces a value.
   ///
   /// PRE_INDEXED  Similar to the unindexed mode where the effective address is
   ///  the result of computation of the base pointer. However, it
   ///  considers the computation as being folded into the load /
   ///  store operation (i.e. the load / store does the address
   ///  computation as well as performing the memory transaction).
-  ///  The base operand is always undefined. A pre-indexed load
-  ///  produces two values (result of the load and the result of
-  ///  the address computation); a pre-indexed store produces one
-  ///  value (result of the address computation).
+  ///  The base operand is always undefined. In addition to
+  ///  producing a chain, pre-indexed load produces two values
+  ///  (result of the load and the result of the address
+  ///  computation); a pre-indexed store produces one value (result
+  ///  of the address computation).
   ///
   /// POST_INDEXED The effective address is the value of the base pointer. The
   ///  value of the offset operand is then added to the base after
-  ///  memory transaction. A post-indexed load produces two values
-  ///  (the result of the load and the result of the base + offset
-  ///  computation); a post-indexed store produces one value (the
-  ///  the result of the base + offset computation).
+  ///  memory transaction. In addition to producing a chain,
+  ///  post-indexed load produces two values (the result of the 
load
+  ///  and the result of the base + offset computation); a
+  ///  post-indexed store produces one value (the the result of the
+  ///  base + offset computation).
   ///
   enum MemOpAddrMode {
 UNINDEXED = 0,
@@ -1375,12 +1377,25 @@
 /// LoadSDNode - This class is used to represent ISD::LOAD nodes.
 ///
 class LoadSDNode : public SDNode {
-  ISD::MemOpAddrMode AddrMode;  // unindexed, pre-indexed, post-indexed.
-  ISD::LoadExtType ExtType; // non-ext, anyext, sext, zext.
-  MVT::ValueType LoadVT;// VT of loaded value before extension.
+  // AddrMode - unindexed, pre-indexed, post-indexed.
+  ISD::MemOpAddrMode AddrMode;
+
+  // ExtType - non-ext, anyext, sext, zext.
+  ISD::LoadExtType ExtType;
+
+  // LoadVT - VT of loaded value before extension.
+  MVT::ValueType LoadVT;
+
+  // SrcValue - Memory location for alias analysis.
   const Value *SrcValue;
+
+  // SVOffset - Memory location offset.
   int SVOffset;
+
+  // Alignment - Alignment of memory location in bytes.
   unsigned Alignment;
+
+  // IsVolatile - True if the load is volatile.
   bool IsVolatile;
 protected:
   friend class SelectionDAG;
@@ -1404,9 +1419,9 @@
   }
 public:
 
-  const SDOperand getChain() const { return getOperand(0); }
-  const SDOperand getBasePtr() const { return getOperand(1); }
-  const SDOperand getOffset() const { return getOperand(2); }
+  const SDOperand getChain() const { return getOperand(0); }
+  const SDOperand getBasePtr() const { return getOperand(1); }
+  const SDOperand getOffset() const { return getOperand(2); }
   ISD::MemOpAddrMode getAddressingMode() const { return AddrMode; }
   ISD::LoadExtType getExtensionType() const { return ExtType; }
   MVT::ValueType getLoadVT() const { return LoadVT; }
@@ -1424,12 +1439,25 @@
 /// StoreSDNode - This class is used to represent ISD::STORE nodes.
 ///
 class StoreSDNode : public SDNode {
-  ISD::MemOpAddrMode AddrMode;  // unindexed, pre-indexed, post-indexed.
-  bool IsTruncStore;// is 

[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-09-24 Thread Andrew Lenharth


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.147 - 1.148
---
Log message:

Add support for other relocation bases to jump tables, as well as custom asm 
directives

---
Diffs of the changes:  (+3 -0)

 SelectionDAGNodes.h |3 +++
 1 files changed, 3 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.147 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.148
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.147 Thu Sep 14 02:30:48 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Sep 24 14:43:29 2006
@@ -82,6 +82,9 @@
 Constant, ConstantFP,
 GlobalAddress, FrameIndex, JumpTable, ConstantPool, ExternalSymbol,
 
+// The relocation value to add to the value loaded from a jump table
+JumpTableRelocBase,
+
 // TargetConstant* - Like Constant*, but the DAG does not do any folding or
 // simplification of the constant.
 TargetConstant,



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-09-14 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.146 - 1.147
---
Log message:

The top bit is used to determine whether it's a MachineConstantPoolValue.

---
Diffs of the changes:  (+4 -2)

 SelectionDAGNodes.h |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.146 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.147
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.146 Tue Sep 12 15:59:22 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu Sep 14 02:30:48 2006
@@ -1150,7 +1150,7 @@
 Constant *ConstVal;
 MachineConstantPoolValue *MachineCPVal;
   } Val;
-  int Offset;
+  int Offset;  // It's a MachineConstantPoolValue if top bit is set.
   unsigned Alignment;
 protected:
   friend class SelectionDAG;
@@ -1200,7 +1200,9 @@
 return Val.MachineCPVal;
   }
 
-  int getOffset() const { return Offset; }
+  int getOffset() const {
+return Offset  ~(1  (sizeof(unsigned)*8-1));
+  }
   
   // Return the alignment of this constant pool object, which is either 0 (for
   // default alignment) or log2 of the desired value.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-09-08 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.144 - 1.145
---
Log message:

Implement new fpowi node


---
Diffs of the changes:  (+4 -3)

 SelectionDAGNodes.h |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.144 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.145
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.144 Sun Aug 27 03:07:55 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Sep  9 00:55:44 2006
@@ -361,9 +361,10 @@
 // conversions, but that is a noop, deleted by getNode().
 BIT_CONVERT,
 
-// FNEG, FABS, FSQRT, FSIN, FCOS - Perform unary floating point negation,
-// absolute value, square root, sine and cosine operations.
-FNEG, FABS, FSQRT, FSIN, FCOS,
+// FNEG, FABS, FSQRT, FSIN, FCOS, FPOWI - Perform unary floating point
+// negation, absolute value, square root, sine and cosine, and powi
+// operations.
+FNEG, FABS, FSQRT, FSIN, FCOS, FPOWI,
 
 // Other operators.  LOAD and STORE have token chains as their first
 // operand, then the same operands as an LLVM load/store instruction, then 
a



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-07-18 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.135 - 1.136
---
Log message:

Add an out-of-line virtual method for the sdnode class to give it a home.


---
Diffs of the changes:  (+3 -0)

 SelectionDAGNodes.h |3 +++
 1 files changed, 3 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.135 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.136
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.135 Fri May 26 19:40:15 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Tue Jul 18 19:00:37 2006
@@ -713,6 +713,9 @@
   /// Uses - These are all of the SDNode's that use a value produced by this
   /// node.
   std::vectorSDNode* Uses;
+  
+  // Out-of-line virtual method to give class a home.
+  virtual void ANCHOR();
 public:
   virtual ~SDNode() {
 assert(NumOperands == 0  Operand list not cleared before deletion);



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-05-26 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.133 - 1.134
---
Log message:

Change RET node to include signness information of the return values. e.g.
RET chain, value1, sign1, value2, sign2


---
Diffs of the changes:  (+3 -2)

 SelectionDAGNodes.h |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.133 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.134
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.133 Wed May 24 19:54:33 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Fri May 26 18:09:09 2006
@@ -414,8 +414,9 @@
 BR_CC,
 
 // RET - Return from function.  The first operand is the chain,
-// and any subsequent operands are the return values for the
-// function.  This operation can have variable number of operands.
+// and any subsequent operands are pairs of return value and return value
+// signness for the function.  This operation can have variable number of
+// operands.
 RET,
 
 // INLINEASM - Represents an inline asm block.  This node always has two



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-05-26 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.134 - 1.135
---
Log message:

Add a new sentry node type, allowing assertions to catch trivial 
use-after-deleted errors.


---
Diffs of the changes:  (+5 -0)

 SelectionDAGNodes.h |5 +
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.134 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.135
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.134 Fri May 26 18:09:09 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Fri May 26 19:40:15 2006
@@ -47,6 +47,10 @@
   /// SelectionDAG.
   ///
   enum NodeType {
+// DELETED_NODE - This is an illegal flag value that is used to catch
+// errors.  This opcode is not a legal opcode for any node.
+DELETED_NODE,
+
 // EntryToken - This is the marker used to indicate the start of the 
region.
 EntryToken,
 
@@ -712,6 +716,7 @@
 public:
   virtual ~SDNode() {
 assert(NumOperands == 0  Operand list not cleared before deletion);
+NodeType = ISD::DELETED_NODE;
   }
   
   
//======//



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-05-24 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.132 - 1.133
---
Log message:

CALL node change: now containing signness of each argument.


---
Diffs of the changes:  (+3 -3)

 SelectionDAGNodes.h |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.132 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.133
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.132 Tue May 16 17:52:27 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Wed May 24 19:54:33 2006
@@ -125,10 +125,10 @@
 FORMAL_ARGUMENTS,
 
 /// RV1, RV2...RVn, CHAIN = CALL(CHAIN, CC#, ISVARARG, ISTAILCALL, CALLEE,
-///  ARG0, ARG1, ... ARGn)
+///  ARG0, SIGN0, ARG1, SIGN1, ... ARGn, SIGNn)
 /// This node represents a fully general function call, before the 
legalizer
-/// runs.  This has one result value for each argument, plus a chain 
result.
-/// It must be custom legalized.
+/// runs.  This has one result value for each argument / signness pair, 
plus
+/// a chain result. It must be custom legalized.
 CALL,
 
 // EXTRACT_ELEMENT - This is used to get the first or second (determined by



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-05-16 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.130 - 1.131
---
Log message:

Add a chain to FORMAL_ARGUMENTS.


---
Diffs of the changes:  (+4 -3)

 SelectionDAGNodes.h |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.130 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.131
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.130 Sat Apr 22 13:53:45 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Tue May 16 01:43:59 2006
@@ -115,12 +115,13 @@
 // UNDEF - An undefined node
 UNDEF,
 
-/// FORMAL_ARGUMENTS(CC#, ISVARARG) - This node represents the formal
+/// FORMAL_ARGUMENTS(CHAIN, CC#, ISVARARG) - This node represents the 
formal
 /// arguments for a function.  CC# is a Constant value indicating the
 /// calling convention of the function, and ISVARARG is a flag that
 /// indicates whether the function is varargs or not.  This node has one
-/// result value for each incoming argument, and is typically custom
-/// legalized.
+/// result value for each incoming argument, plus one for the output chain.
+/// It must be custom legalized.
+/// 
 FORMAL_ARGUMENTS,
 
 // EXTRACT_ELEMENT - This is used to get the first or second (determined by



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-05-16 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.131 - 1.132
---
Log message:

Add a new CALL node.


---
Diffs of the changes:  (+7 -0)

 SelectionDAGNodes.h |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.131 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.132
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.131 Tue May 16 01:43:59 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Tue May 16 17:52:27 2006
@@ -123,6 +123,13 @@
 /// It must be custom legalized.
 /// 
 FORMAL_ARGUMENTS,
+
+/// RV1, RV2...RVn, CHAIN = CALL(CHAIN, CC#, ISVARARG, ISTAILCALL, CALLEE,
+///  ARG0, ARG1, ... ARGn)
+/// This node represents a fully general function call, before the 
legalizer
+/// runs.  This has one result value for each argument, plus a chain 
result.
+/// It must be custom legalized.
+CALL,
 
 // EXTRACT_ELEMENT - This is used to get the first or second (determined by
 // a Constant, which is required to be operand #1), element of the 
aggregate



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-04-12 Thread Reid Spencer


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.128 - 1.129
---
Log message:

Make sure both member variables are initialized in the default constructor
for SDOperand. This gets rid of numerous warnings in lib/CodeGen and 
lib/Target when compiled with GCC 4.0.2


---
Diffs of the changes:  (+1 -1)

 SelectionDAGNodes.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.128 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.129
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.128 Tue Apr 11 16:30:42 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Wed Apr 12 11:44:15 2006
@@ -609,7 +609,7 @@
   SDNode *Val;// The node defining the value we are using.
   unsigned ResNo; // Which return value of the node we are using.
 
-  SDOperand() : Val(0) {}
+  SDOperand() : Val(0), ResNo(0) {}
   SDOperand(SDNode *val, unsigned resno) : Val(val), ResNo(resno) {}
 
   bool operator==(const SDOperand O) const {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-04-08 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.126 - 1.127
---
Log message:

Add a new VSELECT node.


---
Diffs of the changes:  (+5 -0)

 SelectionDAGNodes.h |5 +
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.126 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.127
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.126 Sat Apr  1 20:28:52 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Apr  8 17:16:01 2006
@@ -230,6 +230,11 @@
 VADD, VSUB, VMUL, VSDIV, VUDIV,
 VAND, VOR, VXOR,
 
+/// VSELECT(COND,LHS,RHS,  COUNT,TYPE) - Select for MVT::Vector values.
+/// COND is a boolean value.  This node return LHS if COND is true, RHS if
+/// COND is false.
+VSELECT,
+
 /// SCALAR_TO_VECTOR(VAL) - This represents the operation of loading a
 /// scalar value into the low element of the resultant vector type.  The 
top
 /// elements of the vector are undefined.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-28 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.124 - 1.125
---
Log message:

Add a new node


---
Diffs of the changes:  (+9 -0)

 SelectionDAGNodes.h |9 +
 1 files changed, 9 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.124 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.125
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.124 Mon Mar 27 18:39:06 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Tue Mar 28 13:54:11 2006
@@ -189,6 +189,15 @@
 /// element number IDX.
 EXTRACT_VECTOR_ELT,
 
+/// VVECTOR_SHUFFLE(VEC1, VEC2, SHUFFLEVEC, COUNT,TYPE) - Returns a vector,
+/// of the same type as VEC1/VEC2.  SHUFFLEVEC is a VBUILD_VECTOR of
+/// constant int values that indicate which value each result element will
+/// get.  The elements of VEC1/VEC2 are enumerated in order.  This is quite
+/// similar to the Altivec 'vperm' instruction, except that the indices 
must
+/// be constants and are in terms of the element size of VEC1/VEC2, not in
+/// terms of bytes.
+VVECTOR_SHUFFLE,
+
 /// VECTOR_SHUFFLE(VEC1, VEC2, SHUFFLEVEC) - Returns a vector, of the same
 /// type as VEC1/VEC2.  SHUFFLEVEC is a BUILD_VECTOR of constant int values
 /// (regardless of whether its datatype is legal or not) that indicate



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-26 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.121 - 1.122
---
Log message:

Add ISD::isBuildVectorAllZeros predicate

---
Diffs of the changes:  (+4 -1)

 SelectionDAGNodes.h |5 -
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.121 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.122
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.121 Sat Mar 25 16:56:35 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Mar 26 03:50:58 2006
@@ -458,7 +458,10 @@
   /// isBuildVectorAllOnesInteger - Return true if the specified node is a
   /// BUILD_VECTOR where all of the elements are ~0 or undef.
   bool isBuildVectorAllOnesInteger(const SDNode *N);
-  
+
+  /// isBuildVectorAllZeros - Return true if the specified node is a
+  /// BUILD_VECTOR where all of the elements are 0 or undef.
+  bool isBuildVectorAllZeros(const SDNode *N);
   
   
//======//
   /// ISD::CondCode enum - These are ordered carefully to make the bitfields



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-25 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.120 - 1.121
---
Log message:

Add a predicate


---
Diffs of the changes:  (+7 -0)

 SelectionDAGNodes.h |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.120 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.121
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.120 Thu Mar 23 19:03:55 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Mar 25 16:56:35 2006
@@ -453,6 +453,13 @@
 BUILTIN_OP_END
   };
 
+  /// Node predicates
+
+  /// isBuildVectorAllOnesInteger - Return true if the specified node is a
+  /// BUILD_VECTOR where all of the elements are ~0 or undef.
+  bool isBuildVectorAllOnesInteger(const SDNode *N);
+  
+  
   
//======//
   /// ISD::CondCode enum - These are ordered carefully to make the bitfields
   /// below work out, when considering SETFALSE (something that never exists



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-23 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.119 - 1.120
---
Log message:

add a new intrinsic node


---
Diffs of the changes:  (+8 -0)

 SelectionDAGNodes.h |8 
 1 files changed, 8 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.119 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.120
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.119 Wed Mar 22 14:09:04 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu Mar 23 19:03:55 2006
@@ -79,6 +79,14 @@
 TargetFrameIndex,
 TargetConstantPool,
 TargetExternalSymbol,
+
+/// RESULT{,OUTCHAIN} = INTRINSIC({INCHAIN,} INTRINSICID, arg1, arg2, ...)
+/// This node represents a target intrinsic function.  If the intrinsic
+/// has side effects, the first operand is a chain pointer and the result
+/// includes an output chain.  After this input is the ID number of the 
+/// intrinsic, from the llvm::intrinsic namespace.  The operands to the 
+/// intrinsic follow.
+INTRINSIC,
 
 // CopyToReg - This node has three operands: a chain, a register number to
 // set to this value, and a value.  



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-22 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.117 - 1.118
---
Log message:

add a new node


---
Diffs of the changes:  (+12 -0)

 SelectionDAGNodes.h |   12 
 1 files changed, 12 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.117 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.118
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.117 Tue Mar 21 14:43:08 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Wed Mar 22 13:56:46 2006
@@ -176,6 +176,18 @@
 /// of the element size of VEC1/VEC2, not in terms of bytes.
 VECTOR_SHUFFLE,
 
+/// X = VBIT_CONVERT(Y)  and X = VBIT_CONVERT(Y, COUNT,TYPE) - This node
+/// represents a conversion from or to an ISD::Vector type.
+///
+/// This is lowered to a BIT_CONVERT of the appropriate input/output types.
+/// The input and output are required to have the same size and at least 
one
+/// is required to be a vector.
+///
+/// If the source is a vector, this takes three operands (like any other
+/// vector consumer) which indicate the size and type of the vector input.
+/// Otherwise it takes one input.
+VBIT_CONVERT,
+
 /// BINOP(LHS, RHS,  COUNT,TYPE)
 /// Simple abstract vector operators.  Unlike the integer and floating 
point
 /// binary operators, these nodes also take two additional operands:



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-22 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.118 - 1.119
---
Log message:

Fix comments


---
Diffs of the changes:  (+4 -3)

 SelectionDAGNodes.h |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.118 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.119
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.118 Wed Mar 22 13:56:46 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Wed Mar 22 14:09:04 2006
@@ -181,10 +181,11 @@
 ///
 /// This is lowered to a BIT_CONVERT of the appropriate input/output types.
 /// The input and output are required to have the same size and at least 
one
-/// is required to be a vector.
+/// is required to be a vector (if neither is a vector, just use
+/// BIT_CONVERT).
 ///
-/// If the source is a vector, this takes three operands (like any other
-/// vector consumer) which indicate the size and type of the vector input.
+/// If the result is a vector, this takes three operands (like any other
+/// vector producer) which indicate the size and type of the vector result.
 /// Otherwise it takes one input.
 VBIT_CONVERT,
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-21 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.116 - 1.117
---
Log message:

add some nodes for extractelement


---
Diffs of the changes:  (+10 -0)

 SelectionDAGNodes.h |   10 ++
 1 files changed, 10 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.116 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.117
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.116 Sun Mar 19 17:42:51 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Tue Mar 21 14:43:08 2006
@@ -156,6 +156,16 @@
 /// INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR (a legal packed
 /// type) with the element at IDX replaced with VAL.
 INSERT_VECTOR_ELT,
+
+/// VEXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR
+/// (an MVT::Vector value) identified by the (potentially variable) element
+/// number IDX.
+VEXTRACT_VECTOR_ELT,
+
+/// EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR
+/// (a legal packed type vector) identified by the (potentially variable)
+/// element number IDX.
+EXTRACT_VECTOR_ELT,
 
 /// VECTOR_SHUFFLE(VEC1, VEC2, SHUFFLEVEC) - Returns a vector, of the same
 /// type as VEC1/VEC2.  SHUFFLEVEC is a BUILD_VECTOR of constant int values



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-19 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.115 - 1.116
---
Log message:

add a node


---
Diffs of the changes:  (+9 -0)

 SelectionDAGNodes.h |9 +
 1 files changed, 9 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.115 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.116
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.115 Sat Mar 18 23:26:45 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Mar 19 17:42:51 2006
@@ -157,6 +157,15 @@
 /// type) with the element at IDX replaced with VAL.
 INSERT_VECTOR_ELT,
 
+/// VECTOR_SHUFFLE(VEC1, VEC2, SHUFFLEVEC) - Returns a vector, of the same
+/// type as VEC1/VEC2.  SHUFFLEVEC is a BUILD_VECTOR of constant int values
+/// (regardless of whether its datatype is legal or not) that indicate
+/// which value each result element will get.  The elements of VEC1/VEC2 
are
+/// enumerated in order.  This is quite similar to the Altivec 'vperm'
+/// instruction, except that the indices must be constants and are in terms
+/// of the element size of VEC1/VEC2, not in terms of bytes.
+VECTOR_SHUFFLE,
+
 /// BINOP(LHS, RHS,  COUNT,TYPE)
 /// Simple abstract vector operators.  Unlike the integer and floating 
point
 /// binary operators, these nodes also take two additional operands:



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h ValueTypes.h

2006-03-18 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.114 - 1.115
ValueTypes.h updated: 1.22 - 1.23
---
Log message:

improve comments, add a new MVT::getVectorBaseType method.


---
Diffs of the changes:  (+71 -40)

 SelectionDAGNodes.h |   14 ---
 ValueTypes.h|   97 +---
 2 files changed, 71 insertions(+), 40 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.114 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.115
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.114 Sat Mar 18 18:52:25 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Mar 18 23:26:45 2006
@@ -166,7 +166,12 @@
 /// their last two operands.
 VADD, VSUB, VMUL, VSDIV, VUDIV,
 VAND, VOR, VXOR,
-
+
+/// SCALAR_TO_VECTOR(VAL) - This represents the operation of loading a
+/// scalar value into the low element of the resultant vector type.  The 
top
+/// elements of the vector are undefined.
+SCALAR_TO_VECTOR,
+
 // MULHU/MULHS - Multiply high - Multiply two integers of type iN, 
producing
 // an unsigned/signed value of type i[2*n], then return the top part.
 MULHU, MULHS,
@@ -281,10 +286,9 @@
 //  integer result type.
 // ZEXTLOAD loads the integer operand and zero extends it to a larger
 //  integer result type.
-// EXTLOAD  is used for two things: floating point extending loads, and
-//  integer extending loads where it doesn't matter what the high
-//  bits are set to.  The code generator is allowed to codegen this
-//  into whichever operation is more efficient.
+// EXTLOAD  is used for three things: floating point extending loads, 
+//  integer extending loads [the top bits are undefined], and 
vector
+//  extending loads [load into low elt].
 EXTLOAD, SEXTLOAD, ZEXTLOAD,
 
 // TRUNCSTORE - This operators truncates (for integer) or rounds (for FP) a


Index: llvm/include/llvm/CodeGen/ValueTypes.h
diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.22 
llvm/include/llvm/CodeGen/ValueTypes.h:1.23
--- llvm/include/llvm/CodeGen/ValueTypes.h:1.22 Thu Mar 16 13:42:44 2006
+++ llvm/include/llvm/CodeGen/ValueTypes.h  Sat Mar 18 23:26:45 2006
@@ -66,20 +66,55 @@
 LAST_VALUETYPE =  24// This always remains at the end of the list.
   };
 
+  /// MVT::isInteger - Return true if this is a simple integer, or a packed
+  /// vector integer type.
   static inline bool isInteger(ValueType VT) {
 return (VT = i1  VT = i128) || (VT = v8i8  VT = v2i64);
   }
+
+  /// MVT::isFloatingPoint - Return true if this is a simple FP, or a packed
+  /// vector FP type.
   static inline bool isFloatingPoint(ValueType VT) {
 return (VT = f32  VT = f128) || (VT = v4f32  VT = v2f64);
   }
+  
+  /// MVT::isVector - Return true if this is a packed vector type (i.e. not 
+  /// MVT::Vector).
   static inline bool isVector(ValueType VT) {
-return (VT = FIRST_VECTOR_VALUETYPE 
-VT = LAST_VECTOR_VALUETYPE);
+return VT = FIRST_VECTOR_VALUETYPE  VT = LAST_VECTOR_VALUETYPE;
   }
   
-  /// getVectorType - Returns the ValueType that represents a vector 
NumElements
-  /// in length, where each element is of type VT.  If there is no ValueType
-  /// that represents this vector, a ValueType of Other is returned.
+  /// MVT::getSizeInBits - Return the size of the specified value type in bits.
+  ///
+  static inline unsigned getSizeInBits(ValueType VT) {
+switch (VT) {
+default: assert(0  ValueType has no known size!);
+case MVT::i1  :  return 1;
+case MVT::i8  :  return 8;
+case MVT::i16 :  return 16;
+case MVT::f32 :
+case MVT::i32 :  return 32;
+case MVT::f64 :
+case MVT::i64 :
+case MVT::v8i8:
+case MVT::v4i16:
+case MVT::v2i32: 
+case MVT::v2f32: return 64;
+case MVT::f80 :  return 80;
+case MVT::f128:
+case MVT::i128: 
+case MVT::v16i8:
+case MVT::v8i16:
+case MVT::v4i32:
+case MVT::v2i64:
+case MVT::v4f32:
+case MVT::v2f64: return 128;
+}
+  }
+  
+  /// MVT::getVectorType - Returns the ValueType that represents a vector
+  /// NumElements in length, where each element is of type VT.  If there is no
+  /// ValueType that represents this vector, a ValueType of Other is returned.
   ///
   static inline ValueType getVectorType(ValueType VT, unsigned NumElements) {
 switch (VT) {
@@ -88,19 +123,19 @@
 case MVT::i8:
   if (NumElements == 8)  return MVT::v8i8;
   if (NumElements == 16) return MVT::v16i8;
-  break;
+break;
 case MVT::i16:
   if (NumElements == 4)  return MVT::v4i16;
   if (NumElements == 8)  return MVT::v8i16;
-  break;
+break;
 case MVT::i32:
   if (NumElements == 2)  return MVT::v2i32;
   if (NumElements == 4)  return MVT::v4i32;
-  break;
+ 

[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-17 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.111 - 1.112
---
Log message:

add a couple of enum values


---
Diffs of the changes:  (+12 -1)

 SelectionDAGNodes.h |   13 -
 1 files changed, 12 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.111 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.112
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.111 Thu Mar 16 19:40:33 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Fri Mar 17 13:53:41 2006
@@ -146,7 +146,12 @@
 // are both floating point.  X and the result must have the same type.
 // FCOPYSIGN(f32, f64) is allowed.
 FCOPYSIGN,
+
+/// INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR (a legal packed
+/// type) with the element at IDX replaced with VAL.
+INSERT_VECTOR_ELT,
 
+// BINOP(LHS, RHS,  COUNT,TYPE)
 // Simple abstract vector operators.  Unlike the integer and floating point
 // binary operators, these nodes also take two additional operands:
 // a constant element count, and a value type node indicating the type of
@@ -156,6 +161,12 @@
 VADD, VSUB, VMUL, VSDIV, VUDIV,
 VAND, VOR, VXOR,
 
+/// VINSERT_VECTOR_ELT(VECTOR, VAL, IDX,  COUNT,TYPE) - Given a vector
+/// VECTOR, an element ELEMENT, and a (potentially variable) index IDX,
+/// return an vector with the specified element of VECTOR replaced with 
VAL.
+/// COUNT and TYPE specify the type of vector, as is standard for V* nodes.
+VINSERT_VECTOR_ELT,
+
 // MULHU/MULHS - Multiply high - Multiply two integers of type iN, 
producing
 // an unsigned/signed value of type i[2*n], then return the top part.
 MULHU, MULHS,
@@ -168,7 +179,7 @@
 // Counting operators
 CTTZ, CTLZ, CTPOP,
 
-// Select
+// Select(COND, TRUEVAL, FALSEVAL)
 SELECT, 
 
 // Select with condition operator - This selects between a true value and 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-17 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.112 - 1.113
---
Log message:

Update comments.


---
Diffs of the changes:  (+5 -4)

 SelectionDAGNodes.h |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.112 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.113
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.112 Fri Mar 17 13:53:41 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Fri Mar 17 19:43:28 2006
@@ -85,9 +85,10 @@
 TargetConstantPool,
 TargetExternalSymbol,
 
-// Abstract version of ConstantVec with abstract Vector type. The first 
node
-// is a constant element count, the second is a value type indicating the
-// type of the elements.
+// Abstract version of ConstantVec with abstract Vector type. The first N-2
+// operands are the constants to initialize the vector, the N-2nd operand
+// is a constant element count, and that last operand is the value type
+// indicating the type of the elements.
 VConstant,
 
 // CopyToReg - This node has three operands: a chain, a register number to
@@ -157,7 +158,7 @@
 // a constant element count, and a value type node indicating the type of
 // the elements.  The order is count, type, op0, op1.  All vector opcodes,
 // including VLOAD and VConstant must currently have count and type as
-// their 1st and 2nd arguments.
+// their last two operands.
 VADD, VSUB, VMUL, VSDIV, VUDIV,
 VAND, VOR, VXOR,
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-16 Thread Nate Begeman


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.110 - 1.111
---
Log message:

Remove BRTWOWAY*
Make the PPC backend not dependent on BRTWOWAY_CC and make the branch
selector smarter about the code it generates, fixing a case in the
readme.


---
Diffs of the changes:  (+0 -13)

 SelectionDAGNodes.h |   13 -
 1 files changed, 13 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.110 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.111
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.110 Sat Mar  4 23:06:40 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu Mar 16 19:40:33 2006
@@ -302,25 +302,12 @@
 // to if the condition is true.
 BRCOND,
 
-// BRCONDTWOWAY - Two-way conditional branch.  The first operand is the
-// chain, the second is the condition, the third is the block to branch to
-// if true, and the forth is the block to branch to if false.  Targets
-// usually do not implement this, preferring to have legalize demote the
-// operation to BRCOND/BR pairs when necessary.
-BRCONDTWOWAY,
-
 // BR_CC - Conditional branch.  The behavior is like that of SELECT_CC, in
 // that the condition is represented as condition code, and two nodes to
 // compare, rather than as a combined SetCC node.  The operands in order 
are
 // chain, cc, lhs, rhs, block to branch to if condition is true.
 BR_CC,
 
-// BRTWOWAY_CC - Two-way conditional branch.  The operands in order are
-// chain, cc, lhs, rhs, block to branch to if condition is true, block to
-// branch to if condition is false.  Targets usually do not implement this,
-// preferring to have legalize demote the operation to BRCOND/BR pairs.
-BRTWOWAY_CC,
-
 // RET - Return from function.  The first operand is the chain,
 // and any subsequent operands are the return values for the
 // function.  This operation can have variable number of operands.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-02 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.105 - 1.106
---
Log message:

remove the read/write port/io intrinsics.


---
Diffs of the changes:  (+0 -6)

 SelectionDAGNodes.h |6 --
 1 files changed, 6 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.105 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.106
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.105 Tue Feb 28 18:51:13 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu Mar  2 18:18:00 2006
@@ -379,12 +379,6 @@
 // register (or other high accuracy low latency clock source)
 READCYCLECOUNTER,
 
-// READPORT, WRITEPORT, READIO, WRITEIO - These correspond to the LLVM
-// intrinsics of the same name.  The first operand is a token chain, the
-// other operands match the intrinsic.  These produce a token chain in
-// addition to a value (if any).
-READPORT, WRITEPORT, READIO, WRITEIO,
-
 // HANDLENODE node - Used as a handle for various purposes.
 HANDLENODE,
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-02 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.106 - 1.107
---
Log message:

Added isOperand(N): true if this is an operand of N

---
Diffs of the changes:  (+7 -0)

 SelectionDAGNodes.h |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.106 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.107
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.106 Thu Mar  2 18:18:00 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Fri Mar  3 00:24:54 2006
@@ -542,6 +542,7 @@
   inline const SDOperand getOperand(unsigned i) const;
   inline bool isTargetOpcode() const;
   inline unsigned getTargetOpcode() const;
+  inline const bool isOperand(SDNode *N) const;
 
   /// hasOneUse - Return true if there is exactly one operation using this
   /// result value of the defining operator.
@@ -631,6 +632,9 @@
   // isOnlyUse - Return true if this node is the only use of N.
   bool isOnlyUse(SDNode *N) const;
 
+  // isOperand - Return true if this node is an operand of N.
+  bool isOperand(SDNode *N) const;
+
   /// getNumOperands - Return the number of values used by this operation.
   ///
   unsigned getNumOperands() const { return NumOperands; }
@@ -937,6 +941,9 @@
 inline unsigned SDOperand::getTargetOpcode() const {
   return Val-getTargetOpcode();
 }
+inline const bool SDOperand::isOperand(SDNode *N) const {
+  return Val-isOperand(N);
+}
 inline bool SDOperand::hasOneUse() const {
   return Val-hasNUsesOfValue(1, ResNo);
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-03-02 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.107 - 1.108
---
Log message:

SDOperand::isOperand should not be a forwarding. It must check *this against 
N's operands.

---
Diffs of the changes:  (+3 -4)

 SelectionDAGNodes.h |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.107 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.108
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.107 Fri Mar  3 00:24:54 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Fri Mar  3 00:42:32 2006
@@ -531,6 +531,9 @@
 return SDOperand(Val, R);
   }
 
+  // isOperand - Return true if this node is an operand of N.
+  bool isOperand(SDNode *N) const;
+
   /// getValueType - Return the ValueType of the referenced return value.
   ///
   inline MVT::ValueType getValueType() const;
@@ -542,7 +545,6 @@
   inline const SDOperand getOperand(unsigned i) const;
   inline bool isTargetOpcode() const;
   inline unsigned getTargetOpcode() const;
-  inline const bool isOperand(SDNode *N) const;
 
   /// hasOneUse - Return true if there is exactly one operation using this
   /// result value of the defining operator.
@@ -941,9 +943,6 @@
 inline unsigned SDOperand::getTargetOpcode() const {
   return Val-getTargetOpcode();
 }
-inline const bool SDOperand::isOperand(SDNode *N) const {
-  return Val-isOperand(N);
-}
 inline bool SDOperand::hasOneUse() const {
   return Val-hasNUsesOfValue(1, ResNo);
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-02-28 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.104 - 1.105
---
Log message:

- Added VConstant as an abstract version of ConstantVec.
- All abstrct vector nodes must have # of elements and element type as their
first two operands.


---
Diffs of the changes:  (+15 -10)

 SelectionDAGNodes.h |   25 +++--
 1 files changed, 15 insertions(+), 10 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.104 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.105
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.104 Sat Feb 25 03:52:55 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Tue Feb 28 18:51:13 2006
@@ -63,10 +63,10 @@
 AssertSext, AssertZext,
 
 // Various leaf nodes.
-Constant, ConstantFP, STRING,
-GlobalAddress, FrameIndex, ConstantPool,
-BasicBlock, ExternalSymbol, VALUETYPE, CONDCODE, Register,
-
+STRING, BasicBlock, VALUETYPE, CONDCODE, Register,
+Constant, ConstantFP,
+GlobalAddress, FrameIndex, ConstantPool, ExternalSymbol,
+
 // ConstantVec works like Constant or ConstantFP, except that it is not a
 // leaf node.  All operands are either Constant or ConstantFP nodes.
 ConstantVec,
@@ -85,6 +85,11 @@
 TargetConstantPool,
 TargetExternalSymbol,
 
+// Abstract version of ConstantVec with abstract Vector type. The first 
node
+// is a constant element count, the second is a value type indicating the
+// type of the elements.
+VConstant,
+
 // CopyToReg - This node has three operands: a chain, a register number to
 // set to this value, and a value.  
 CopyToReg,
@@ -139,9 +144,9 @@
 // Simple abstract vector operators.  Unlike the integer and floating point
 // binary operators, these nodes also take two additional operands:
 // a constant element count, and a value type node indicating the type of
-// the elements.  The order is op0, op1, count, type.  All vector opcodes,
-// including VLOAD, must currently have count and type as their 3rd and 4th
-// arguments.
+// the elements.  The order is count, type, op0, op1.  All vector opcodes,
+// including VLOAD and VConstant must currently have count and type as
+// their 1st and 2nd arguments.
 VADD, VSUB, VMUL,
 
 // MULHU/MULHS - Multiply high - Multiply two integers of type iN, 
producing
@@ -243,9 +248,9 @@
 // SRCVALUE node that provides alias analysis information.
 LOAD, STORE,
 
-// Abstract vector version of LOAD.  VLOAD has a token chain as the first
-// operand, followed by a pointer operand, a constant element count, a 
value
-// type node indicating the type of the elements, and a SRCVALUE node.
+// Abstract vector version of LOAD.  VLOAD has a constant element count as
+// the first operand, followed by a value type node indicating the type of
+// the elements, a token chain, a pointer operand, and a SRCVALUE node.
 VLOAD,
 
 // EXTLOAD, SEXTLOAD, ZEXTLOAD - These three operators all load a value 
from



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-02-04 Thread Evan Cheng


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.99 - 1.100
---
Log message:

* Added SDNode::isOnlyUse().
* Fix hasNUsesOfValue(), it should be const.


---
Diffs of the changes:  (+4 -1)

 SelectionDAGNodes.h |5 -
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.99 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.100
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.99  Tue Jan 31 16:21:33 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Feb  5 00:29:23 2006
@@ -619,7 +619,10 @@
   /// hasNUsesOfValue - Return true if there are exactly NUSES uses of the
   /// indicated value.  This method ignores uses of other values defined by 
this
   /// operation.
-  bool hasNUsesOfValue(unsigned NUses, unsigned Value);
+  bool hasNUsesOfValue(unsigned NUses, unsigned Value) const;
+
+  // isOnlyUse - Return true if this node is the only use of N.
+  bool isOnlyUse(SDNode *N) const;
 
   /// getNumOperands - Return the number of values used by this operation.
   ///



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-01-28 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.97 - 1.98
---
Log message:

remove some methods


---
Diffs of the changes:  (+0 -5)

 SelectionDAGNodes.h |5 -
 1 files changed, 5 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.97 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.98
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.97  Sun Jan 29 00:24:40 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Jan 29 01:57:11 2006
@@ -658,11 +658,6 @@
 
   static bool classof(const SDNode *) { return true; }
 
-
-  /// setAdjCallChain - This method should only be used by the legalizer.
-  void setAdjCallChain(SDOperand N);
-  void setAdjCallFlag(SDOperand N);
-
 protected:
   friend class SelectionDAG;
   



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-01-26 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.94 - 1.95
---
Log message:

Add new INLINEASM node


---
Diffs of the changes:  (+9 -0)

 SelectionDAGNodes.h |9 +
 1 files changed, 9 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.94 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.95
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.94  Wed Jan 25 12:21:52 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu Jan 26 16:23:45 2006
@@ -311,6 +311,15 @@
 // the callee is known not to access the stack of the caller.
 CALL,
 TAILCALL,
+
+// INLINEASM - Represents an inline asm block.  This node always has two
+// return values: a chain and a flag result.  The inputs are as follows:
+//   Operand #0   : Input chain.
+//   Operand #1   : a ExternalSymbolSDNode with a pointer to the asm 
string.
+//   Operand #2n+2: A RegisterNode.
+//   Operand #2n+3: A TargetConstant, indicating if the reg is a use/def
+//   Operand #last: Optional, an incoming flag.
+INLINEASM,
 
 // STACKSAVE - STACKSAVE has one operand, an input chain.  It produces a
 // value, the same type as the pointer type for the system, and an output



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-01-23 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.92 - 1.93
---
Log message:

add a method


---
Diffs of the changes:  (+1 -0)

 SelectionDAGNodes.h |1 +
 1 files changed, 1 insertion(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.92 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.93
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.92  Mon Jan 23 15:51:14 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Mon Jan 23 23:47:05 2006
@@ -645,6 +645,7 @@
 
   /// setAdjCallChain - This method should only be used by the legalizer.
   void setAdjCallChain(SDOperand N);
+  void setAdjCallFlag(SDOperand N);
 
 protected:
   friend class SelectionDAG;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-01-12 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.89 - 1.90
---
Log message:

add stacksave/stackrestore nodes


---
Diffs of the changes:  (+9 -0)

 SelectionDAGNodes.h |9 +
 1 files changed, 9 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.89 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.90
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.89  Wed Jan 11 15:21:00 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu Jan 12 20:39:03 2006
@@ -312,6 +312,15 @@
 CALL,
 TAILCALL,
 
+// STACKSAVE - STACKSAVE has one operand, an input chain.  It produces a
+// value, the same type as the pointer type for the system, and an output
+// chain.
+STACKSAVE,
+
+// STACKRESTORE has two operands, an input chain and a pointer to restore 
to
+// it returns an output chain.
+STACKRESTORE,
+
 // MEMSET/MEMCPY/MEMMOVE - The first operand is the chain, and the rest
 // correspond to the operands of the LLVM intrinsic functions.  The only
 // result is a token chain.  The alignment argument is guaranteed to be a



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2006-01-04 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.85 - 1.86
---
Log message:

Add unique id to debug location for debug label use (work in progress.)


---
Diffs of the changes:  (+3 -2)

 SelectionDAGNodes.h |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.85 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.86
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.85  Thu Dec 22 18:46:10 2005
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Wed Jan  4 09:04:11 2006
@@ -356,8 +356,9 @@
 
 // DEBUG_LOC - This node is used to represent source line information
 // embedded in the code.  It takes token chain as input, then a line 
number,
-// then a column then a file id (provided by MachineDebugInfo.  It produces
-// a token chain as output.
+// then a column then a file id (provided by MachineDebugInfo), then a
+// unique id (provided by MachineDebugInfo for label gen).  It produces a
+// token chain as output.
 DEBUG_LOC,
 
 // BUILTIN_OP_END - This must be the last enum value in this list.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2005-12-22 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.83 - 1.84
---
Log message:

add a new node


---
Diffs of the changes:  (+7 -0)

 SelectionDAGNodes.h |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.83 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.84
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.83  Thu Dec 22 15:16:35 2005
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu Dec 22 18:15:59 2005
@@ -214,6 +214,13 @@
 // FP_EXTEND - Extend a smaller FP type into a larger FP type.
 FP_EXTEND,
 
+// BIT_CONVERT - Theis operator converts between integer and FP values, as
+// if one was stored to memory as integer and the other was loaded from the
+// same address.  The source and result are required to have the same bit
+// size (e.g. f32 - i32).  This can also be used for int-to-int or 
+// fp-to-fp conversions, but that is a noop, deleted by getNode().
+BIT_CONVERT,
+
 // FNEG, FABS, FSQRT, FSIN, FCOS - Perform unary floating point negation,
 // absolute value, square root, sine and cosine operations.
 FNEG, FABS, FSQRT, FSIN, FCOS,



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2005-12-22 Thread Chris Lattner


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.84 - 1.85
---
Log message:

improve comment: mention vectors


---
Diffs of the changes:  (+4 -3)

 SelectionDAGNodes.h |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.84 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.85
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.84  Thu Dec 22 18:15:59 2005
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Thu Dec 22 18:46:10 2005
@@ -216,9 +216,10 @@
 
 // BIT_CONVERT - Theis operator converts between integer and FP values, as
 // if one was stored to memory as integer and the other was loaded from the
-// same address.  The source and result are required to have the same bit
-// size (e.g. f32 - i32).  This can also be used for int-to-int or 
-// fp-to-fp conversions, but that is a noop, deleted by getNode().
+// same address (or equivalently for vector format conversions, etc).  The 
+// source and result are required to have the same bit size (e.g. 
+// f32 - i32).  This can also be used for int-to-int or fp-to-fp 
+// conversions, but that is a noop, deleted by getNode().
 BIT_CONVERT,
 
 // FNEG, FABS, FSQRT, FSIN, FCOS - Perform unary floating point negation,



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2005-12-05 Thread Nate Begeman


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.80 - 1.81
---
Log message:

Teach the SelectionDAG ISel how to turn ConstantPacked values into 
constant nodes with vector types.  Also teach the asm printer how to print
ConstantPacked constant pool entries.  This allows us to generate altivec
code such as the following, which adds a vector constantto a packed float.

LCPI1_0:  4 x float  float 0.0e+0, float 0.0e+0, float 0.0e+0, float 1.0e+0 
.space  4
.space  4
.space  4
.long   1065353216  ; float 1
.text
.align  4
.globl  _foo
_foo:
lis r2, ha16(LCPI1_0)
la r2, lo16(LCPI1_0)(r2)
li r4, 0
lvx v0, r4, r2
lvx v1, r4, r3
vaddfp v0, v1, v0
stvx v0, r4, r3
blr

For the llvm code:

void %foo(4 x float * %a) {
entry:
  %tmp1 = load 4 x float * %a;
  %tmp2 = add 4 x float %tmp1,  float 0.0, float 0.0, float 0.0, float 1.0 
  store 4 x float %tmp2, 4 x float *%a
  ret void
}



---
Diffs of the changes:  (+4 -0)

 SelectionDAGNodes.h |4 
 1 files changed, 4 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.80 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.81
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.80  Tue Nov 29 20:04:11 2005
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Tue Dec  6 00:18:55 2005
@@ -67,6 +67,10 @@
 GlobalAddress, FrameIndex, ConstantPool,
 BasicBlock, ExternalSymbol, VALUETYPE, CONDCODE, Register,
 
+// ConstantVec works like Constant or ConstantFP, except that it is not a
+// 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,



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits