Re: [llvm-commits] [llvm-gcc] SETCC Removal Patch (Please Commit)
I don't have a normative document at hand, but I believe that in C != should return true if one of the operands is unordered. Currently, llvm-gcc produces a "fcmp one". I have patched llvm-conver.cpp:TreeToLLVM::Emit to emit a "fcmp une" in the NE_EXPR case. The generated code now is: %tmp = fcmp une float %a, %b %tmp2 = tail call bool %llvm.isunordered.f32( float %a, float %b ) %tmp3 = or bool %tmp2, %tmp Correct, but redundant. The call to llvm.isunordered is added by TreeToLLVM::EmitCompare. Simply removing the "if" produces the correct code. It looks like the call to isunordered is a leftover of the old compare instruction. An updated patch is attached. Comments? Best Regards, Rafael ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm-gcc] SETCC Removal Patch (Please Commit)
Rafael, Nothing was attached to your message. Reid. On Sat, 2006-12-30 at 11:38 -0200, Rafael Espíndola wrote: > I don't have a normative document at hand, but I believe that in C != > should return true if one of the operands is unordered. Currently, > llvm-gcc produces a "fcmp one". > > I have patched llvm-conver.cpp:TreeToLLVM::Emit to emit a "fcmp une" > in the NE_EXPR case. The generated code now is: > > %tmp = fcmp une float %a, %b > %tmp2 = tail call bool %llvm.isunordered.f32( float %a, float %b ) > %tmp3 = or bool %tmp2, %tmp > > Correct, but redundant. The call to llvm.isunordered is added by > TreeToLLVM::EmitCompare. Simply removing the "if" produces the correct > code. It looks like the call to isunordered is a leftover of the old > compare instruction. > > An updated patch is attached. > > Comments? > > Best Regards, > Rafael ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/Makefile.rules
Changes in directory llvm: Makefile.rules updated: 1.416 -> 1.417 --- Log message: When compiling a C or C++ file to assembly, make the assembly output depend on the compiler. This works around problems in the Stacker runtime when the CFE changes in such a way that the assembly file needs to be updated. --- Diffs of the changes: (+6 -6) Makefile.rules | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.416 llvm/Makefile.rules:1.417 --- llvm/Makefile.rules:1.416 Sat Dec 16 16:07:52 2006 +++ llvm/Makefile.rules Sat Dec 30 10:31:02 2006 @@ -1042,7 +1042,7 @@ # Create .bc files in the ObjDir directory from .cpp .cc and .c files... #- -$(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) +$(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \ $< -o $@ -S -emit-llvm ; \ @@ -1051,7 +1051,7 @@ $(call UPGRADE_MSG,$@) $(call UPGRADE_LL,$@) -$(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) +$(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" \ $< -o $@ -S -emit-llvm ; \ @@ -1060,7 +1060,7 @@ $(call UPGRADE_MSG,$@) $(call UPGRADE_LL,$@) -$(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) +$(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" \ $< -o $@ -S -emit-llvm ; \ @@ -1084,19 +1084,19 @@ $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG) $(MAYBE_PIC_Compile.C) $< -o $@ -$(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) +$(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -S -emit-llvm $(call UPGRADE_MSG,$@) $(call UPGRADE_LL,$@) -$(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) +$(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -S -emit-llvm $(call UPGRADE_MSG,$@) $(call UPGRADE_LL,$@) -$(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) +$(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMGCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(BCCompile.C) $< -o $@ -S -emit-llvm $(call UPGRADE_MSG,@) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm-gcc] SETCC Removal Patch (Please Commit)
On 12/30/06, Reid Spencer <[EMAIL PROTECTED]> wrote: Rafael, Nothing was attached to your message. oops! Rafael Index: gcc/llvm-convert.cpp === --- gcc/llvm-convert.cpp (revisão 236) +++ gcc/llvm-convert.cpp (cópia de trabalho) @@ -544,23 +544,37 @@ case TRUTH_NOT_EXPR: Result = EmitTRUTH_NOT_EXPR(exp); break; // Binary Operators - case LT_EXPR:Result = EmitCompare(exp, Instruction::SetLT, 0); break; - case LE_EXPR:Result = EmitCompare(exp, Instruction::SetLE, 0); break; - case GT_EXPR:Result = EmitCompare(exp, Instruction::SetGT, 0); break; - case GE_EXPR:Result = EmitCompare(exp, Instruction::SetGE, 0); break; - case EQ_EXPR:Result = EmitCompare(exp, Instruction::SetEQ, 0); break; - case NE_EXPR:Result = EmitCompare(exp, Instruction::SetNE, 0); break; - case UNORDERED_EXPR: Result = EmitCompare(exp, 0, 1); break; // not a typo - case ORDERED_EXPR: Result = EmitCompare(exp, 0, 1); break; // not a typo - case UNLT_EXPR: Result = EmitCompare(exp, Instruction::SetLT, 1); break; - case UNLE_EXPR: Result = EmitCompare(exp, Instruction::SetLE, 1); break; - case UNGT_EXPR: Result = EmitCompare(exp, Instruction::SetGT, 1); break; - case UNGE_EXPR: Result = EmitCompare(exp, Instruction::SetGE, 1); break; - case UNEQ_EXPR: Result = EmitCompare(exp, Instruction::SetEQ, 1); break; - case LTGT_EXPR: Result = EmitCompare(exp, Instruction::SetNE, 1); break; - case PLUS_EXPR: Result = EmitBinOp(exp, DestLoc, Instruction::Add);break; - case MINUS_EXPR: Result = EmitBinOp(exp, DestLoc, Instruction::Sub);break; - case MULT_EXPR: Result = EmitBinOp(exp, DestLoc, Instruction::Mul);break; + case LT_EXPR: +Result = EmitCompare(exp, ICmpInst::ICMP_ULT, ICmpInst::ICMP_SLT, + FCmpInst::FCMP_OLT); break; + case LE_EXPR: +Result = EmitCompare(exp, ICmpInst::ICMP_ULE, ICmpInst::ICMP_SLE, + FCmpInst::FCMP_OLE); break; + case GT_EXPR: +Result = EmitCompare(exp, ICmpInst::ICMP_UGT, ICmpInst::ICMP_SGT, + FCmpInst::FCMP_OGT); break; + case GE_EXPR: +Result = EmitCompare(exp, ICmpInst::ICMP_UGE, ICmpInst::ICMP_SGE, + FCmpInst::FCMP_OGE); break; + case EQ_EXPR: +Result = EmitCompare(exp, ICmpInst::ICMP_EQ, ICmpInst::ICMP_EQ, + FCmpInst::FCMP_OEQ); break; + case NE_EXPR: +Result = EmitCompare(exp, ICmpInst::ICMP_NE, ICmpInst::ICMP_NE, + FCmpInst::FCMP_UNE); break; + case UNORDERED_EXPR: +Result = EmitCompare(exp, 0, 0, FCmpInst::FCMP_UNO); break; + case ORDERED_EXPR: +Result = EmitCompare(exp, 0, 0, FCmpInst::FCMP_ORD); break; + case UNLT_EXPR: Result = EmitCompare(exp, 0, 0, FCmpInst::FCMP_ULT); break; + case UNLE_EXPR: Result = EmitCompare(exp, 0, 0, FCmpInst::FCMP_ULE); break; + case UNGT_EXPR: Result = EmitCompare(exp, 0, 0, FCmpInst::FCMP_UGT); break; + case UNGE_EXPR: Result = EmitCompare(exp, 0, 0, FCmpInst::FCMP_UGE); break; + case UNEQ_EXPR: Result = EmitCompare(exp, 0, 0, FCmpInst::FCMP_UEQ); break; + case LTGT_EXPR: Result = EmitCompare(exp, 0, 0, FCmpInst::FCMP_UNE); break; + case PLUS_EXPR: Result = EmitBinOp(exp, DestLoc, Instruction::Add);break; + case MINUS_EXPR:Result = EmitBinOp(exp, DestLoc, Instruction::Sub);break; + case MULT_EXPR: Result = EmitBinOp(exp, DestLoc, Instruction::Mul);break; case TRUNC_DIV_EXPR: if (TYPE_UNSIGNED(TREE_TYPE(exp))) Result = EmitBinOp(exp, DestLoc, Instruction::UDiv); @@ -596,8 +610,14 @@ case LROTATE_EXPR: Result = EmitRotateOp(exp, Instruction::Shl, Instruction::LShr); break; - case MIN_EXPR: Result = EmitMinMaxExpr(exp, Instruction::SetLE); break; - case MAX_EXPR: Result = EmitMinMaxExpr(exp, Instruction::SetGE); break; + case MIN_EXPR: +Result = EmitMinMaxExpr(exp, ICmpInst::ICMP_ULE, ICmpInst::ICMP_SLE, +FCmpInst::FCMP_OLE); +break; + case MAX_EXPR: +Result = EmitMinMaxExpr(exp, ICmpInst::ICMP_UGE, ICmpInst::ICMP_SGE, +FCmpInst::FCMP_OGE); +break; case CONSTRUCTOR:Result = EmitCONSTRUCTOR(exp, DestLoc); break; // Complex Math Expressions. @@ -1353,8 +1373,8 @@ Value *Cond = Emit(COND_EXPR_COND(exp), 0); // If its not already a bool, insert a comparison against zero to make it so. if (Cond->getType() != Type::BoolTy) -Cond = new SetCondInst(Instruction::SetNE, Cond, - Constant::getNullValue(Cond->getType()), "toBool", +Cond = new ICmpInst(ICmpInst::ICMP_NE, Cond, +Constant::getNullValue(Cond->getType()), "toBool", CurBB); tree Then = COND_EXPR_THEN(exp); tree Else = COND_EXPR_ELSE(exp); @@ -2323,8 +2343,9 @@ Value *Op = Emit(TREE_OPERAND(exp, 0), 0); if (!Op->getTyp
[llvm-commits] CVS: llvm/docs/Stacker.html
Changes in directory llvm/docs: Stacker.html updated: 1.22 -> 1.23 --- Log message: Typo. --- Diffs of the changes: (+2 -2) Stacker.html |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/Stacker.html diff -u llvm/docs/Stacker.html:1.22 llvm/docs/Stacker.html:1.23 --- llvm/docs/Stacker.html:1.22 Tue Dec 19 13:47:54 2006 +++ llvm/docs/Stacker.html Sat Dec 30 21:44:08 2006 @@ -198,7 +198,7 @@ Create your blocks early. While writing your compiler, you will encounter several situations where you know apriori that you will need several blocks. For example, if-then-else, switch, while, and for -statements in C/C++ all need multiple blocks for expression in LVVM. +statements in C/C++ all need multiple blocks for expression in LLVM. The rule is, create them early. Terminate your blocks early. This just reduces the chances that you forget to terminate your blocks which is required (go @@ -1405,7 +1405,7 @@ mailto:[EMAIL PROTECTED]">Reid Spencer http://llvm.org";>LLVM Compiler Infrastructure - Last modified: $Date: 2006/12/19 19:47:54 $ + Last modified: $Date: 2006/12/31 03:44:08 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Type.h
Changes in directory llvm/include/llvm: Type.h updated: 1.96 -> 1.97 --- Log message: For PR950: http://llvm.org/PR950 : Make integer types signless: Rename [US]Byte->Int8, [U]Short->Int16, [U]Int->Int32, [U]Long->Int64 Remove methods pertaining to sign of integer types. --- Diffs of the changes: (+11 -42) Type.h | 53 +++-- 1 files changed, 11 insertions(+), 42 deletions(-) Index: llvm/include/llvm/Type.h diff -u llvm/include/llvm/Type.h:1.96 llvm/include/llvm/Type.h:1.97 --- llvm/include/llvm/Type.h:1.96 Sat Dec 16 23:15:12 2006 +++ llvm/include/llvm/Type.hSat Dec 30 23:20:51 2006 @@ -72,12 +72,12 @@ enum TypeID { // PrimitiveTypes .. make sure LastPrimitiveTyID stays up to date VoidTyID = 0 , BoolTyID, // 0, 1: Basics... -UByteTyID , SByteTyID, // 2, 3: 8 bit types... -UShortTyID, ShortTyID, // 4, 5: 16 bit types... -UIntTyID , IntTyID,// 6, 7: 32 bit types... -ULongTyID , LongTyID, // 8, 9: 64 bit types... -FloatTyID , DoubleTyID, // 10,11: Floating point types... -LabelTyID , // 12 : Labels... +Int8TyID, // 2 : 8 bit type... +Int16TyID, // 3 : 16 bit type... +Int32TyID, // 4 : 32 bit type... +Int64TyID, // 5 : 64 bit type... +FloatTyID, DoubleTyID, // 6, 7: Floating point types... +LabelTyID, // 8 : Labels... // Derived types... see DerivedTypes.h file... // Make sure FirstDerivedTyID stays up to date!!! @@ -160,28 +160,9 @@ /// getDescription - Return the string representation of the type... const std::string &getDescription() const; - /// isSigned - Return whether an integral numeric type is signed. This is - /// true for SByteTy, ShortTy, IntTy, LongTy. Note that this is not true for - /// Float and Double. - /// - bool isSigned() const { -return ID == SByteTyID || ID == ShortTyID || - ID == IntTyID || ID == LongTyID; - } - - /// isUnsigned - Return whether a numeric type is unsigned. This is not quite - /// the complement of isSigned... nonnumeric types return false as they do - /// with isSigned. This returns true for UByteTy, UShortTy, UIntTy, and - /// ULongTy - /// - bool isUnsigned() const { -return ID == UByteTyID || ID == UShortTyID || - ID == UIntTyID || ID == ULongTyID; - } - /// isInteger - Equivalent to isSigned() || isUnsigned() /// - bool isInteger() const { return ID >= UByteTyID && ID <= LongTyID; } + bool isInteger() const { return ID >= Int8TyID && ID <= Int64TyID; } /// isIntegral - Returns true if this is an integral type, which is either /// BoolTy or one of the Integer types. @@ -246,14 +227,6 @@ unsigned getPrimitiveSize() const; unsigned getPrimitiveSizeInBits() const; - /// getUnsignedVersion - If this is an integer type, return the unsigned - /// variant of this type. For example int -> uint. - const Type *getUnsignedVersion() const; - - /// getSignedVersion - If this is an integer type, return the signed variant - /// of this type. For example uint -> int. - const Type *getSignedVersion() const; - /// getIntegralTypeMask - Return a bitmask with ones set for all of the bits /// that can be set by an unsigned version of this type. This is 0xFF for /// sbyte/ubyte, 0x for shorts, etc. @@ -275,10 +248,8 @@ /// will be promoted to if passed through a variable argument /// function. const Type *getVAArgsPromotedType() const { -if (ID == BoolTyID || ID == UByteTyID || ID == UShortTyID) - return Type::UIntTy; -else if (ID == SByteTyID || ID == ShortTyID) - return Type::IntTy; +if (ID == BoolTyID || ID == Int8TyID || ID == Int16TyID) + return Type::Int32Ty; else if (ID == FloatTyID) return Type::DoubleTy; else @@ -318,10 +289,8 @@ // These are the builtin types that are always available... // static Type *VoidTy , *BoolTy; - static Type *SByteTy, *UByteTy, - *ShortTy, *UShortTy, - *IntTy , *UIntTy, - *LongTy , *ULongTy; + static Type *Int8Ty , *Int16Ty, + *Int32Ty, *Int64Ty; static Type *FloatTy, *DoubleTy; static Type* LabelTy; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/DerivedTypes.h
Changes in directory llvm/include/llvm: DerivedTypes.h updated: 1.74 -> 1.75 --- Log message: For PR950: http://llvm.org/PR950 : Add a new feature to FunctionType, Parameter Attributes. This allows tags such as "sext" and "zext" to be associated with a faunction's arguments or return type. This allows signedness information to be carried forward from the frontend to the backend for arguments and result types. --- Diffs of the changes: (+43 -5) DerivedTypes.h | 48 +++- 1 files changed, 43 insertions(+), 5 deletions(-) Index: llvm/include/llvm/DerivedTypes.h diff -u llvm/include/llvm/DerivedTypes.h:1.74 llvm/include/llvm/DerivedTypes.h:1.75 --- llvm/include/llvm/DerivedTypes.h:1.74 Thu Dec 28 22:12:03 2006 +++ llvm/include/llvm/DerivedTypes.hSat Dec 30 23:22:12 2006 @@ -75,21 +75,40 @@ /// FunctionType - Class to represent function types /// class FunctionType : public DerivedType { +public: + /// Function parameters can have attributes to indicate how they should be + /// treated by optimizations and code generation. This enumeration lists the + /// set of possible attributes. + /// @brief Function parameter attributes enumeration. + enum ParameterAttributes { +NoAttributeSet = 0, ///< No attribute value has been set on the parameter +ZExtAttribute = 1, ///< The parameter should be zero extended before call +SExtAttribute = 2 ///< The parameter should be sign extended before call + }; + typedef std::vector ParamAttrsList; +private: friend class TypeMap; bool isVarArgs; + ParamAttrsList *ParamAttrs; FunctionType(const FunctionType &); // Do not implement const FunctionType &operator=(const FunctionType &); // Do not implement FunctionType(const Type *Result, const std::vector &Params, - bool IsVarArgs); + bool IsVarArgs, const ParamAttrsList &Attrs); public: /// FunctionType::get - This static method is the primary way of constructing - /// a FunctionType + /// a FunctionType. /// - static FunctionType *get(const Type *Result, - const std::vector &Params, - bool isVarArg); + static FunctionType *get( +const Type *Result, ///< The result type +const std::vector &Params, ///< The types of the parameters +bool isVarArg, ///< Whether this is a variable argument length function +const ParamAttrsList & Attrs = ParamAttrsList() + ///< Indicates the parameter attributes to use, if any. The 0th entry + ///< in the list refers to the return type. Parameters are numbered + ///< starting at 1. + ); inline bool isVarArg() const { return isVarArgs; } inline const Type *getReturnType() const { return ContainedTys[0]; } @@ -106,6 +125,25 @@ /// unsigned getNumParams() const { return unsigned(ContainedTys.size()-1); } + /// The parameter attributes for the \p ith parameter are returned. The 0th + /// parameter refers to the return type of the function. + /// @returns The ParameterAttributes for the \p ith parameter. + /// @brief Get the attributes for a parameter + ParameterAttributes getParamAttrs(unsigned i) const; + + /// @brief Determine if a parameter attribute is set + bool paramHasAttr(unsigned i, ParameterAttributes attr) const { +return getParamAttrs(i) & attr; + } + + /// @brief Return the number of parameter attributes this type has. + unsigned getNumAttrs() const { +return (ParamAttrs ? unsigned(ParamAttrs->size()) : 0); + } + + /// @brief Convert a ParameterAttribute into its assembly text + static const char * getParamAttrsText(ParameterAttributes Attr); + // Implement the AbstractTypeUser interface. virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy); virtual void typeBecameConcrete(const DerivedType *AbsTy); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h
Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.94 -> 1.95 --- Log message: For PR950: http://llvm.org/PR950 : Change integer type names for signless integer types --- Diffs of the changes: (+13 -12) TargetLowering.h | 25 + 1 files changed, 13 insertions(+), 12 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.94 llvm/include/llvm/Target/TargetLowering.h:1.95 --- llvm/include/llvm/Target/TargetLowering.h:1.94 Wed Dec 13 14:52:00 2006 +++ llvm/include/llvm/Target/TargetLowering.h Sat Dec 30 23:23:18 2006 @@ -343,14 +343,10 @@ default: assert(0 && "Unknown type!"); case Type::VoidTyID:return MVT::isVoid; case Type::BoolTyID:return MVT::i1; -case Type::UByteTyID: -case Type::SByteTyID: return MVT::i8; -case Type::ShortTyID: -case Type::UShortTyID: return MVT::i16; -case Type::IntTyID: -case Type::UIntTyID:return MVT::i32; -case Type::LongTyID: -case Type::ULongTyID: return MVT::i64; +case Type::Int8TyID:return MVT::i8; +case Type::Int16TyID: return MVT::i16; +case Type::Int32TyID: return MVT::i32; +case Type::Int64TyID: return MVT::i64; case Type::FloatTyID: return MVT::f32; case Type::DoubleTyID: return MVT::f64; case Type::PointerTyID: return PointerTy; @@ -743,11 +739,16 @@ /// actual call. This returns a pair of operands. The first element is the /// return value for the function (if RetTy is not VoidTy). The second /// element is the outgoing token chain. - typedef std::vector > ArgListTy; + struct ArgListEntry { +SDOperand Node; +const Type* Ty; +bool isSigned; + }; + typedef std::vector ArgListTy; virtual std::pair - LowerCallTo(SDOperand Chain, const Type *RetTy, bool isVarArg, - unsigned CallingConv, bool isTailCall, SDOperand Callee, - ArgListTy &Args, SelectionDAG &DAG); + LowerCallTo(SDOperand Chain, const Type *RetTy, bool RetTyIsSigned, + bool isVarArg, unsigned CallingConv, bool isTailCall, + SDOperand Callee, ArgListTy &Args, SelectionDAG &DAG); /// LowerFrameReturnAddress - This hook lowers a call to llvm.returnaddress or /// llvm.frameaddress (depending on the value of the first argument). The ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/InstrTypes.h Intrinsics.td
Changes in directory llvm/include/llvm: InstrTypes.h updated: 1.57 -> 1.58 Intrinsics.td updated: 1.35 -> 1.36 --- Log message: For PR950: http://llvm.org/PR950 : Change integer type names for signless integer types --- Diffs of the changes: (+9 -9) InstrTypes.h |2 +- Intrinsics.td | 16 2 files changed, 9 insertions(+), 9 deletions(-) Index: llvm/include/llvm/InstrTypes.h diff -u llvm/include/llvm/InstrTypes.h:1.57 llvm/include/llvm/InstrTypes.h:1.58 --- llvm/include/llvm/InstrTypes.h:1.57 Sat Dec 23 13:06:54 2006 +++ llvm/include/llvm/InstrTypes.h Sat Dec 30 23:23:18 2006 @@ -427,7 +427,7 @@ /// involving Integer and Pointer types. They are no-op casts if the integer /// is the same size as the pointer. However, pointer size varies with /// platform. Generally, the result of TargetData::getIntPtrType() should be - /// passed in. If that's not available, use Type::ULongTy, which will make + /// passed in. If that's not available, use Type::Int64Ty, which will make /// the isNoopCast call conservative. /// @brief Determine if this cast is a no-op cast. bool isNoopCast( Index: llvm/include/llvm/Intrinsics.td diff -u llvm/include/llvm/Intrinsics.td:1.35 llvm/include/llvm/Intrinsics.td:1.36 --- llvm/include/llvm/Intrinsics.td:1.35Fri Sep 8 01:43:00 2006 +++ llvm/include/llvm/Intrinsics.td Sat Dec 30 23:23:18 2006 @@ -65,14 +65,14 @@ def llvm_void_ty : LLVMType; def llvm_bool_ty : LLVMType; -def llvm_sbyte_ty : LLVMType; -def llvm_short_ty : LLVMType; -def llvm_int_ty: LLVMType; -def llvm_long_ty : LLVMType; -def llvm_ubyte_ty : LLVMType; -def llvm_ushort_ty : LLVMType; -def llvm_uint_ty : LLVMType; -def llvm_ulong_ty : LLVMType; +def llvm_sbyte_ty : LLVMType; +def llvm_short_ty : LLVMType; +def llvm_int_ty: LLVMType; +def llvm_long_ty : LLVMType; +def llvm_ubyte_ty : LLVMType; +def llvm_ushort_ty : LLVMType; +def llvm_uint_ty : LLVMType; +def llvm_ulong_ty : LLVMType; def llvm_float_ty : LLVMType; def llvm_double_ty : LLVMType; def llvm_ptr_ty: LLVMType; // sbyte* ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/ExecutionEngine/GenericValue.h
Changes in directory llvm/include/llvm/ExecutionEngine: GenericValue.h updated: 1.7 -> 1.8 --- Log message: For PR950: http://llvm.org/PR950 : Change integer type names for signless integer types --- Diffs of the changes: (+4 -8) GenericValue.h | 12 1 files changed, 4 insertions(+), 8 deletions(-) Index: llvm/include/llvm/ExecutionEngine/GenericValue.h diff -u llvm/include/llvm/ExecutionEngine/GenericValue.h:1.7 llvm/include/llvm/ExecutionEngine/GenericValue.h:1.8 --- llvm/include/llvm/ExecutionEngine/GenericValue.h:1.7Thu Apr 21 15:39:54 2005 +++ llvm/include/llvm/ExecutionEngine/GenericValue.hSat Dec 30 23:23:18 2006 @@ -23,14 +23,10 @@ union GenericValue { boolBoolVal; - unsigned char UByteVal; - signed char SByteVal; - unsigned short UShortVal; - signed short ShortVal; - unsigned intUIntVal; - signed intIntVal; - uint64_tULongVal; - int64_t LongVal; + unsigned char Int8Val; + unsigned short Int16Val; + unsigned intInt32Val; + uint64_tInt64Val; double DoubleVal; float FloatVal; struct { unsigned int first; unsigned int second; } UIntPairVal; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp
Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.231 -> 1.232 --- Log message: For PR950: http://llvm.org/PR950 : * Change integer type name from signed to signless * Implement printing of FunctionType parameter attributes. --- Diffs of the changes: (+49 -16) AsmWriter.cpp | 65 +++--- 1 files changed, 49 insertions(+), 16 deletions(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.231 llvm/lib/VMCore/AsmWriter.cpp:1.232 --- llvm/lib/VMCore/AsmWriter.cpp:1.231 Fri Dec 29 14:29:48 2006 +++ llvm/lib/VMCore/AsmWriter.cpp Sat Dec 30 23:24:50 2006 @@ -271,12 +271,22 @@ case Type::FunctionTyID: { const FunctionType *FTy = cast(Ty); calcTypeName(FTy->getReturnType(), TypeStack, TypeNames, Result); +if (FTy->getParamAttrs(0)) { + Result += " "; + Result += FunctionType::getParamAttrsText(FTy->getParamAttrs(0)); +} Result += " ("; +unsigned Idx = 1; for (FunctionType::param_iterator I = FTy->param_begin(), E = FTy->param_end(); I != E; ++I) { if (I != FTy->param_begin()) Result += ", "; calcTypeName(*I, TypeStack, TypeNames, Result); + if (FTy->getParamAttrs(Idx)) { +Result += + " "; +Result += FunctionType::getParamAttrsText(FTy->getParamAttrs(Idx)); + } + Idx++; } if (FTy->isVarArg()) { if (FTy->getNumParams()) Result += ", "; @@ -660,7 +670,7 @@ void printConstant(const Constant *CPV); void printGlobal(const GlobalVariable *GV); void printFunction(const Function *F); - void printArgument(const Argument *FA); + void printArgument(const Argument *FA, FunctionType::ParameterAttributes A); void printBasicBlock(const BasicBlock *BB); void printInstruction(const Instruction &I); @@ -687,12 +697,20 @@ /// std::ostream &AssemblyWriter::printTypeAtLeastOneLevel(const Type *Ty) { if (const FunctionType *FTy = dyn_cast(Ty)) { -printType(FTy->getReturnType()) << " ("; +printType(FTy->getReturnType()); +if (FTy->getParamAttrs(0)) + Out << ' ' << FunctionType::getParamAttrsText(FTy->getParamAttrs(0)); +Out << " ("; +unsigned Idx = 1; for (FunctionType::param_iterator I = FTy->param_begin(), E = FTy->param_end(); I != E; ++I) { if (I != FTy->param_begin()) Out << ", "; printType(*I); + if (FTy->getParamAttrs(Idx)) { +Out << " " << FunctionType::getParamAttrsText(FTy->getParamAttrs(Idx)); + } + Idx++; } if (FTy->isVarArg()) { if (FTy->getNumParams()) Out << ", "; @@ -949,7 +967,10 @@ default: Out << "cc" << F->getCallingConv() << " "; break; } + const FunctionType *FT = F->getFunctionType(); printType(F->getReturnType()) << ' '; + if (FT->getParamAttrs(0)) +Out << FunctionType::getParamAttrsText(FT->getParamAttrs(0)) << ' '; if (!F->getName().empty()) Out << getLLVMName(F->getName()); else @@ -958,11 +979,15 @@ Machine.incorporateFunction(F); // Loop over the arguments, printing them... - const FunctionType *FT = F->getFunctionType(); + unsigned Idx = 1; for (Function::const_arg_iterator I = F->arg_begin(), E = F->arg_end(); - I != E; ++I) -printArgument(I); + I != E; ++I) { +// Insert commas as we go... the first arg doesn't get a comma +if (I != F->arg_begin()) Out << ", "; +printArgument(I, FT->getParamAttrs(Idx)); +Idx++; + } // Finish printing arguments... if (FT->isVarArg()) { @@ -994,13 +1019,14 @@ /// printArgument - This member is called for every argument that is passed into /// the function. Simply print it out /// -void AssemblyWriter::printArgument(const Argument *Arg) { - // Insert commas as we go... the first arg doesn't get a comma - if (Arg != Arg->getParent()->arg_begin()) Out << ", "; - +void AssemblyWriter::printArgument(const Argument *Arg, + FunctionType::ParameterAttributes attrs) { // Output type... printType(Arg->getType()); + if (attrs != FunctionType::NoAttributeSet) +Out << ' ' << FunctionType::getParamAttrsText(attrs); + // Output name, if available... if (Arg->hasName()) Out << ' ' << getLLVMName(Arg->getName()); @@ -1160,17 +1186,20 @@ (!isa(RetTy) || !isa(cast(RetTy)->getElementType( { Out << ' '; printType(RetTy); + if (FTy->getParamAttrs(0) != FunctionType::NoAttributeSet) +Out << " " << FTy->getParamAttrsText(FTy->getParamAttrs(0)); writeOperand(Operand, false); } else { writeOperand(Operand, true); } Out << '('; -if (CI->getNumOperands() > 1) writeOperand(CI->getOperand(1), true); -for (unsigned op = 2, Eop = I.getNumOperands(); op < Eop; ++op) { - Out << ','; +for (unsigned op = 1, Eop = I.getNumOperands(); op < Eop; ++op) { + if (op > 1) +Out << ','; writeOperand(I.getOpe
[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp
Changes in directory llvm/lib/VMCore: Type.cpp updated: 1.152 -> 1.153 --- Log message: For PR950: http://llvm.org/PR950 : Implement signless integer types and FunctionType parameter attributes. --- Diffs of the changes: (+90 -98) Type.cpp | 188 ++- 1 files changed, 90 insertions(+), 98 deletions(-) Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.152 llvm/lib/VMCore/Type.cpp:1.153 --- llvm/lib/VMCore/Type.cpp:1.152 Fri Dec 8 12:06:16 2006 +++ llvm/lib/VMCore/Type.cppSat Dec 30 23:25:34 2006 @@ -74,14 +74,10 @@ switch (IDNumber) { case VoidTyID : return VoidTy; case BoolTyID : return BoolTy; - case UByteTyID : return UByteTy; - case SByteTyID : return SByteTy; - case UShortTyID: return UShortTy; - case ShortTyID : return ShortTy; - case UIntTyID : return UIntTy; - case IntTyID : return IntTy; - case ULongTyID : return ULongTy; - case LongTyID : return LongTy; + case Int8TyID : return Int8Ty; + case Int16TyID : return Int16Ty; + case Int32TyID : return Int32Ty; + case Int64TyID : return Int64Ty; case FloatTyID : return FloatTy; case DoubleTyID: return DoubleTy; case LabelTyID : return LabelTy; @@ -120,57 +116,11 @@ // At this point we have only various mismatches of the first class types // remaining and ptr->ptr. Just select the lossless conversions. Everything // else is not lossless. - switch (getTypeID()) { - case Type::UByteTyID: return Ty == Type::SByteTy; - case Type::SByteTyID: return Ty == Type::UByteTy; - case Type::UShortTyID: return Ty == Type::ShortTy; - case Type::ShortTyID: return Ty == Type::UShortTy; - case Type::UIntTyID:return Ty == Type::IntTy; - case Type::IntTyID: return Ty == Type::UIntTy; - case Type::ULongTyID: return Ty == Type::LongTy; - case Type::LongTyID:return Ty == Type::ULongTy; - case Type::PointerTyID: return isa(Ty); - default: -break; - } + if (getTypeID() == Type::PointerTyID) +return isa(Ty); return false; // Other types have no identity values } -/// getUnsignedVersion - If this is an integer type, return the unsigned -/// variant of this type. For example int -> uint. -const Type *Type::getUnsignedVersion() const { - switch (getTypeID()) { - default: -assert(isInteger()&&"Type::getUnsignedVersion is only valid for integers!"); - case Type::UByteTyID: - case Type::SByteTyID: return Type::UByteTy; - case Type::UShortTyID: - case Type::ShortTyID: return Type::UShortTy; - case Type::UIntTyID: - case Type::IntTyID: return Type::UIntTy; - case Type::ULongTyID: - case Type::LongTyID:return Type::ULongTy; - } -} - -/// getSignedVersion - If this is an integer type, return the signed variant -/// of this type. For example uint -> int. -const Type *Type::getSignedVersion() const { - switch (getTypeID()) { - default: -assert(isInteger() && "Type::getSignedVersion is only valid for integers!"); - case Type::UByteTyID: - case Type::SByteTyID: return Type::SByteTy; - case Type::UShortTyID: - case Type::ShortTyID: return Type::ShortTy; - case Type::UIntTyID: - case Type::IntTyID: return Type::IntTy; - case Type::ULongTyID: - case Type::LongTyID:return Type::LongTy; - } -} - - // getPrimitiveSize - Return the basic size of this type if it is a primitive // type. These are fixed by LLVM and are not target dependent. This will // return zero if the type does not have a size or is not a primitive type. @@ -178,15 +128,11 @@ unsigned Type::getPrimitiveSize() const { switch (getTypeID()) { case Type::BoolTyID: - case Type::SByteTyID: - case Type::UByteTyID: return 1; - case Type::UShortTyID: - case Type::ShortTyID: return 2; + case Type::Int8TyID: return 1; + case Type::Int16TyID: return 2; case Type::FloatTyID: - case Type::IntTyID: - case Type::UIntTyID: return 4; - case Type::LongTyID: - case Type::ULongTyID: + case Type::Int32TyID: return 4; + case Type::Int64TyID: case Type::DoubleTyID: return 8; default: return 0; } @@ -195,15 +141,11 @@ unsigned Type::getPrimitiveSizeInBits() const { switch (getTypeID()) { case Type::BoolTyID: return 1; - case Type::SByteTyID: - case Type::UByteTyID: return 8; - case Type::UShortTyID: - case Type::ShortTyID: return 16; + case Type::Int8TyID: return 8; + case Type::Int16TyID: return 16; case Type::FloatTyID: - case Type::IntTyID: - case Type::UIntTyID: return 32; - case Type::LongTyID: - case Type::ULongTyID: + case Type::Int32TyID:return 32; + case Type::Int64TyID: case Type::DoubleTyID: return 64; case Type::PackedTyID: { const PackedType *PTy = cast(this); @@ -303,11 +245,21 @@ switch (Ty->getTypeID()) { case Type::FunctionTyID: { const FunctionType *FTy = cast(Ty); -Result = getTypeDescription(FTy->getReturnType(), TypeStack) + " ("; +Result = FunctionType::getParamAttrsText(FTy->getParamAttrs(0)); +
[llvm-commits] CVS: llvm/lib/VMCore/ConstantFolding.cpp Constants.cpp Function.cpp Instructions.cpp Module.cpp ValueTypes.cpp Verifier.cpp
Changes in directory llvm/lib/VMCore: ConstantFolding.cpp updated: 1.121 -> 1.122 Constants.cpp updated: 1.192 -> 1.193 Function.cpp updated: 1.107 -> 1.108 Instructions.cpp updated: 1.57 -> 1.58 Module.cpp updated: 1.69 -> 1.70 ValueTypes.cpp updated: 1.8 -> 1.9 Verifier.cpp updated: 1.179 -> 1.180 --- Log message: For PR950: http://llvm.org/PR950 : Change signed integer type names to unsigned equivalents. --- Diffs of the changes: (+82 -137) ConstantFolding.cpp | 37 +++- Constants.cpp | 117 +--- Function.cpp|2 Instructions.cpp| 38 +--- Module.cpp | 15 +++--- ValueTypes.cpp |8 +-- Verifier.cpp|2 7 files changed, 82 insertions(+), 137 deletions(-) Index: llvm/lib/VMCore/ConstantFolding.cpp diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.121 llvm/lib/VMCore/ConstantFolding.cpp:1.122 --- llvm/lib/VMCore/ConstantFolding.cpp:1.121 Sun Dec 24 12:52:08 2006 +++ llvm/lib/VMCore/ConstantFolding.cpp Sat Dec 30 23:26:44 2006 @@ -87,7 +87,7 @@ for (unsigned i = 0; i != SrcNumElts; ++i) { uint64_t V = DoubleToBits(cast(CP->getOperand(i))->getValue()); -Constant *C = ConstantInt::get(Type::ULongTy, V); +Constant *C = ConstantInt::get(Type::Int64Ty, V); Result.push_back(ConstantExpr::getBitCast(C, DstEltTy )); } return ConstantPacked::get(Result); @@ -96,7 +96,7 @@ assert(SrcEltTy->getTypeID() == Type::FloatTyID); for (unsigned i = 0; i != SrcNumElts; ++i) { uint32_t V = FloatToBits(cast(CP->getOperand(i))->getValue()); - Constant *C = ConstantInt::get(Type::UIntTy, V); + Constant *C = ConstantInt::get(Type::Int32Ty, V); Result.push_back(ConstantExpr::getBitCast(C, DstEltTy)); } return ConstantPacked::get(Result); @@ -132,7 +132,7 @@ // Let CastInst::isEliminableCastPair do the heavy lifting. return CastInst::isEliminableCastPair(firstOp, secondOp, SrcTy, MidTy, DstTy, -Type::ULongTy); +Type::Int64Ty); } Constant *llvm::ConstantFoldCastInstruction(unsigned opc, const Constant *V, @@ -217,13 +217,13 @@ if (const PointerType *PTy = dyn_cast(V->getType())) if (const PointerType *DPTy = dyn_cast(DestTy)) { std::vector IdxList; -IdxList.push_back(Constant::getNullValue(Type::IntTy)); +IdxList.push_back(Constant::getNullValue(Type::Int32Ty)); const Type *ElTy = PTy->getElementType(); while (ElTy != DPTy->getElementType()) { if (const StructType *STy = dyn_cast(ElTy)) { if (STy->getNumElements() == 0) break; ElTy = STy->getElementType(0); -IdxList.push_back(Constant::getNullValue(Type::UIntTy)); +IdxList.push_back(Constant::getNullValue(Type::Int32Ty)); } else if (const SequentialType *STy = dyn_cast(ElTy)) { if (isa(ElTy)) break; // Can't index into pointers! @@ -296,10 +296,10 @@ if (const ConstantFP *FP = dyn_cast(V)) { // FP -> Integral. if (DestTy->isIntegral()) { -if (DestTy == Type::IntTy || DestTy == Type::UIntTy) +if (DestTy == Type::Int32Ty) return ConstantInt::get(DestTy, FloatToBits(FP->getValue())); -assert((DestTy == Type::LongTy || DestTy == Type::ULongTy) - && "Incorrect integer type for bitcast!"); +assert(DestTy == Type::Int64Ty && + "Incorrect integer type for bitcast!"); return ConstantInt::get(DestTy, DoubleToBits(FP->getValue())); } } @@ -712,16 +712,13 @@ // Ok, we have two differing integer indices. Sign extend them to be the same // type. Long is always big enough, so we use it. - if (C1->getType() != Type::LongTy && C1->getType() != Type::ULongTy) -C1 = ConstantExpr::getSExt(C1, Type::LongTy); - else -C1 = ConstantExpr::getBitCast(C1, Type::LongTy); - if (C2->getType() != Type::LongTy && C1->getType() != Type::ULongTy) -C2 = ConstantExpr::getSExt(C2, Type::LongTy); - else -C2 = ConstantExpr::getBitCast(C2, Type::LongTy); + if (C1->getType() != Type::Int64Ty) +C1 = ConstantExpr::getSExt(C1, Type::Int64Ty); + + if (C2->getType() != Type::Int64Ty) +C1 = ConstantExpr::getSExt(C2, Type::Int64Ty); - if (C1 == C2) return 0; // Are they just differing types? + if (C1 == C2) return 0; // They are equal // If the type being indexed over is really just a zero sized type, there is // no pointer difference being made here. @@ -1324,7 +1321,7 @@ if (uint32_t ElSize = ElTy->getPrimitiveSize()) { // gep null, C is equal to C*sizeof(nullty). If nullty is a known llvm // type, we can statically fold this. -Constant *R = ConstantInt::get(Type::UIntTy, ElSize); +Constant *R = ConstantInt::get(Type::Int32
[llvm-commits] CVS: llvm/lib/AsmParser/Lexer.l llvmAsmParser.y
Changes in directory llvm/lib/AsmParser: Lexer.l updated: 1.89 -> 1.90 llvmAsmParser.y updated: 1.292 -> 1.293 --- Log message: For PR950: http://llvm.org/PR950 : Major reorganization. This patch introduces the signedness changes for the new integer types (i8, i16, i32, i64) which replace the old signed versions (ubyte, sbyte, ushort, short, etc). This patch also implements the function type parameter attributes feature. Together these conspired to introduce new reduce/reduce errors into the grammar. Consequently, it was necessary to introduce a new keyword into the grammar in order to disambiguate. Without this, yacc would make incorrect shift/reduce and reduce/reduce decisions and fail to parse the intended assembly. Changes in assembly: 1. The "implementation" keyword is superfluous but still supported. You can use it as a sentry which will ensure there are no remaining up reference types. However, this is optional as those checks are also performed elsewhere. 2. Parameter attributes are now implemented using an at sign to indicate the attribute. The attributes are placed after the type in a function declaration or after the argument value in a function call. For example: i8 @sext %myfunc(i16 @zext) call i8 @sext %myfunc(i16 @zext %someVal) The facility is available for supporting additional attributes and they can be combined using the @(attr1,attr2,attr3) syntax. Right now the only two supported are @sext and @zext 3. Functions must now be defined with the "define" keyword which is analagous to the "declare" keyword for function declarations. The introduction of this keyword disambiguates situations where a named result type is confused with a new type or gvar definition. For example: %MyType = type i16 %MyType %func(%MyType) { ... } With the introduction of optional parameter attributes between the function name and the function result type, yacc will pick the wrong rule to reduce unless it is disambiguated with "define" before the function definition, as in: define %MyType @zext %func(%MyType %someArg) { ... } --- Diffs of the changes: (+413 -253) Lexer.l | 12 - llvmAsmParser.y | 654 +++- 2 files changed, 413 insertions(+), 253 deletions(-) Index: llvm/lib/AsmParser/Lexer.l diff -u llvm/lib/AsmParser/Lexer.l:1.89 llvm/lib/AsmParser/Lexer.l:1.90 --- llvm/lib/AsmParser/Lexer.l:1.89 Fri Dec 29 14:29:48 2006 +++ llvm/lib/AsmParser/Lexer.l Sat Dec 30 23:40:12 2006 @@ -235,14 +235,10 @@ void{ RET_TY(Type::VoidTy, VOID); } bool{ RET_TY(Type::BoolTy, BOOL); } -sbyte { RET_TY(Type::SByteTy, SBYTE); } -ubyte { RET_TY(Type::UByteTy, UBYTE); } -short { RET_TY(Type::ShortTy, SHORT); } -ushort { RET_TY(Type::UShortTy,USHORT);} -int { RET_TY(Type::IntTy, INT); } -uint{ RET_TY(Type::UIntTy, UINT); } -long{ RET_TY(Type::LongTy, LONG); } -ulong { RET_TY(Type::ULongTy, ULONG); } +i8 { RET_TY(Type::Int8Ty, INT8); } +i16 { RET_TY(Type::Int16Ty, INT16); } +i32 { RET_TY(Type::Int32Ty, INT32); } +i64 { RET_TY(Type::Int64Ty, INT64); } float { RET_TY(Type::FloatTy, FLOAT); } double { RET_TY(Type::DoubleTy,DOUBLE);} label { RET_TY(Type::LabelTy, LABEL); } Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.292 llvm/lib/AsmParser/llvmAsmParser.y:1.293 --- llvm/lib/AsmParser/llvmAsmParser.y:1.292Fri Dec 29 14:29:48 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y Sat Dec 30 23:40:12 2006 @@ -19,12 +19,16 @@ #include "llvm/Module.h" #include "llvm/SymbolTable.h" #include "llvm/Support/GetElementPtrTypeIterator.h" +#include "llvm/Support/CommandLine.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/Streams.h" #include #include #include +#ifndef NDEBUG +#define YYDEBUG 1 +#endif // The following is a gross hack. In order to rid the libAsmParser library of // exceptions, we have to have a way of getting the yyparse function to go into @@ -47,6 +51,11 @@ namespace llvm { std::string CurFilename; +#if YYDEBUG +static cl::opt +Debug("debug-yacc", cl::desc("Print yacc debug state changes"), + cl::Hidden, cl::init(false)); +#endif } using namespace llvm; @@ -71,6 +80,7 @@ // destroyed when the function is completed. // typedef std::vector ValueList; // Numbered defs + static void ResolveDefinitions(std::map &LateResolvers, std::map *FutureLateResolvers = 0); @@ -804,34 +814,12 @@ return Ty; } -// common code from the two 'RunVMAsmParser' functions -static Module* RunParser(Module * M) { - - llvmAsmlineno = 1; // Reset the current line number... - CurModule.CurrentModule = M; - - // Check to make sure the
[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp
Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.214 -> 1.215 --- Log message: For PR950: http://llvm.org/PR950 : Update for signless integer types and parameter attribute implementation. Of significant note: 1. This changes the bytecode format yet again. 2. There are 1/2 as many integer type planes (this is a good thing) 3. GEP indices now use only 1 bit to identify their type which means more GEP instructions won't be relegated to format 0 (size win) 4. Parameter attributes are implemented but currently being stored verbosely for each function type. Some other day this needs to be optimized for size. --- Diffs of the changes: (+29 -34) Reader.cpp | 63 - 1 files changed, 29 insertions(+), 34 deletions(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.214 llvm/lib/Bytecode/Reader/Reader.cpp:1.215 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.214 Fri Dec 15 13:49:23 2006 +++ llvm/lib/Bytecode/Reader/Reader.cpp Sat Dec 30 23:44:24 2006 @@ -44,7 +44,7 @@ Use Op; ConstantPlaceHolder(const Type *Ty) : ConstantExpr(Ty, Instruction::UserOp1, &Op, 1), -Op(UndefValue::get(Type::IntTy), this) { +Op(UndefValue::get(Type::Int32Ty), this) { } }; } @@ -572,7 +572,7 @@ if (Oprnds.size() != 2) error("Invalid extractelement instruction!"); Value *V1 = getValue(iType, Oprnds[0]); - Value *V2 = getValue(Type::UIntTyID, Oprnds[1]); + Value *V2 = getValue(Type::Int32TyID, Oprnds[1]); if (!ExtractElementInst::isValidOperands(V1, V2)) error("Invalid extractelement instruction!"); @@ -587,7 +587,7 @@ Value *V1 = getValue(iType, Oprnds[0]); Value *V2 = getValue(getTypeSlot(PackedTy->getElementType()),Oprnds[1]); - Value *V3 = getValue(Type::UIntTyID, Oprnds[2]); + Value *V3 = getValue(Type::Int32TyID, Oprnds[2]); if (!InsertElementInst::isValidOperands(V1, V2, V3)) error("Invalid insertelement instruction!"); @@ -601,7 +601,7 @@ Value *V1 = getValue(iType, Oprnds[0]); Value *V2 = getValue(iType, Oprnds[1]); const PackedType *EltTy = -PackedType::get(Type::UIntTy, PackedTy->getNumElements()); +PackedType::get(Type::Int32Ty, PackedTy->getNumElements()); Value *V3 = getValue(getTypeSlot(EltTy), Oprnds[2]); if (!ShuffleVectorInst::isValidOperands(V1, V2, V3)) error("Invalid shufflevector instruction!"); @@ -713,7 +713,7 @@ case Instruction::AShr: Result = new ShiftInst(Instruction::OtherOps(Opcode), getValue(iType, Oprnds[0]), - getValue(Type::UByteTyID, Oprnds[1])); + getValue(Type::Int8TyID, Oprnds[1])); break; case Instruction::Ret: if (Oprnds.size() == 0) @@ -876,7 +876,7 @@ error("Invalid malloc instruction!"); Result = new MallocInst(cast(InstTy)->getElementType(), - getValue(Type::UIntTyID, Oprnds[0]), Align); + getValue(Type::Int32TyID, Oprnds[0]), Align); break; } case Instruction::Alloca: { @@ -889,7 +889,7 @@ error("Invalid alloca instruction!"); Result = new AllocaInst(cast(InstTy)->getElementType(), - getValue(Type::UIntTyID, Oprnds[0]), Align); + getValue(Type::Int32TyID, Oprnds[0]), Align); break; } case Instruction::Free: @@ -913,18 +913,16 @@ unsigned IdxTy = 0; // Struct indices are always uints, sequential type indices can be // any of the 32 or 64-bit integer types. The actual choice of -// type is encoded in the low two bits of the slot number. +// type is encoded in the low bit of the slot number. if (isa(TopTy)) - IdxTy = Type::UIntTyID; + IdxTy = Type::Int32TyID; else { - switch (ValIdx & 3) { + switch (ValIdx & 1) { default: - case 0: IdxTy = Type::UIntTyID; break; - case 1: IdxTy = Type::IntTyID; break; - case 2: IdxTy = Type::ULongTyID; break; - case 3: IdxTy = Type::LongTyID; break; + case 0: IdxTy = Type::Int32TyID; break; + case 1: IdxTy = Type::Int64TyID; break; } - ValIdx >>= 2; + ValIdx >>= 1; } Idx.push_back(getValue(IdxTy, ValIdx)); NextTy = GetElementPtrInst::getIndexedType(InstTy, Idx, true); @@ -1159,17 +1157,23 @@ switch (PrimType) { case Type::FunctionTyID: { const Type *RetType = readType(); +unsigned RetAttr = read_vbr_uint(); unsigned NumParams = read_vbr_uint(); std::vector Params; -while (NumParams--) +std::vector Attrs; +Attrs.push_back(FunctionType::ParameterAttrib
[llvm-commits] CVS: llvm/lib/Bytecode/Writer/SlotCalculator.cpp Writer.cpp
Changes in directory llvm/lib/Bytecode/Writer: SlotCalculator.cpp updated: 1.76 -> 1.77 Writer.cpp updated: 1.140 -> 1.141 --- Log message: For PR950: http://llvm.org/PR950 : Update for signless integer types and parameter attribute implementation. Of significant note: 1. This changes the bytecode format yet again. 2. There are 1/2 as many integer type planes (this is a good thing) 3. GEP indices now use only 1 bit to identify their type which means more GEP instructions won't be relegated to format 0 (size win) 4. Parameter attributes are implemented but currently being stored verbosely for each function type. Some other day this needs to be optimized for size. --- Diffs of the changes: (+15 -23) SlotCalculator.cpp |3 +-- Writer.cpp | 35 ++- 2 files changed, 15 insertions(+), 23 deletions(-) Index: llvm/lib/Bytecode/Writer/SlotCalculator.cpp diff -u llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.76 llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.77 --- llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.76Wed Dec 6 19:30:31 2006 +++ llvm/lib/Bytecode/Writer/SlotCalculator.cpp Sat Dec 30 23:44:24 2006 @@ -145,8 +145,7 @@ // for (unsigned plane = 0, e = Table.size(); plane != e; ++plane) { if (const ArrayType *AT = dyn_cast(Types[plane])) - if (AT->getElementType() == Type::SByteTy || - AT->getElementType() == Type::UByteTy) { + if (AT->getElementType() == Type::Int8Ty) { TypePlane &Plane = Table[plane]; unsigned FirstNonStringID = 0; for (unsigned i = 0, e = Plane.size(); i != e; ++i) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.140 llvm/lib/Bytecode/Writer/Writer.cpp:1.141 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.140 Tue Dec 19 17:16:47 2006 +++ llvm/lib/Bytecode/Writer/Writer.cpp Sat Dec 30 23:44:24 2006 @@ -214,16 +214,20 @@ int Slot = Table.getSlot(MT->getReturnType()); assert(Slot != -1 && "Type used but not available!!"); output_typeid((unsigned)Slot); +output_vbr(unsigned(MT->getParamAttrs(0))); // Output the number of arguments to function (+1 if varargs): output_vbr((unsigned)MT->getNumParams()+MT->isVarArg()); // Output all of the arguments... FunctionType::param_iterator I = MT->param_begin(); +unsigned Idx = 1; for (; I != MT->param_end(); ++I) { Slot = Table.getSlot(*I); assert(Slot != -1 && "Type used but not available!!"); output_typeid((unsigned)Slot); + output_vbr(unsigned(MT->getParamAttrs(Idx))); + Idx++; } // Terminate list with VoidTy if we are a varargs function... @@ -323,20 +327,13 @@ output_vbr(0U); break; - case Type::UByteTyID: // Unsigned integer types... - case Type::UShortTyID: - case Type::UIntTyID: - case Type::ULongTyID: + case Type::Int8TyID: // Unsigned integer types... + case Type::Int16TyID: + case Type::Int32TyID: + case Type::Int64TyID: output_vbr(cast(CPV)->getZExtValue()); break; - case Type::SByteTyID: // Signed integer types... - case Type::ShortTyID: - case Type::IntTyID: - case Type::LongTyID: -output_vbr(cast(CPV)->getSExtValue()); -break; - case Type::ArrayTyID: { const ConstantArray *CPA = cast(CPV); assert(!CPA->isString() && "Constant strings should be handled specially!"); @@ -489,12 +486,10 @@ unsigned IdxId; switch (I->getOperand(Idx)->getType()->getTypeID()) { default: assert(0 && "Unknown index type!"); -case Type::UIntTyID: IdxId = 0; break; -case Type::IntTyID: IdxId = 1; break; -case Type::ULongTyID: IdxId = 2; break; -case Type::LongTyID: IdxId = 3; break; +case Type::Int32TyID: IdxId = 0; break; +case Type::Int64TyID: IdxId = 1; break; } -Slot = (Slot << 2) | IdxId; +Slot = (Slot << 1) | IdxId; } output_vbr(unsigned(Slot)); } @@ -742,12 +737,10 @@ unsigned IdxId; switch (GEP->getOperand(Idx)->getType()->getTypeID()) { default: assert(0 && "Unknown index type!"); - case Type::UIntTyID: IdxId = 0; break; - case Type::IntTyID: IdxId = 1; break; - case Type::ULongTyID: IdxId = 2; break; - case Type::LongTyID: IdxId = 3; break; + case Type::Int32TyID: IdxId = 0; break; + case Type::Int64TyID: IdxId = 1; break; } - Slots[Idx] = (Slots[Idx] << 2) | IdxId; + Slots[Idx] = (Slots[Idx] << 1) | IdxId; if (Slots[Idx] > MaxOpSlot) MaxOpSlot = Slots[Idx]; } } else if (Opcode == 58) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeLexer.l UpgradeParser.y
Changes in directory llvm/tools/llvm-upgrade: UpgradeLexer.l updated: 1.10 -> 1.11 UpgradeParser.y updated: 1.26 -> 1.27 --- Log message: For PR950: http://llvm.org/PR950 : Don't attempt to parse both the old and new grammars. It is near impossible to get it right. Remove support for the new define keyword and don't attempt to insert parameter attributes because there isn't enough contextual information for it. --- Diffs of the changes: (+29 -30) UpgradeLexer.l | 21 - UpgradeParser.y | 38 +- 2 files changed, 29 insertions(+), 30 deletions(-) Index: llvm/tools/llvm-upgrade/UpgradeLexer.l diff -u llvm/tools/llvm-upgrade/UpgradeLexer.l:1.10 llvm/tools/llvm-upgrade/UpgradeLexer.l:1.11 --- llvm/tools/llvm-upgrade/UpgradeLexer.l:1.10 Fri Dec 29 14:33:37 2006 +++ llvm/tools/llvm-upgrade/UpgradeLexer.l Sat Dec 30 23:45:57 2006 @@ -105,7 +105,6 @@ true{ RET_TOK( TRUETOK); } false { RET_TOK( FALSETOK); } declare { RET_TOK( DECLARE); } -define { RET_TOK( DEFINE); } global { RET_TOK( GLOBAL); } constant{ RET_TOK( CONSTANT); } internal{ RET_TOK( INTERNAL); } @@ -149,14 +148,18 @@ void{ RET_TY(VOID,VoidTy,"void",false); } bool{ RET_TY(BOOL,BoolTy,"bool",false); } -sbyte { RET_TY(SBYTE,SByteTy,"sbyte",true); } -ubyte { RET_TY(UBYTE,UByteTy,"ubyte",false); } -short { RET_TY(SHORT,ShortTy,"short",true); } -ushort { RET_TY(USHORT,UShortTy,"ushort",false); } -int { RET_TY(INT,IntTy,"int",true); } -uint{ RET_TY(UINT,UIntTy,"uint",false); } -long{ RET_TY(LONG,LongTy,"long",true); } -ulong { RET_TY(ULONG,ULongTy,"ulong",false); } +sbyte { RET_TY(SBYTE,SByteTy,"i8",true); } +ubyte { RET_TY(UBYTE,UByteTy,"i8",false); } +short { RET_TY(SHORT,ShortTy,"i16",true); } +ushort { RET_TY(USHORT,UShortTy,"i16",false); } +int { RET_TY(INT,IntTy,"i32",true); } +uint{ RET_TY(UINT,UIntTy,"i32",false); } +long{ RET_TY(LONG,LongTy,"i64",true); } +ulong { RET_TY(ULONG,ULongTy,"i64",false); } +i8 { RET_TY(UBYTE,UByteTy,"i8",false); } +i16 { RET_TY(USHORT,UShortTy,"i16",false); } +i32 { RET_TY(UINT,UIntTy,"i32",false); } +i64 { RET_TY(ULONG,ULongTy,"i64",false); } float { RET_TY(FLOAT,FloatTy,"float",false); } double { RET_TY(DOUBLE,DoubleTy,"double",false); } label { RET_TY(LABEL,LabelTy,"label",false); } Index: llvm/tools/llvm-upgrade/UpgradeParser.y diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.26 llvm/tools/llvm-upgrade/UpgradeParser.y:1.27 --- llvm/tools/llvm-upgrade/UpgradeParser.y:1.26Fri Dec 29 14:33:37 2006 +++ llvm/tools/llvm-upgrade/UpgradeParser.y Sat Dec 30 23:45:57 2006 @@ -34,6 +34,10 @@ unsigned SizeOfPointer = 32; static uint64_t unique = 1; +// This bool controls whether attributes are ever added to function declarations +// definitions and calls. +static bool AddAttributes = false; + typedef std::vector TypeVector; static TypeVector EnumeratedTypes; typedef std::map TypeMap; @@ -50,12 +54,13 @@ } void UpgradeAssembly(const std::string &infile, std::istream& in, - std::ostream &out, bool debug) + std::ostream &out, bool debug, bool addAttrs) { Upgradelineno = 1; CurFilename = infile; LexInput = ∈ yydebug = debug; + AddAttributes = addAttrs; O = &out; if (yyparse()) { @@ -176,15 +181,15 @@ // fp -> ptr cast is no longer supported but we must upgrade this // by doing a double cast: fp -> int -> ptr if (isConst) - Source = "ulong fptoui(" + Source + " to ulong)"; + Source = "i64 fptoui(" + Source + " to i64)"; else { *O << "%cast_upgrade" << unique << " = fptoui " << Source - << " to ulong\n"; - Source = "ulong %cast_upgrade" + llvm::utostr(unique); + << " to i64\n"; + Source = "i64 %cast_upgrade" + llvm::utostr(unique); } // Update the SrcTy for the getCastOpcode call below SrcTy.destroy(); -SrcTy.newTy = new std::string("ulong"); +SrcTy.newTy = new std::string("i64"); SrcTy.oldTy = ULongTy; } else if (DstTy.oldTy == BoolTy && SrcTy.oldTy != BoolTy) { // cast ptr %x to bool was previously defined as setne ptr %x, null @@ -286,7 +291,7 @@ %token NULL_TOK UNDEF ZEROINITIALIZER TRUETOK FALSETOK %token TYPE VAR_ID LABELSTR STRINGCONSTANT %token IMPLEMENTATION BEGINTOK ENDTOK -%token DECLARE DEFINE GLOBAL CONSTANT SECTION VOLATILE +%token DECLARE GLOBAL CONSTANT SECTION VOLATILE %token TO DOTDOTDOT CONST INTERNAL LINKONCE WEAK %token DLLIMPORT DLLEXPORT EXTERN_WEAK APPENDING %token NOT EXTERNAL TARGET TRIPLE ENDIAN POINTERSIZE LITTLE BIG @@ -922,8 +927,8 @@ } | /* empty */ { $$ = new std::
[llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp ConstantFolding.cpp ScalarEvolution.cpp
Changes in directory llvm/lib/Analysis: BasicAliasAnalysis.cpp updated: 1.95 -> 1.96 ConstantFolding.cpp updated: 1.7 -> 1.8 ScalarEvolution.cpp updated: 1.77 -> 1.78 --- Log message: For PR950: http://llvm.org/PR950 : This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. --- Diffs of the changes: (+21 -68) BasicAliasAnalysis.cpp | 32 ++-- ConstantFolding.cpp|1 ScalarEvolution.cpp| 56 +++-- 3 files changed, 21 insertions(+), 68 deletions(-) Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.95 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.96 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.95 Sat Dec 23 00:05:40 2006 +++ llvm/lib/Analysis/BasicAliasAnalysis.cppSat Dec 30 23:48:39 2006 @@ -269,7 +269,7 @@ if (V1 == V2) return MustAlias; if ((!isa(V1->getType()) || !isa(V2->getType())) && - V1->getType() != Type::LongTy && V2->getType() != Type::LongTy) + V1->getType() != Type::Int64Ty && V2->getType() != Type::Int64Ty) return NoAlias; // Scalars cannot alias each other // Strip off cast instructions... @@ -458,14 +458,10 @@ if (Constant *C1 = dyn_cast(V1)) if (Constant *C2 = dyn_cast(V2)) { // Sign extend the constants to long types, if necessary - if (C1->getType()->getPrimitiveSizeInBits() < 64) -C1 = ConstantExpr::getSExt(C1, Type::LongTy); - else if (C1->getType() == Type::ULongTy) -C1 = ConstantExpr::getBitCast(C1, Type::LongTy); - if (C2->getType()->getPrimitiveSizeInBits() < 64) -C2 = ConstantExpr::getSExt(C2, Type::LongTy); - else if (C2->getType() == Type::ULongTy) -C2 = ConstantExpr::getBitCast(C2, Type::LongTy); + if (C1->getType() != Type::Int64Ty) +C1 = ConstantExpr::getSExt(C1, Type::Int64Ty); + if (C2->getType() != Type::Int64Ty) +C2 = ConstantExpr::getSExt(C2, Type::Int64Ty); return C1 == C2; } return false; @@ -554,14 +550,10 @@ if (Constant *G2OC = dyn_cast(const_cast(G2Oper))){ if (G1OC->getType() != G2OC->getType()) { // Sign extend both operands to long. -if (G1OC->getType()->getPrimitiveSizeInBits() < 64) - G1OC = ConstantExpr::getSExt(G1OC, Type::LongTy); -else if (G1OC->getType() == Type::ULongTy) - G1OC = ConstantExpr::getBitCast(G1OC, Type::LongTy); -if (G2OC->getType()->getPrimitiveSizeInBits() < 64) - G2OC = ConstantExpr::getSExt(G2OC, Type::LongTy); -else if (G2OC->getType() == Type::ULongTy) - G2OC = ConstantExpr::getBitCast(G2OC, Type::LongTy); +if (G1OC->getType() != Type::Int64Ty) + G1OC = ConstantExpr::getSExt(G1OC, Type::Int64Ty); +if (G2OC->getType() != Type::Int64Ty) + G2OC = ConstantExpr::getSExt(G2OC, Type::Int64Ty); GEP1Ops[FirstConstantOper] = G1OC; GEP2Ops[FirstConstantOper] = G2OC; } @@ -661,7 +653,7 @@ const Type *ZeroIdxTy = GEPPointerTy; for (unsigned i = 0; i != FirstConstantOper; ++i) { if (!isa(ZeroIdxTy)) - GEP1Ops[i] = GEP2Ops[i] = Constant::getNullValue(Type::UIntTy); + GEP1Ops[i] = GEP2Ops[i] = Constant::getNullValue(Type::Int32Ty); if (const CompositeType *CT = dyn_cast(ZeroIdxTy)) ZeroIdxTy = CT->getTypeAtIndex(GEP1Ops[i]); @@ -702,9 +694,9 @@ // value possible. // if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) -GEP1Ops[i] = ConstantInt::get(Type::LongTy, AT->getNumElements()-1); +GEP1Ops[i] = ConstantInt::get(Type::Int64Ty, AT->getNumElements()-1); else if (const PackedType *PT = dyn_cast(BasePtr1Ty)) -GEP1Ops[i] = ConstantInt::get(Type::LongTy, PT->getNumElements()-1); +GEP1Ops[i] = ConstantInt::get(Type::Int64Ty, PT->getNumElements()-1); } } Index: llvm/lib/Analysis/ConstantFolding.cpp diff -u llvm/lib/Analysis/ConstantFolding.cpp:1.7 llvm/lib/Analysis/ConstantFolding.cpp:1.8 --- llvm/lib/Analysis/ConstantFolding.cpp:1.7 Fri Dec 1 20:22:01 2006 +++ llvm/lib/Analysis/ConstantFolding.cpp Sat Dec 30 23:48:39 2006 @@ -164,7 +164,6 @@ break; } } else if (ConstantInt *Op = dyn_cast(Operands[0])) { - assert(Op->getType()->isUnsigned() && "bswap args must be unsigned"); uint64_t V = Op->getZExtValue(); if (Name == "llvm.bswap.i16") return ConstantInt::get(Ty, ByteSwap_16(V)); Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/Sc
[llvm-commits] CVS: llvm/lib/Transforms/ExprTypeConvert.cpp LevelRaise.cpp TransformInternals.cpp
Changes in directory llvm/lib/Transforms: ExprTypeConvert.cpp updated: 1.118 -> 1.119 LevelRaise.cpp updated: 1.117 -> 1.118 TransformInternals.cpp updated: 1.51 -> 1.52 --- Log message: For PR950: http://llvm.org/PR950 : This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. --- Diffs of the changes: (+15 -16) ExprTypeConvert.cpp| 19 +-- LevelRaise.cpp |4 ++-- TransformInternals.cpp |8 3 files changed, 15 insertions(+), 16 deletions(-) Index: llvm/lib/Transforms/ExprTypeConvert.cpp diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.118 llvm/lib/Transforms/ExprTypeConvert.cpp:1.119 --- llvm/lib/Transforms/ExprTypeConvert.cpp:1.118 Sat Dec 23 00:05:41 2006 +++ llvm/lib/Transforms/ExprTypeConvert.cpp Sat Dec 30 23:48:39 2006 @@ -210,8 +210,9 @@ Constant *CPV = cast(V); // Constants are converted by constant folding the cast that is required. // We assume here that all casts are implemented for constant prop. -Instruction::CastOps opcode = CastInst::getCastOpcode(CPV, -CPV->getType()->isSigned(), Ty, Ty->isSigned()); +// FIXME: This seems to work, but it is unclear why ZEXT is always the +// right choice here. +Instruction::CastOps opcode = CastInst::getCastOpcode(CPV, false, Ty,false); Value *Result = ConstantExpr::getCast(opcode, CPV, Ty); // Add the instruction to the expression map //VMC.ExprMap[V] = Result; @@ -231,7 +232,7 @@ case Instruction::BitCast: { assert(VMC.NewCasts.count(ValueHandle(VMC, I)) == 0); Instruction::CastOps opcode = CastInst::getCastOpcode(I->getOperand(0), -I->getOperand(0)->getType()->isSigned(), Ty, Ty->isSigned()); +false, Ty, false); Res = CastInst::create(opcode, I->getOperand(0), Ty, Name); VMC.NewCasts.insert(ValueHandle(VMC, Res)); break; @@ -473,8 +474,6 @@ } case Instruction::LShr: case Instruction::AShr: -if (Ty->isSigned() != V->getType()->isSigned()) return false; -// FALL THROUGH case Instruction::Shl: if (I->getOperand(1) == V) return false; // Cannot change shift amount type if (!Ty->isInteger()) return false; @@ -713,8 +712,8 @@ switch (I->getOpcode()) { case Instruction::BitCast: { -Instruction::CastOps opcode = CastInst::getCastOpcode(NewVal, -NewVal->getType()->isSigned(), I->getType(), I->getType()->isSigned()); +Instruction::CastOps opcode = CastInst::getCastOpcode(NewVal, false, + I->getType(), false); Res = CastInst::create(opcode, NewVal, I->getType(), Name); break; } @@ -768,7 +767,7 @@ if (const CompositeType *CT = dyn_cast(LoadedTy)) { std::vector Indices; - Indices.push_back(Constant::getNullValue(Type::UIntTy)); + Indices.push_back(Constant::getNullValue(Type::Int32Ty)); unsigned Offset = 0; // No offset, get first leaf. LoadedTy = getStructOffsetType(CT, Offset, Indices, TD, false); @@ -801,7 +800,7 @@ if (ElTy != NewTy) { std::vector Indices; - Indices.push_back(Constant::getNullValue(Type::UIntTy)); + Indices.push_back(Constant::getNullValue(Type::Int32Ty)); unsigned Offset = 0; const Type *Ty = getStructOffsetType(ElTy, Offset, Indices, TD,false); @@ -830,7 +829,7 @@ if (isa(ValTy)) { std::vector Indices; -Indices.push_back(Constant::getNullValue(Type::UIntTy)); +Indices.push_back(Constant::getNullValue(Type::Int32Ty)); unsigned Offset = 0; ValTy = getStructOffsetType(ValTy, Offset, Indices, TD, false); Index: llvm/lib/Transforms/LevelRaise.cpp diff -u llvm/lib/Transforms/LevelRaise.cpp:1.117 llvm/lib/Transforms/LevelRaise.cpp:1.118 --- llvm/lib/Transforms/LevelRaise.cpp:1.117Sat Dec 23 00:05:41 2006 +++ llvm/lib/Transforms/LevelRaise.cpp Sat Dec 30 23:48:39 2006 @@ -206,7 +206,7 @@ // Build the index vector, full of all zeros std::vector Indices; - Indices.push_back(Constant::getNullValue(Type::UIntTy)); + Indices.push_back(Constant::getNullValue(Type::Int32Ty)); while (CurCTy && !isa(CurCTy)) { if (const StructType *CurSTy = dyn_cast(CurCTy)) { // Check for a zero element struct type... if we have one, bail. @@ -221,7 +221,7 @@ } // Insert a zero to index through this type... -Indices.push_back(Constant::getNullValue(Type::UIntTy)); +Indices.push_back(Constant::getNullValue(Type::Int32Ty)); // Did we find what we're looking for? if (ElT
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp IndVarSimplify.cpp InstructionCombining.cpp LoopStrengthReduce.cpp LowerGC.cpp LowerPacked.cpp ScalarReplAggregates.cpp
Changes in directory llvm/lib/Transforms/Scalar: CorrelatedExprs.cpp updated: 1.42 -> 1.43 IndVarSimplify.cpp updated: 1.99 -> 1.100 InstructionCombining.cpp updated: 1.576 -> 1.577 LoopStrengthReduce.cpp updated: 1.102 -> 1.103 LowerGC.cpp updated: 1.16 -> 1.17 LowerPacked.cpp updated: 1.14 -> 1.15 ScalarReplAggregates.cpp updated: 1.61 -> 1.62 --- Log message: For PR950: http://llvm.org/PR950 : This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. --- Diffs of the changes: (+158 -227) CorrelatedExprs.cpp |2 IndVarSimplify.cpp |5 InstructionCombining.cpp | 291 ++- LoopStrengthReduce.cpp | 12 - LowerGC.cpp | 18 +- LowerPacked.cpp | 14 +- ScalarReplAggregates.cpp | 43 +++--- 7 files changed, 158 insertions(+), 227 deletions(-) Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.42 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.43 --- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.42 Sat Dec 23 00:05:41 2006 +++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp Sat Dec 30 23:48:39 2006 @@ -111,7 +111,7 @@ Value *Replacement; public: ValueInfo(const Type *Ty) - : Bounds(Ty->isIntegral() ? Ty : Type::IntTy), Replacement(0) {} + : Bounds(Ty->isIntegral() ? Ty : Type::Int32Ty), Replacement(0) {} // getBounds() - Return the constant bounds of the value... const ConstantRange &getBounds() const { return Bounds; } Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.99 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.100 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.99 Sat Dec 23 00:05:41 2006 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Sat Dec 30 23:48:39 2006 @@ -173,7 +173,7 @@ Constant *NCE = ConstantExpr::getGetElementPtr(CE->getOperand(0), CEIdxs); GetElementPtrInst *NGEPI = -new GetElementPtrInst(NCE, Constant::getNullValue(Type::IntTy), +new GetElementPtrInst(NCE, Constant::getNullValue(Type::Int32Ty), NewAdd, GEPI->getName(), GEPI); GEPI->replaceAllUsesWith(NGEPI); GEPI->eraseFromParent(); @@ -499,7 +499,6 @@ // Now that we know the largest of of the induction variables in this loop, // insert a canonical induction variable of the largest size. - LargestType = LargestType->getUnsignedVersion(); Value *IndVar = Rewriter.getOrInsertCanonicalInductionVariable(L,LargestType); ++NumInserted; Changed = true; @@ -525,7 +524,7 @@ PHINode *PN = IndVars[i].first; InsertedSizes[PN->getType()->getPrimitiveSize()] = true; Instruction *New = CastInst::create(Instruction::Trunc, IndVar, -PN->getType()->getUnsignedVersion(), "indvar", InsertPt); +PN->getType(), "indvar", InsertPt); Rewriter.addInsertedValue(New, SE->getSCEV(New)); } } Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.576 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.577 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.576 Sat Dec 23 18:40:59 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sat Dec 30 23:48:39 2006 @@ -340,10 +340,8 @@ // though a va_arg area... static const Type *getPromotedType(const Type *Ty) { switch (Ty->getTypeID()) { - case Type::SByteTyID: - case Type::ShortTyID: return Type::IntTy; - case Type::UByteTyID: - case Type::UShortTyID: return Type::UIntTy; + case Type::Int8TyID: + case Type::Int16TyID: return Type::Int32Ty; case Type::FloatTyID: return Type::DoubleTy; default: return Ty; } @@ -540,14 +538,9 @@ /// GetConstantInType - Return a ConstantInt with the specified type and value. /// static ConstantIntegral *GetConstantInType(const Type *Ty, uint64_t Val) { - if (Ty->isUnsigned()) -return ConstantInt::get(Ty, Val); - else if (Ty->getTypeID() == Type::BoolTyID) + if (Ty->getTypeID() == Type::BoolTyID) return ConstantBool::get(Val); - int64_t SVal = Val; - SVal <<= 64-Ty->getPrimitiveSizeInBits(); - SVal >>= 64-Ty->getPrimitiveSizeInBits(); - return ConstantInt::get(Ty, SVal); + return ConstantInt::get(Ty, Val); } @@ -1575,7 +1568,7 @@ bool shouldApply(Value *LHS) const { return LHS == RHS; } Instruction *apply(BinaryOperator &Add) const { return new ShiftInst(Instruction::Shl, Add.getOpera
[llvm-commits] CVS: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp DeadArgumentElimination.cpp GlobalOpt.cpp IndMemRemoval.cpp LowerSetJmp.cpp RaiseAllocations.cpp SimplifyLibCalls.cpp
Changes in directory llvm/lib/Transforms/IPO: ArgumentPromotion.cpp updated: 1.32 -> 1.33 DeadArgumentElimination.cpp updated: 1.33 -> 1.34 GlobalOpt.cpp updated: 1.81 -> 1.82 IndMemRemoval.cpp updated: 1.9 -> 1.10 LowerSetJmp.cpp updated: 1.34 -> 1.35 RaiseAllocations.cpp updated: 1.34 -> 1.35 SimplifyLibCalls.cpp updated: 1.80 -> 1.81 --- Log message: For PR950: http://llvm.org/PR950 : This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. --- Diffs of the changes: (+133 -135) ArgumentPromotion.cpp |6 - DeadArgumentElimination.cpp |4 GlobalOpt.cpp | 17 +-- IndMemRemoval.cpp |4 LowerSetJmp.cpp | 24 ++--- RaiseAllocations.cpp| 22 ++--- SimplifyLibCalls.cpp| 191 +--- 7 files changed, 133 insertions(+), 135 deletions(-) Index: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp diff -u llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.32 llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.33 --- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.32 Tue Dec 19 16:09:18 2006 +++ llvm/lib/Transforms/IPO/ArgumentPromotion.cpp Sat Dec 30 23:48:39 2006 @@ -384,7 +384,7 @@ bool ExtraArgHack = false; if (Params.empty() && FTy->isVarArg()) { ExtraArgHack = true; -Params.push_back(Type::IntTy); +Params.push_back(Type::Int32Ty); } FunctionType *NFTy = FunctionType::get(RetTy, Params, FTy->isVarArg()); @@ -429,7 +429,7 @@ } if (ExtraArgHack) - Args.push_back(Constant::getNullValue(Type::IntTy)); + Args.push_back(Constant::getNullValue(Type::Int32Ty)); // Push any varargs arguments on the list for (; AI != CS.arg_end(); ++AI) @@ -540,7 +540,7 @@ // Notify the alias analysis implementation that we inserted a new argument. if (ExtraArgHack) -AA.copyValue(Constant::getNullValue(Type::IntTy), NF->arg_begin()); +AA.copyValue(Constant::getNullValue(Type::Int32Ty), NF->arg_begin()); // Tell the alias analysis that the old function is about to disappear. Index: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp diff -u llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.33 llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.34 --- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.33Tue Dec 19 16:09:18 2006 +++ llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp Sat Dec 30 23:48:39 2006 @@ -500,7 +500,7 @@ bool ExtraArgHack = false; if (Params.empty() && FTy->isVarArg()) { ExtraArgHack = true; -Params.push_back(Type::IntTy); +Params.push_back(Type::Int32Ty); } FunctionType *NFTy = FunctionType::get(RetTy, Params, FTy->isVarArg()); @@ -526,7 +526,7 @@ Args.push_back(*AI); if (ExtraArgHack) - Args.push_back(UndefValue::get(Type::IntTy)); + Args.push_back(UndefValue::get(Type::Int32Ty)); // Push any varargs arguments on the list for (; AI != CS.arg_end(); ++AI) Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.81 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.82 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.81 Sat Dec 23 00:05:41 2006 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Sat Dec 30 23:48:39 2006 @@ -384,7 +384,7 @@ NewGlobals.reserve(STy->getNumElements()); for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { Constant *In = getAggregateConstantElement(Init, -ConstantInt::get(Type::UIntTy, i)); +ConstantInt::get(Type::Int32Ty, i)); assert(In && "Couldn't get element of initializer?"); GlobalVariable *NGV = new GlobalVariable(STy->getElementType(i), false, GlobalVariable::InternalLinkage, @@ -406,7 +406,7 @@ NewGlobals.reserve(NumElements); for (unsigned i = 0, e = NumElements; i != e; ++i) { Constant *In = getAggregateConstantElement(Init, -ConstantInt::get(Type::UIntTy, i)); +ConstantInt::get(Type::Int32Ty, i)); assert(In && "Couldn't get element of initializer?"); GlobalVariable *NGV = new GlobalVariable(STy->getElementType(), false, @@ -422,7 +422,7 @@ DOUT << "PERFORMING GLOBAL SRA ON: " << *GV; - Constant *NullInt = Constant::getNullValue(Type::IntTy); + Constant *NullInt = Constant::getNullValue(Type::Int32Ty); // Loop over all of the uses of the global, replacing the constantexpr geps, // with smaller constantexpr geps or direct references. @@ -679,10 +679,10 @@ Type *NewTy =
[llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp EdgeProfiling.cpp EmitFunctions.cpp ProfilingUtils.cpp RSProfiling.cpp TraceBasicBlocks.cpp TraceValues.cpp
Changes in directory llvm/lib/Transforms/Instrumentation: BlockProfiling.cpp updated: 1.18 -> 1.19 EdgeProfiling.cpp updated: 1.9 -> 1.10 EmitFunctions.cpp updated: 1.26 -> 1.27 ProfilingUtils.cpp updated: 1.12 -> 1.13 RSProfiling.cpp updated: 1.13 -> 1.14 TraceBasicBlocks.cpp updated: 1.19 -> 1.20 TraceValues.cpp updated: 1.78 -> 1.79 --- Log message: For PR950: http://llvm.org/PR950 : This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. --- Diffs of the changes: (+37 -37) BlockProfiling.cpp |4 ++-- EdgeProfiling.cpp|2 +- EmitFunctions.cpp|8 ProfilingUtils.cpp | 26 +- RSProfiling.cpp | 16 TraceBasicBlocks.cpp |4 ++-- TraceValues.cpp | 14 +++--- 7 files changed, 37 insertions(+), 37 deletions(-) Index: llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.18 llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.19 --- llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.18 Wed Dec 6 19:30:31 2006 +++ llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp Sat Dec 30 23:48:39 2006 @@ -57,7 +57,7 @@ if (!I->isExternal()) ++NumFunctions; - const Type *ATy = ArrayType::get(Type::UIntTy, NumFunctions); + const Type *ATy = ArrayType::get(Type::Int32Ty, NumFunctions); GlobalVariable *Counters = new GlobalVariable(ATy, false, GlobalValue::InternalLinkage, Constant::getNullValue(ATy), "FuncProfCounters", &M); @@ -99,7 +99,7 @@ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) NumBlocks += I->size(); - const Type *ATy = ArrayType::get(Type::UIntTy, NumBlocks); + const Type *ATy = ArrayType::get(Type::Int32Ty, NumBlocks); GlobalVariable *Counters = new GlobalVariable(ATy, false, GlobalValue::InternalLinkage, Constant::getNullValue(ATy), "BlockProfCounters", &M); Index: llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.9 llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.10 --- llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.9 Wed Dec 6 19:30:31 2006 +++ llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp Sat Dec 30 23:48:39 2006 @@ -58,7 +58,7 @@ NumEdges += BB->getTerminator()->getNumSuccessors(); } - const Type *ATy = ArrayType::get(Type::UIntTy, NumEdges); + const Type *ATy = ArrayType::get(Type::Int32Ty, NumEdges); GlobalVariable *Counters = new GlobalVariable(ATy, false, GlobalValue::InternalLinkage, Constant::getNullValue(ATy), "EdgeProfCounters", &M); Index: llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp diff -u llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.26 llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.27 --- llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.26 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp Sat Dec 30 23:48:39 2006 @@ -87,7 +87,7 @@ //std::cerrbegin(); while (isa(InsertPos)) ++InsertPos; - std::vector GEPIndices(2, Constant::getNullValue(Type::IntTy)); + std::vector GEPIndices(2, Constant::getNullValue(Type::Int32Ty)); unsigned NumElements = 0; if (Array) { Args[2] = ConstantExpr::getGetElementPtr(Array, GEPIndices); @@ -51,7 +51,7 @@ // pass null. Args[2] = ConstantPointerNull::get(UIntPtr); } - Args[3] = ConstantInt::get(Type::UIntTy, NumElements); + Args[3] = ConstantInt::get(Type::Int32Ty, NumElements); Instruction *InitCall = new CallInst(InitFn, Args, "newargc", InsertPos); @@ -75,16 +75,16 @@ AI = MainFn->arg_begin(); // If the program looked at argc, have it look at the return value of the // init call instead. -if
[llvm-commits] CVS: llvm/lib/Transforms/Utils/CodeExtractor.cpp InlineFunction.cpp LowerAllocations.cpp LowerInvoke.cpp LowerSwitch.cpp
Changes in directory llvm/lib/Transforms/Utils: CodeExtractor.cpp updated: 1.43 -> 1.44 InlineFunction.cpp updated: 1.47 -> 1.48 LowerAllocations.cpp updated: 1.68 -> 1.69 LowerInvoke.cpp updated: 1.48 -> 1.49 LowerSwitch.cpp updated: 1.31 -> 1.32 --- Log message: For PR950: http://llvm.org/PR950 : This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. --- Diffs of the changes: (+36 -38) CodeExtractor.cpp| 24 InlineFunction.cpp |2 +- LowerAllocations.cpp |6 +++--- LowerInvoke.cpp | 38 +++--- LowerSwitch.cpp |4 +--- 5 files changed, 36 insertions(+), 38 deletions(-) Index: llvm/lib/Transforms/Utils/CodeExtractor.cpp diff -u llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.43 llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.44 --- llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.43Wed Dec 6 19:30:31 2006 +++ llvm/lib/Transforms/Utils/CodeExtractor.cpp Sat Dec 30 23:48:39 2006 @@ -252,7 +252,7 @@ case 0: case 1: RetTy = Type::VoidTy; break; case 2: RetTy = Type::BoolTy; break; - default: RetTy = Type::UShortTy; break; + default: RetTy = Type::Int16Ty; break; } std::vector paramTy; @@ -304,8 +304,8 @@ Value *RewriteVal; if (AggregateArgs) { std::vector Indices; - Indices.push_back(Constant::getNullValue(Type::UIntTy)); - Indices.push_back(ConstantInt::get(Type::UIntTy, i)); + Indices.push_back(Constant::getNullValue(Type::Int32Ty)); + Indices.push_back(ConstantInt::get(Type::Int32Ty, i)); std::string GEPname = "gep_" + inputs[i]->getName(); TerminatorInst *TI = newFunction->begin()->getTerminator(); GetElementPtrInst *GEP = new GetElementPtrInst(AI, Indices, GEPname, TI); @@ -391,8 +391,8 @@ for (unsigned i = 0, e = inputs.size(); i != e; ++i) { std::vector Indices; - Indices.push_back(Constant::getNullValue(Type::UIntTy)); - Indices.push_back(ConstantInt::get(Type::UIntTy, i)); + Indices.push_back(Constant::getNullValue(Type::Int32Ty)); + Indices.push_back(ConstantInt::get(Type::Int32Ty, i)); GetElementPtrInst *GEP = new GetElementPtrInst(Struct, Indices, "gep_" + StructValues[i]->getName()); @@ -417,8 +417,8 @@ Value *Output = 0; if (AggregateArgs) { std::vector Indices; - Indices.push_back(Constant::getNullValue(Type::UIntTy)); - Indices.push_back(ConstantInt::get(Type::UIntTy, FirstOut + i)); + Indices.push_back(Constant::getNullValue(Type::Int32Ty)); + Indices.push_back(ConstantInt::get(Type::Int32Ty, FirstOut + i)); GetElementPtrInst *GEP = new GetElementPtrInst(Struct, Indices, "gep_reload_" + outputs[i]->getName()); @@ -439,7 +439,7 @@ // Now we can emit a switch statement using the call as a value. SwitchInst *TheSwitch = -new SwitchInst(ConstantInt::getNullValue(Type::UShortTy), +new SwitchInst(ConstantInt::getNullValue(Type::Int16Ty), codeReplacer, 0, codeReplacer); // Since there may be multiple exits from the original region, make the new @@ -473,14 +473,14 @@ brVal = ConstantBool::get(!SuccNum); break; default: -brVal = ConstantInt::get(Type::UShortTy, SuccNum); +brVal = ConstantInt::get(Type::Int16Ty, SuccNum); break; } ReturnInst *NTRet = new ReturnInst(brVal, NewTarget); // Update the switch instruction. - TheSwitch->addCase(ConstantInt::get(Type::UShortTy, SuccNum), + TheSwitch->addCase(ConstantInt::get(Type::Int16Ty, SuccNum), OldTarget); // Restore values just before we exit @@ -518,8 +518,8 @@ if (DominatesDef) { if (AggregateArgs) { std::vector Indices; -Indices.push_back(Constant::getNullValue(Type::UIntTy)); -Indices.push_back(ConstantInt::get(Type::UIntTy,FirstOut+out)); +Indices.push_back(Constant::getNullValue(Type::Int32Ty)); + Indices.push_back(ConstantInt::get(Type::Int32Ty,FirstOut+out)); GetElementPtrInst *GEP = new GetElementPtrInst(OAI, Indices, "gep_" + outputs[out]->getName(), Index: llvm/lib/Transforms/Utils/InlineFunction.cpp diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.47 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.48 --- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.47 Wed Sep 13 14:23:57 2006 +++ llvm/lib/Transforms/Utils/Inl
[llvm-commits] CVS: llvm/examples/ModuleMaker/ModuleMaker.cpp
Changes in directory llvm/examples/ModuleMaker: ModuleMaker.cpp updated: 1.11 -> 1.12 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless. --- Diffs of the changes: (+3 -3) ModuleMaker.cpp |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/examples/ModuleMaker/ModuleMaker.cpp diff -u llvm/examples/ModuleMaker/ModuleMaker.cpp:1.11 llvm/examples/ModuleMaker/ModuleMaker.cpp:1.12 --- llvm/examples/ModuleMaker/ModuleMaker.cpp:1.11 Wed Dec 6 19:30:30 2006 +++ llvm/examples/ModuleMaker/ModuleMaker.cpp Sat Dec 30 23:50:28 2006 @@ -27,7 +27,7 @@ Module *M = new Module("test"); // Create the main function: first create the type 'int ()' - FunctionType *FT = FunctionType::get(Type::IntTy, std::vector(), + FunctionType *FT = FunctionType::get(Type::Int32Ty, std::vector(), /*not vararg*/false); // By passing a module as the last parameter to the Function constructor, @@ -39,8 +39,8 @@ BasicBlock *BB = new BasicBlock("EntryBlock", F); // Get pointers to the constant integers... - Value *Two = ConstantInt::get(Type::IntTy, 2); - Value *Three = ConstantInt::get(Type::IntTy, 3); + Value *Two = ConstantInt::get(Type::Int32Ty, 2); + Value *Three = ConstantInt::get(Type::Int32Ty, 3); // Create the add instruction... does not insert... Instruction *Add = BinaryOperator::create(Instruction::Add, Two, Three, ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/utils/TableGen/CodeGenIntrinsics.h
Changes in directory llvm/utils/TableGen: CodeGenIntrinsics.h updated: 1.10 -> 1.11 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless. --- Diffs of the changes: (+1 -1) CodeGenIntrinsics.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/TableGen/CodeGenIntrinsics.h diff -u llvm/utils/TableGen/CodeGenIntrinsics.h:1.10 llvm/utils/TableGen/CodeGenIntrinsics.h:1.11 --- llvm/utils/TableGen/CodeGenIntrinsics.h:1.10Mon Mar 27 18:15:00 2006 +++ llvm/utils/TableGen/CodeGenIntrinsics.h Sat Dec 30 23:50:28 2006 @@ -31,7 +31,7 @@ std::string TargetPrefix; // Target prefix, e.g. "ppc" for t-s intrinsics. /// ArgTypes - The type primitive enum value for the return value and all -/// of the arguments. These are things like Type::UIntTyID. +/// of the arguments. These are things like Type::Int32TyID. std::vector ArgTypes; /// ArgVTs - The MVT::ValueType for each argument type. Note that this list ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/examples/ParallelJIT/ParallelJIT.cpp
Changes in directory llvm/examples/ParallelJIT: ParallelJIT.cpp updated: 1.7 -> 1.8 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless. --- Diffs of the changes: (+7 -7) ParallelJIT.cpp | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) Index: llvm/examples/ParallelJIT/ParallelJIT.cpp diff -u llvm/examples/ParallelJIT/ParallelJIT.cpp:1.7 llvm/examples/ParallelJIT/ParallelJIT.cpp:1.8 --- llvm/examples/ParallelJIT/ParallelJIT.cpp:1.7 Sat Dec 23 00:05:40 2006 +++ llvm/examples/ParallelJIT/ParallelJIT.cpp Sat Dec 30 23:50:28 2006 @@ -34,7 +34,7 @@ // Create the add1 function entry and insert this entry into module M. The // function will have a return type of "int" and take an argument of "int". // The '0' terminates the list of argument types. - Function *Add1F = M->getOrInsertFunction("add1", Type::IntTy, Type::IntTy, + Function *Add1F = M->getOrInsertFunction("add1", Type::Int32Ty, Type::Int32Ty, (Type *)0); // Add a basic block to the function. As before, it automatically inserts @@ -42,7 +42,7 @@ BasicBlock *BB = new BasicBlock("EntryBlock", Add1F); // Get pointers to the constant `1'. - Value *One = ConstantInt::get(Type::IntTy, 1); + Value *One = ConstantInt::get(Type::Int32Ty, 1); // Get pointers to the integer argument of the add1 function... assert(Add1F->arg_begin() != Add1F->arg_end()); // Make sure there's an arg @@ -63,15 +63,15 @@ { // Create the fib function and insert it into module M. This function is said // to return an int and take an int parameter. - Function *FibF = M->getOrInsertFunction("fib", Type::IntTy, Type::IntTy, + Function *FibF = M->getOrInsertFunction("fib", Type::Int32Ty, Type::Int32Ty, (Type *)0); // Add a basic block to the function. BasicBlock *BB = new BasicBlock("EntryBlock", FibF); // Get pointers to the constants. - Value *One = ConstantInt::get(Type::IntTy, 1); - Value *Two = ConstantInt::get(Type::IntTy, 2); + Value *One = ConstantInt::get(Type::Int32Ty, 1); + Value *Two = ConstantInt::get(Type::Int32Ty, 2); // Get pointer to the integer argument of the add1 function... Argument *ArgX = FibF->arg_begin(); // Get the arg. @@ -221,12 +221,12 @@ // Call the `foo' function with no arguments: std::vector Args(1); - Args[0].IntVal = p->value; + Args[0].Int32Val = p->value; synchronize.block(); // wait until other threads are at this point GenericValue gv = p->EE->runFunction(p->F, Args); - return (void*) intptr_t(gv.IntVal); + return (void*) intptr_t(gv.Int32Val); } int main() ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/examples/HowToUseJIT/HowToUseJIT.cpp
Changes in directory llvm/examples/HowToUseJIT: HowToUseJIT.cpp updated: 1.12 -> 1.13 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless. --- Diffs of the changes: (+5 -5) HowToUseJIT.cpp | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/examples/HowToUseJIT/HowToUseJIT.cpp diff -u llvm/examples/HowToUseJIT/HowToUseJIT.cpp:1.12 llvm/examples/HowToUseJIT/HowToUseJIT.cpp:1.13 --- llvm/examples/HowToUseJIT/HowToUseJIT.cpp:1.12 Fri Oct 20 02:07:23 2006 +++ llvm/examples/HowToUseJIT/HowToUseJIT.cpp Sat Dec 30 23:50:28 2006 @@ -52,7 +52,7 @@ // Create the add1 function entry and insert this entry into module M. The // function will have a return type of "int" and take an argument of "int". // The '0' terminates the list of argument types. - Function *Add1F = M->getOrInsertFunction("add1", Type::IntTy, Type::IntTy, + Function *Add1F = M->getOrInsertFunction("add1", Type::Int32Ty, Type::Int32Ty, (Type *)0); // Add a basic block to the function. As before, it automatically inserts @@ -60,7 +60,7 @@ BasicBlock *BB = new BasicBlock("EntryBlock", Add1F); // Get pointers to the constant `1'. - Value *One = ConstantInt::get(Type::IntTy, 1); + Value *One = ConstantInt::get(Type::Int32Ty, 1); // Get pointers to the integer argument of the add1 function... assert(Add1F->arg_begin() != Add1F->arg_end()); // Make sure there's an arg @@ -78,13 +78,13 @@ // Now we going to create function `foo', which returns an int and takes no // arguments. - Function *FooF = M->getOrInsertFunction("foo", Type::IntTy, (Type *)0); + Function *FooF = M->getOrInsertFunction("foo", Type::Int32Ty, (Type *)0); // Add a basic block to the FooF function. BB = new BasicBlock("EntryBlock", FooF); // Get pointers to the constant `10'. - Value *Ten = ConstantInt::get(Type::IntTy, 10); + Value *Ten = ConstantInt::get(Type::Int32Ty, 10); // Pass Ten to the call call: std::vector Params; @@ -107,6 +107,6 @@ GenericValue gv = EE->runFunction(FooF, noargs); // Import result of execution: - std::cout << "Result: " << gv.IntVal << "\n"; + std::cout << "Result: " << gv.Int32Val << "\n"; return 0; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp
Changes in directory llvm/projects/Stacker/lib/compiler: StackerCompiler.cpp updated: 1.28 -> 1.29 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless. --- Diffs of the changes: (+44 -44) StackerCompiler.cpp | 88 ++-- 1 files changed, 44 insertions(+), 44 deletions(-) Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.28 llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.29 --- llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.28 Sat Dec 23 00:05:41 2006 +++ llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Sat Dec 30 23:50:28 2006 @@ -122,7 +122,7 @@ // Create a type to represent the stack. This is the same as the LLVM // Assembly type [ 256 x long ] -stack_type = ArrayType::get( Type::LongTy, stack_size ); +stack_type = ArrayType::get( Type::Int64Ty, stack_size ); // Create a global variable for the stack. Note the use of appending // linkage linkage so that multiple modules will make the stack larger. @@ -141,10 +141,10 @@ // of LinkOnce linkage. Only one copy of _index_ will be retained // after linking TheIndex = new GlobalVariable( -/*type=*/Type::LongTy, +/*type=*/Type::Int64Ty, /*isConstant=*/false, /*Linkage=*/GlobalValue::LinkOnceLinkage, -/*initializer=*/ Constant::getNullValue(Type::LongTy), +/*initializer=*/ Constant::getNullValue(Type::Int64Ty), /*name=*/"_index_", /*parent=*/TheModule ); @@ -155,9 +155,9 @@ DefinitionType = FunctionType::get( Type::VoidTy, params, false ); // Create a function for printf(3) -params.push_back( PointerType::get( Type::SByteTy ) ); +params.push_back( PointerType::get( Type::Int8Ty ) ); FunctionType* printf_type = -FunctionType::get( Type::IntTy, params, true ); +FunctionType::get( Type::Int32Ty, params, true ); ThePrintf = new Function( printf_type, GlobalValue::ExternalLinkage, "printf", TheModule); @@ -167,7 +167,7 @@ // Create a function for exit(3) params.clear(); -params.push_back( Type::IntTy ); +params.push_back( Type::Int32Ty ); FunctionType* exit_type = FunctionType::get( Type::VoidTy, params, false ); TheExit = new Function( @@ -175,7 +175,7 @@ Constant* str_format = ConstantArray::get("%s"); StrFormat = new GlobalVariable( -/*type=*/ArrayType::get( Type::SByteTy, 3 ), +/*type=*/ArrayType::get( Type::Int8Ty, 3 ), /*isConstant=*/true, /*Linkage=*/GlobalValue::LinkOnceLinkage, /*initializer=*/str_format, @@ -185,7 +185,7 @@ Constant* in_str_format = ConstantArray::get(" %as"); InStrFormat = new GlobalVariable( -/*type=*/ArrayType::get( Type::SByteTy, 5 ), +/*type=*/ArrayType::get( Type::Int8Ty, 5 ), /*isConstant=*/true, /*Linkage=*/GlobalValue::LinkOnceLinkage, /*initializer=*/in_str_format, @@ -195,7 +195,7 @@ Constant* num_format = ConstantArray::get("%d"); NumFormat = new GlobalVariable( -/*type=*/ArrayType::get( Type::SByteTy, 3 ), +/*type=*/ArrayType::get( Type::Int8Ty, 3 ), /*isConstant=*/true, /*Linkage=*/GlobalValue::LinkOnceLinkage, /*initializer=*/num_format, @@ -205,7 +205,7 @@ Constant* in_num_format = ConstantArray::get(" %d"); InNumFormat = new GlobalVariable( -/*type=*/ArrayType::get( Type::SByteTy, 4 ), +/*type=*/ArrayType::get( Type::Int8Ty, 4 ), /*isConstant=*/true, /*Linkage=*/GlobalValue::LinkOnceLinkage, /*initializer=*/in_num_format, @@ -215,7 +215,7 @@ Constant* chr_format = ConstantArray::get("%c"); ChrFormat = new GlobalVariable( -/*type=*/ArrayType::get( Type::SByteTy, 3 ), +/*type=*/ArrayType::get( Type::Int8Ty, 3 ), /*isConstant=*/true, /*Linkage=*/GlobalValue::LinkOnceLinkage, /*initializer=*/chr_format, @@ -225,7 +225,7 @@ Constant* in_chr_format = ConstantArray::get(" %c"); InChrFormat = new GlobalVariable( -/*type=*/ArrayType::get( Type::SByteTy, 4 ), +/*type=*/ArrayType::get( Type::Int8Ty, 4 ), /*isConstant=*/true, /*Linkage=*/GlobalValue::LinkOnceLinkage, /*initializer=*/in_chr_format, @@ -234,12 +234,12 @@ ); // Get some constants so we aren't always creating them -Zero = ConstantInt::get( Type::LongTy, 0 ); -One = ConstantInt::get( Type
[llvm-commits] CVS: llvm/examples/Fibonacci/fibonacci.cpp
Changes in directory llvm/examples/Fibonacci: fibonacci.cpp updated: 1.13 -> 1.14 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless. --- Diffs of the changes: (+5 -5) fibonacci.cpp | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/examples/Fibonacci/fibonacci.cpp diff -u llvm/examples/Fibonacci/fibonacci.cpp:1.13 llvm/examples/Fibonacci/fibonacci.cpp:1.14 --- llvm/examples/Fibonacci/fibonacci.cpp:1.13 Sat Dec 23 00:05:40 2006 +++ llvm/examples/Fibonacci/fibonacci.cpp Sat Dec 30 23:50:27 2006 @@ -38,15 +38,15 @@ static Function *CreateFibFunction(Module *M) { // Create the fib function and insert it into module M. This function is said // to return an int and take an int parameter. - Function *FibF = M->getOrInsertFunction("fib", Type::IntTy, Type::IntTy, + Function *FibF = M->getOrInsertFunction("fib", Type::Int32Ty, Type::Int32Ty, (Type *)0); // Add a basic block to the function. BasicBlock *BB = new BasicBlock("EntryBlock", FibF); // Get pointers to the constants. - Value *One = ConstantInt::get(Type::IntTy, 1); - Value *Two = ConstantInt::get(Type::IntTy, 2); + Value *One = ConstantInt::get(Type::Int32Ty, 1); + Value *Two = ConstantInt::get(Type::Int32Ty, 2); // Get pointer to the integer argument of the add1 function... Argument *ArgX = FibF->arg_begin(); // Get the arg. @@ -111,10 +111,10 @@ // Call the Fibonacci function with argument n: std::vector Args(1); - Args[0].IntVal = n; + Args[0].Int32Val = n; GenericValue GV = EE->runFunction(FibF, Args); // import result of execution - std::cout << "Result: " << GV.IntVal << "\n"; + std::cout << "Result: " << GV.Int32Val << "\n"; return 0; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp
Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.84 -> 1.85 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless ones. --- Diffs of the changes: (+24 -32) JIT.cpp | 56 1 files changed, 24 insertions(+), 32 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.84 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.85 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.84 Sun Dec 17 15:04:02 2006 +++ llvm/lib/ExecutionEngine/JIT/JIT.cppSat Dec 30 23:51:36 2006 @@ -95,11 +95,11 @@ // Handle some common cases first. These cases correspond to common `main' // prototypes. - if (RetTy == Type::IntTy || RetTy == Type::UIntTy || RetTy == Type::VoidTy) { + if (RetTy == Type::Int32Ty || RetTy == Type::Int32Ty || RetTy == Type::VoidTy) { switch (ArgValues.size()) { case 3: - if ((FTy->getParamType(0) == Type::IntTy || - FTy->getParamType(0) == Type::UIntTy) && + if ((FTy->getParamType(0) == Type::Int32Ty || + FTy->getParamType(0) == Type::Int32Ty) && isa(FTy->getParamType(1)) && isa(FTy->getParamType(2))) { int (*PF)(int, char **, const char **) = @@ -107,30 +107,30 @@ // Call the function. GenericValue rv; -rv.IntVal = PF(ArgValues[0].IntVal, (char **)GVTOP(ArgValues[1]), +rv.Int32Val = PF(ArgValues[0].Int32Val, (char **)GVTOP(ArgValues[1]), (const char **)GVTOP(ArgValues[2])); return rv; } break; case 2: - if ((FTy->getParamType(0) == Type::IntTy || - FTy->getParamType(0) == Type::UIntTy) && + if ((FTy->getParamType(0) == Type::Int32Ty || + FTy->getParamType(0) == Type::Int32Ty) && isa(FTy->getParamType(1))) { int (*PF)(int, char **) = (int(*)(int, char **))(intptr_t)FPtr; // Call the function. GenericValue rv; -rv.IntVal = PF(ArgValues[0].IntVal, (char **)GVTOP(ArgValues[1])); +rv.Int32Val = PF(ArgValues[0].Int32Val, (char **)GVTOP(ArgValues[1])); return rv; } break; case 1: if (FTy->getNumParams() == 1 && - (FTy->getParamType(0) == Type::IntTy || - FTy->getParamType(0) == Type::UIntTy)) { + (FTy->getParamType(0) == Type::Int32Ty || + FTy->getParamType(0) == Type::Int32Ty)) { GenericValue rv; int (*PF)(int) = (int(*)(int))(intptr_t)FPtr; -rv.IntVal = PF(ArgValues[0].IntVal); +rv.Int32Val = PF(ArgValues[0].Int32Val); return rv; } break; @@ -145,22 +145,18 @@ case Type::BoolTyID: rv.BoolVal = ((bool(*)())(intptr_t)FPtr)(); return rv; -case Type::SByteTyID: -case Type::UByteTyID: - rv.SByteVal = ((char(*)())(intptr_t)FPtr)(); +case Type::Int8TyID: + rv.Int8Val = ((char(*)())(intptr_t)FPtr)(); return rv; -case Type::ShortTyID: -case Type::UShortTyID: - rv.ShortVal = ((short(*)())(intptr_t)FPtr)(); +case Type::Int16TyID: + rv.Int16Val = ((short(*)())(intptr_t)FPtr)(); return rv; case Type::VoidTyID: -case Type::IntTyID: -case Type::UIntTyID: - rv.IntVal = ((int(*)())(intptr_t)FPtr)(); +case Type::Int32TyID: + rv.Int32Val = ((int(*)())(intptr_t)FPtr)(); return rv; -case Type::LongTyID: -case Type::ULongTyID: - rv.LongVal = ((int64_t(*)())(intptr_t)FPtr)(); +case Type::Int64TyID: + rv.Int64Val = ((int64_t(*)())(intptr_t)FPtr)(); return rv; case Type::FloatTyID: rv.FloatVal = ((float(*)())(intptr_t)FPtr)(); @@ -196,22 +192,18 @@ switch (ArgTy->getTypeID()) { default: assert(0 && "Unknown argument type for function call!"); case Type::BoolTyID: C = ConstantBool::get(AV.BoolVal); break; -case Type::SByteTyID: C = ConstantInt::get(ArgTy, AV.SByteVal); break; -case Type::UByteTyID: C = ConstantInt::get(ArgTy, AV.UByteVal); break; -case Type::ShortTyID: C = ConstantInt::get(ArgTy, AV.ShortVal); break; -case Type::UShortTyID: C = ConstantInt::get(ArgTy, AV.UShortVal); break; -case Type::IntTyID:C = ConstantInt::get(ArgTy, AV.IntVal);break; -case Type::UIntTyID: C = ConstantInt::get(ArgTy, AV.UIntVal); break; -case Type::LongTyID: C = ConstantInt::get(ArgTy, AV.LongVal); break; -case Type::ULongTyID: C = ConstantInt::get(ArgTy, AV.ULongVal); break; +case Type::Int8TyID: C = ConstantInt::get(ArgTy, AV.Int8Val); break; +case Type::Int16TyID: C = ConstantInt::get(ArgTy, AV.Int16Val); break; +case Type::Int32TyID: C = ConstantInt::get(ArgTy, AV.Int32Val);break; +case Type::Int64TyID: C = ConstantInt::get(ArgTy, AV.Int64Val); break; case Type::FloatTyID: C = ConstantFP ::get(ArgTy, AV.FloatVal); break; case Type::DoubleTyID: C
[llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp ExternalFunctions.cpp
Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.154 -> 1.155 ExternalFunctions.cpp updated: 1.92 -> 1.93 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless ones. --- Diffs of the changes: (+253 -369) Execution.cpp | 526 +++--- ExternalFunctions.cpp | 96 - 2 files changed, 253 insertions(+), 369 deletions(-) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.154 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.155 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.154Sat Dec 23 00:05:41 2006 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Sat Dec 30 23:51:36 2006 @@ -194,14 +194,10 @@ const Type *Ty) { GenericValue Dest; switch (Ty->getTypeID()) { -IMPLEMENT_BINARY_OPERATOR(+, UByte); -IMPLEMENT_BINARY_OPERATOR(+, SByte); -IMPLEMENT_BINARY_OPERATOR(+, UShort); -IMPLEMENT_BINARY_OPERATOR(+, Short); -IMPLEMENT_BINARY_OPERATOR(+, UInt); -IMPLEMENT_BINARY_OPERATOR(+, Int); -IMPLEMENT_BINARY_OPERATOR(+, ULong); -IMPLEMENT_BINARY_OPERATOR(+, Long); +IMPLEMENT_BINARY_OPERATOR(+, Int8); +IMPLEMENT_BINARY_OPERATOR(+, Int16); +IMPLEMENT_BINARY_OPERATOR(+, Int32); +IMPLEMENT_BINARY_OPERATOR(+, Int64); IMPLEMENT_BINARY_OPERATOR(+, Float); IMPLEMENT_BINARY_OPERATOR(+, Double); default: @@ -215,14 +211,10 @@ const Type *Ty) { GenericValue Dest; switch (Ty->getTypeID()) { -IMPLEMENT_BINARY_OPERATOR(-, UByte); -IMPLEMENT_BINARY_OPERATOR(-, SByte); -IMPLEMENT_BINARY_OPERATOR(-, UShort); -IMPLEMENT_BINARY_OPERATOR(-, Short); -IMPLEMENT_BINARY_OPERATOR(-, UInt); -IMPLEMENT_BINARY_OPERATOR(-, Int); -IMPLEMENT_BINARY_OPERATOR(-, ULong); -IMPLEMENT_BINARY_OPERATOR(-, Long); +IMPLEMENT_BINARY_OPERATOR(-, Int8); +IMPLEMENT_BINARY_OPERATOR(-, Int16); +IMPLEMENT_BINARY_OPERATOR(-, Int32); +IMPLEMENT_BINARY_OPERATOR(-, Int64); IMPLEMENT_BINARY_OPERATOR(-, Float); IMPLEMENT_BINARY_OPERATOR(-, Double); default: @@ -236,14 +228,10 @@ const Type *Ty) { GenericValue Dest; switch (Ty->getTypeID()) { -IMPLEMENT_BINARY_OPERATOR(*, UByte); -IMPLEMENT_BINARY_OPERATOR(*, SByte); -IMPLEMENT_BINARY_OPERATOR(*, UShort); -IMPLEMENT_BINARY_OPERATOR(*, Short); -IMPLEMENT_BINARY_OPERATOR(*, UInt); -IMPLEMENT_BINARY_OPERATOR(*, Int); -IMPLEMENT_BINARY_OPERATOR(*, ULong); -IMPLEMENT_BINARY_OPERATOR(*, Long); +IMPLEMENT_BINARY_OPERATOR(*, Int8); +IMPLEMENT_BINARY_OPERATOR(*, Int16); +IMPLEMENT_BINARY_OPERATOR(*, Int32); +IMPLEMENT_BINARY_OPERATOR(*, Int64); IMPLEMENT_BINARY_OPERATOR(*, Float); IMPLEMENT_BINARY_OPERATOR(*, Double); default: @@ -253,17 +241,18 @@ return Dest; } -#define IMPLEMENT_SIGNLESS_BINOP(OP, TY1, TY2) \ - case Type::TY2##TyID: IMPLEMENT_BINARY_OPERATOR(OP, TY1) +#define IMPLEMENT_SIGNLESS_BINOP(OP, TY, CAST) \ + case Type::TY##TyID: Dest.TY##Val = \ +((CAST)Src1.TY##Val) OP ((CAST)Src2.TY##Val); break static GenericValue executeUDivInst(GenericValue Src1, GenericValue Src2, const Type *Ty) { GenericValue Dest; switch (Ty->getTypeID()) { -IMPLEMENT_SIGNLESS_BINOP(/, UByte, SByte); -IMPLEMENT_SIGNLESS_BINOP(/, UShort, Short); -IMPLEMENT_SIGNLESS_BINOP(/, UInt, Int); -IMPLEMENT_SIGNLESS_BINOP(/, ULong, Long); +IMPLEMENT_SIGNLESS_BINOP(/, Int8, uint8_t); +IMPLEMENT_SIGNLESS_BINOP(/, Int16, uint16_t); +IMPLEMENT_SIGNLESS_BINOP(/, Int32, uint32_t); +IMPLEMENT_SIGNLESS_BINOP(/, Int64, uint64_t); default: cerr << "Unhandled type for UDiv instruction: " << *Ty << "\n"; abort(); @@ -275,10 +264,10 @@ const Type *Ty) { GenericValue Dest; switch (Ty->getTypeID()) { -IMPLEMENT_SIGNLESS_BINOP(/, SByte, UByte); -IMPLEMENT_SIGNLESS_BINOP(/, Short, UShort); -IMPLEMENT_SIGNLESS_BINOP(/, Int, UInt); -IMPLEMENT_SIGNLESS_BINOP(/, Long, ULong); +IMPLEMENT_SIGNLESS_BINOP(/, Int8, int8_t); +IMPLEMENT_SIGNLESS_BINOP(/, Int16, int16_t); +IMPLEMENT_SIGNLESS_BINOP(/, Int32, int32_t); +IMPLEMENT_SIGNLESS_BINOP(/, Int64, int64_t); default: cerr << "Unhandled type for SDiv instruction: " << *Ty << "\n"; abort(); @@ -303,10 +292,10 @@ const Type *Ty) { GenericValue Dest; switch (Ty->getTypeID()) { -IMPLEMENT_SIGNLESS_BINOP(%, UByte, SByte); -IMPLEMENT_SIGNLESS_BINOP(%, UShort, Short); -IMPLEMENT_SIGNLESS_BINOP(%, UInt, Int); -IMPLEMENT_SIGNLESS_BINOP(%, ULong, Long); +IMPLEMENT_SIGNLESS_BINOP(%, Int8, uint8_t); +IMPLEMENT_SIGNLESS_BINOP(%, Int16, uint16_
[llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
Changes in directory llvm/lib/ExecutionEngine: ExecutionEngine.cpp updated: 1.93 -> 1.94 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless ones. --- Diffs of the changes: (+69 -97) ExecutionEngine.cpp | 166 +--- 1 files changed, 69 insertions(+), 97 deletions(-) Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.93 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.94 --- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.93 Tue Dec 19 16:43:32 2006 +++ llvm/lib/ExecutionEngine/ExecutionEngine.cppSat Dec 30 23:51:35 2006 @@ -157,7 +157,7 @@ char *Result = new char[(InputArgv.size()+1)*PtrSize]; DOUT << "ARGV = " << (void*)Result << "\n"; - const Type *SBytePtr = PointerType::get(Type::SByteTy); + const Type *SBytePtr = PointerType::get(Type::Int8Ty); for (unsigned i = 0; i != InputArgv.size(); ++i) { unsigned Size = InputArgv[i].size()+1; @@ -228,7 +228,7 @@ const char * const * envp) { std::vector GVArgs; GenericValue GVArgc; - GVArgc.IntVal = argv.size(); + GVArgc.Int32Val = argv.size(); unsigned NumArgs = Fn->getFunctionType()->getNumParams(); if (NumArgs) { GVArgs.push_back(GVArgc); // Arg #0 = argc. @@ -244,7 +244,7 @@ } } } - return runFunction(Fn, GVArgs).IntVal; + return runFunction(Fn, GVArgs).Int32Val; } /// If possible, create a JIT, unless the caller specifically requests an @@ -317,9 +317,9 @@ TD->getIndexedOffset(CE->getOperand(0)->getType(), Indexes); if (getTargetData()->getPointerSize() == 4) -Result.IntVal += Offset; +Result.Int32Val += Offset; else -Result.LongVal += Offset; +Result.Int64Val += Offset; return Result; } case Instruction::Trunc: @@ -352,14 +352,10 @@ GenericValue GV = getConstantValue(Op); switch (Op->getType()->getTypeID()) { case Type::BoolTyID:return PTOGV((void*)(uintptr_t)GV.BoolVal); -case Type::SByteTyID: return PTOGV((void*)( intptr_t)GV.SByteVal); -case Type::UByteTyID: return PTOGV((void*)(uintptr_t)GV.UByteVal); -case Type::ShortTyID: return PTOGV((void*)( intptr_t)GV.ShortVal); -case Type::UShortTyID: return PTOGV((void*)(uintptr_t)GV.UShortVal); -case Type::IntTyID: return PTOGV((void*)( intptr_t)GV.IntVal); -case Type::UIntTyID:return PTOGV((void*)(uintptr_t)GV.UIntVal); -case Type::LongTyID:return PTOGV((void*)( intptr_t)GV.LongVal); -case Type::ULongTyID: return PTOGV((void*)(uintptr_t)GV.ULongVal); +case Type::Int8TyID: return PTOGV((void*)(uintptr_t)GV.Int8Val); +case Type::Int16TyID: return PTOGV((void*)(uintptr_t)GV.Int16Val); +case Type::Int32TyID:return PTOGV((void*)(uintptr_t)GV.Int32Val); +case Type::Int64TyID: return PTOGV((void*)(uintptr_t)GV.Int64Val); default: assert(0 && "Unknown integral type!"); } break; @@ -367,25 +363,21 @@ case Instruction::Add: switch (CE->getOperand(0)->getType()->getTypeID()) { default: assert(0 && "Bad add type!"); abort(); - case Type::LongTyID: - case Type::ULongTyID: -Result.LongVal = getConstantValue(CE->getOperand(0)).LongVal + - getConstantValue(CE->getOperand(1)).LongVal; + case Type::Int64TyID: +Result.Int64Val = getConstantValue(CE->getOperand(0)).Int64Val + + getConstantValue(CE->getOperand(1)).Int64Val; break; - case Type::IntTyID: - case Type::UIntTyID: -Result.IntVal = getConstantValue(CE->getOperand(0)).IntVal + -getConstantValue(CE->getOperand(1)).IntVal; + case Type::Int32TyID: +Result.Int32Val = getConstantValue(CE->getOperand(0)).Int32Val + +getConstantValue(CE->getOperand(1)).Int32Val; break; - case Type::ShortTyID: - case Type::UShortTyID: -Result.ShortVal = getConstantValue(CE->getOperand(0)).ShortVal + - getConstantValue(CE->getOperand(1)).ShortVal; + case Type::Int16TyID: +Result.Int16Val = getConstantValue(CE->getOperand(0)).Int16Val + + getConstantValue(CE->getOperand(1)).Int16Val; break; - case Type::SByteTyID: - case Type::UByteTyID: -Result.SByteVal = getConstantValue(CE->getOperand(0)).SByteVal + - getConstantValue(CE->getOperand(1)).SByteVal; + case Type::Int8TyID: +Result.Int8Val = getConstantValue(CE->getOperand(0)).Int8Val + + getConstantValue(CE->getOperand(1)).Int8Val; break; case Type::FloatTyID: Result.FloatVal = getConstantValue(CE->getOperand(0)).FloatVal + @@ -407,17 +399,13 @@ switch (C->g
[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp IntrinsicLowering.cpp MachOWriter.cpp MachineDebugInfo.cpp
Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.128 -> 1.129 IntrinsicLowering.cpp updated: 1.54 -> 1.55 MachOWriter.cpp updated: 1.9 -> 1.10 MachineDebugInfo.cpp updated: 1.64 -> 1.65 --- Log message: For PR950: http://llvm.org/PR950 : Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. --- Diffs of the changes: (+50 -54) AsmPrinter.cpp| 10 IntrinsicLowering.cpp | 60 +- MachOWriter.cpp | 12 +++--- MachineDebugInfo.cpp | 22 +- 4 files changed, 50 insertions(+), 54 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.128 llvm/lib/CodeGen/AsmPrinter.cpp:1.129 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.128 Thu Dec 21 13:04:23 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Sat Dec 30 23:55:36 2006 @@ -607,7 +607,7 @@ << "\t" << TAI->getCommentString() << " float " << Val << "\n"; return; } - } else if (CV->getType() == Type::ULongTy || CV->getType() == Type::LongTy) { + } else if (CV->getType() == Type::Int64Ty) { if (const ConstantInt *CI = dyn_cast(CV)) { uint64_t Val = CI->getZExtValue(); @@ -918,10 +918,10 @@ const TargetData *TD = TM.getTargetData(); switch (type->getTypeID()) { case Type::BoolTyID: - case Type::UByteTyID: case Type::SByteTyID: + case Type::Int8TyID: O << TAI->getData8bitsDirective(); break; - case Type::UShortTyID: case Type::ShortTyID: + case Type::Int16TyID: O << TAI->getData16bitsDirective(); break; case Type::PointerTyID: @@ -932,10 +932,10 @@ break; } //Fall through for pointer size == int size - case Type::UIntTyID: case Type::IntTyID: + case Type::Int32TyID: O << TAI->getData32bitsDirective(); break; - case Type::ULongTyID: case Type::LongTyID: + case Type::Int64TyID: assert(TAI->getData64bitsDirective() && "Target cannot handle 64-bit constant exprs!"); O << TAI->getData64bitsDirective(); Index: llvm/lib/CodeGen/IntrinsicLowering.cpp diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.54 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.55 --- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.54 Sat Dec 23 00:05:40 2006 +++ llvm/lib/CodeGen/IntrinsicLowering.cpp Sat Dec 30 23:55:36 2006 @@ -95,7 +95,7 @@ default: break; case Intrinsic::setjmp: EnsureFunctionExists(M, "setjmp", I->arg_begin(), I->arg_end(), - Type::IntTy); + Type::Int32Ty); break; case Intrinsic::longjmp: EnsureFunctionExists(M, "longjmp", I->arg_begin(), I->arg_end(), @@ -117,9 +117,9 @@ break; case Intrinsic::memset_i32: case Intrinsic::memset_i64: -M.getOrInsertFunction("memset", PointerType::get(Type::SByteTy), - PointerType::get(Type::SByteTy), - Type::IntTy, (--(--I->arg_end()))->getType(), +M.getOrInsertFunction("memset", PointerType::get(Type::Int8Ty), + PointerType::get(Type::Int8Ty), + Type::Int32Ty, (--(--I->arg_end()))->getType(), (Type *)0); break; case Intrinsic::isunordered_f32: @@ -150,26 +150,26 @@ default: assert(0 && "Unhandled type size of value to byteswap!"); case 16: { Value *Tmp1 = new ShiftInst(Instruction::Shl, V, - ConstantInt::get(Type::UByteTy,8),"bswap.2",IP); +ConstantInt::get(Type::Int8Ty,8),"bswap.2",IP); Value *Tmp2 = new ShiftInst(Instruction::LShr, V, - ConstantInt::get(Type::UByteTy,8),"bswap.1",IP); +ConstantInt::get(Type::Int8Ty,8),"bswap.1",IP); V = BinaryOperator::createOr(Tmp1, Tmp2, "bswap.i16", IP); break; } case 32: { Value *Tmp4 = new ShiftInst(Instruction::Shl, V, - ConstantInt::get(Type::UByteTy,24),"bswap.4", IP); + ConstantInt::get(Type::Int8Ty,24),"bswap.4", IP); Value *Tmp3 = new ShiftInst(Instruction::Shl, V, -
[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.94 -> 1.95 --- Log message: For PR950: http://llvm.org/PR950 : Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. --- Diffs of the changes: (+1 -1) ARMISelDAGToDAG.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.94 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.95 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.94Fri Dec 29 08:28:12 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Sat Dec 30 23:55:36 2006 @@ -915,7 +915,7 @@ SDOperand C = CurDAG->getTargetConstant(~val, MVT::i32); n = CurDAG->getTargetNode(ARM::MVN, MVT::i32, C, Z, Z); } else { -Constant*C = ConstantInt::get(Type::UIntTy, val); +Constant*C = ConstantInt::get(Type::Int32Ty, val); int alignment = 2; SDOperand Addr = CurDAG->getTargetConstantPool(C, MVT::i32, alignment); n = CurDAG->getTargetNode(ARM::LDR, MVT::i32, Addr, Z); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/Sparc: SparcISelDAGToDAG.cpp updated: 1.116 -> 1.117 --- Log message: For PR950: http://llvm.org/PR950 : Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. --- Diffs of the changes: (+21 -19) SparcISelDAGToDAG.cpp | 40 +--- 1 files changed, 21 insertions(+), 19 deletions(-) Index: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp diff -u llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.116 llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.117 --- llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.116 Thu Dec 7 16:21:48 2006 +++ llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Sat Dec 30 23:55:36 2006 @@ -117,10 +117,9 @@ virtual std::vector LowerArguments(Function &F, SelectionDAG &DAG); virtual std::pair - LowerCallTo(SDOperand Chain, const Type *RetTy, bool isVarArg, - unsigned CC, - bool isTailCall, SDOperand Callee, ArgListTy &Args, - SelectionDAG &DAG); + LowerCallTo(SDOperand Chain, const Type *RetTy, bool RetTyIsSigned, + bool isVarArg, unsigned CC, bool isTailCall, SDOperand Callee, + ArgListTy &Args, SelectionDAG &DAG); virtual MachineBasicBlock *InsertAtEndOfBasicBlock(MachineInstr *MI, MachineBasicBlock *MBB); @@ -318,8 +317,7 @@ MF.addLiveIn(*CurArgReg++, VReg); SDOperand Arg = DAG.getCopyFromReg(Root, VReg, MVT::i32); if (ObjectVT != MVT::i32) { - unsigned AssertOp = I->getType()->isSigned() ? ISD::AssertSext - : ISD::AssertZext; + unsigned AssertOp = ISD::AssertSext; Arg = DAG.getNode(AssertOp, MVT::i32, Arg, DAG.getValueType(ObjectVT)); Arg = DAG.getNode(ISD::TRUNCATE, ObjectVT, Arg); @@ -332,8 +330,7 @@ if (ObjectVT == MVT::i32) { Load = DAG.getLoad(MVT::i32, Root, FIPtr, NULL, 0); } else { - ISD::LoadExtType LoadOp = -I->getType()->isSigned() ? ISD::SEXTLOAD : ISD::ZEXTLOAD; + ISD::LoadExtType LoadOp = ISD::SEXTLOAD; // Sparc is big endian, so add an offset based on the ObjectVT. unsigned Offset = 4-std::max(1U, MVT::getSizeInBits(ObjectVT)/8); @@ -472,13 +469,13 @@ std::pair SparcTargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy, - bool isVarArg, unsigned CC, + bool RetTyIsSigned, bool isVarArg, unsigned CC, bool isTailCall, SDOperand Callee, ArgListTy &Args, SelectionDAG &DAG) { // Count the size of the outgoing arguments. unsigned ArgsSize = 0; for (unsigned i = 0, e = Args.size(); i != e; ++i) { -switch (getValueType(Args[i].second)) { +switch (getValueType(Args[i].Ty)) { default: assert(0 && "Unknown value type!"); case MVT::i1: case MVT::i8: @@ -508,7 +505,7 @@ std::vector RegValuesToPass; unsigned ArgOffset = 68; for (unsigned i = 0, e = Args.size(); i != e; ++i) { -SDOperand Val = Args[i].first; +SDOperand Val = Args[i].Node; MVT::ValueType ObjectVT = Val.getValueType(); SDOperand ValToStore(0, 0); unsigned ObjSize; @@ -516,14 +513,15 @@ default: assert(0 && "Unhandled argument type!"); case MVT::i1: case MVT::i8: -case MVT::i16: +case MVT::i16: { // Promote the integer to 32-bits. If the input type is signed, use a // sign extend, otherwise use a zero extend. - if (Args[i].second->isSigned()) -Val = DAG.getNode(ISD::SIGN_EXTEND, MVT::i32, Val); - else -Val = DAG.getNode(ISD::ZERO_EXTEND, MVT::i32, Val); + ISD::NodeType ExtendKind = ISD::ZERO_EXTEND; + if (Args[i].isSigned) +ExtendKind = ISD::SIGN_EXTEND; + Val = DAG.getNode(ExtendKind, MVT::i32, Val); // FALL THROUGH +} case MVT::i32: ObjSize = 4; @@ -629,15 +627,19 @@ default: assert(0 && "Unknown value type to return!"); case MVT::i1: case MVT::i8: -case MVT::i16: +case MVT::
[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp
Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.301 -> 1.302 --- Log message: For PR950: http://llvm.org/PR950 : Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. --- Diffs of the changes: (+16 -56) Writer.cpp | 72 + 1 files changed, 16 insertions(+), 56 deletions(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.301 llvm/lib/Target/CBackend/Writer.cpp:1.302 --- llvm/lib/Target/CBackend/Writer.cpp:1.301 Sat Dec 23 00:05:41 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Sat Dec 30 23:55:36 2006 @@ -365,17 +365,13 @@ switch (Ty->getTypeID()) { case Type::VoidTyID: return Out << "void " << NameSoFar; case Type::BoolTyID: return Out << "bool " << NameSoFar; - case Type::UByteTyID: - case Type::SByteTyID: + case Type::Int8TyID: return Out << (isSigned?"signed":"unsigned") << " char " << NameSoFar; - case Type::UShortTyID: - case Type::ShortTyID: + case Type::Int16TyID: return Out << (isSigned?"signed":"unsigned") << " short " << NameSoFar; - case Type::UIntTyID: - case Type::IntTyID: + case Type::Int32TyID: return Out << (isSigned?"signed":"unsigned") << " int " << NameSoFar; - case Type::ULongTyID: - case Type::LongTyID: + case Type::Int64TyID: return Out << (isSigned?"signed":"unsigned") << " long long " << NameSoFar; case Type::FloatTyID: return Out << "float " << NameSoFar; case Type::DoubleTyID: return Out << "double " << NameSoFar; @@ -488,7 +484,7 @@ // ubytes or an array of sbytes with positive values. // const Type *ETy = CPA->getType()->getElementType(); - bool isString = (ETy == Type::SByteTy || ETy == Type::UByteTy); + bool isString = (ETy == Type::Int8Ty || ETy == Type::Int8Ty); // Make sure the last character is a null char, as automatically added by C if (isString && (CPA->getNumOperands() == 0 || @@ -810,50 +806,19 @@ case Type::BoolTyID: Out << (cast(CPV)->getValue() ? '1' : '0'); break; - case Type::SByteTyID: - case Type::UByteTyID: + case Type::Int8TyID: Out << "((char)" << cast(CPV)->getSExtValue() << ")"; break; - case Type::ShortTyID: - case Type::UShortTyID: + case Type::Int16TyID: Out << "((short)" << cast(CPV)->getSExtValue() << ")"; break; - case Type::IntTyID: - case Type::UIntTyID: + case Type::Int32TyID: Out << "((int)" << cast(CPV)->getSExtValue() << ")"; break; - case Type::LongTyID: - case Type::ULongTyID: + case Type::Int64TyID: Out << "((long long)" << cast(CPV)->getSExtValue() << "ll)"; break; -#if 0 - case Type::IntTyID: -if ((int)cast(CPV)->getSExtValue() == (int)0x8000) - Out << "((int)0x8000U)"; // Handle MININT specially to avoid warning -else - Out << cast(CPV)->getSExtValue(); -break; - - case Type::LongTyID: -if (cast(CPV)->isMinValue(true)) - Out << "(/*INT64_MIN*/(-9223372036854775807LL)-1)"; -else - Out << cast(CPV)->getSExtValue() << "ll"; -break; - - case Type::UByteTyID: - case Type::UShortTyID: -Out << cast(CPV)->getZExtValue(); -break; - case Type::UIntTyID: -Out << cast(CPV)->getZExtValue() << 'u'; -break; - case Type::ULongTyID: -Out << cast(CPV)->getZExtValue() << "ull"; -break; -#endif - case Type::FloatTyID: case Type::DoubleTyID: { ConstantFP *FPC = cast(CPV); @@ -1627,10 +1592,8 @@ void CWriter::printModuleTypes(const SymbolTable &ST) { Out << "/* Helper union for bitcasts */\n"; Out << "typedef union {\n"; - Out << " unsigned int UInt;\n"; - Out << " signed int SInt;\n"; - Out << " unsigned long long ULong;\n"; - Out << " signed long long SLong;\n"; + Out << " unsigned int Int32;\n"; + Out << " unsigned long long Int64;\n"; Out << " float Float;\n"; Out << " double Double;\n"; Out << "} llvmBitCastUnion;\n"; @@ -2060,8 +2023,7 @@ // We must cast the results of binary operations which might be promoted. bool needsCast = false; - if ((I.getType() == Type::UByteTy) || (I.getType() == Type::SByteTy) - || (I.getType() == Type::UShortTy
[llvm-commits] CVS: llvm/lib/Target/TargetData.cpp
Changes in directory llvm/lib/Target: TargetData.cpp updated: 1.73 -> 1.74 --- Log message: For PR950: http://llvm.org/PR950 : Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. --- Diffs of the changes: (+8 -12) TargetData.cpp | 20 1 files changed, 8 insertions(+), 12 deletions(-) Index: llvm/lib/Target/TargetData.cpp diff -u llvm/lib/Target/TargetData.cpp:1.73 llvm/lib/Target/TargetData.cpp:1.74 --- llvm/lib/Target/TargetData.cpp:1.73 Fri Dec 8 12:06:15 2006 +++ llvm/lib/Target/TargetData.cpp Sat Dec 30 23:55:36 2006 @@ -243,14 +243,10 @@ switch (Ty->getTypeID()) { case Type::BoolTyID: Size = 1; Alignment = TD->getBoolAlignment(); return; case Type::VoidTyID: - case Type::UByteTyID: - case Type::SByteTyID: Size = 1; Alignment = TD->getByteAlignment(); return; - case Type::UShortTyID: - case Type::ShortTyID: Size = 2; Alignment = TD->getShortAlignment(); return; - case Type::UIntTyID: - case Type::IntTyID:Size = 4; Alignment = TD->getIntAlignment(); return; - case Type::ULongTyID: - case Type::LongTyID: Size = 8; Alignment = TD->getLongAlignment(); return; + case Type::Int8TyID: Size = 1; Alignment = TD->getByteAlignment(); return; + case Type::Int16TyID: Size = 2; Alignment = TD->getShortAlignment(); return; + case Type::Int32TyID: Size = 4; Alignment = TD->getIntAlignment(); return; + case Type::Int64TyID: Size = 8; Alignment = TD->getLongAlignment(); return; case Type::FloatTyID: Size = 4; Alignment = TD->getFloatAlignment(); return; case Type::DoubleTyID: Size = 8; Alignment = TD->getDoubleAlignment(); return; case Type::LabelTyID: @@ -312,9 +308,9 @@ const Type *TargetData::getIntPtrType() const { switch (getPointerSize()) { default: assert(0 && "Unknown pointer size!"); - case 2: return Type::UShortTy; - case 4: return Type::UIntTy; - case 8: return Type::ULongTy; + case 2: return Type::Int16Ty; + case 4: return Type::Int32Ty; + case 8: return Type::Int64Ty; } } @@ -329,7 +325,7 @@ TI = gep_type_begin(ptrTy, Idx.begin(), Idx.end()); for (unsigned CurIDX = 0; CurIDX != Idx.size(); ++CurIDX, ++TI) { if (const StructType *STy = dyn_cast(*TI)) { - assert(Idx[CurIDX]->getType() == Type::UIntTy && "Illegal struct idx"); + assert(Idx[CurIDX]->getType() == Type::Int32Ty && "Illegal struct idx"); unsigned FieldNo = cast(Idx[CurIDX])->getZExtValue(); // Get structure layout information... ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelLowering.cpp IA64ISelLowering.h
Changes in directory llvm/lib/Target/IA64: IA64ISelLowering.cpp updated: 1.50 -> 1.51 IA64ISelLowering.h updated: 1.7 -> 1.8 --- Log message: For PR950: http://llvm.org/PR950 : Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. --- Diffs of the changes: (+20 -19) IA64ISelLowering.cpp | 32 +--- IA64ISelLowering.h |7 +++ 2 files changed, 20 insertions(+), 19 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.50 llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.51 --- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.50 Mon Nov 27 17:37:22 2006 +++ llvm/lib/Target/IA64/IA64ISelLowering.cpp Sat Dec 30 23:55:36 2006 @@ -290,10 +290,10 @@ std::pair IA64TargetLowering::LowerCallTo(SDOperand Chain, -const Type *RetTy, bool isVarArg, -unsigned CallingConv, bool isTailCall, -SDOperand Callee, ArgListTy &Args, -SelectionDAG &DAG) { +const Type *RetTy, bool RetTyIsSigned, +bool isVarArg, unsigned CallingConv, +bool isTailCall, SDOperand Callee, +ArgListTy &Args, SelectionDAG &DAG) { MachineFunction &MF = DAG.getMachineFunction(); @@ -315,7 +315,8 @@ std::max(outRegsUsed, MF.getInfo()->outRegsUsed); // keep stack frame 16-byte aligned - //assert(NumBytes==((NumBytes+15) & ~15) && "stack frame not 16-byte aligned!"); + // assert(NumBytes==((NumBytes+15) & ~15) && + //"stack frame not 16-byte aligned!"); NumBytes = (NumBytes+15) & ~15; Chain = DAG.getCALLSEQ_START(Chain,DAG.getConstant(NumBytes, getPointerTy())); @@ -328,7 +329,7 @@ for (unsigned i = 0, e = Args.size(); i != e; ++i) { - SDOperand Val = Args[i].first; + SDOperand Val = Args[i].Node; MVT::ValueType ObjectVT = Val.getValueType(); SDOperand ValToStore(0, 0), ValToConvert(0, 0); unsigned ObjSize=8; @@ -337,14 +338,15 @@ case MVT::i1: case MVT::i8: case MVT::i16: - case MVT::i32: + case MVT::i32: { //promote to 64-bits, sign/zero extending based on type //of the argument -if(Args[i].second->isSigned()) - Val = DAG.getNode(ISD::SIGN_EXTEND, MVT::i64, Val); -else - Val = DAG.getNode(ISD::ZERO_EXTEND, MVT::i64, Val); +ISD::NodeType ExtendKind = ISD::ZERO_EXTEND; +if (Args[i].isSigned) + ExtendKind = ISD::SIGN_EXTEND; +Val = DAG.getNode(ExtendKind, MVT::i64, Val); // XXX: fall through + } case MVT::i64: //ObjSize = 8; if(RegValuesToPass.size() >= 8) { @@ -422,7 +424,8 @@ unsigned seenConverts = 0; for (unsigned i = 0, e = RegValuesToPass.size(); i != e; ++i) { if(MVT::isFloatingPoint(RegValuesToPass[i].getValueType())) { - Chain = DAG.getCopyToReg(Chain, IntArgRegs[i], Converts[seenConverts++], InFlag); + Chain = DAG.getCopyToReg(Chain, IntArgRegs[i], Converts[seenConverts++], + InFlag); InFlag = Chain.getValue(1); } } @@ -432,8 +435,7 @@ for (unsigned i = 0, e = RegValuesToPass.size(); i != e; ++i) { Chain = DAG.getCopyToReg(Chain, MVT::isInteger(RegValuesToPass[i].getValueType()) ? - IntArgRegs[i] : FPArgRegs[usedFPArgs++], - RegValuesToPass[i], InFlag); +IntArgRegs[i] : FPArgRegs[usedFPArgs++], RegValuesToPass[i], InFlag); InFlag = Chain.getValue(1); } @@ -483,7 +485,7 @@ case MVT::i1: { // bools are just like other integers (returned in r8) // we *could* fall through to the truncate below, but this saves a // few redundant predicate ops - SDOperand boolInR8 = DAG.getCopyFromReg(Chain, IA64::r8, MVT::i64, InFlag); + SDOperand boolInR8 = DAG.getCopyFromReg(Chain, IA64::r8, MVT::i64,InFlag); InFlag = boolInR8.getValue(2); Chain = boolInR8.getValue(1); SDOperand zeroReg = DAG.getCopyFromReg(Chain, IA64::r0, MVT::i64, InFlag); I
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAGISel.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.449 -> 1.450 SelectionDAGISel.cpp updated: 1.334 -> 1.335 --- Log message: For PR950: http://llvm.org/PR950 : Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. --- Diffs of the changes: (+119 -97) LegalizeDAG.cpp | 108 ++- SelectionDAGISel.cpp | 108 +-- 2 files changed, 119 insertions(+), 97 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.449 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.450 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.449 Mon Dec 18 19:44:04 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat Dec 30 23:55:36 2006 @@ -186,7 +186,7 @@ SDOperand CreateStackTemporary(MVT::ValueType VT); - SDOperand ExpandLibCall(const char *Name, SDNode *Node, + SDOperand ExpandLibCall(const char *Name, SDNode *Node, bool isSigned, SDOperand &Hi); SDOperand ExpandIntToFP(bool isSigned, MVT::ValueType DestTy, SDOperand Source); @@ -2122,33 +2122,42 @@ // operation to an explicit libcall as appropriate. MVT::ValueType IntPtr = TLI.getPointerTy(); const Type *IntPtrTy = TLI.getTargetData()->getIntPtrType(); - std::vector > Args; + TargetLowering::ArgListTy Args; + TargetLowering::ArgListEntry Entry; const char *FnName = 0; if (Node->getOpcode() == ISD::MEMSET) { -Args.push_back(std::make_pair(Tmp2, IntPtrTy)); +Entry.Node = Tmp2; +Entry.Ty = IntPtrTy; +Entry.isSigned = false; +Args.push_back(Entry); // Extend the (previously legalized) ubyte argument to be an int value // for the call. if (Tmp3.getValueType() > MVT::i32) Tmp3 = DAG.getNode(ISD::TRUNCATE, MVT::i32, Tmp3); else Tmp3 = DAG.getNode(ISD::ZERO_EXTEND, MVT::i32, Tmp3); -Args.push_back(std::make_pair(Tmp3, Type::IntTy)); -Args.push_back(std::make_pair(Tmp4, IntPtrTy)); +Entry.Node = Tmp3; Entry.Ty = Type::Int32Ty; Entry.isSigned = true; +Args.push_back(Entry); +Entry.Node = Tmp4; Entry.Ty = IntPtrTy; Entry.isSigned = false; +Args.push_back(Entry); FnName = "memset"; } else if (Node->getOpcode() == ISD::MEMCPY || Node->getOpcode() == ISD::MEMMOVE) { -Args.push_back(std::make_pair(Tmp2, IntPtrTy)); -Args.push_back(std::make_pair(Tmp3, IntPtrTy)); -Args.push_back(std::make_pair(Tmp4, IntPtrTy)); +Entry.Node = Tmp2; Entry.Ty = IntPtrTy; Entry.isSigned = false; +Args.push_back(Entry); +Entry.Node = Tmp3; Entry.Ty = IntPtrTy; Entry.isSigned = false; +Args.push_back(Entry); +Entry.Node = Tmp4; Entry.Ty = IntPtrTy; Entry.isSigned = false; +Args.push_back(Entry); FnName = Node->getOpcode() == ISD::MEMMOVE ? "memmove" : "memcpy"; } else { assert(0 && "Unknown op!"); } std::pair CallResult = -TLI.LowerCallTo(Tmp1, Type::VoidTy, false, CallingConv::C, false, +TLI.LowerCallTo(Tmp1, Type::VoidTy, false, false, CallingConv::C, false, DAG.getExternalSymbol(FnName, IntPtr), Args, DAG); Result = CallResult.second; break; @@ -2243,7 +2252,8 @@ const char *FnName = Node->getOpcode() == ISD::UDIV ? "__udivsi3" : "__divsi3"; SDOperand Dummy; - Result = ExpandLibCall(FnName, Node, Dummy); + bool isSigned = Node->getOpcode() == ISD::SDIV; + Result = ExpandLibCall(FnName, Node, isSigned, Dummy); }; break; } @@ -2346,7 +2356,7 @@ DAG.getNode(ISD::FP_EXTEND, MVT::f64, Tmp2)); } SDOperand Dummy; - Result = ExpandLibCall(FnName, Node, Dummy); + Result = ExpandLibCall(FnName, Node, false, Dummy); break; } break; @@ -2419,6 +2429,7 @@ break; case TargetLowering::Expand: unsigned DivOpc= (Node->getOpcode() == ISD::URE
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86TargetAsmInfo.cpp
Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.307 -> 1.308 X86TargetAsmInfo.cpp updated: 1.13 -> 1.14 --- Log message: For PR950: http://llvm.org/PR950 : Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. --- Diffs of the changes: (+25 -17) X86ISelLowering.cpp | 32 X86TargetAsmInfo.cpp | 10 +- 2 files changed, 25 insertions(+), 17 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.307 llvm/lib/Target/X86/X86ISelLowering.cpp:1.308 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.307 Fri Dec 22 16:29:05 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Sat Dec 30 23:55:36 2006 @@ -4447,14 +4447,21 @@ (I && I->getValue() < Subtarget->getMinRepStrSizeThreshold())) { MVT::ValueType IntPtr = getPointerTy(); const Type *IntPtrTy = getTargetData()->getIntPtrType(); -std::vector > Args; -Args.push_back(std::make_pair(Op.getOperand(1), IntPtrTy)); +TargetLowering::ArgListTy Args; +TargetLowering::ArgListEntry Entry; +Entry.Node = Op.getOperand(1); +Entry.Ty = IntPtrTy; +Entry.isSigned = false; +Args.push_back(Entry); // Extend the ubyte argument to be an int value for the call. -SDOperand Val = DAG.getNode(ISD::ZERO_EXTEND, MVT::i32, Op.getOperand(2)); -Args.push_back(std::make_pair(Val, IntPtrTy)); -Args.push_back(std::make_pair(Op.getOperand(3), IntPtrTy)); +Entry.Node = DAG.getNode(ISD::ZERO_EXTEND, MVT::i32, Op.getOperand(2)); +Entry.Ty = IntPtrTy; +Entry.isSigned = false; +Args.push_back(Entry); +Entry.Node = Op.getOperand(3); +Args.push_back(Entry); std::pair CallResult = - LowerCallTo(Chain, Type::VoidTy, false, CallingConv::C, false, + LowerCallTo(Chain, Type::VoidTy, false, false, CallingConv::C, false, DAG.getExternalSymbol("memset", IntPtr), Args, DAG); return CallResult.second; } @@ -4601,13 +4608,14 @@ if ((Align & 3) != 0 || (I && I->getValue() < Subtarget->getMinRepStrSizeThreshold())) { MVT::ValueType IntPtr = getPointerTy(); -const Type *IntPtrTy = getTargetData()->getIntPtrType(); -std::vector > Args; -Args.push_back(std::make_pair(Op.getOperand(1), IntPtrTy)); -Args.push_back(std::make_pair(Op.getOperand(2), IntPtrTy)); -Args.push_back(std::make_pair(Op.getOperand(3), IntPtrTy)); +TargetLowering::ArgListTy Args; +TargetLowering::ArgListEntry Entry; +Entry.Ty = getTargetData()->getIntPtrType(); Entry.isSigned = false; +Entry.Node = Op.getOperand(1); Args.push_back(Entry); +Entry.Node = Op.getOperand(2); Args.push_back(Entry); +Entry.Node = Op.getOperand(3); Args.push_back(Entry); std::pair CallResult = - LowerCallTo(Chain, Type::VoidTy, false, CallingConv::C, false, + LowerCallTo(Chain, Type::VoidTy, false, false, CallingConv::C, false, DAG.getExternalSymbol("memcpy", IntPtr), Args, DAG); return CallResult.second; } Index: llvm/lib/Target/X86/X86TargetAsmInfo.cpp diff -u llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.13 llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.14 --- llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.13 Tue Dec 19 15:04:20 2006 +++ llvm/lib/Target/X86/X86TargetAsmInfo.cppSat Dec 30 23:55:36 2006 @@ -172,13 +172,13 @@ !CI->getType()->isInteger()) return false; - const Type *Ty = CI->getType()->getUnsignedVersion(); + const Type *Ty = CI->getType(); const char *IntName; switch (Ty->getTypeID()) { default: return false; - case Type::UShortTyID: IntName = "llvm.bswap.i16"; break; - case Type::UIntTyID: IntName = "llvm.bswap.i32"; break; - case Type::ULongTyID: IntName = "llvm.bswap.i64"; break; + case Type::Int16TyID: IntName = "llvm.bswap.i16"; break; + case Type::Int32TyID: IntName = "llvm.bswap.i32"; break; + case Type::Int64TyID: IntName = "llvm.bswap.i64"; break; } // Okay, we can do this xform, do so now. @@ -226,7 +226,7 @@ } break; case 3: -if (CI->getType() == Type::ULongTy && Constraints.size() >= 2 && +if (CI->getType() == Type::Int64Ty && Constraints.size() >= 2 && Constraints[0].C
[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp AlphaISelLowering.cpp AlphaISelLowering.h
Changes in directory llvm/lib/Target/Alpha: AlphaISelDAGToDAG.cpp updated: 1.64 -> 1.65 AlphaISelLowering.cpp updated: 1.75 -> 1.76 AlphaISelLowering.h updated: 1.22 -> 1.23 --- Log message: For PR950: http://llvm.org/PR950 : Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. --- Diffs of the changes: (+12 -12) AlphaISelDAGToDAG.cpp |2 +- AlphaISelLowering.cpp | 16 AlphaISelLowering.h |6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.64 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.65 --- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.64Tue Dec 19 16:59:25 2006 +++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Sat Dec 30 23:55:36 2006 @@ -322,7 +322,7 @@ // val32 >= IMM_LOW + IMM_LOW * IMM_MULT) //always true break; //(zext (LDAH (LDA))) //Else use the constant pool -ConstantInt *C = ConstantInt::get(Type::ULongTy, uval); +ConstantInt *C = ConstantInt::get(Type::Int64Ty, uval); SDOperand CPI = CurDAG->getTargetConstantPool(C, MVT::i64); SDNode *Tmp = CurDAG->getTargetNode(Alpha::LDAHr, MVT::i64, CPI, getGlobalBaseReg()); Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.75 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.76 --- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.75Thu Dec 7 16:21:48 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Sat Dec 30 23:55:36 2006 @@ -317,8 +317,8 @@ } std::pair -AlphaTargetLowering::LowerCallTo(SDOperand Chain, - const Type *RetTy, bool isVarArg, +AlphaTargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy, + bool RetTyIsSigned, bool isVarArg, unsigned CallingConv, bool isTailCall, SDOperand Callee, ArgListTy &Args, SelectionDAG &DAG) { @@ -331,7 +331,7 @@ std::vector args_to_use; for (unsigned i = 0, e = Args.size(); i != e; ++i) { -switch (getValueType(Args[i].second)) { +switch (getValueType(Args[i].Ty)) { default: assert(0 && "Unexpected ValueType for argument!"); case MVT::i1: case MVT::i8: @@ -339,17 +339,17 @@ case MVT::i32: // Promote the integer to 64 bits. If the input type is signed use a // sign extend, otherwise use a zero extend. - if (Args[i].second->isSigned()) -Args[i].first = DAG.getNode(ISD::SIGN_EXTEND, MVT::i64, Args[i].first); + if (Args[i].isSigned) +Args[i].Node = DAG.getNode(ISD::SIGN_EXTEND, MVT::i64, Args[i].Node); else -Args[i].first = DAG.getNode(ISD::ZERO_EXTEND, MVT::i64, Args[i].first); +Args[i].Node = DAG.getNode(ISD::ZERO_EXTEND, MVT::i64, Args[i].Node); break; case MVT::i64: case MVT::f64: case MVT::f32: break; } -args_to_use.push_back(Args[i].first); +args_to_use.push_back(Args[i].Node); } std::vector RetVals; @@ -373,7 +373,7 @@ SDOperand RetVal = TheCall; if (RetTyVT != ActualRetTyVT) { -RetVal = DAG.getNode(RetTy->isSigned() ? ISD::AssertSext : ISD::AssertZext, +RetVal = DAG.getNode(RetTyIsSigned ? ISD::AssertSext : ISD::AssertZext, MVT::i64, RetVal, DAG.getValueType(RetTyVT)); RetVal = DAG.getNode(ISD::TRUNCATE, RetTyVT, RetVal); } Index: llvm/lib/Target/Alpha/AlphaISelLowering.h diff -u llvm/lib/Target/Alpha/AlphaISelLowering.h:1.22 llvm/lib/Target/Alpha/AlphaISelLowering.h:1.23 --- llvm/lib/Target/Alpha/AlphaISelLowering.h:1.22 Tue Oct 31 10:49:55 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.h Sat Dec 30 23:55:36 2006 @@ -77,9 +77,9 @@ /// LowerCallTo - This hook lowers an abstract call to a function into an /// actual call. virtual std::pair -LowerCallTo(SDOperand Chain, const Type *RetTy, bool isVarArg, unsigned CC, -bool isTailCall, SDOperand Callee, ArgListTy &Args, -SelectionDAG &DAG); +LowerCallTo(SDOperand Chain, const Type *RetTy, bool RetT
[llvm-commits] CVS: llvm/test/Regression/Transforms/Inline/casts.ll
Changes in directory llvm/test/Regression/Transforms/Inline: casts.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+1 -1) casts.ll |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Regression/Transforms/Inline/casts.ll diff -u llvm/test/Regression/Transforms/Inline/casts.ll:1.2 llvm/test/Regression/Transforms/Inline/casts.ll:1.3 --- llvm/test/Regression/Transforms/Inline/casts.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/Inline/casts.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | grep 'ret int 1' +; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | grep 'ret i32 1' ; ModuleID = 'short.opt.bc' implementation ; Functions: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/ArgumentPromotion/control-flow2.ll
Changes in directory llvm/test/Regression/Transforms/ArgumentPromotion: control-flow2.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+1 -1) control-flow2.ll |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Regression/Transforms/ArgumentPromotion/control-flow2.ll diff -u llvm/test/Regression/Transforms/ArgumentPromotion/control-flow2.ll:1.2 llvm/test/Regression/Transforms/ArgumentPromotion/control-flow2.ll:1.3 --- llvm/test/Regression/Transforms/ArgumentPromotion/control-flow2.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/Transforms/ArgumentPromotion/control-flow2.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion | llvm-dis | grep 'load int\* %A' +; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion | llvm-dis | grep 'load i32\* %A' implementation ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll 2006-08-07-CycleInDAG.ll loop-hoist.ll loop-strength-reduce.ll trunc-to-bool.ll vec_ins_extract.ll
Changes in directory llvm/test/Regression/CodeGen/X86: 2006-05-02-InstrSched1.ll updated: 1.2 -> 1.3 2006-08-07-CycleInDAG.ll updated: 1.2 -> 1.3 loop-hoist.ll updated: 1.3 -> 1.4 loop-strength-reduce.ll updated: 1.3 -> 1.4 trunc-to-bool.ll updated: 1.4 -> 1.5 vec_ins_extract.ll updated: 1.3 -> 1.4 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+38 -37) 2006-05-02-InstrSched1.ll |6 + 2006-08-07-CycleInDAG.ll |4 +-- loop-hoist.ll |4 +-- loop-strength-reduce.ll |6 ++--- trunc-to-bool.ll | 51 -- vec_ins_extract.ll|4 +-- 6 files changed, 38 insertions(+), 37 deletions(-) Index: llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll diff -u llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll:1.2 llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll:1.3 --- llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll Sun Dec 31 00:01:59 2006 @@ -11,10 +11,8 @@ %tmp4 = getelementptr ubyte* %tmp, uint %tmp3 ; [#uses=1] %tmp7 = load uint* %tmp ; [#uses=1] %tmp8 = getelementptr ubyte* %tmp, uint %tmp7 ; [#uses=1] - %tmp8 = cast ubyte* %tmp8 to sbyte* ; [#uses=1] - %tmp4 = cast ubyte* %tmp4 to sbyte* ; [#uses=1] - %tmp = tail call int %memcmp( sbyte* %tmp8, sbyte* %tmp4, uint %tmp ) ; [#uses=1] - ret int %tmp + %result = tail call int %memcmp( sbyte* %tmp8, sbyte* %tmp4, uint %tmp ); [#uses=1] + ret int %result } declare int %memcmp(sbyte*, sbyte*, uint) Index: llvm/test/Regression/CodeGen/X86/2006-08-07-CycleInDAG.ll diff -u llvm/test/Regression/CodeGen/X86/2006-08-07-CycleInDAG.ll:1.2 llvm/test/Regression/CodeGen/X86/2006-08-07-CycleInDAG.ll:1.3 --- llvm/test/Regression/CodeGen/X86/2006-08-07-CycleInDAG.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/X86/2006-08-07-CycleInDAG.ll Sun Dec 31 00:01:59 2006 @@ -10,8 +10,8 @@ %tmp24.i = load int* null ; [#uses=1] %tmp13.i12.i = tail call double %ldexp( double 0.00e+00, int 0 ) ; [#uses=1] %tmp13.i13.i = cast double %tmp13.i12.i to float; [#uses=1] - %tmp11.i = load int* null ; [#uses=1] - %tmp11.i = cast int %tmp11.i to uint; [#uses=1] + %tmp11.s = load int* null ; [#uses=1] + %tmp11.i = cast int %tmp11.s to uint; [#uses=1] %n.i = cast int %tmp24.i to uint; [#uses=1] %tmp13.i7 = mul uint %tmp11.i, %n.i ; [#uses=1] %tmp.i8 = tail call sbyte* %calloc( uint %tmp13.i7, uint 4 ) ; [#uses=0] Index: llvm/test/Regression/CodeGen/X86/loop-hoist.ll diff -u llvm/test/Regression/CodeGen/X86/loop-hoist.ll:1.3 llvm/test/Regression/CodeGen/X86/loop-hoist.ll:1.4 --- llvm/test/Regression/CodeGen/X86/loop-hoist.ll:1.3 Sat Dec 2 14:39:25 2006 +++ llvm/test/Regression/CodeGen/X86/loop-hoist.ll Sun Dec 31 00:01:59 2006 @@ -5,9 +5,9 @@ implementation ; Functions: -void %foo(int %N) { +void %foo(int %N.in) { entry: -%N = cast int %N to uint; [#uses=1] +%N = cast int %N.in to uint; [#uses=1] br label %cond_true cond_true: ; preds = %cond_true, %entry Index: llvm/test/Regression/CodeGen/X86/loop-strength-reduce.ll diff -u llvm/test/Regression/CodeGen/X86/loop-strength-reduce.ll:1.3 llvm/test/Regression/CodeGen/X86/loop-strength-reduce.ll:1.4 --- llvm/test/Regression/CodeGen/X86/loop-strength-reduce.ll:1.3Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/X86/loop-strength-reduce.llSun Dec 31 00:01:59 2006 @@ -4,10 +4,10 @@ %A = internal global [16 x [16 x int]] zeroinitializer, align 32 -void %test(int %row, int %N) { +void %test(int %row, int %N.in) { entry: - %N = cast int %N to uint - %tmp5 = setgt int %N, 0 + %N = cast int %N.i
[llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp Miscompilation.cpp
Changes in directory llvm/tools/bugpoint: ExtractFunction.cpp updated: 1.55 -> 1.56 Miscompilation.cpp updated: 1.82 -> 1.83 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless. --- Diffs of the changes: (+4 -4) ExtractFunction.cpp |2 +- Miscompilation.cpp |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/tools/bugpoint/ExtractFunction.cpp diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.55 llvm/tools/bugpoint/ExtractFunction.cpp:1.56 --- llvm/tools/bugpoint/ExtractFunction.cpp:1.55Sun Nov 26 19:05:10 2006 +++ llvm/tools/bugpoint/ExtractFunction.cpp Sun Dec 31 00:02:26 2006 @@ -180,7 +180,7 @@ std::vector ArrayElts; for (unsigned i = 0, e = TorList.size(); i != e; ++i) { std::vector Elts; -Elts.push_back(ConstantInt::get(Type::IntTy, TorList[i].second)); +Elts.push_back(ConstantInt::get(Type::Int32Ty, TorList[i].second)); Elts.push_back(TorList[i].first); ArrayElts.push_back(ConstantStruct::get(Elts)); } Index: llvm/tools/bugpoint/Miscompilation.cpp diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.82 llvm/tools/bugpoint/Miscompilation.cpp:1.83 --- llvm/tools/bugpoint/Miscompilation.cpp:1.82 Sat Dec 23 00:05:41 2006 +++ llvm/tools/bugpoint/Miscompilation.cpp Sun Dec 31 00:02:26 2006 @@ -675,8 +675,8 @@ // Prototype: void *getPointerToNamedFunction(const char* Name) Function *resolverFunc = Safe->getOrInsertFunction("getPointerToNamedFunction", - PointerType::get(Type::SByteTy), - PointerType::get(Type::SByteTy), (Type *)0); + PointerType::get(Type::Int8Ty), + PointerType::get(Type::Int8Ty), (Type *)0); // Use the function we just added to get addresses of functions we need. for (Module::iterator F = Safe->begin(), E = Safe->end(); F != E; ++F) { @@ -697,7 +697,7 @@ // sbyte* so it matches the signature of the resolver function. // GetElementPtr *funcName, ulong 0, ulong 0 -std::vector GEPargs(2,Constant::getNullValue(Type::IntTy)); +std::vector GEPargs(2,Constant::getNullValue(Type::Int32Ty)); Value *GEP = ConstantExpr::getGetElementPtr(funcName, GEPargs); std::vector ResolverArgs; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll shifttest.ll
Changes in directory llvm/test/Regression/Transforms/Reassociate: 2005-09-01-ArrayOutOfBounds.ll updated: 1.2 -> 1.3 shifttest.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+2 -2) 2005-09-01-ArrayOutOfBounds.ll |2 +- shifttest.ll |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Regression/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll diff -u llvm/test/Regression/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll:1.2 llvm/test/Regression/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll:1.3 --- llvm/test/Regression/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep 'ret int 0' +; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep 'ret i32 0' int %f(int %a0, int %a1, int %a2, int %a3, int %a4) { %tmp.2 = add int %a4, %a3 ; [#uses=1] Index: llvm/test/Regression/Transforms/Reassociate/shifttest.ll diff -u llvm/test/Regression/Transforms/Reassociate/shifttest.ll:1.2 llvm/test/Regression/Transforms/Reassociate/shifttest.ll:1.3 --- llvm/test/Regression/Transforms/Reassociate/shifttest.ll:1.2Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/Reassociate/shifttest.llSun Dec 31 00:01:59 2006 @@ -1,6 +1,6 @@ ; With shl->mul reassociation, we can see that this is (shl A, 9) * A ; -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep 'shl .*, ubyte 9' +; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep 'shl .*, i8 9' int %test(int %A, int %B) { %X = shl int %A, ubyte 5 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CFrontend/2005-12-04-DeclarationLineNumbers.c 2006-01-16-BitCountIntrinsicsUnsigned.c 2006-03-03-MissingInitializer.c
Changes in directory llvm/test/Regression/CFrontend: 2005-12-04-DeclarationLineNumbers.c updated: 1.4 -> 1.5 2006-01-16-BitCountIntrinsicsUnsigned.c updated: 1.1 -> 1.2 2006-03-03-MissingInitializer.c updated: 1.1 -> 1.2 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+4 -4) 2005-12-04-DeclarationLineNumbers.c |2 +- 2006-01-16-BitCountIntrinsicsUnsigned.c |4 ++-- 2006-03-03-MissingInitializer.c |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/test/Regression/CFrontend/2005-12-04-DeclarationLineNumbers.c diff -u llvm/test/Regression/CFrontend/2005-12-04-DeclarationLineNumbers.c:1.4 llvm/test/Regression/CFrontend/2005-12-04-DeclarationLineNumbers.c:1.5 --- llvm/test/Regression/CFrontend/2005-12-04-DeclarationLineNumbers.c:1.4 Fri Jun 16 11:50:24 2006 +++ llvm/test/Regression/CFrontend/2005-12-04-DeclarationLineNumbers.c Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -// RUN: %llvmgcc %s -S -g -o - | grep 'llvm.dbg.stoppoint.*uint 14' +// RUN: %llvmgcc %s -S -g -o - | grep 'llvm.dbg.stoppoint.*i32 14' // PR664: ensure that line #'s are emitted for declarations Index: llvm/test/Regression/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c diff -u llvm/test/Regression/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c:1.1 llvm/test/Regression/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c:1.2 --- llvm/test/Regression/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c:1.1 Tue Jan 17 00:24:01 2006 +++ llvm/test/Regression/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c Sun Dec 31 00:01:59 2006 @@ -1,5 +1,5 @@ -// RUN: %llvmgcc -S %s -o - | grep 'llvm.ctlz.i32(uint' && -// RUN: %llvmgcc -S %s -o - | not grep 'llvm.ctlz.i32(int' +// RUN: %llvmgcc -S %s -o - | grep 'llvm.ctlz.i32(i32' +// RUNMEIFWEHADSIGNEDTYPES: %llvmgcc -S %s -o - | not grep 'llvm.ctlz.i32(i32' unsigned t2(unsigned X) { return __builtin_clz(X); Index: llvm/test/Regression/CFrontend/2006-03-03-MissingInitializer.c diff -u llvm/test/Regression/CFrontend/2006-03-03-MissingInitializer.c:1.1 llvm/test/Regression/CFrontend/2006-03-03-MissingInitializer.c:1.2 --- llvm/test/Regression/CFrontend/2006-03-03-MissingInitializer.c:1.1 Fri Mar 3 18:47:12 2006 +++ llvm/test/Regression/CFrontend/2006-03-03-MissingInitializer.c Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -// RUN: %llvmgcc %s -S -o - | gccas | llvm-dis | grep nate | grep 'global int 0' +// RUN: %llvmgcc %s -S -o - | gccas | llvm-dis | grep nate | grep 'global i32 0' struct X { int *XX; int Y;}; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/LCSSA/basictest.ll
Changes in directory llvm/test/Regression/Transforms/LCSSA: basictest.ll updated: 1.5 -> 1.6 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+3 -3) basictest.ll |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/Regression/Transforms/LCSSA/basictest.ll diff -u llvm/test/Regression/Transforms/LCSSA/basictest.ll:1.5 llvm/test/Regression/Transforms/LCSSA/basictest.ll:1.6 --- llvm/test/Regression/Transforms/LCSSA/basictest.ll:1.5 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/LCSSA/basictest.ll Sun Dec 31 00:01:59 2006 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | grep "X3.lcssa = phi int" && -; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | grep "%X4 = add int 3, %X3.lcssa" +; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | grep "X3.lcssa = phi i32" && +; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | grep "%X4 = add i32 3, %X3.lcssa" void %lcssa(bool %S2) { entry: @@ -23,4 +23,4 @@ loop.exit: %X4 = add int 3, %X3 ret void -} \ No newline at end of file +} ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll share_code_in_preheader.ll use_postinc_value_outside_loop.ll var_stride_used_by_compare.ll
Changes in directory llvm/test/Regression/Transforms/LoopStrengthReduce: nested-reduce.ll updated: 1.2 -> 1.3 share_code_in_preheader.ll updated: 1.2 -> 1.3 use_postinc_value_outside_loop.ll updated: 1.3 -> 1.4 var_stride_used_by_compare.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+18 -18) nested-reduce.ll |6 +++--- share_code_in_preheader.ll| 12 ++-- use_postinc_value_outside_loop.ll | 10 +- var_stride_used_by_compare.ll |8 4 files changed, 18 insertions(+), 18 deletions(-) Index: llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll diff -u llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll:1.2 llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll:1.3 --- llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll Sun Dec 31 00:01:59 2006 @@ -25,8 +25,8 @@ br label %no_exit.1 no_exit.1: ; preds = %cond_continue, %no_exit.1.outer - %indvar = phi uint [ 0, %no_exit.1.outer ], [ %indvar.next, %cond_continue ]; [#uses=2] - %indvar = cast uint %indvar to int ; [#uses=1] + %indvar.ui = phi uint [ 0, %no_exit.1.outer ], [ %indvar.next, %cond_continue ] ; [#uses=2] + %indvar = cast uint %indvar.ui to int ; [#uses=1] %j.1.2 = add int %indvar, %j.1.2.ph ; [#uses=2] %tmp.11 = add int %j.1.2, %tmp.9; [#uses=1] %tmp.12 = cast int %tmp.11 to ubyte ; [#uses=1] @@ -43,7 +43,7 @@ cond_continue: ; preds = %no_exit.1 %tmp.519 = setlt int %inc.1, %C ; [#uses=1] - %indvar.next = add uint %indvar, 1 ; [#uses=1] + %indvar.next = add uint %indvar.ui, 1 ; [#uses=1] br bool %tmp.519, label %no_exit.1, label %loopexit.1 loopexit.1:; preds = %cond_continue, %cond_true, %loopentry.1 Index: llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll diff -u llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll:1.2 llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll:1.3 --- llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll Sun Dec 31 00:01:59 2006 @@ -1,17 +1,17 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | grep mul | wc -l | grep 1 ; LSR should not make two copies of the Q*L expression in the preheader! -sbyte %test(sbyte* %A, sbyte* %B, int %L, int %Q, int %N) { +sbyte %test(sbyte* %A, sbyte* %B, int %L, int %Q, int %N.s) { entry: %tmp.6 = mul int %Q, %L ; [#uses=1] - %N = cast int %N to uint; [#uses=1] + %N = cast int %N.s to uint ; [#uses=1] br label %no_exit no_exit: ; preds = %no_exit, %no_exit.preheader - %indvar = phi uint [ 0, %entry], [ %indvar.next, %no_exit ] ; [#uses=2] + %indvar.ui = phi uint [ 0, %entry], [ %indvar.next, %no_exit ] ; [#uses=2] %Sum.0.0 = phi sbyte [ 0, %entry], [ %tmp.21, %no_exit ] ; [#uses=1] - %indvar = cast uint %indvar to int ; [#uses=1] - %N_addr.0.0 = sub int %N, %indvar ; [#uses=1] + %indvar = cast uint %indvar.ui to int ; [#uses=1] + %N_addr.0.0 = sub int %N.s, %indvar ; [#uses=1] %tmp.8 = add int %N_addr.0.0, %tmp.6; [#uses=2] %tmp.9 = getelementptr sbyte* %A, int %tmp.8; [#uses=1] %tmp.10 = load sbyte* %tmp.9; [#uses=1] @@ -19,7 +19,7 @@ %tmp.18 = load sbyte* %tmp.17 ; [#uses=1] %tmp.19 = sub sbyte %tmp.10, %tmp.18; [#uses=1] %tmp.21 = add sbyte %tmp.19, %Sum.0.0 ; [#uses=2] - %indvar.nex
[llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/2005-10-21-longlonggtu.ll 2006-06-28-SimplifySetCCCrash.ll SwitchLowering.ll
Changes in directory llvm/test/Regression/CodeGen/Generic: 2005-10-21-longlonggtu.ll updated: 1.2 -> 1.3 2006-06-28-SimplifySetCCCrash.ll updated: 1.2 -> 1.3 SwitchLowering.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+7 -8) 2005-10-21-longlonggtu.ll|4 ++-- 2006-06-28-SimplifySetCCCrash.ll | 10 +- SwitchLowering.ll|1 - 3 files changed, 7 insertions(+), 8 deletions(-) Index: llvm/test/Regression/CodeGen/Generic/2005-10-21-longlonggtu.ll diff -u llvm/test/Regression/CodeGen/Generic/2005-10-21-longlonggtu.ll:1.2 llvm/test/Regression/CodeGen/Generic/2005-10-21-longlonggtu.ll:1.3 --- llvm/test/Regression/CodeGen/Generic/2005-10-21-longlonggtu.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/Generic/2005-10-21-longlonggtu.ll Sun Dec 31 00:01:59 2006 @@ -1,6 +1,6 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -float %t(long %u) { - %u = cast long %u to ulong ; [#uses=1] +float %t(long %u_arg) { + %u = cast long %u_arg to ulong ; [#uses=1] %tmp5 = add ulong %u, 9007199254740991 ; [#uses=1] %tmp = setgt ulong %tmp5, 18014398509481982 ; [#uses=1] br bool %tmp, label %T, label %F Index: llvm/test/Regression/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll diff -u llvm/test/Regression/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll:1.2 llvm/test/Regression/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll:1.3 --- llvm/test/Regression/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll Sun Dec 31 00:01:59 2006 @@ -239,19 +239,19 @@ ret void bb1876:; preds = %bb1808 - %tmp1877 = load int* %which_alternative ; [#uses=4] - %tmp1877 = cast int %tmp1877 to uint; [#uses=1] + %tmp1877signed = load int* %which_alternative ; [#uses=4] + %tmp1877 = cast int %tmp1877signed to uint ; [#uses=1] %bothcond699 = setlt uint %tmp1877, 2 ; [#uses=1] - %tmp1888 = seteq int %tmp1877, 2; [#uses=1] + %tmp1888 = seteq int %tmp1877signed, 2 ; [#uses=1] %bothcond700 = or bool %bothcond699, %tmp1888 ; [#uses=1] %bothcond700.not = xor bool %bothcond700, true ; [#uses=1] - %tmp1894 = seteq int %tmp1877, 3; [#uses=1] + %tmp1894 = seteq int %tmp1877signed, 3 ; [#uses=1] %bothcond701 = or bool %tmp1894, %bothcond700.not ; [#uses=1] %bothcond702 = or bool %bothcond701, false ; [#uses=1] br bool %bothcond702, label %UnifiedReturnBlock, label %cond_next1902 cond_next1902: ; preds = %bb1876 - switch int %tmp1877, label %cond_next1937 [ + switch int %tmp1877signed, label %cond_next1937 [ int 0, label %bb1918 int 1, label %bb1918 int 2, label %bb1918 Index: llvm/test/Regression/CodeGen/Generic/SwitchLowering.ll diff -u llvm/test/Regression/CodeGen/Generic/SwitchLowering.ll:1.2 llvm/test/Regression/CodeGen/Generic/SwitchLowering.ll:1.3 --- llvm/test/Regression/CodeGen/Generic/SwitchLowering.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/Generic/SwitchLowering.ll Sun Dec 31 00:01:59 2006 @@ -19,7 +19,6 @@ ] bb7: ; preds = %bb, %bb - %tmp = cast sbyte %tmp to ubyte ; [#uses=1] tail call void %foo( ubyte %tmp ) ret sbyte* %tmp2 } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/SCCP/2004-12-10-UndefBranchBug.ll 2006-12-04-PackedType.ll ipsccp-basic.ll ipsccp-conditional.ll logical-nuke.ll
Changes in directory llvm/test/Regression/Transforms/SCCP: 2004-12-10-UndefBranchBug.ll updated: 1.2 -> 1.3 2006-12-04-PackedType.ll updated: 1.1 -> 1.2 ipsccp-basic.ll updated: 1.3 -> 1.4 ipsccp-conditional.ll updated: 1.3 -> 1.4 logical-nuke.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+6 -6) 2004-12-10-UndefBranchBug.ll |2 +- 2006-12-04-PackedType.ll |4 ++-- ipsccp-basic.ll |2 +- ipsccp-conditional.ll|2 +- logical-nuke.ll |2 +- 5 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/test/Regression/Transforms/SCCP/2004-12-10-UndefBranchBug.ll diff -u llvm/test/Regression/Transforms/SCCP/2004-12-10-UndefBranchBug.ll:1.2 llvm/test/Regression/Transforms/SCCP/2004-12-10-UndefBranchBug.ll:1.3 --- llvm/test/Regression/Transforms/SCCP/2004-12-10-UndefBranchBug.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/SCCP/2004-12-10-UndefBranchBug.ll Sun Dec 31 00:02:00 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep 'ret int 1' +; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep 'ret i32 1' ; This function definitely returns 1, even if we don't know the direction ; of the branch. Index: llvm/test/Regression/Transforms/SCCP/2006-12-04-PackedType.ll diff -u llvm/test/Regression/Transforms/SCCP/2006-12-04-PackedType.ll:1.1 llvm/test/Regression/Transforms/SCCP/2006-12-04-PackedType.ll:1.2 --- llvm/test/Regression/Transforms/SCCP/2006-12-04-PackedType.ll:1.1 Mon Dec 4 17:54:59 2006 +++ llvm/test/Regression/Transforms/SCCP/2006-12-04-PackedType.ll Sun Dec 31 00:02:00 2006 @@ -105,8 +105,8 @@ void %gldLLVMVecPointRender(%struct.GLDContextRec* %ctx) { entry: - %tmp = getelementptr %struct.GLDContextRec* %ctx, int 0, uint 22 ; [#uses=1] - %tmp = load uint* %tmp ; [#uses=3] + %tmp.uip = getelementptr %struct.GLDContextRec* %ctx, int 0, uint 22 ; [#uses=1] + %tmp = load uint* %tmp.uip ; [#uses=3] %tmp91 = lshr uint %tmp, ubyte 5; [#uses=1] %tmp92 = trunc uint %tmp91 to bool ; [#uses=1] br bool %tmp92, label %cond_true93, label %cond_next116 Index: llvm/test/Regression/Transforms/SCCP/ipsccp-basic.ll diff -u llvm/test/Regression/Transforms/SCCP/ipsccp-basic.ll:1.3 llvm/test/Regression/Transforms/SCCP/ipsccp-basic.ll:1.4 --- llvm/test/Regression/Transforms/SCCP/ipsccp-basic.ll:1.3Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/SCCP/ipsccp-basic.llSun Dec 31 00:02:00 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | grep -v 'ret int 17' | grep -v 'ret int undef' | not grep ret +; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | grep -v 'ret i32 17' | grep -v 'ret i32 undef' | not grep ret implementation Index: llvm/test/Regression/Transforms/SCCP/ipsccp-conditional.ll diff -u llvm/test/Regression/Transforms/SCCP/ipsccp-conditional.ll:1.3 llvm/test/Regression/Transforms/SCCP/ipsccp-conditional.ll:1.4 --- llvm/test/Regression/Transforms/SCCP/ipsccp-conditional.ll:1.3 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/SCCP/ipsccp-conditional.ll Sun Dec 31 00:02:00 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | grep -v 'ret int 0' | grep -v 'ret int undef' | not grep ret +; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | grep -v 'ret i32 0' | grep -v 'ret i32 undef' | not grep ret implementation Index: llvm/test/Regression/Transforms/SCCP/logical-nuke.ll diff -u llvm/test/Regression/Transforms/SCCP/logical-nuke.ll:1.2 llvm/test/Regression/Transforms/SCCP/logical-nuke.ll:1.3 --- llvm/test/Regression/Transforms/SCCP/logical-nuke.ll:1.2Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/SCCP/logical-nuke.llSun Dec 31 00:02:00 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep 'ret int 0' +; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep 'ret i32 0' ; Test that SCCP has
[llvm-commits] CVS: llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-SetCC.ll
Changes in directory llvm/test/Regression/Transforms/PredicateSimplifier: 2006-09-20-SetCC.ll updated: 1.3 -> 1.4 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+3 -3) 2006-09-20-SetCC.ll |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-SetCC.ll diff -u llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-SetCC.ll:1.3 llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-SetCC.ll:1.4 --- llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-SetCC.ll:1.3 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-SetCC.ll Sun Dec 31 00:01:59 2006 @@ -16,8 +16,8 @@ br label %cond_true cond_true: ; preds = %return.i, %cond_true.outer - %indvar = phi uint [ 0, %cond_true.outer ], [ %indvar.next, %return.i ] ; [#uses=2] - %indvar = cast uint %indvar to int ; [#uses=1] + %indvar.ui = phi uint [ 0, %cond_true.outer ], [ %indvar.next, %return.i ] ; [#uses=2] + %indvar = cast uint %indvar.ui to int ; [#uses=1] %i.0.0 = add int %indvar, %i.0.0.ph ; [#uses=3] %savedstack = call sbyte* %llvm.stacksave( ); [#uses=2] %tmp.i = seteq int %i.0.0, 0; [#uses=1] @@ -38,7 +38,7 @@ return.i: ; preds = %cond_true call void %llvm.stackrestore( sbyte* %savedstack ) %tmp21 = setgt int %tmp5, ; [#uses=1] - %indvar.next = add uint %indvar, 1 ; [#uses=1] + %indvar.next = add uint %indvar.ui, 1 ; [#uses=1] br bool %tmp21, label %bb8, label %cond_true bb8: ; preds = %return.i, %cond_true.i ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Analysis/GlobalsModRef/indirect-global.ll
Changes in directory llvm/test/Regression/Analysis/GlobalsModRef: indirect-global.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+3 -1) indirect-global.ll |4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/test/Regression/Analysis/GlobalsModRef/indirect-global.ll diff -u llvm/test/Regression/Analysis/GlobalsModRef/indirect-global.ll:1.2 llvm/test/Regression/Analysis/GlobalsModRef/indirect-global.ll:1.3 --- llvm/test/Regression/Analysis/GlobalsModRef/indirect-global.ll:1.2 Fri Dec 1 22:23:07 2006 +++ llvm/test/Regression/Analysis/GlobalsModRef/indirect-global.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0' +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | \ +; RUN: grep 'ret i32 0' %G = internal global int* null implementation ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll move_alloca_for_tail_call.ll
Changes in directory llvm/test/Regression/Transforms/TailCallElim: dont-tce-tail-marked-call.ll updated: 1.2 -> 1.3 move_alloca_for_tail_call.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+2 -2) dont-tce-tail-marked-call.ll |2 +- move_alloca_for_tail_call.ll |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll diff -u llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll:1.2 llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll:1.3 --- llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll Sun Dec 31 00:02:00 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | grep 'call int %foo' +; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | grep 'call i32 %foo' declare void %bar(int*) int %foo(uint %N) { Index: llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll diff -u llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll:1.2 llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll:1.3 --- llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll Sun Dec 31 00:02:00 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | %prcontext alloca 1 | grep 'int %foo' +; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | %prcontext alloca 1 | grep 'i32 %foo' declare void %bar(int*) int %foo() { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll 2006-12-08-Ptr-ICmp-Branch.ll
Changes in directory llvm/test/Regression/Transforms/SimplifyCFG: 2006-10-29-InvokeCrash.ll updated: 1.2 -> 1.3 2006-12-08-Ptr-ICmp-Branch.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+3 -3) 2006-10-29-InvokeCrash.ll |4 ++-- 2006-12-08-Ptr-ICmp-Branch.ll |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/Regression/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll diff -u llvm/test/Regression/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll:1.2 llvm/test/Regression/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll:1.3 --- llvm/test/Regression/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll Sun Dec 31 00:02:00 2006 @@ -413,11 +413,11 @@ cond_next225: ; preds = %invcont222, %cond_true217, %invcont213 %toPage.1 = phi int [ %tmp223, %invcont222 ], [ %tmp214, %cond_true217 ], [ %tmp214, %invcont213 ] ; [#uses=2] %fromPage.1 = phi int [ 1, %invcont222 ], [ %tmp211, %cond_true217 ], [ %tmp211, %invcont213 ] ; [#uses=2] - %tmp = invoke uint %_ZNK8QPrinter9pageOrderEv( %struct.QPrinter* %printer ) + %tmp.page = invoke uint %_ZNK8QPrinter9pageOrderEv( %struct.QPrinter* %printer ) to label %invcont227 unwind label %cleanup329 ; [#uses=1] invcont227:; preds = %cond_next225 - %tmp228 = seteq uint %tmp, 1; [#uses=1] + %tmp228 = seteq uint %tmp.page, 1 ; [#uses=1] br bool %tmp228, label %cond_true230, label %cond_next234 cond_true230: ; preds = %invcont227 Index: llvm/test/Regression/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll diff -u llvm/test/Regression/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll:1.2 llvm/test/Regression/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll:1.3 --- llvm/test/Regression/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll:1.2 Fri Dec 29 14:01:32 2006 +++ llvm/test/Regression/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll Sun Dec 31 00:02:00 2006 @@ -56,7 +56,7 @@ bb: ; preds = %bb33 %tmp = load %struct.FILE** %f_addr ; <%struct.FILE*> [#uses=1] -%tmp = call int %_IO_getc( %struct.FILE* %tmp ) ; [#uses=1] +%tmp.r = call int %_IO_getc( %struct.FILE* %tmp ) ; [#uses=1] %tmp6 = call int %tolower( int %tmp ) ; [#uses=1] %tmp6 = trunc int %tmp6 to sbyte; [#uses=1] store sbyte %tmp6, sbyte* %c ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx 2005-03-09-BrokenBasicAA.ll tailcall-modref.ll
Changes in directory llvm/test/Regression/Analysis/BasicAA: 2004-07-28-MustAliasbug.llx updated: 1.2 -> 1.3 2005-03-09-BrokenBasicAA.ll updated: 1.2 -> 1.3 tailcall-modref.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+3 -3) 2004-07-28-MustAliasbug.llx |2 +- 2005-03-09-BrokenBasicAA.ll |2 +- tailcall-modref.ll |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx diff -u llvm/test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx:1.2 llvm/test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx:1.3 --- llvm/test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx:1.2 Fri Dec 29 14:01:32 2006 +++ llvm/test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep 'store int 0' +; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep 'store i32 0' void %test({int,int }* %P) { %Q = getelementptr {int,int}* %P, int 1 Index: llvm/test/Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll diff -u llvm/test/Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll:1.2 llvm/test/Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll:1.3 --- llvm/test/Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll:1.2 Fri Dec 1 22:23:07 2006 +++ llvm/test/Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'load int\* %A' +; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'load i32\* %A' declare double* %useit(int*) Index: llvm/test/Regression/Analysis/BasicAA/tailcall-modref.ll diff -u llvm/test/Regression/Analysis/BasicAA/tailcall-modref.ll:1.2 llvm/test/Regression/Analysis/BasicAA/tailcall-modref.ll:1.3 --- llvm/test/Regression/Analysis/BasicAA/tailcall-modref.ll:1.2Fri Dec 1 22:23:07 2006 +++ llvm/test/Regression/Analysis/BasicAA/tailcall-modref.llSun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0' +; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'ret i32 0' declare void %foo(int*) declare void %bar() ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/ExecutionEngine/2003-01-04-PhiTest.ll 2003-05-11-PHIRegAllocBug.ll 2003-06-05-PHIBug.ll 2003-08-15-AllocaAssertion.ll 2003-08-23-RegisterAllocatePhysReg.ll hel
Changes in directory llvm/test/Regression/ExecutionEngine: 2003-01-04-PhiTest.ll updated: 1.4 -> 1.5 2003-05-11-PHIRegAllocBug.ll updated: 1.3 -> 1.4 2003-06-05-PHIBug.ll updated: 1.2 -> 1.3 2003-08-15-AllocaAssertion.ll updated: 1.2 -> 1.3 2003-08-23-RegisterAllocatePhysReg.ll updated: 1.2 -> 1.3 hello.ll updated: 1.3 -> 1.4 hello2.ll updated: 1.3 -> 1.4 simplesttest.ll updated: 1.5 -> 1.6 simpletest.ll updated: 1.2 -> 1.3 test-loadstore.ll updated: 1.6 -> 1.7 test-logical.ll updated: 1.5 -> 1.6 test-malloc.ll updated: 1.2 -> 1.3 test-ret.ll updated: 1.5 -> 1.6 test-shift.ll updated: 1.7 -> 1.8 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+36 -36) 2003-01-04-PhiTest.ll |2 +- 2003-05-11-PHIRegAllocBug.ll |2 +- 2003-06-05-PHIBug.ll |2 +- 2003-08-15-AllocaAssertion.ll |2 +- 2003-08-23-RegisterAllocatePhysReg.ll |2 +- hello.ll |2 +- hello2.ll |2 +- simplesttest.ll |2 +- simpletest.ll |2 +- test-loadstore.ll |2 +- test-logical.ll |2 +- test-malloc.ll|2 +- test-ret.ll | 22 +++--- test-shift.ll | 26 +- 14 files changed, 36 insertions(+), 36 deletions(-) Index: llvm/test/Regression/ExecutionEngine/2003-01-04-PhiTest.ll diff -u llvm/test/Regression/ExecutionEngine/2003-01-04-PhiTest.ll:1.4 llvm/test/Regression/ExecutionEngine/2003-01-04-PhiTest.ll:1.5 --- llvm/test/Regression/ExecutionEngine/2003-01-04-PhiTest.ll:1.4 Sat Nov 6 17:32:43 2004 +++ llvm/test/Regression/ExecutionEngine/2003-01-04-PhiTest.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-as -f %s -o %t.bc +; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc ; RUN: lli %t.bc > /dev/null int %main() { Index: llvm/test/Regression/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll diff -u llvm/test/Regression/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll:1.3 llvm/test/Regression/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll:1.4 --- llvm/test/Regression/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll:1.3 Sat Nov 6 17:32:43 2004 +++ llvm/test/Regression/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-as -f %s -o %t.bc +; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc ; RUN: lli %t.bc > /dev/null target endian = little Index: llvm/test/Regression/ExecutionEngine/2003-06-05-PHIBug.ll diff -u llvm/test/Regression/ExecutionEngine/2003-06-05-PHIBug.ll:1.2 llvm/test/Regression/ExecutionEngine/2003-06-05-PHIBug.ll:1.3 --- llvm/test/Regression/ExecutionEngine/2003-06-05-PHIBug.ll:1.2 Sat Nov 6 17:32:43 2004 +++ llvm/test/Regression/ExecutionEngine/2003-06-05-PHIBug.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-as -f %s -o %t.bc +; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; Testcase distilled from 256.bzip2. Index: llvm/test/Regression/ExecutionEngine/2003-08-15-AllocaAssertion.ll diff -u llvm/test/Regression/ExecutionEngine/2003-08-15-AllocaAssertion.ll:1.2 llvm/test/Regression/ExecutionEngine/2003-08-15-AllocaAssertion.ll:1.3 --- llvm/test/Regression/ExecutionEngine/2003-08-15-AllocaAssertion.ll:1.2 Sat Nov 6 17:32:43 2004 +++ llvm/test/Regression/ExecutionEngine/2003-08-15-AllocaAssertion.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-as -f %s -o %t.bc +; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; This testcase failed to work because two variable sized allocas confused the Index: llvm/test/Regression/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll diff -u llvm/test/Regression/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll:1.2 llvm/test/Regression/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll:1.3 --- llvm/test/Regression/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll:1.2 Sat Nov 6 17:32:43 2004 +++ llvm/test/Regression/ExecutionEngine/2003-08-23-RegisterAll
[llvm-commits] CVS: llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx 2003-04-15-ConstantInitAssertion.llx 2003-05-21-MalformedShiftCrash.llx 2003-05-21-MalformedStructCrash.llx 200
Changes in directory llvm/test/Regression/Assembler: 2002-07-08-HugePerformanceProblem.llx updated: 1.4 -> 1.5 2003-04-15-ConstantInitAssertion.llx updated: 1.2 -> 1.3 2003-05-21-MalformedShiftCrash.llx updated: 1.3 -> 1.4 2003-05-21-MalformedStructCrash.llx updated: 1.3 -> 1.4 2003-11-12-ConstantExprCast.llx updated: 1.3 -> 1.4 2003-12-30-TypeMapInvalidMemory.llx updated: 1.3 -> 1.4 2004-10-22-BCWriterUndefBug.llx updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+10 -9) 2002-07-08-HugePerformanceProblem.llx |2 +- 2003-04-15-ConstantInitAssertion.llx |2 +- 2003-05-21-MalformedShiftCrash.llx|2 +- 2003-05-21-MalformedStructCrash.llx |2 +- 2003-11-12-ConstantExprCast.llx |6 +++--- 2003-12-30-TypeMapInvalidMemory.llx |3 ++- 2004-10-22-BCWriterUndefBug.llx |2 +- 7 files changed, 10 insertions(+), 9 deletions(-) Index: llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx diff -u llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx:1.4 llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx:1.5 --- llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx:1.4 Sat Nov 6 14:38:27 2004 +++ llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx Sun Dec 31 00:01:59 2006 @@ -1,6 +1,6 @@ ; This file takes about 48 __MINUTES__ to assemble using as. This is WAY too ; long. The type resolution code needs to be sped up a lot. -; RUN: ulimit -t 20; llvm-as < %s +; RUN: ulimit -t 20; llvm-upgrade < %s | llvm-as %ALL_INTERSECTIONS_METHOD = type int (%OBJECT*, %RAY*, %ISTACK*)* %BBOX = type { %BBOX_VECT, %BBOX_VECT } Index: llvm/test/Regression/Assembler/2003-04-15-ConstantInitAssertion.llx diff -u llvm/test/Regression/Assembler/2003-04-15-ConstantInitAssertion.llx:1.2 llvm/test/Regression/Assembler/2003-04-15-ConstantInitAssertion.llx:1.3 --- llvm/test/Regression/Assembler/2003-04-15-ConstantInitAssertion.llx:1.2 Thu Oct 23 10:47:23 2003 +++ llvm/test/Regression/Assembler/2003-04-15-ConstantInitAssertion.llx Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: (llvm-as < %s 2>&1) | grep Expected +; RUN: llvm-upgrade < %s | llvm-as 2>&1 >/dev/null | grep Expected ; Test the case of a misformed constant initializer ; This should cause an assembler error, not an assertion failure! %X = constant {int} { float 1.0 } Index: llvm/test/Regression/Assembler/2003-05-21-MalformedShiftCrash.llx diff -u llvm/test/Regression/Assembler/2003-05-21-MalformedShiftCrash.llx:1.3 llvm/test/Regression/Assembler/2003-05-21-MalformedShiftCrash.llx:1.4 --- llvm/test/Regression/Assembler/2003-05-21-MalformedShiftCrash.llx:1.3 Sat Dec 2 14:34:08 2006 +++ llvm/test/Regression/Assembler/2003-05-21-MalformedShiftCrash.llx Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f 2>&1 | grep "Shift constant expression" +; RUN: llvm-upgrade < %s | llvm-as 2>&1 > /dev/null | grep "Shift constant expression" global int shr (float 1.0, ubyte 2) Index: llvm/test/Regression/Assembler/2003-05-21-MalformedStructCrash.llx diff -u llvm/test/Regression/Assembler/2003-05-21-MalformedStructCrash.llx:1.3 llvm/test/Regression/Assembler/2003-05-21-MalformedStructCrash.llx:1.4 --- llvm/test/Regression/Assembler/2003-05-21-MalformedStructCrash.llx:1.3 Mon Sep 15 15:01:21 2003 +++ llvm/test/Regression/Assembler/2003-05-21-MalformedStructCrash.llx Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: llvm-as < %s 2>&1 | grep "Illegal" +; RUN: llvm-upgrade < %s | llvm-as 2>&1 > /dev/null | grep "Illegal" global {} { int 7, float 1.0, int 7, int 8 } Index: llvm/test/Regression/Assembler/2003-11-12-ConstantExprCast.llx diff -u llvm/test/Regression/Assembler/2003-11-12-ConstantExprCast.llx:1.3 llvm/test/Regression/Assembler/2003-11-12-ConstantExprCast.llx:1.4 --- llvm/test/Regression/Assembler/2003-11-12-ConstantExprCast.llx:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/Assembler/2003-11-12-ConstantExprCast.llx Sun Dec 31 00:01:59 20
[llvm-commits] CVS: llvm/test/Regression/C++Frontend/2006-09-27-Debug-Protection.cpp
Changes in directory llvm/test/Regression/C++Frontend: 2006-09-27-Debug-Protection.cpp updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+2 -2) 2006-09-27-Debug-Protection.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Regression/C++Frontend/2006-09-27-Debug-Protection.cpp diff -u llvm/test/Regression/C++Frontend/2006-09-27-Debug-Protection.cpp:1.2 llvm/test/Regression/C++Frontend/2006-09-27-Debug-Protection.cpp:1.3 --- llvm/test/Regression/C++Frontend/2006-09-27-Debug-Protection.cpp:1.2 Wed Nov 8 14:16:05 2006 +++ llvm/test/Regression/C++Frontend/2006-09-27-Debug-Protection.cppSun Dec 31 00:01:59 2006 @@ -1,6 +1,6 @@ // XFAIL: llvmgcc3 -// RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep 'uint 1,' && -// RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep 'uint 2,' +// RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep 'i32 1,' && +// RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep 'i32 2,' class A { public: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/ConstProp/2006-11-30-vector-cast.ll 2006-12-01-bool-casts.ll bitcast.ll float-to-ptr-cast.ll
Changes in directory llvm/test/Regression/Transforms/ConstProp: 2006-11-30-vector-cast.ll updated: 1.3 -> 1.4 2006-12-01-bool-casts.ll updated: 1.2 -> 1.3 bitcast.ll updated: 1.1 -> 1.2 float-to-ptr-cast.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+6 -6) 2006-11-30-vector-cast.ll |2 +- 2006-12-01-bool-casts.ll |4 ++-- bitcast.ll|4 ++-- float-to-ptr-cast.ll |2 +- 4 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/test/Regression/Transforms/ConstProp/2006-11-30-vector-cast.ll diff -u llvm/test/Regression/Transforms/ConstProp/2006-11-30-vector-cast.ll:1.3 llvm/test/Regression/Transforms/ConstProp/2006-11-30-vector-cast.ll:1.4 --- llvm/test/Regression/Transforms/ConstProp/2006-11-30-vector-cast.ll:1.3 Tue Dec 19 16:42:17 2006 +++ llvm/test/Regression/Transforms/ConstProp/2006-11-30-vector-cast.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'uint -1' && +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'i32 -1' && ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep zeroinitializer < 4 x uint> %test() { Index: llvm/test/Regression/Transforms/ConstProp/2006-12-01-bool-casts.ll diff -u llvm/test/Regression/Transforms/ConstProp/2006-12-01-bool-casts.ll:1.2 llvm/test/Regression/Transforms/ConstProp/2006-12-01-bool-casts.ll:1.3 --- llvm/test/Regression/Transforms/ConstProp/2006-12-01-bool-casts.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/ConstProp/2006-12-01-bool-casts.ll Sun Dec 31 00:01:59 2006 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret int -1' && -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret uint 1' +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret i32 -1' && +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret i32 1' int %test1() { %A = sext bool true to int Index: llvm/test/Regression/Transforms/ConstProp/bitcast.ll diff -u llvm/test/Regression/Transforms/ConstProp/bitcast.ll:1.1 llvm/test/Regression/Transforms/ConstProp/bitcast.ll:1.2 --- llvm/test/Regression/Transforms/ConstProp/bitcast.ll:1.1Mon Dec 11 12:29:07 2006 +++ llvm/test/Regression/Transforms/ConstProp/bitcast.llSun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llvm-dis && -; RUN: llvm-as < %s | llvm-dis | grep 0x36A0 +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis && +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 0x36A0 %A = global float bitcast (int 1 to float) Index: llvm/test/Regression/Transforms/ConstProp/float-to-ptr-cast.ll diff -u llvm/test/Regression/Transforms/ConstProp/float-to-ptr-cast.ll:1.2 llvm/test/Regression/Transforms/ConstProp/float-to-ptr-cast.ll:1.3 --- llvm/test/Regression/Transforms/ConstProp/float-to-ptr-cast.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/ConstProp/float-to-ptr-cast.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep -F 'ret int* null' | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep -F 'ret i32* null' | wc -l | grep 2 int* %test1() { %X = cast float 0.0 to int* ret int* %X ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/Alpha/zapnot.ll
Changes in directory llvm/test/Regression/CodeGen/Alpha: zapnot.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+4 -5) zapnot.ll |9 - 1 files changed, 4 insertions(+), 5 deletions(-) Index: llvm/test/Regression/CodeGen/Alpha/zapnot.ll diff -u llvm/test/Regression/CodeGen/Alpha/zapnot.ll:1.2 llvm/test/Regression/CodeGen/Alpha/zapnot.ll:1.3 --- llvm/test/Regression/CodeGen/Alpha/zapnot.ll:1.2Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/Alpha/zapnot.llSun Dec 31 00:01:59 2006 @@ -1,11 +1,10 @@ ; Make sure this testcase codegens to the bic instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'zapnot' +; RUN: llvm-as < %s | llc -march=alpha | grep 'zapnot' implementation ; Functions: -ushort %foo(long %y) { +define i16 @zext %foo(i64 %y) { entry: -%tmp.1 = cast long %y to ushort ; [#uses=1] -ret ushort %tmp.1 +%tmp.1 = trunc i64 %y to i16 ; [#uses=1] +ret i16 %tmp.1 } - ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll 2006-06-27-AST-Remove.ll
Changes in directory llvm/test/Regression/Transforms/DeadStoreElimination: 2004-12-28-PartialStore.ll updated: 1.3 -> 1.4 2006-06-27-AST-Remove.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+13 -13) 2004-12-28-PartialStore.ll |2 +- 2006-06-27-AST-Remove.ll | 24 2 files changed, 13 insertions(+), 13 deletions(-) Index: llvm/test/Regression/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll diff -u llvm/test/Regression/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll:1.3 llvm/test/Regression/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll:1.4 --- llvm/test/Regression/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll:1.3 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep 'store int 1234567' +; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep 'store i32 1234567' ; Do not delete stores that are only partially killed. Index: llvm/test/Regression/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll diff -u llvm/test/Regression/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll:1.2 llvm/test/Regression/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll:1.3 --- llvm/test/Regression/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll Sun Dec 31 00:01:59 2006 @@ -755,22 +755,22 @@ %tmp.i = load %struct.TType** %DP_TTable; <%struct.TType*> [#uses=1] %tmp.i7.b = load bool* %TTSize.b; [#uses=1] %tmp1.i = select bool %tmp.i7.b, uint 6000, uint 0 ; [#uses=1] - %tmp.i = getelementptr %struct.TType* %tmp.i, int 0, uint 0 ; [#uses=1] - call void %llvm.memset.i32( sbyte* %tmp.i, ubyte 0, uint %tmp1.i, uint 4 ) + %tmp.i.sb = getelementptr %struct.TType* %tmp.i, int 0, uint 0 ; [#uses=1] + call void %llvm.memset.i32( sbyte* %tmp.i.sb, ubyte 0, uint %tmp1.i, uint 4 ) %tmp2.i = load %struct.TType** %AS_TTable ; <%struct.TType*> [#uses=1] %tmp3.i8.b = load bool* %TTSize.b ; [#uses=1] %tmp4.i = select bool %tmp3.i8.b, uint 6000, uint 0 ; [#uses=1] %tmp2.i = getelementptr %struct.TType* %tmp2.i, int 0, uint 0 ; [#uses=1] call void %llvm.memset.i32( sbyte* %tmp2.i, ubyte 0, uint %tmp4.i, uint 4 ) - %tmp.i = load %struct.QTType** %QS_TTable ; <%struct.QTType*> [#uses=1] + %tmp.i.QTT = load %struct.QTType** %QS_TTable ; <%struct.QTType*> [#uses=1] %tmp5.i9.b = load bool* %TTSize.b ; [#uses=1] %tmp6.i10 = select bool %tmp5.i9.b, uint 4800, uint 0 ; [#uses=1] - %tmp7.i = getelementptr %struct.QTType* %tmp.i, int 0, uint 0 ; [#uses=1] + %tmp7.i = getelementptr %struct.QTType* %tmp.i.QTT, int 0, uint 0 ; [#uses=1] call void %llvm.memset.i32( sbyte* %tmp7.i, ubyte 0, uint %tmp6.i10, uint 4 ) - %tmp.i = load %struct.ECacheType** %ECache ; <%struct.ECacheType*> [#uses=1] + %tmp.i.ECache = load %struct.ECacheType** %ECache ; <%struct.ECacheType*> [#uses=1] %tmp.i14.b = load bool* %ECacheSize.b ; [#uses=1] %tmp1.i16 = select bool %tmp.i14.b, uint 1200, uint 0 ; [#uses=1] - %tmp.i17 = cast %struct.ECacheType* %tmp.i to sbyte*; [#uses=1] + %tmp.i17 = cast %struct.ECacheType* %tmp.i.ECache to sbyte* ; [#uses=1] call void %llvm.memset.i32( sbyte* %tmp.i17, ubyte 0, uint %tmp1.i16, uint 4 ) call void %llvm.memset.i32( sbyte* cast ([300 x int]* %rootlosers to sbyte*), ubyte 0, uint 1200, uint 4 ) %tmp234.b = load bool* %is_pondering.b ; [#uses=1] @@ -800,12 +800,12 @@ %tmp1.b.i = load
[llvm-commits] CVS: llvm/test/Regression/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll union-fp-int.ll union-pointer.ll
Changes in directory llvm/test/Regression/Transforms/ScalarRepl: 2006-11-07-InvalidArrayPromote.ll updated: 1.2 -> 1.3 union-fp-int.ll updated: 1.3 -> 1.4 union-pointer.ll updated: 1.3 -> 1.4 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+3 -3) 2006-11-07-InvalidArrayPromote.ll |2 +- union-fp-int.ll |2 +- union-pointer.ll |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/Regression/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll diff -u llvm/test/Regression/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll:1.2 llvm/test/Regression/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll:1.3 --- llvm/test/Regression/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll Sun Dec 31 00:02:00 2006 @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis && -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep -F 'alloca [2 x <4 x int>]' +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep -F 'alloca [2 x <4 x i32>]' int %func(<4 x float> %v0, <4 x float> %v1) { %vsiidx = alloca [2 x <4 x int>], align 16 ; <[2 x <4 x int>]*> [#uses=3] Index: llvm/test/Regression/Transforms/ScalarRepl/union-fp-int.ll diff -u llvm/test/Regression/Transforms/ScalarRepl/union-fp-int.ll:1.3 llvm/test/Regression/Transforms/ScalarRepl/union-fp-int.ll:1.4 --- llvm/test/Regression/Transforms/ScalarRepl/union-fp-int.ll:1.3 Fri Dec 15 01:32:49 2006 +++ llvm/test/Regression/Transforms/ScalarRepl/union-fp-int.ll Sun Dec 31 00:02:00 2006 @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca && -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'bitcast.*float.*int' +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'bitcast.*float.*i32' int %test(float %X) { %X_addr = alloca float Index: llvm/test/Regression/Transforms/ScalarRepl/union-pointer.ll diff -u llvm/test/Regression/Transforms/ScalarRepl/union-pointer.ll:1.3 llvm/test/Regression/Transforms/ScalarRepl/union-pointer.ll:1.4 --- llvm/test/Regression/Transforms/ScalarRepl/union-pointer.ll:1.3 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/ScalarRepl/union-pointer.ll Sun Dec 31 00:02:00 2006 @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca && -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'ret sbyte' +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'ret i8' ; PR892 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/IndVarsSimplify/2005-02-26-ExitValueCompute.ll 2006-03-31-NegativeStride.ll variable-stride-ivs.ll
Changes in directory llvm/test/Regression/Transforms/IndVarsSimplify: 2005-02-26-ExitValueCompute.ll updated: 1.2 -> 1.3 2006-03-31-NegativeStride.ll updated: 1.2 -> 1.3 variable-stride-ivs.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+6 -6) 2005-02-26-ExitValueCompute.ll |2 +- 2006-03-31-NegativeStride.ll |2 +- variable-stride-ivs.ll |8 3 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/test/Regression/Transforms/IndVarsSimplify/2005-02-26-ExitValueCompute.ll diff -u llvm/test/Regression/Transforms/IndVarsSimplify/2005-02-26-ExitValueCompute.ll:1.2 llvm/test/Regression/Transforms/IndVarsSimplify/2005-02-26-ExitValueCompute.ll:1.3 --- llvm/test/Regression/Transforms/IndVarsSimplify/2005-02-26-ExitValueCompute.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/IndVarsSimplify/2005-02-26-ExitValueCompute.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep 'ret int 152' +; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep 'ret i32 152' int %main() { entry: Index: llvm/test/Regression/Transforms/IndVarsSimplify/2006-03-31-NegativeStride.ll diff -u llvm/test/Regression/Transforms/IndVarsSimplify/2006-03-31-NegativeStride.ll:1.2 llvm/test/Regression/Transforms/IndVarsSimplify/2006-03-31-NegativeStride.ll:1.3 --- llvm/test/Regression/Transforms/IndVarsSimplify/2006-03-31-NegativeStride.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/IndVarsSimplify/2006-03-31-NegativeStride.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep 'ret int 27' +; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep 'ret i32 27' ; Make sure to compute the right exit value based on negative strides. ; PR726 Index: llvm/test/Regression/Transforms/IndVarsSimplify/variable-stride-ivs.ll diff -u llvm/test/Regression/Transforms/IndVarsSimplify/variable-stride-ivs.ll:1.2 llvm/test/Regression/Transforms/IndVarsSimplify/variable-stride-ivs.ll:1.3 --- llvm/test/Regression/Transforms/IndVarsSimplify/variable-stride-ivs.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/IndVarsSimplify/variable-stride-ivs.ll Sun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -instcombine | llvm-dis | grep 'store int 0' +; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -instcombine | llvm-dis | grep 'store i32 0' ; Test that -indvars can reduce variable stride IVs. If it can reduce variable ; stride iv's, it will make %iv. and %m.0.0 isomorphic to each other without ; cycles, allowing the tmp.21 subtraction to be eliminated. @@ -19,7 +19,7 @@ br label %no_exit no_exit:; preds = %no_exit, %no_exit.preheader -%iv. = phi uint [ 0, %no_exit.preheader ], [ %iv..inc, %no_exit ] ; [#uses=1] +%iv.ui = phi uint [ 0, %no_exit.preheader ], [ %iv..inc.ui, %no_exit ] ; [#uses=1] %iv. = phi int [ %tmp.5, %no_exit.preheader ], [ %iv..inc, %no_exit ] ; [#uses=2] %m.0.0 = phi int [ %tmp.5, %no_exit.preheader ], [ %tmp.24, %no_exit ] ; [#uses=2] store int 2, int* %tmp.16 @@ -27,8 +27,8 @@ store int %tmp.21, int* %data %tmp.24 = add int %m.0.0, %tmp.9; [#uses=1] %iv..inc = add int %tmp.9, %iv. ; [#uses=1] -%iv..inc = add uint %iv., 1 ; [#uses=2] -%iv..inc1 = cast uint %iv..inc to int ; [#uses=1] +%iv..inc.ui = add uint %iv.ui, 1 ; [#uses=2] +%iv..inc1 = cast uint %iv..inc.ui to int ; [#uses=1] %tmp.12 = setlt int %iv..inc1, %tmp.2 ; [#uses=1] br bool %tmp.12, label %no_exit, label %return.loopexit ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll 2002-07-17-LinkTest2.ll 2002-08-20-ConstantExpr.ll 2003-04-26-NullPtrLinkProblem.ll 2003-05-15-TypeProblem.ll 2003-06-02-TypeRe
Changes in directory llvm/test/Regression/Linker: 2002-07-17-GlobalFail.ll updated: 1.3 -> 1.4 2002-07-17-LinkTest2.ll updated: 1.4 -> 1.5 2002-08-20-ConstantExpr.ll updated: 1.4 -> 1.5 2003-04-26-NullPtrLinkProblem.ll updated: 1.4 -> 1.5 2003-05-15-TypeProblem.ll updated: 1.3 -> 1.4 2003-06-02-TypeResolveProblem.ll updated: 1.3 -> 1.4 2003-06-02-TypeResolveProblem2.ll updated: 1.3 -> 1.4 2003-08-20-OpaqueTypeResolve.ll updated: 1.3 -> 1.4 2003-08-23-GlobalVarLinking.ll updated: 1.4 -> 1.5 2003-08-23-RecursiveOpaqueTypeResolve.ll updated: 1.4 -> 1.5 2003-10-21-ConflictingTypesTolerance.ll updated: 1.1 -> 1.2 2003-10-27-LinkOncePromote.ll updated: 1.2 -> 1.3 2004-02-17-WeakStrongLinkage.ll updated: 1.1 -> 1.2 2005-02-12-ConstantGlobals-2.ll updated: 1.1 -> 1.2 2005-02-12-ConstantGlobals.ll updated: 1.2 -> 1.3 2005-12-06-AppendingZeroLengthArrays.ll updated: 1.1 -> 1.2 2006-01-19-ConstantPacked.ll updated: 1.1 -> 1.2 2006-06-15-GlobalVarAlignment.ll updated: 1.1 -> 1.2 AppendingLinkage2.ll updated: 1.3 -> 1.4 ConstantGlobals1.ll updated: 1.2 -> 1.3 ConstantGlobals2.ll updated: 1.2 -> 1.3 ConstantGlobals3.ll updated: 1.2 -> 1.3 LinkOnce.ll updated: 1.3 -> 1.4 weakextern.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+47 -47) 2002-07-17-GlobalFail.ll |2 +- 2002-07-17-LinkTest2.ll |2 +- 2002-08-20-ConstantExpr.ll |2 +- 2003-04-26-NullPtrLinkProblem.ll |2 +- 2003-05-15-TypeProblem.ll|4 ++-- 2003-06-02-TypeResolveProblem.ll |4 ++-- 2003-06-02-TypeResolveProblem2.ll|4 ++-- 2003-08-20-OpaqueTypeResolve.ll |4 ++-- 2003-08-23-GlobalVarLinking.ll |4 ++-- 2003-08-23-RecursiveOpaqueTypeResolve.ll |4 ++-- 2003-10-21-ConflictingTypesTolerance.ll |4 ++-- 2003-10-27-LinkOncePromote.ll|4 ++-- 2004-02-17-WeakStrongLinkage.ll |4 ++-- 2005-02-12-ConstantGlobals-2.ll |6 +++--- 2005-02-12-ConstantGlobals.ll|6 +++--- 2005-12-06-AppendingZeroLengthArrays.ll |4 ++-- 2006-01-19-ConstantPacked.ll |2 +- 2006-06-15-GlobalVarAlignment.ll |4 ++-- AppendingLinkage2.ll |4 ++-- ConstantGlobals1.ll |4 ++-- ConstantGlobals2.ll |4 ++-- ConstantGlobals3.ll |2 +- LinkOnce.ll |4 ++-- weakextern.ll| 10 +- 24 files changed, 47 insertions(+), 47 deletions(-) Index: llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll diff -u llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll:1.3 llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll:1.4 --- llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll:1.3Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/2002-07-17-GlobalFail.llSun Dec 31 00:01:59 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s > %t.bc +; RUN: llvm-upgrade < %s | llvm-as > %t.bc ; RUN: echo | llvm-as > %t.tmp.bc ; RUN: llvm-link %t.tmp.bc %t.bc Index: llvm/test/Regression/Linker/2002-07-17-LinkTest2.ll diff -u llvm/test/Regression/Linker/2002-07-17-LinkTest2.ll:1.4 llvm/test/Regression/Linker/2002-07-17-LinkTest2.ll:1.5 --- llvm/test/Regression/Linker/2002-07-17-LinkTest2.ll:1.4 Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/2002-07-17-LinkTest2.ll Sun Dec 31 00:01:59 2006 @@ -1,7 +1,7 @@ ; This fails linking when it is linked with an empty file as the first object file ; RUN: llvm-as > %t1.bc < /dev/null -; RUN: llvm-as < %s > %t2.bc +; RUN: llvm-upgrade < %s | llvm-as > %t2.bc ; RUN: llvm-link %t[12].bc %work = global int (int, int)* %zip Index: llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll diff -u llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll:1.4 llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll:1.5 --- llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll:1.4 Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll Sun Dec 31 00:01:59 2006 @@ -1,7 +1,7 @@ ; This fails lin
[llvm-commits] CVS: llvm/test/Regression/Transforms/LoopSimplify/2006-08-11-LoopSimplifyLongTime.ll.bc
Changes in directory llvm/test/Regression/Transforms/LoopSimplify: 2006-08-11-LoopSimplifyLongTime.ll.bc updated: 1.3 -> 1.4 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+0 -0) 2006-08-11-LoopSimplifyLongTime.ll.bc |0 1 files changed Index: llvm/test/Regression/Transforms/LoopSimplify/2006-08-11-LoopSimplifyLongTime.ll.bc ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll
Changes in directory llvm/test/Regression/Transforms/LoopUnswitch: 2006-02-14-LoopSimplifyCrash.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+3 -3) 2006-02-14-LoopSimplifyCrash.ll |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/Regression/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll diff -u llvm/test/Regression/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll:1.2 llvm/test/Regression/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll:1.3 --- llvm/test/Regression/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll Sun Dec 31 00:01:59 2006 @@ -1421,8 +1421,8 @@ no_exit.53:; preds = %else.166, %else.168, %then.360, %no_exit.53.outer %file.2.3.3.ph = phi int [ 0, %no_exit.53.outer ], [ %inc.551688, %then.360 ], [ %inc.551701, %else.168 ], [ %file.2.3.3.ph, %else.166 ] ; [#uses=2] %nempty.5.3.ph = phi int [ 0, %no_exit.53.outer ], [ %nempty.5.3, %then.360 ], [ %nempty.5.3, %else.168 ], [ %nempty.5.3.ph, %else.166 ] ; [#uses=2] - %indvar2053 = phi uint [ 0, %no_exit.53.outer ], [ 0, %then.360 ], [ 0, %else.168 ], [ %indvar.next2054, %else.166 ]; [#uses=2] - %indvar2053 = cast uint %indvar2053 to int ; [#uses=2] + %indvar2053.ui = phi uint [ 0, %no_exit.53.outer ], [ 0, %then.360 ], [ 0, %else.168 ], [ %indvar.next2054, %else.166 ] ; [#uses=2] + %indvar2053 = cast uint %indvar2053.ui to int ; [#uses=2] %file.2.3.3 = add int %indvar2053, %file.2.3.3.ph ; [#uses=4] %nempty.5.3 = add int %indvar2053, %nempty.5.3.ph ; [#uses=3] %tmp.4749 = add int %file.2.3.3, %tmp.4747 ; [#uses=1] @@ -1472,7 +1472,7 @@ else.166: ; preds = %no_exit.53 %inc.55 = add int %file.2.3.3, 1; [#uses=1] %tmp.47421705 = setlt int %inc.55, 8; [#uses=1] - %indvar.next2054 = add uint %indvar2053, 1 ; [#uses=1] + %indvar.next2054 = add uint %indvar2053.ui, 1 ; [#uses=1] br bool %tmp.47421705, label %no_exit.53, label %loopexit.56 loopexit.56: ; preds = %else.166, %else.168, %then.360 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/2006-05-06-Infloop.ll 2006-06-28-infloop.ll 2006-09-15-CastToBool.ll 2006-10-19-SignedToUnsignedCastAndConst-2.ll 2006-10-19-SignedToUns
Changes in directory llvm/test/Regression/Transforms/InstCombine: 2006-05-06-Infloop.ll updated: 1.2 -> 1.3 2006-06-28-infloop.ll updated: 1.2 -> 1.3 2006-09-15-CastToBool.ll updated: 1.2 -> 1.3 2006-10-19-SignedToUnsignedCastAndConst-2.ll updated: 1.3 -> 1.4 2006-10-19-SignedToUnsignedCastAndConst.ll updated: 1.3 -> 1.4 deadcode.ll updated: 1.2 -> 1.3 fpcast.ll updated: 1.2 -> 1.3 shift-sra.ll updated: 1.4 -> 1.5 sub.ll updated: 1.23 -> 1.24 zeroext-and-reduce.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+19 -29) 2006-05-06-Infloop.ll| 18 -- 2006-06-28-infloop.ll|4 ++-- 2006-09-15-CastToBool.ll |8 2006-10-19-SignedToUnsignedCastAndConst-2.ll |2 +- 2006-10-19-SignedToUnsignedCastAndConst.ll |2 +- deadcode.ll |2 +- fpcast.ll|6 +++--- shift-sra.ll |2 +- sub.ll |2 +- zeroext-and-reduce.ll|2 +- 10 files changed, 19 insertions(+), 29 deletions(-) Index: llvm/test/Regression/Transforms/InstCombine/2006-05-06-Infloop.ll diff -u llvm/test/Regression/Transforms/InstCombine/2006-05-06-Infloop.ll:1.2 llvm/test/Regression/Transforms/InstCombine/2006-05-06-Infloop.ll:1.3 --- llvm/test/Regression/Transforms/InstCombine/2006-05-06-Infloop.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/InstCombine/2006-05-06-Infloop.ll Sun Dec 31 00:01:59 2006 @@ -10,7 +10,7 @@ int %mem_mono_copy_mono(%struct.gx_device* %dev, ubyte* %base, int %sourcex, int %raster, int %x, int %y, int %w, int %h, uint %zero, uint %one) { entry: - %raster = cast int %raster to uint ; [#uses=3] + %raster.ui = cast int %raster to uint ; [#uses=3] %tmp = seteq uint %one, %zero ; [#uses=1] br bool %tmp, label %cond_true, label %cond_next @@ -146,7 +146,6 @@ %optr.3.2 = phi ubyte* [ %tmp232, %cond_true249 ], [ %dest.1.0, %cond_true249.preheader ] ; [#uses=1] %bptr.3.2 = phi ubyte* [ %tmp226, %cond_true249 ], [ %line.1.0, %cond_true249.preheader ] ; [#uses=1] %tmp. = add int %tmp109, %w ; [#uses=1] - %indvar = cast uint %indvar to int ; [#uses=1] %tmp.58 = mul int %indvar, -8 ; [#uses=1] %tmp.57 = add int %tmp., -16; [#uses=1] %tmp246.2 = add int %tmp.58, %tmp.57; [#uses=1] @@ -236,10 +235,8 @@ %dest.1.0.us = phi ubyte* [ %tmp286.us, %cond_next280.us ], [ %tmp100, %cond_true295.preheader.split.us ] ; [#uses=3] %dest_line.1.0.us = phi ubyte** [ %tmp282.us, %cond_next280.us ], [ %tmp96, %cond_true295.preheader.split.us ] ; [#uses=1] %tmp.89 = sub uint 0, %indvar86 ; [#uses=1] - %tmp.89 = cast uint %tmp.89 to int ; [#uses=1] %tmp292.0.us = add int %tmp.89, %tmp29222 ; [#uses=1] - %tmp.91 = mul uint %indvar86, %raster ; [#uses=1] - %tmp.91 = cast uint %tmp.91 to int ; [#uses=1] + %tmp.91 = mul uint %indvar86, %raster.ui; [#uses=1] %tmp104.sum101 = add int %tmp102, %tmp.91 ; [#uses=1] %line.1.0.us = getelementptr ubyte* %base, int %tmp104.sum101 ; [#uses=2] %tmp.us = load ubyte* %line.1.0.us ; [#uses=1] @@ -313,10 +310,8 @@ %dest.1.0 = phi ubyte* [ %tmp286, %cond_next280 ], [ %tmp100, %cond_true295.preheader.split ] ; [#uses=4] %dest_line.1.0 = phi ubyte** [ %tmp282, %cond_next280 ], [ %tmp96, %cond_true295.preheader.split ] ; [#uses=1] %tmp.63 = sub uint 0, %indvar60 ; [#uses=1] - %tmp.63 = cast uint %tmp.63 to int ; [#uses=1] %tmp292.0 = add int %tmp.63, %tmp29222 ; [#uses=1] - %tmp.65 = mul uint %indvar60, %raster ; [#uses=1] - %tmp.65
[llvm-commits] CVS: llvm/test/Regression/Analysis/LoadVN/casts.ll
Changes in directory llvm/test/Regression/Analysis/LoadVN: casts.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+1 -1) casts.ll |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Regression/Analysis/LoadVN/casts.ll diff -u llvm/test/Regression/Analysis/LoadVN/casts.ll:1.2 llvm/test/Regression/Analysis/LoadVN/casts.ll:1.3 --- llvm/test/Regression/Analysis/LoadVN/casts.ll:1.2 Fri Dec 29 14:01:32 2006 +++ llvm/test/Regression/Analysis/LoadVN/casts.ll Sun Dec 31 00:01:59 2006 @@ -1,7 +1,7 @@ ; Check to make sure that Value Numbering doesn't merge casts of different ; flavors. ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | \ -; RUN: grep '[sz]ext' | wc -l | grep 2 +; RUN: grep '[sz]ext' | wc -l | grep 2 declare void %external(int) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/LICM/basictest.ll no-preheader-test.ll
Changes in directory llvm/test/Regression/Transforms/LICM: basictest.ll updated: 1.3 -> 1.4 no-preheader-test.ll updated: 1.3 -> 1.4 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+4 -4) basictest.ll |4 ++-- no-preheader-test.ll |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/test/Regression/Transforms/LICM/basictest.ll diff -u llvm/test/Regression/Transforms/LICM/basictest.ll:1.3 llvm/test/Regression/Transforms/LICM/basictest.ll:1.4 --- llvm/test/Regression/Transforms/LICM/basictest.ll:1.3 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/LICM/basictest.ll Sun Dec 31 00:01:59 2006 @@ -1,12 +1,12 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis -void "testfunc"(int %i) { +void "testfunc"(int %i.s) { br label %Loop Loop: %j = phi uint [0, %0], [%Next, %Loop] - %i = cast int %i to uint + %i = cast int %i.s to uint %i2 = mul uint %i, 17 %Next = add uint %j, %i2 %cond = seteq uint %Next, 0 Index: llvm/test/Regression/Transforms/LICM/no-preheader-test.ll diff -u llvm/test/Regression/Transforms/LICM/no-preheader-test.ll:1.3 llvm/test/Regression/Transforms/LICM/no-preheader-test.ll:1.4 --- llvm/test/Regression/Transforms/LICM/no-preheader-test.ll:1.3 Fri Dec 1 22:23:09 2006 +++ llvm/test/Regression/Transforms/LICM/no-preheader-test.ll Sun Dec 31 00:01:59 2006 @@ -1,7 +1,7 @@ ; Test that LICM works when there is not a loop-preheader ; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis -void "testfunc"(int %i, bool %ifcond) { +void "testfunc"(int %i.s, bool %ifcond) { br bool %ifcond, label %Then, label %Else Then: br label %Loop @@ -10,7 +10,7 @@ Loop: %j = phi uint [0, %Then], [12, %Else], [%Next, %Loop] - %i = cast int %i to uint + %i = cast int %i.s to uint %i2 = mul uint %i, 17 %Next = add uint %j, %i2 %cond = seteq uint %Next, 0 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll and-elim.ll branch-opt.ll rotl.ll small-arguments.ll vec_spat.ll
Changes in directory llvm/test/Regression/CodeGen/PowerPC: 2006-01-20-ShiftPartsCrash.ll updated: 1.2 -> 1.3 and-elim.ll updated: 1.3 -> 1.4 branch-opt.ll updated: 1.3 -> 1.4 rotl.ll updated: 1.2 -> 1.3 small-arguments.ll updated: 1.5 -> 1.6 vec_spat.ll updated: 1.5 -> 1.6 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+33 -39) 2006-01-20-ShiftPartsCrash.ll | 14 +++--- and-elim.ll |3 ++- branch-opt.ll | 17 - rotl.ll | 20 small-arguments.ll| 10 -- vec_spat.ll |8 6 files changed, 33 insertions(+), 39 deletions(-) Index: llvm/test/Regression/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll diff -u llvm/test/Regression/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll:1.2 llvm/test/Regression/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll:1.3 --- llvm/test/Regression/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll Sun Dec 31 00:01:59 2006 @@ -1,16 +1,16 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc void %iterative_hash_host_wide_int() { - %zero = alloca int ; [#uses=2] - %b = alloca uint; [#uses=1] + %zero = alloca int ; [#uses=2] + %b = alloca uint; [#uses=1] store int 0, int* %zero - %tmp = load int* %zero ; [#uses=1] + %tmp = load int* %zero ; [#uses=1] %tmp5 = cast int %tmp to uint ; [#uses=1] - %tmp6 = add uint %tmp5, 32 ; [#uses=1] - %tmp6 = cast uint %tmp6 to int ; [#uses=1] - %tmp7 = load long* null ; [#uses=1] + %tmp6.u = add uint %tmp5, 32; [#uses=1] + %tmp6 = cast uint %tmp6.u to int; [#uses=1] + %tmp7 = load long* null ; [#uses=1] %tmp6 = cast int %tmp6 to ubyte ; [#uses=1] - %tmp8 = shr long %tmp7, ubyte %tmp6 ; [#uses=1] + %tmp8 = shr long %tmp7, ubyte %tmp6 ; [#uses=1] %tmp8 = cast long %tmp8 to uint ; [#uses=1] store uint %tmp8, uint* %b unreachable Index: llvm/test/Regression/CodeGen/PowerPC/and-elim.ll diff -u llvm/test/Regression/CodeGen/PowerPC/and-elim.ll:1.3 llvm/test/Regression/CodeGen/PowerPC/and-elim.ll:1.4 --- llvm/test/Regression/CodeGen/PowerPC/and-elim.ll:1.3Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/PowerPC/and-elim.llSun Dec 31 00:01:59 2006 @@ -10,7 +10,8 @@ ret void } -ushort %test2(ushort %crc) { ; No and's should be needed for the ushorts here. +ushort @zext %test2(ushort @zext %crc) { +; No and's should be needed for the ushorts here. %tmp.1 = shr ushort %crc, ubyte 1 %tmp.7 = xor ushort %tmp.1, 40961 ret ushort %tmp.7 Index: llvm/test/Regression/CodeGen/PowerPC/branch-opt.ll diff -u llvm/test/Regression/CodeGen/PowerPC/branch-opt.ll:1.3 llvm/test/Regression/CodeGen/PowerPC/branch-opt.ll:1.4 --- llvm/test/Regression/CodeGen/PowerPC/branch-opt.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/PowerPC/branch-opt.ll Sun Dec 31 00:01:59 2006 @@ -9,10 +9,10 @@ void %foo(int %W, int %X, int %Y, int %Z) { entry: - %X = cast int %X to uint; [#uses=1] - %Y = cast int %Y to uint; [#uses=1] - %Z = cast int %Z to uint; [#uses=1] - %W = cast int %W to uint; [#uses=1] + %X.u = cast int %X to uint ; [#uses=1] + %Y.u = cast int %Y to uint ; [#uses=1] + %Z.u = cast int %Z to uint ; [#uses=1] + %W.u = cast int %W to uint ; [#uses=1] %tmp1 = and int %W, 1 ; [#uses=1] %tmp1 = seteq int %tmp1, 0 ; [#uses=1] br bool %tmp1, label %cond_false, label %bb5 @@ -21,7 +21,7 @@ %indvar77 = phi uint [ %indvar.next78, %bb ], [ 0, %bb5 ]
[llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/vargs2.ll
Changes in directory llvm/test/Regression/CodeGen/ARM: vargs2.ll updated: 1.3 -> 1.4 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+3 -3) vargs2.ll |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/Regression/CodeGen/ARM/vargs2.ll diff -u llvm/test/Regression/CodeGen/ARM/vargs2.ll:1.3 llvm/test/Regression/CodeGen/ARM/vargs2.ll:1.4 --- llvm/test/Regression/CodeGen/ARM/vargs2.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/Regression/CodeGen/ARM/vargs2.ll Sun Dec 31 00:01:59 2006 @@ -3,14 +3,14 @@ implementation ; Functions: -void %f(int %a, ...) { +void %f(int %a_arg, ...) { entry: - %a = cast int %a to uint; [#uses=1] + %a = cast int %a_arg to uint; [#uses=1] %l1 = alloca sbyte*, align 4; [#uses=5] %l2 = alloca sbyte*, align 4; [#uses=4] %memtmp = alloca sbyte* ; [#uses=2] call void %llvm.va_start( sbyte** %l1 ) - %tmp22 = seteq int %a, 0; [#uses=1] + %tmp22 = seteq int %a_arg, 0; [#uses=1] %tmp23 = volatile load sbyte** %l1 ; [#uses=2] br bool %tmp22, label %bb8, label %bb ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyLibCalls/ExitInMain.ll
Changes in directory llvm/test/Regression/Transforms/SimplifyLibCalls: ExitInMain.ll updated: 1.2 -> 1.3 --- Log message: For PR950: http://llvm.org/PR950 : Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. --- Diffs of the changes: (+1 -1) ExitInMain.ll |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Regression/Transforms/SimplifyLibCalls/ExitInMain.ll diff -u llvm/test/Regression/Transforms/SimplifyLibCalls/ExitInMain.ll:1.2 llvm/test/Regression/Transforms/SimplifyLibCalls/ExitInMain.ll:1.3 --- llvm/test/Regression/Transforms/SimplifyLibCalls/ExitInMain.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Regression/Transforms/SimplifyLibCalls/ExitInMain.ll Sun Dec 31 00:02:00 2006 @@ -1,5 +1,5 @@ ; Test that the ExitInMainOptimization pass works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep -c 'ret int 3' | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep -c 'ret i32 3' | grep 1 declare void %exit(int) declare void %exitonly(int) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/lli/lli.cpp
Changes in directory llvm/tools/lli: lli.cpp updated: 1.62 -> 1.63 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless. --- Diffs of the changes: (+2 -2) lli.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/tools/lli/lli.cpp diff -u llvm/tools/lli/lli.cpp:1.62 llvm/tools/lli/lli.cpp:1.63 --- llvm/tools/lli/lli.cpp:1.62 Sun Dec 10 13:01:52 2006 +++ llvm/tools/lli/lli.cpp Sun Dec 31 00:02:26 2006 @@ -121,12 +121,12 @@ // If the program didn't explicitly call exit, call exit now, for the // program. This ensures that any atexit handlers get called correctly. Function *Exit = MP->getModule()->getOrInsertFunction("exit", Type::VoidTy, - Type::IntTy, + Type::Int32Ty, (Type *)0); std::vector Args; GenericValue ResultGV; -ResultGV.IntVal = Result; +ResultGV.Int32Val = Result; Args.push_back(ResultGV); EE->runFunction(Exit, Args); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp
Changes in directory llvm/tools/llvm2cpp: CppWriter.cpp updated: 1.26 -> 1.27 --- Log message: For PR950: http://llvm.org/PR950 : Convert signed integer types to signless. --- Diffs of the changes: (+14 -22) CppWriter.cpp | 36 ++-- 1 files changed, 14 insertions(+), 22 deletions(-) Index: llvm/tools/llvm2cpp/CppWriter.cpp diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.26 llvm/tools/llvm2cpp/CppWriter.cpp:1.27 --- llvm/tools/llvm2cpp/CppWriter.cpp:1.26 Sat Dec 23 00:05:41 2006 +++ llvm/tools/llvm2cpp/CppWriter.cpp Sun Dec 31 00:02:26 2006 @@ -166,14 +166,10 @@ switch (Ty->getTypeID()) { case Type::VoidTyID: prefix = "void_"; break; case Type::BoolTyID: prefix = "bool_"; break; -case Type::UByteTyID:prefix = "ubyte_"; break; -case Type::SByteTyID:prefix = "sbyte_"; break; -case Type::UShortTyID: prefix = "ushort_"; break; -case Type::ShortTyID:prefix = "short_"; break; -case Type::UIntTyID: prefix = "uint_"; break; -case Type::IntTyID: prefix = "int_"; break; -case Type::ULongTyID:prefix = "ulong_"; break; -case Type::LongTyID: prefix = "long_"; break; +case Type::Int8TyID: prefix = "int8_"; break; +case Type::Int16TyID:prefix = "int16_"; break; +case Type::Int32TyID:prefix = "int32_"; break; +case Type::Int64TyID:prefix = "int64_"; break; case Type::FloatTyID:prefix = "float_"; break; case Type::DoubleTyID: prefix = "double_"; break; case Type::LabelTyID:prefix = "label_"; break; @@ -318,19 +314,15 @@ // First, handle the primitive types .. easy if (Ty->isPrimitiveType()) { switch (Ty->getTypeID()) { - case Type::VoidTyID: return "Type::VoidTy"; - case Type::BoolTyID: return "Type::BoolTy"; - case Type::UByteTyID:return "Type::UByteTy"; - case Type::SByteTyID:return "Type::SByteTy"; - case Type::UShortTyID: return "Type::UShortTy"; - case Type::ShortTyID:return "Type::ShortTy"; - case Type::UIntTyID: return "Type::UIntTy"; - case Type::IntTyID: return "Type::IntTy"; - case Type::ULongTyID:return "Type::ULongTy"; - case Type::LongTyID: return "Type::LongTy"; - case Type::FloatTyID:return "Type::FloatTy"; - case Type::DoubleTyID: return "Type::DoubleTy"; - case Type::LabelTyID:return "Type::LabelTy"; + case Type::VoidTyID: return "Type::VoidTy"; + case Type::BoolTyID: return "Type::BoolTy"; + case Type::Int8TyID: return "Type::Int8Ty"; + case Type::Int16TyID: return "Type::Int16Ty"; + case Type::Int32TyID: return "Type::Int32Ty"; + case Type::Int64TyID: return "Type::Int64Ty"; + case Type::FloatTyID: return "Type::FloatTy"; + case Type::DoubleTyID: return "Type::DoubleTy"; + case Type::LabelTyID: return "Type::LabelTy"; default: error("Invalid primitive type"); break; @@ -692,7 +684,7 @@ printCFP(CFP); Out << ";"; } else if (const ConstantArray *CA = dyn_cast(CV)) { -if (CA->isString() && CA->getType()->getElementType() == Type::SByteTy) { +if (CA->isString() && CA->getType()->getElementType() == Type::Int8Ty) { Out << "Constant* " << constName << " = ConstantArray::get(\""; printEscapedString(CA->getAsString()); // Determine if we want null termination or not. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/docs/LangRef.html
Changes in directory llvm/docs: LangRef.html updated: 1.180 -> 1.181 --- Log message: For PR950: http://llvm.org/PR950 : Update for signless integer types: 1. Replace [us]byte with i8 2. Replace [u]short with i16 3. Replace [u]int with i32 4. Replace [u]long with i64 5. Document the "define" keyword and use it in all examples. 6. Document parameter attributes and how they affect function types. --- Diffs of the changes: (+307 -277) LangRef.html | 584 +++ 1 files changed, 307 insertions(+), 277 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.180 llvm/docs/LangRef.html:1.181 --- llvm/docs/LangRef.html:1.180Thu Dec 28 10:55:55 2006 +++ llvm/docs/LangRef.html Sun Dec 31 01:07:53 2006 @@ -24,6 +24,7 @@ Calling Conventions Global Variables Functions + Parameter Attributes Module-Level Inline Assembly @@ -248,7 +249,7 @@ following instruction is syntactically okay, but not well formed: - %x = add int 1, %x + %x = add i32 1, %x ...because the definition of %x does not dominate all of @@ -296,7 +297,7 @@ ('add', 'bitcast', 'ret', etc...), for primitive type names ('void', 'uint', etc...), +href="#t_void">void', 'i32', etc...), and others. These reserved words cannot conflict with variable names, because none of them start with a '%' character. @@ -306,21 +307,21 @@ The easy way: - %result = mul uint %X, 8 + %result = mul i32 %X, 8 After strength reduction: - %result = shl uint %X, ubyte 3 + %result = shl i32 %X, i8 3 And the hard way: - add uint %X, %X ; yields {uint}:%0 - add uint %0, %0 ; yields {uint}:%1 - %result = add uint %1, %1 + add i32 %X, %X ; yields {i32}:%0 + add i32 %0, %0 ; yields {i32}:%1 + %result = add i32 %1, %1 This last way of multiplying %X by 8 illustrates several @@ -364,25 +365,25 @@ ; Declare the string constant as a global constant... %.LC0 = internal constant [13 x sbyte] c"hello world\0A\00" ; [13 x sbyte]* + href="#globalvars">constant [13 x i8 ] c"hello world\0A\00" ; [13 x i8 ]* ; External declaration of the puts function -declare int %puts(sbyte*) ; int(sbyte*)* +declare i32 %puts(i8 *) ; i32(i8 *)* ; Global variable / Function body section separator implementation ; Definition of main function -int %main() {; int()* -; Convert [13x sbyte]* to sbyte *... +define i32 %main() { ; i32()* +; Convert [13x i8 ]* to i8 *... %cast210 = getelementptr [13 x sbyte]* %.LC0, long 0, long 0 ; sbyte* + href="#i_getelementptr">getelementptr [13 x i8 ]* %.LC0, i64 0, i64 0 ; i8 * ; Call puts function to write out the string to stdout... call int %puts(sbyte* %cast210) ; int + href="#i_call">call i32 %puts(i8 * %cast210) ; i32 ret int 0} + href="#i_ret">ret i32 0} This example is made up of a global variable named ".LC0", an external declaration of the "puts" @@ -440,7 +441,7 @@ "weak" linkage is exactly the same as linkonce linkage, except that unreferenced weak globals may not be discarded. This is - used to implement constructs in C such as "int X;" at global scope. + used to implement constructs in C such as "i32 X;" at global scope. appending: @@ -646,14 +647,18 @@ -LLVM function definitions consist of an optional linkage -type, an optional calling convention, a return -type, a function name, a (possibly empty) argument list, an optional section, -an optional alignment, an opening curly brace, -a list of basic blocks, and a closing curly brace. LLVM function declarations -are defined with the "declare" keyword, an optional calling convention, a return type, a function name, -a possibly empty list of arguments, and an optional alignment. +LLVM function definitions consist of the "define" keyord, +an optional linkage type, an optional +calling convention, a return type, an optional +parameter attribute for the return type, a function +name, a (possibly empty) argument list (each with optional +parameter attributes, an optional section, an optional +alignment, an opening curly brace, a list of basic blocks, and a closing curly +brace. LLVM function declarations +are consist of the "declare" keyword, an optional calling convention, a return type, an optional +parameter attribute for the return type, a function +name, a possibly empty list of arguments, and an optional alignment. A function definition contains a list of basic blocks, forming the CFG for the function. Each basic block may optionally start with a label (giving the @@ -684,6 +689,42 @@ +Par
[llvm-commits] CVS: llvm/docs/LangRef.html
Changes in directory llvm/docs: LangRef.html updated: 1.181 -> 1.182 --- Log message: Clean up some typos and formatting. --- Diffs of the changes: (+22 -20) LangRef.html | 42 ++ 1 files changed, 22 insertions(+), 20 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.181 llvm/docs/LangRef.html:1.182 --- llvm/docs/LangRef.html:1.181Sun Dec 31 01:07:53 2006 +++ llvm/docs/LangRef.html Sun Dec 31 01:18:34 2006 @@ -652,10 +652,10 @@ calling convention, a return type, an optional parameter attribute for the return type, a function name, a (possibly empty) argument list (each with optional -parameter attributes, an optional section, an optional -alignment, an opening curly brace, a list of basic blocks, and a closing curly -brace. LLVM function declarations -are consist of the "declare" keyword, an optional parameter attributes), an optional section, an +optional alignment, an opening curly brace, a list of basic blocks, and a +closing curly brace. LLVM function declarations +consist of the "declare" keyword, an optional calling convention, a return type, an optional parameter attribute for the return type, a function name, a possibly empty list of arguments, and an optional alignment. @@ -698,12 +698,12 @@ type so two functions types that differ only by the parameter attributes are different function types. - Parameter attributes consist of a at sign (@) followed by either a single + Parameter attributes consist of an at sign (@) followed by either a single keyword or a comma separate list of keywords enclosed in parentheses. For example: %someFunc = i16 @zext (i8 @(sext) %someParam) -%someFunc = i16 @zext (i8 @zext %someParam) - Note that the two function types above are unique because the parameter +%someFunc = i16 @zext (i8 @zext %someParam) + Note that the two function types above are unique because the parameter has a different attribute (@sext in the first one, @zext in the second). Currently, only the following parameter attributes are defined: @@ -938,20 +938,22 @@ Examples: - - i32 (i32) - float (i16 @sext, i32 *) * - i32 (i8*, ...) +i32 (i32) +function taking an i32, returning an i32 - - function taking an i32, returning an i32 - Pointer to a function that takes an - i16 that should be sign extended and a + +float (i16 @sext, i32 *) * +Pointer to a function that takes + an i16 that should be sign extended and a pointer to i32, returning - float. - A vararg function that takes at least one pointer - to i8 (signed char in C), which returns an integer. This is - the signature for printf in LLVM. + float. + + +i32 (i8*, ...) +A vararg function that takes at least one + pointer to i8 (signed char in C), + which returns an integer. This is the signature for printf in + LLVM. @@ -4523,7 +4525,7 @@ mailto:[EMAIL PROTECTED]">Chris Lattner http://llvm.org";>The LLVM Compiler Infrastructure - Last modified: $Date: 2006/12/31 07:07:53 $ + Last modified: $Date: 2006/12/31 07:18:34 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/docs/LangRef.html
Changes in directory llvm/docs: LangRef.html updated: 1.182 -> 1.183 --- Log message: One more try on the table formatting. --- Diffs of the changes: (+3 -2) LangRef.html |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.182 llvm/docs/LangRef.html:1.183 --- llvm/docs/LangRef.html:1.182Sun Dec 31 01:18:34 2006 +++ llvm/docs/LangRef.html Sun Dec 31 01:20:23 2006 @@ -942,7 +942,8 @@ function taking an i32, returning an i32 -float (i16 @sext, i32 *) * +float (i16 @sext, i32 *) * + Pointer to a function that takes an i16 that should be sign extended and a pointer to i32, returning @@ -4525,7 +4526,7 @@ mailto:[EMAIL PROTECTED]">Chris Lattner http://llvm.org";>The LLVM Compiler Infrastructure - Last modified: $Date: 2006/12/31 07:18:34 $ + Last modified: $Date: 2006/12/31 07:20:23 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits