[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.191 -> 1.192 --- Log message: Introduce new SelectionDAG node opcodes VEXTRACT_SUBVECTOR and VCONCAT_VECTORS. Use these for CopyToReg and CopyFromReg legalizing in the case that the full register is to be split into subvectors instead of scalars. This replaces uses of VBIT_CONVERT to present values as vector-of-vector types in order to make whole subvectors accessible via BUILD_VECTOR and EXTRACT_VECTOR_ELT. This is in preparation for adding extended ValueType values, where having vector-of-vector types is undesirable. --- Diffs of the changes: (+13 -0) SelectionDAGNodes.h | 13 + 1 files changed, 13 insertions(+) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.191 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.192 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.191 Thu May 24 09:36:03 2007 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Wed Jun 13 10:12:02 2007 @@ -267,6 +267,19 @@ /// element number IDX. EXTRACT_VECTOR_ELT, +/// VCONCAT_VECTORS(VECTOR0, VECTOR1, ..., COUNT,TYPE) - Given a number of +/// values of MVT::Vector type with the same length and element type, this +/// produces a concatenated MVT::Vector result value, with length equal to +/// the sum of the input vectors. This can only be used before +/// legalization. +VCONCAT_VECTORS, + +/// VEXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR (an +/// MVT::Vector value) starting with the (potentially variable) +/// element number IDX, which must be a multiple of the result vector +/// length. This can only be used before legalization. +VEXTRACT_SUBVECTOR, + /// 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 ___ 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
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
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
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
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_cast(GA) && - dyn_cast(GA)->isThreadLocal() ? - // Thread Local - (isTarget ? ISD::TargetGlobalTLSAddress : ISD::GlobalTLSAddress) : - // Non Thread Local - (isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress), - getSDVTList(VT)), Offset(o) { -TheGlobal = const_cast(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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.183 -> 1.184 --- Log message: Implemented correct stack probing on mingw/cygwin for dynamic alloca's. Also, fixed static case in presence of eax livin. This fixes PR331: http://llvm.org/PR331 PS: Why don't we still have push/pop instructions? :) --- 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.183 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.184 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.183 Sun Apr 1 02:28:37 2007 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Tue Apr 17 04:20:00 2007 @@ -430,10 +430,11 @@ TRUNCSTORE, // DYNAMIC_STACKALLOC - Allocate some number of bytes on the stack aligned -// to a specified boundary. The first operand is the token chain, the -// second is the number of bytes to allocate, and the third is the alignment -// boundary. The size is guaranteed to be a multiple of the stack -// alignment, and the alignment is guaranteed to be bigger than the stack +// to a specified boundary. This node always has two return values: a new +// stack pointer value and a chain. The first operand is the token chain, +// the second is the number of bytes to allocate, and the third is the +// alignment boundary. The size is guaranteed to be a multiple of the stack +// alignment, and the alignment is guaranteed to be bigger than the stack // alignment (if required) or 0 to get standard stack alignment. DYNAMIC_STACKALLOC, ___ 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
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
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 @@ cast(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 && + cast(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
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
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
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
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
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
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_cast(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, MVT::ValueTy
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
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_cast(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 : ISD::Co
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
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_cast(GA); } p
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
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
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
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
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
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
Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
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
Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
> +/// 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
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
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
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
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
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
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
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
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
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
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 @@ /// /// UNINDEXED"Normal" 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;//
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
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
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
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
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::vector 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
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
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
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
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
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
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
Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
On Wed, 12 Apr 2006, Reid Spencer wrote: 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 It's lame when we have to sacrifice (even small amounts of) performance to work around buggy compiler warnings. :( -Chris 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 -Chris -- http://nondot.org/sabre/ http://llvm.org/ ___ 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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.127 -> 1.128 --- Log message: new dag 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.127 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.128 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.127 Sat Apr 8 17:16:01 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Tue Apr 11 16:30:42 2006 @@ -113,6 +113,14 @@ // UNDEF - An undefined node UNDEF, + +/// FORMAL_ARGUMENTS(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. +FORMAL_ARGUMENTS, // 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
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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.125 -> 1.126 --- Log message: simplify this method --- Diffs of the changes: (+1 -3) SelectionDAGNodes.h |4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.125 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.126 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.125 Tue Mar 28 13:54:11 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Sat Apr 1 20:28:52 2006 @@ -1076,9 +1076,7 @@ bool isNullValue() const { return Value == 0; } bool isAllOnesValue() const { -int NumBits = MVT::getSizeInBits(getValueType(0)); -if (NumBits == 64) return Value+1 == 0; -return Value == (1ULL << NumBits)-1; +return Value == MVT::getIntVTBitMask(getValueType(0)); } static bool classof(const ConstantSDNode *) { return true; } ___ 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
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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.123 -> 1.124 --- Log message: Tblgen doesn't like multiple SDNode<> definitions that map to the same enum value. Split them into separate enums. --- Diffs of the changes: (+22 -8) SelectionDAGNodes.h | 30 ++ 1 files changed, 22 insertions(+), 8 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.123 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.124 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.123 Mon Mar 27 00:58:47 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Mon Mar 27 18:39:06 2006 @@ -80,14 +80,28 @@ 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, - +/// RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...) +/// This node represents a target intrinsic function with no side effects. +/// The first operand is the ID number of the intrinsic from the +/// llvm::Intrinsic namespace. The operands to the intrinsic follow. The +/// node has returns the result of the intrinsic. +INTRINSIC_WO_CHAIN, + +/// RESULT,OUTCHAIN = INTRINSIC_W_CHAIN(INCHAIN, INTRINSICID, arg1, ...) +/// This node represents a target intrinsic function with side effects that +/// returns a result. The first operand is a chain pointer. The second is +/// the ID number of the intrinsic from the llvm::Intrinsic namespace. The +/// operands to the intrinsic follow. The node has two results, the result +/// of the intrinsic and an output chain. +INTRINSIC_W_CHAIN, + +/// OUTCHAIN = INTRINSIC_VOID(INCHAIN, INTRINSICID, arg1, arg2, ...) +/// This node represents a target intrinsic function with side effects that +/// does not return a result. The first operand is a chain pointer. The +/// second is the ID number of the intrinsic from the llvm::Intrinsic +/// namespace. The operands to the intrinsic follow. +INTRINSIC_VOID, + // CopyToReg - This node has three operands: a chain, a register number to // set to this value, and a value. CopyToReg, ___ 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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.122 -> 1.123 --- Log message: Change isBuildVectorAllOnesInteger to isBuildVectorAllOnes. Also check for floating point cases. --- 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.122 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.123 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.122 Sun Mar 26 03:50:58 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Mon Mar 27 00:58:47 2006 @@ -455,9 +455,9 @@ /// Node predicates - /// isBuildVectorAllOnesInteger - Return true if the specified node is a + /// isBuildVectorAllOnes - Return true if the specified node is a /// BUILD_VECTOR where all of the elements are ~0 or undef. - bool isBuildVectorAllOnesInteger(const SDNode *N); + bool isBuildVectorAllOnes(const SDNode *N); /// isBuildVectorAllZeros - Return true if the specified node is a /// BUILD_VECTOR where all of the elements are 0 or undef. ___ 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
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
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
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
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
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
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
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
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 MV
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.113 -> 1.114 --- Log message: Rename ConstantVec -> BUILD_VECTOR and VConstant -> VBUILD_VECTOR. Allow *BUILD_VECTOR to take variable inputs. --- Diffs of the changes: (+23 -24) SelectionDAGNodes.h | 47 +++ 1 files changed, 23 insertions(+), 24 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.113 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.114 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.113 Fri Mar 17 19:43:28 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Sat Mar 18 18:52:25 2006 @@ -67,15 +67,10 @@ 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, - // TargetConstant* - Like Constant*, but the DAG does not do any folding or // simplification of the constant. TargetConstant, TargetConstantFP, -TargetConstantVec, // TargetGlobalAddress - Like GlobalAddress, but the DAG does no folding or // anything else with this node, and this is valid in the target-specific @@ -85,12 +80,6 @@ TargetConstantPool, TargetExternalSymbol, -// 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 // set to this value, and a value. CopyToReg, @@ -148,26 +137,36 @@ // 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, +/// VBUILD_VECTOR(ELT1, ELT2, ELT3, ELT4,..., COUNT,TYPE) - Return a vector +/// with the specified, possibly variable, elements. The number of elements +/// is required to be a power of two. +VBUILD_VECTOR, + +/// BUILD_VECTOR(ELT1, ELT2, ELT3, ELT4,...) - Return a vector +/// with the specified, possibly variable, elements. The number of elements +/// is required to be a power of two. +BUILD_VECTOR, -// 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 -// the elements. The order is count, type, op0, op1. All vector opcodes, -// including VLOAD and VConstant must currently have count and type as -// their last two operands. -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, +/// 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 +/// the elements. The order is count, type, op0, op1. All vector opcodes, +/// including VLOAD and VConstant must currently have count and type as +/// their last two operands. +VADD, VSUB, VMUL, VSDIV, VUDIV, +VAND, VOR, VXOR, + // 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, ___ 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
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
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
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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.109 -> 1.110 --- Log message: Add a copysign node --- Diffs of the changes: (+7 -1) SelectionDAGNodes.h |8 +++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.109 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.110 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.109 Fri Mar 3 01:01:07 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Sat Mar 4 23:06:40 2006 @@ -140,6 +140,12 @@ // Simple binary floating point operators. FADD, FSUB, FMUL, FDIV, FREM, + +// FCOPYSIGN(X, Y) - Return the value of X with the sign of Y. NOTE: This +// DAG node does not require that X and Y have the same type, just that they +// are both floating point. X and the result must have the same type. +// FCOPYSIGN(f32, f64) is allowed. +FCOPYSIGN, // Simple abstract vector operators. Unlike the integer and floating point // binary operators, these nodes also take two additional operands: @@ -243,7 +249,7 @@ // FNEG, FABS, FSQRT, FSIN, FCOS - Perform unary floating point negation, // absolute value, square root, sine and cosine operations. FNEG, FABS, FSQRT, FSIN, FCOS, - + // Other operators. LOAD and STORE have token chains as their first // operand, then the same operands as an LLVM load/store instruction, then a // SRCVALUE node that provides alias analysis information. ___ 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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.108 -> 1.109 --- Log message: Add more vector NodeTypes: VSDIV, VUDIV, VAND, VOR, and VXOR. --- Diffs of the changes: (+2 -1) SelectionDAGNodes.h |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.108 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.109 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.108 Fri Mar 3 00:42:32 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Fri Mar 3 01:01:07 2006 @@ -147,7 +147,8 @@ // 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, +VADD, VSUB, VMUL, VSDIV, VUDIV, +VAND, VOR, VXOR, // 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. ___ 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
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
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
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
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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.101 -> 1.102 --- Log message: kill ADD_PARTS & SUB_PARTS and replace them with fancy new ADDC, ADDE, SUBC and SUBE nodes that actually expose what's going on and allow for significant simplifications in the targets. --- Diffs of the changes: (+15 -7) SelectionDAGNodes.h | 22 +++--- 1 files changed, 15 insertions(+), 7 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.101 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.102 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.101 Wed Feb 8 20:10:15 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Thu Feb 16 23:43:56 2006 @@ -118,6 +118,21 @@ // Simple integer binary arithmetic operators. ADD, SUB, MUL, SDIV, UDIV, SREM, UREM, +// 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 +// result is the carry flag result. +ADDC, SUBC, + +// Carry-using nodes for multiple precision addition and subtraction. These +// nodes take three operands: The first two are the normal lhs and rhs to +// the add or sub, and the third is the input carry flag. These nodes +// produce two results; the normal result of the add or sub, and the output +// carry flag. These nodes both read and write a carry flag to allow them +// to them to be chained together for add and sub of arbitrarily large +// values. +ADDE, SUBE, + // Simple binary floating point operators. FADD, FSUB, FMUL, FDIV, FREM, @@ -156,13 +171,6 @@ // (op #2) as a CondCodeSDNode. SETCC, -// ADD_PARTS/SUB_PARTS - These operators take two logical operands which are -// broken into a multiple pieces each, and return the resulting pieces of -// doing an atomic add/sub operation. This is used to handle add/sub of -// expanded types. The operation ordering is: -// [Lo,Hi] = op [LoLHS,HiLHS], [LoRHS,HiRHS] -ADD_PARTS, SUB_PARTS, - // SHL_PARTS/SRA_PARTS/SRL_PARTS - These operators are used for expanded // integer shift operations, just like ADD/SUB_PARTS. The operation // ordering is: ___ 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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.100 -> 1.101 --- Log message: Add a comment: value is log2 --- 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.100 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.101 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.100 Sun Feb 5 00:29:23 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Wed Feb 8 20:10:15 2006 @@ -1074,6 +1074,9 @@ public: Constant *get() const { return C; } + + // Return the alignment of this constant pool object, which is either 0 (for + // default alignment) or log2 of the desired value. unsigned getAlignment() const { return Alignment; } static bool classof(const ConstantPoolSDNode *) { return true; } ___ 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
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
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
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
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
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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.88 -> 1.89 --- Log message: Add bswap, rotl, and rotr nodes Add dag combiner code to recognize rotl, rotr Add ppc code to match rotl Targets should add rotl/rotr patterns if they have them --- 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.88 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.89 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.88 Wed Jan 4 19:53:28 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Wed Jan 11 15:21:00 2006 @@ -131,8 +131,10 @@ // an unsigned/signed value of type i[2*n], then return the top part. MULHU, MULHS, -// Bitwise operators. -AND, OR, XOR, SHL, SRA, SRL, +// Bitwise operators - logical and, logical or, logical xor, shift left, +// shift right algebraic (shift in sign bits), shift right logical (shift in +// zeroes), rotate left, rotate right, and byteswap. +AND, OR, XOR, SHL, SRA, SRL, ROTL, ROTR, BSWAP, // Counting operators CTTZ, CTLZ, CTPOP, ___ 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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.87 -> 1.88 --- Log message: Grammer correction. --- 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.87 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.88 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.87 Wed Jan 4 19:25:28 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Wed Jan 4 19:53:28 2006 @@ -362,8 +362,8 @@ // DEBUG_LABEL - This node is used to mark a location in the code where a // label should be generated for use by the debug information. It takes a -// token chain as input, the a unique id (provided by MachineDebugInfo.) It -// produces a token chain as output. +// token chain as input and then a unique id (provided by MachineDebugInfo.) +// It produces a token chain as output. DEBUG_LABEL, // 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
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
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
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
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
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.77 -> 1.78 --- Log message: Check in code to scalarize arbitrarily wide packed types for some simple vector operations (load, add, sub, mul). This allows us to codegen: void %foo(<4 x float> * %a) { entry: %tmp1 = load <4 x float> * %a; %tmp2 = add <4 x float> %tmp1, %tmp1 store <4 x float> %tmp2, <4 x float> *%a ret void } on ppc as: _foo: lfs f0, 12(r3) lfs f1, 8(r3) lfs f2, 4(r3) lfs f3, 0(r3) fadds f0, f0, f0 fadds f1, f1, f1 fadds f2, f2, f2 fadds f3, f3, f3 stfs f0, 12(r3) stfs f1, 8(r3) stfs f2, 4(r3) stfs f3, 0(r3) blr --- Diffs of the changes: (+3 -1) SelectionDAGNodes.h |4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.77 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.78 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.77 Sun Nov 20 16:55:57 2005 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Tue Nov 22 12:15:59 2005 @@ -123,7 +123,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 count, type, op0, op1. +// 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. VADD, VSUB, VMUL, // MULHU/MULHS - Multiply high - Multiply two integers of type iN, producing ___ 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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.76 -> 1.77 --- Log message: add a new node type --- 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.76 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.77 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.76 Fri Nov 18 18:36:38 2005 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Sun Nov 20 16:55:57 2005 @@ -106,6 +106,13 @@ // two values of the same integer value type, this produces a value twice as // big. Like EXTRACT_ELEMENT, this can only be used before legalization. BUILD_PAIR, + +// MERGE_VALUES - This node takes multiple discrete operands and returns +// them all as its individual results. This nodes has exactly the same +// number of inputs and outputs, and is only valid before legalization. +// This node is useful for some pieces of the code generator that want to +// think about a single node with multiple results, not multiple nodes. +MERGE_VALUES, // Simple integer binary arithmetic operators. ADD, SUB, MUL, SDIV, UDIV, SREM, UREM, ___ 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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.74 -> 1.75 --- Log message: added a chain output --- 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.74 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.75 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.74 Fri Nov 11 10:45:18 2005 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Fri Nov 11 16:48:54 2005 @@ -308,6 +308,9 @@ PCMARKER, // READCYCLECOUNTER - This corresponds to the readcyclecounter intrinsic. +// The only operand is a chain and a value and a chain are produced. The +// value is the contents of the architecture specific cycle counter like +// register (or other high accuracy low latency clock source) READCYCLECOUNTER, // READPORT, WRITEPORT, READIO, WRITEIO - These correspond to the LLVM ___ 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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.73 -> 1.74 --- Log message: Add support for a cycle counter intrinsic. As basically all processors have this and have it in about the same form, I think this makes sense. on X86, you do a RDTSC (64bit result, from any ring since the P5MMX) on Alpha, you do a RDCC on PPC, there is a sequence which may or may not work depending on how things are setup by the OS. Or something like that. Maybe someone who knows PPC can add support. Something about the time base register. on Sparc, you read %tick, which in some solaris versions (>=8) is readable by userspace on IA64 read ar.itc So I think the ulong is justified since all of those are 64bit. Support is slighly flaky on old chips (P5 and lower) and sometimes depends on OS (PPC, Sparc). But for modern OS/Hardware (aka this decade), we should be ok. I am still not sure what to do about lowering. I can either see a lower to 0, to gettimeofday (or the target os equivalent), or loudly complaining and refusing to continue. I am commiting an Alpha implementation. I will add the X86 implementation if I have to (I have use of it in the near future), but if someone who knows that backend (and the funky multi-register results) better wants to add it, it would take them a lot less time ;) TODO: better lowering and legalizing, and support more platforms --- 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.73 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.74 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.73 Wed Nov 9 17:46:43 2005 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Fri Nov 11 10:45:18 2005 @@ -307,6 +307,9 @@ // PCMARKER - This corresponds to the pcmarker intrinsic. PCMARKER, +// READCYCLECOUNTER - This corresponds to the readcyclecounter intrinsic. +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 ___ 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
Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.70 -> 1.71 --- Log message: Switch the operandlist/valuelist from being vectors to being just an array. This saves 12 bytes from SDNode, but doesn't speed things up substantially (our graphs apparently already fit within the cache on my g5). In any case this reduces memory usage. --- Diffs of the changes: (+122 -72) SelectionDAGNodes.h | 194 1 files changed, 122 insertions(+), 72 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.70 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.71 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.70 Sat Oct 22 22:40:17 2005 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Tue Nov 8 16:06:23 2005 @@ -491,13 +491,16 @@ /// depth of 2, etc. unsigned short NodeDepth; - /// Operands - The values that are used by this operation. + /// OperandList - The values that are used by this operation. /// - std::vector Operands; + SDOperand *OperandList; + + /// ValueList - The types of the values this node defines. SDNode's may + /// define multiple values simultaneously. + MVT::ValueType *ValueList; - /// Values - The types of the values this node defines. SDNode's may define - /// multiple values simultaneously. - std::vector Values; + /// NumOperands/NumValues - The number of entries in the Operand/Value list. + unsigned short NumOperands, NumValues; /// Uses - These are all of the SDNode's that use a value produced by this /// node. @@ -533,37 +536,32 @@ /// getNumOperands - Return the number of values used by this operation. /// - unsigned getNumOperands() const { return Operands.size(); } - - const SDOperand &getOperand(unsigned Num) { -assert(Num < Operands.size() && "Invalid child # of SDNode!"); -return Operands[Num]; - } + unsigned getNumOperands() const { return NumOperands; } const SDOperand &getOperand(unsigned Num) const { -assert(Num < Operands.size() && "Invalid child # of SDNode!"); -return Operands[Num]; +assert(Num < NumOperands && "Invalid child # of SDNode!"); +return OperandList[Num]; } - typedef std::vector::const_iterator op_iterator; - op_iterator op_begin() const { return Operands.begin(); } - op_iterator op_end() const { return Operands.end(); } + typedef const SDOperand* op_iterator; + op_iterator op_begin() const { return OperandList; } + op_iterator op_end() const { return OperandList+NumOperands; } /// getNumValues - Return the number of values defined/returned by this /// operator. /// - unsigned getNumValues() const { return Values.size(); } + unsigned getNumValues() const { return NumValues; } /// getValueType - Return the type of a specified result. /// MVT::ValueType getValueType(unsigned ResNo) const { -assert(ResNo < Values.size() && "Illegal result number!"); -return Values[ResNo]; +assert(ResNo < NumValues && "Illegal result number!"); +return ValueList[ResNo]; } - typedef std::vector::const_iterator value_iterator; - value_iterator value_begin() const { return Values.begin(); } - value_iterator value_end() const { return Values.end(); } + typedef const MVT::ValueType* value_iterator; + value_iterator value_begin() const { return ValueList; } + value_iterator value_end() const { return ValueList+NumValues; } /// getOperationName - Return the opcode of this operation for printing. /// @@ -581,13 +579,19 @@ friend class SelectionDAG; SDNode(unsigned NT, MVT::ValueType VT) : NodeType(NT), NodeDepth(1) { -Values.reserve(1); -Values.push_back(VT); +OperandList = 0; NumOperands = 0; +ValueList = new MVT::ValueType[1]; +ValueList[0] = VT; +NumValues = 1; } SDNode(unsigned NT, SDOperand Op) : NodeType(NT), NodeDepth(Op.Val->getNodeDepth()+1) { -Operands.reserve(1); Operands.push_back(Op); +OperandList = new SDOperand[1]; +OperandList[0] = Op; +NumOperands = 1; Op.Val->Uses.push_back(this); +ValueList = 0; +NumValues = 0; } SDNode(unsigned NT, SDOperand N1, SDOperand N2) : NodeType(NT) { @@ -595,8 +599,13 @@ NodeDepth = N1.Val->getNodeDepth()+1; else NodeDepth = N2.Val->getNodeDepth()+1; -Operands.reserve(2); Operands.push_back(N1); Operands.push_back(N2); +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; } SDNode(unsigned NT, SDOperand N1, SDOperand N2, SDOperand N3) : NodeType(NT) { @@ -607,10 +616,16 @@ ND = N3.Val->getNodeDepth(); NodeDepth = ND+1; -Operands.reserve(3); Operands.push_back(N1); Operands.push_back(N2); -Operands.push_back(N3); +OperandList = new SDOperand[3]; +