From sabre at nondot.org Mon Apr 16 00:59:08 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 00:59:08 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll Message-ID: <200704160559.l3G5x8hH016661@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/CBackend: 2005-07-14-NegationToMinusMinus.ll updated: 1.4 -> 1.5 --- Log message: fix incorrectly upgraded test, add PR# --- Diffs of the changes: (+2 -3) 2005-07-14-NegationToMinusMinus.ll | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll diff -u llvm/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll:1.4 llvm/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll:1.5 --- llvm/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll:1.4 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll Mon Apr 16 00:58:47 2007 @@ -1,7 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep -- -65535 -; XFAIL: * +; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep -- --65535 +; PR596 -; ModuleID = '' target endian = little target pointersize = 32 target triple = "i686-pc-linux-gnu" From sabre at nondot.org Mon Apr 16 01:04:23 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 01:04:23 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr Message-ID: <200704160604.l3G64Nhc016806@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2003-07-22-ArrayAccessTypeSafety.c.tr updated: 1.5 -> 1.6 --- Log message: update test --- Diffs of the changes: (+1 -2) 2003-07-22-ArrayAccessTypeSafety.c.tr | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr diff -u llvm/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr:1.5 llvm/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr:1.6 --- llvm/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr:1.5 Sun Apr 15 18:00:46 2007 +++ llvm/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr Mon Apr 16 01:04:03 2007 @@ -1,5 +1,4 @@ -/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep cast - XFAIL: * +/* RUN: %llvmgcc -xc %s -S -o - | grep -v alloca | not grep bitcast */ void test(int* array, long long N) { From lattner at cs.uiuc.edu Mon Apr 16 01:07:03 2007 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 16 Apr 2007 01:07:03 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2002-11-07-Redefinition.c Message-ID: <200704160607.l3G673rf016903@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2002-11-07-Redefinition.c (r1.3) removed --- Log message: remove a bogus test --- Diffs of the changes: (+0 -0) 0 files changed From sabre at nondot.org Mon Apr 16 01:11:08 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 01:11:08 -0500 Subject: [llvm-commits] CVS: llvm/test/C++Frontend/2007-04-11-InlineStorageClassC++.cpp Message-ID: <200704160611.l3G6B8qI017047@zion.cs.uiuc.edu> Changes in directory llvm/test/C++Frontend: 2007-04-11-InlineStorageClassC++.cpp updated: 1.3 -> 1.4 --- Log message: fix incorrectly upgraded test --- Diffs of the changes: (+1 -2) 2007-04-11-InlineStorageClassC++.cpp | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/test/C++Frontend/2007-04-11-InlineStorageClassC++.cpp diff -u llvm/test/C++Frontend/2007-04-11-InlineStorageClassC++.cpp:1.3 llvm/test/C++Frontend/2007-04-11-InlineStorageClassC++.cpp:1.4 --- llvm/test/C++Frontend/2007-04-11-InlineStorageClassC++.cpp:1.3 Sun Apr 15 18:00:46 2007 +++ llvm/test/C++Frontend/2007-04-11-InlineStorageClassC++.cpp Mon Apr 16 01:10:47 2007 @@ -6,13 +6,12 @@ // RUN: grep xWeaknoinline | grep weak | wc -l | grep 1 // RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \ // RUN: grep xWeakextnoinline | grep weak | wc -l | grep 1 -// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep declare | \ +// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \ // RUN: grep xglobnoWeak | grep linkonce | wc -l | grep 1 // RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \ // RUN: grep xstatnoWeak | grep internal | wc -l | grep 1 // RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \ // RUN: grep xextnoWeak | grep linkonce | wc -l | grep 1 -// XFAIL: * inline int xglobWeak(int) __attribute__((weak)); inline int xglobWeak (int i) { return i*2; From sabre at nondot.org Mon Apr 16 01:14:50 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 01:14:50 -0500 Subject: [llvm-commits] CVS: llvm/test/C++Frontend/2004-09-27-CompilerCrash.cpp Message-ID: <200704160614.l3G6EoiN017140@zion.cs.uiuc.edu> Changes in directory llvm/test/C++Frontend: 2004-09-27-CompilerCrash.cpp updated: 1.4 -> 1.5 --- Log message: make this test more portable. --- Diffs of the changes: (+1 -6) 2004-09-27-CompilerCrash.cpp | 7 +------ 1 files changed, 1 insertion(+), 6 deletions(-) Index: llvm/test/C++Frontend/2004-09-27-CompilerCrash.cpp diff -u llvm/test/C++Frontend/2004-09-27-CompilerCrash.cpp:1.4 llvm/test/C++Frontend/2004-09-27-CompilerCrash.cpp:1.5 --- llvm/test/C++Frontend/2004-09-27-CompilerCrash.cpp:1.4 Sun Apr 15 18:00:46 2007 +++ llvm/test/C++Frontend/2004-09-27-CompilerCrash.cpp Mon Apr 16 01:14:28 2007 @@ -1,5 +1,4 @@ // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null -// XFAIL: * struct Pass {} ; template @@ -7,11 +6,7 @@ void foo(Pass *(*C)()); -#include -#include -#include -#include // For allocator. -#include +#include bool foo(std::string &X) { return X.empty(); From reid at x10sys.com Mon Apr 16 01:52:42 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 01:52:42 -0500 Subject: [llvm-commits] CVS: llvm/test/Assembler/2007-04-15-BadIntrinsic.ll Message-ID: <200704160652.l3G6qg1v017880@zion.cs.uiuc.edu> Changes in directory llvm/test/Assembler: 2007-04-15-BadIntrinsic.ll added (r1.1) --- Log message: Test case for PR1328: http://llvm.org/PR1328 . --- Diffs of the changes: (+9 -0) 2007-04-15-BadIntrinsic.ll | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/test/Assembler/2007-04-15-BadIntrinsic.ll diff -c /dev/null llvm/test/Assembler/2007-04-15-BadIntrinsic.ll:1.1 *** /dev/null Mon Apr 16 01:52:31 2007 --- llvm/test/Assembler/2007-04-15-BadIntrinsic.ll Mon Apr 16 01:52:21 2007 *************** *** 0 **** --- 1,9 ---- + ; RUN: llvm-as < %s -o /dev/null -f |& grep {Call to invalid LLVM intrinsic} + + declare i32 @llvm.foobar(i32 %foo) + + define i32 @test() { + %nada = call i32 @llvm.foobar(i32 0) + ret i32 %nada + } + From reid at x10sys.com Mon Apr 16 01:54:56 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 01:54:56 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Function.h Message-ID: <200704160654.l3G6suRv017938@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Function.h updated: 1.74 -> 1.75 --- Log message: For PR1328: http://llvm.org/PR1328 : Don't assert everytime an intrinsic name isn't recognized. Instead, make the assert optional when callin getIntrinsicID(). This allows the assembler to handle invalid intrinsic names gracefully. --- Diffs of the changes: (+1 -1) Function.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/Function.h diff -u llvm/include/llvm/Function.h:1.74 llvm/include/llvm/Function.h:1.75 --- llvm/include/llvm/Function.h:1.74 Fri Apr 13 13:12:09 2007 +++ llvm/include/llvm/Function.h Mon Apr 16 01:54:34 2007 @@ -103,7 +103,7 @@ /// The particular intrinsic functions which correspond to this value are /// defined in llvm/Intrinsics.h. /// - unsigned getIntrinsicID() const; + unsigned getIntrinsicID(bool noAssert = false) const; bool isIntrinsic() const { return getIntrinsicID() != 0; } /// getCallingConv()/setCallingConv(uint) - These method get and set the From reid at x10sys.com Mon Apr 16 01:55:04 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 01:55:04 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/IntrinsicEmitter.cpp Message-ID: <200704160655.l3G6t4PN017950@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: IntrinsicEmitter.cpp updated: 1.30 -> 1.31 --- Log message: For PR1328: http://llvm.org/PR1328 : Don't assert everytime an intrinsic name isn't recognized. Instead, make the assert optional when callin getIntrinsicID(). This allows the assembler to handle invalid intrinsic names gracefully. --- Diffs of the changes: (+0 -2) IntrinsicEmitter.cpp | 2 -- 1 files changed, 2 deletions(-) Index: llvm/utils/TableGen/IntrinsicEmitter.cpp diff -u llvm/utils/TableGen/IntrinsicEmitter.cpp:1.30 llvm/utils/TableGen/IntrinsicEmitter.cpp:1.31 --- llvm/utils/TableGen/IntrinsicEmitter.cpp:1.30 Sun Apr 1 02:20:02 2007 +++ llvm/utils/TableGen/IntrinsicEmitter.cpp Mon Apr 16 01:54:34 2007 @@ -103,8 +103,6 @@ << Ints[I->second].EnumName << ";\n"; } OS << " }\n"; - OS << " // The 'llvm.' namespace is reserved!\n"; - OS << " assert(0 && \"Unknown LLVM intrinsic function!\");\n"; OS << "#endif\n\n"; } From reid at x10sys.com Mon Apr 16 01:55:05 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 01:55:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Message-ID: <200704160655.l3G6t5uT017955@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Function.cpp updated: 1.118 -> 1.119 --- Log message: For PR1328: http://llvm.org/PR1328 : Don't assert everytime an intrinsic name isn't recognized. Instead, make the assert optional when callin getIntrinsicID(). This allows the assembler to handle invalid intrinsic names gracefully. --- Diffs of the changes: (+4 -3) Function.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.118 llvm/lib/VMCore/Function.cpp:1.119 --- llvm/lib/VMCore/Function.cpp:1.118 Tue Apr 10 21:44:19 2007 +++ llvm/lib/VMCore/Function.cpp Mon Apr 16 01:54:34 2007 @@ -224,20 +224,21 @@ /// particular intrinsic functions which correspond to this value are defined in /// llvm/Intrinsics.h. /// -unsigned Function::getIntrinsicID() const { +unsigned Function::getIntrinsicID(bool noAssert) const { const ValueName *ValName = this->getValueName(); unsigned Len = ValName->getKeyLength(); const char *Name = ValName->getKeyData(); - if (Len < 5 || Name[4] != '.' || Name[0] != 'l' || Name[1] != 'l' + if (Len <= 5 || Name[4] != '.' || Name[0] != 'l' || Name[1] != 'l' || Name[2] != 'v' || Name[3] != 'm') return 0; // All intrinsics start with 'llvm.' - assert(Len != 5 && "'llvm.' is an invalid intrinsic name!"); + assert((Len != 5 || noAssert) && "'llvm.' is an invalid intrinsic name!"); #define GET_FUNCTION_RECOGNIZER #include "llvm/Intrinsics.gen" #undef GET_FUNCTION_RECOGNIZER + assert(noAssert && "Invalid LLVM intrinsic name"); return 0; } From reid at x10sys.com Mon Apr 16 01:56:03 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 01:56:03 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Message-ID: <200704160656.l3G6u3KV017978@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.y updated: 1.339 -> 1.340 --- Log message: For PR1328: http://llvm.org/PR1328 : Use the new parameter on Function::getIntrinsicID to identify cases where a function is being called with an "llvm." name but it isn't actually an intrinsic. In such cases generate an error. --- Diffs of the changes: (+8 -0) llvmAsmParser.y | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.339 llvm/lib/AsmParser/llvmAsmParser.y:1.340 --- llvm/lib/AsmParser/llvmAsmParser.y:1.339 Thu Apr 12 13:32:50 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y Mon Apr 16 01:55:42 2007 @@ -2821,6 +2821,14 @@ Value *V = getVal(PFTy, $4); // Get the function we're calling... CHECK_FOR_ERROR + // Check for call to invalid intrinsic to avoid crashing later. + if (Function *theF = dyn_cast(V)) { + if (theF->hasName() && 0 == strncmp(theF->getName().c_str(), "llvm.", 5)&& + !theF->getIntrinsicID(true)) + GEN_ERROR("Call to invalid LLVM intrinsic function '" + + theF->getName() + "'"); + } + // Check the arguments ValueList Args; if ($6->empty()) { // Has no arguments? From reid at x10sys.com Mon Apr 16 01:56:28 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 01:56:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs Message-ID: <200704160656.l3G6uSUq018008@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.cpp.cvs updated: 1.84 -> 1.85 llvmAsmParser.h.cvs updated: 1.65 -> 1.66 llvmAsmParser.y.cvs updated: 1.85 -> 1.86 --- Log message: Regenerate. --- Diffs of the changes: (+1048 -1206) llvmAsmParser.cpp.cvs | 2206 +++++++++++++++++++++++--------------------------- llvmAsmParser.h.cvs | 40 llvmAsmParser.y.cvs | 8 3 files changed, 1048 insertions(+), 1206 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.84 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.85 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.84 Thu Apr 12 13:32:50 2007 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Mon Apr 16 01:56:07 2007 @@ -1,9 +1,7 @@ -/* A Bison parser, made by GNU Bison 2.3. */ +/* A Bison parser, made by GNU Bison 2.1. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,21 +18,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local @@ -47,7 +37,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -346,7 +336,7 @@ /* Copy the first part of user declarations. */ -#line 14 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1289,10 +1279,9 @@ # define YYTOKEN_TABLE 0 #endif -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 938 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" -{ +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 938 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; llvm::BasicBlock *BasicBlockVal; @@ -1337,10 +1326,9 @@ llvm::Instruction::OtherOps OtherOpVal; llvm::ICmpInst::Predicate IPredicate; llvm::FCmpInst::Predicate FPredicate; -} -/* Line 193 of yacc.c. */ -#line 1343 "llvmAsmParser.tab.c" - YYSTYPE; +} YYSTYPE; +/* Line 196 of yacc.c. */ +#line 1332 "llvmAsmParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -1351,56 +1339,23 @@ /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 1356 "llvmAsmParser.tab.c" +/* Line 219 of yacc.c. */ +#line 1344 "llvmAsmParser.tab.c" -#ifdef short -# undef short +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ #endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t #endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; +#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t #endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS @@ -1413,32 +1368,7 @@ # endif #endif -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int i) -#else -static int -YYID (i) - int i; -#endif -{ - return i; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE +#if ! defined (yyoverflow) || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -1446,76 +1376,64 @@ # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif +# define YYINCLUDED_STDLIB_H # endif # endif # endif # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif +# ifdef __cplusplus +extern "C" { # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ + && (defined (__STDC__) || defined (__cplusplus))) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ + && (defined (__STDC__) || defined (__cplusplus))) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif +# ifdef __cplusplus +} +# endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; + short int yyss; YYSTYPE yyvs; }; @@ -1525,13 +1443,13 @@ /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ +# if defined (__GNUC__) && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else @@ -1542,7 +1460,7 @@ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif @@ -1560,22 +1478,28 @@ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ - while (YYID (0)) + while (0) #endif -/* YYFINAL -- State number of the termination state. */ +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 39 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 1317 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 149 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 79 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 288 -/* YYNRULES -- Number of states. */ +/* YYNRULES -- Number of states. */ #define YYNSTATES 563 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ @@ -1586,7 +1510,7 @@ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = +static const unsigned char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1632,7 +1556,7 @@ #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const yytype_uint16 yyprhs[] = +static const unsigned short int yyprhs[] = { 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, @@ -1665,8 +1589,8 @@ 870, 871, 875, 882, 886, 893, 896, 901, 908 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const short int yyrhs[] = { 190, 0, -1, 68, -1, 69, -1, 70, -1, 71, -1, 72, -1, 73, -1, 74, -1, 75, -1, 76, @@ -1763,7 +1687,7 @@ }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const unsigned short int yyrline[] = { 0, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1094, 1094, 1094, 1094, 1094, 1094, 1095, 1095, 1095, @@ -1792,14 +1716,14 @@ 2396, 2405, 2414, 2423, 2427, 2432, 2436, 2440, 2445, 2455, 2474, 2483, 2559, 2563, 2570, 2581, 2594, 2604, 2615, 2625, 2634, 2643, 2646, 2647, 2654, 2658, 2663, 2684, 2701, 2715, - 2729, 2741, 2749, 2756, 2762, 2768, 2774, 2789, 2861, 2866, - 2870, 2877, 2884, 2892, 2899, 2907, 2915, 2929, 2946 + 2729, 2741, 2749, 2756, 2762, 2768, 2774, 2789, 2869, 2874, + 2878, 2885, 2892, 2900, 2907, 2915, 2923, 2937, 2954 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "ESINT64VAL", "EUINT64VAL", "ESAPINTVAL", @@ -1847,7 +1771,7 @@ # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = +static const unsigned short int yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, @@ -1868,7 +1792,7 @@ # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = +static const unsigned char yyr1[] = { 0, 149, 150, 150, 150, 150, 150, 150, 150, 150, 150, 151, 151, 151, 151, 151, 151, 152, 152, 152, @@ -1902,7 +1826,7 @@ }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +static const unsigned char yyr2[] = { 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1938,7 +1862,7 @@ /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const yytype_uint16 yydefact[] = +static const unsigned short int yydefact[] = { 67, 58, 64, 59, 65, 185, 183, 0, 0, 0, 0, 0, 0, 76, 0, 67, 181, 78, 81, 0, @@ -1999,8 +1923,8 @@ 254, 0, 251 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const short int yydefgoto[] = { -1, 239, 240, 241, 265, 282, 139, 140, 71, 480, 11, 72, 13, 36, 37, 38, 43, 49, 115, 304, @@ -2015,7 +1939,7 @@ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -476 -static const yytype_int16 yypact[] = +static const short int yypact[] = { 28, -476, -476, -476, -476, -476, -476, -10, -55, 8, -33, 97, 3, 55, 167, 394, -476, 172, 210, 86, @@ -2077,7 +2001,7 @@ }; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = +static const short int yypgoto[] = { -476, 389, 392, 397, 292, 306, -153, -476, 0, 10, 435, 4, -476, -476, -476, 87, -476, -476, -145, -295, @@ -2094,7 +2018,7 @@ number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -181 -static const yytype_int16 yytable[] = +static const short int yytable[] = { 10, 74, 253, 242, 12, 96, 243, 311, 358, 252, 252, 254, 375, 352, 285, 10, 375, 147, 445, 12, @@ -2230,7 +2154,7 @@ 0, 0, 68, 0, 0, 69, 0, 324 }; -static const yytype_int16 yycheck[] = +static const short int yycheck[] = { 0, 25, 155, 141, 0, 4, 141, 215, 284, 11, 11, 156, 307, 254, 178, 15, 311, 24, 401, 15, @@ -2368,7 +2292,7 @@ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +static const unsigned char yystos[] = { 0, 16, 17, 19, 20, 26, 27, 46, 49, 53, 157, 159, 160, 161, 190, 191, 192, 194, 193, 47, @@ -2454,7 +2378,7 @@ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ + YYPOPSTACK; \ goto yybackup; \ } \ else \ @@ -2462,7 +2386,7 @@ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ -while (YYID (0)) +while (0) #define YYTERROR 1 @@ -2477,7 +2401,7 @@ #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ - if (YYID (N)) \ + if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ @@ -2491,7 +2415,7 @@ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ - while (YYID (0)) + while (0) #endif @@ -2503,8 +2427,8 @@ # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif @@ -2531,96 +2455,36 @@ do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); +} while (0) - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (short int *bottom, short int *top) #else static void yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; + short int *bottom; + short int *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) + for (/* Nothing. */; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -2629,45 +2493,37 @@ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +yy_reduce_print (int yyrule) #else static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; +yy_reduce_print (yyrule) int yyrule; #endif { - int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - fprintf (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - fprintf (stderr, "\n"); - } + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) + yy_reduce_print (Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -2701,44 +2557,42 @@ #if YYERROR_VERBOSE # ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H +# if defined (__GLIBC__) && defined (_STRING_H) # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -#else -static YYSIZE_T +# else yystrlen (yystr) - const char *yystr; -#endif + const char *yystr; +# endif { - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) + const char *yys = yystr; + + while (*yys++ != '\0') continue; - return yylen; + + return yys - yystr - 1; } # endif # endif # ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * +# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -#else -static char * +# else yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif + char *yydest; + const char *yysrc; +# endif { char *yyd = yydest; const char *yys = yysrc; @@ -2764,7 +2618,7 @@ { if (*yystr == '"') { - YYSIZE_T yyn = 0; + size_t yyn = 0; char const *yyp = yystr; for (;;) @@ -2799,123 +2653,53 @@ } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; +#endif /* YYERROR_VERBOSE */ - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; + - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - if (yysize_overflow) - return YYSIZE_MAXIMUM; - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + switch (yytype) + { + default: + break; } + YYFPRINTF (yyoutput, ")"); } -#endif /* YYERROR_VERBOSE */ - +#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else @@ -2926,7 +2710,8 @@ YYSTYPE *yyvaluep; #endif { - YYUSE (yyvaluep); + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; if (!yymsg) yymsg = "Deleting"; @@ -2936,7 +2721,7 @@ { default: - break; + break; } } @@ -2944,13 +2729,13 @@ /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus +# if defined (__STDC__) || defined (__cplusplus) int yyparse (void *YYPARSE_PARAM); -#else +# else int yyparse (); -#endif +# endif #else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus +#if defined (__STDC__) || defined (__cplusplus) int yyparse (void); #else int yyparse (); @@ -2975,18 +2760,14 @@ `----------*/ #ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif #else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if defined (__STDC__) || defined (__cplusplus) int yyparse (void) #else @@ -3004,12 +2785,6 @@ int yyerrstatus; /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif /* Three stacks and their tools: `yyss': related to states, @@ -3020,9 +2795,9 @@ to reallocate them elsewhere. */ /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + short int *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; @@ -3031,7 +2806,7 @@ -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) +#define YYPOPSTACK (yyvsp--, yyssp--) YYSIZE_T yystacksize = YYINITDEPTH; @@ -3040,9 +2815,9 @@ YYSTYPE yyval; - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; YYDPRINTF ((stderr, "Starting parse\n")); @@ -3066,7 +2841,8 @@ `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ + have just been pushed. so pushing a state here evens the stacks. + */ yyssp++; yysetstate: @@ -3079,11 +2855,11 @@ #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + short int *yyss1 = yyss; /* Each stack pointer address is followed by the size of the @@ -3111,7 +2887,7 @@ yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + short int *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) @@ -3146,10 +2922,12 @@ `-----------*/ yybackup: - /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ +/* Do appropriate processing given the current state. */ +/* Read a look-ahead token if we need one and don't already have one. */ +/* yyresume: */ /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; @@ -3191,21 +2969,22 @@ if (yyn == YYFINAL) YYACCEPT; - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ + /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; - yystate = yyn; *++yyvsp = yylval; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; goto yynewstate; @@ -3241,150 +3020,150 @@ switch (yyn) { case 29: -#line 1099 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1099 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;} break; case 30: -#line 1099 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1099 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;} break; case 31: -#line 1100 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1100 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;} break; case 32: -#line 1100 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1100 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;} break; case 33: -#line 1101 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1101 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;} break; case 34: -#line 1101 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1101 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;} break; case 35: -#line 1102 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1102 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;} break; case 36: -#line 1102 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1102 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;} break; case 37: -#line 1103 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1103 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;} break; case 38: -#line 1103 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1103 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;} break; case 39: -#line 1107 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1107 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;} break; case 40: -#line 1107 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1107 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;} break; case 41: -#line 1108 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1108 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;} break; case 42: -#line 1108 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1108 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;} break; case 43: -#line 1109 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1109 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;} break; case 44: -#line 1109 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1109 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;} break; case 45: -#line 1110 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1110 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;} break; case 46: -#line 1110 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1110 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;} break; case 47: -#line 1111 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1111 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;} break; case 48: -#line 1111 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1111 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;} break; case 49: -#line 1112 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1112 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;} break; case 50: -#line 1112 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1112 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;} break; case 51: -#line 1113 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1113 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;} break; case 52: -#line 1113 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1113 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;} break; case 53: -#line 1114 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1114 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;} break; case 54: -#line 1115 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1115 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;} break; case 61: -#line 1124 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1124 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 62: -#line 1128 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1128 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); + (yyval.StrVal) = (yyvsp[-1].StrVal); CHECK_FOR_ERROR ;} break; case 63: -#line 1132 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1132 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3392,15 +3171,15 @@ break; case 66: -#line 1139 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1139 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); + (yyval.StrVal) = (yyvsp[-1].StrVal); CHECK_FOR_ERROR ;} break; case 67: -#line 1143 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1143 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3408,198 +3187,198 @@ break; case 68: -#line 1149 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1149 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 69: -#line 1150 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1150 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 70: -#line 1151 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1151 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 71: -#line 1152 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1152 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; case 72: -#line 1153 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 73: -#line 1157 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1157 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 74: -#line 1158 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1158 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 75: -#line 1159 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1159 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 76: -#line 1163 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1163 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 77: -#line 1164 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1164 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;} break; case 78: -#line 1168 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1168 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 79: -#line 1169 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1169 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 80: -#line 1170 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1170 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 81: -#line 1174 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1174 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 82: -#line 1175 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1175 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 83: -#line 1176 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1176 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 84: -#line 1177 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1177 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 85: -#line 1178 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1178 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 86: -#line 1181 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1181 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 87: -#line 1182 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1182 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 88: -#line 1183 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1183 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; case 89: -#line 1184 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1184 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; case 90: -#line 1185 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1185 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; case 91: -#line 1186 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1186 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; case 92: -#line 1187 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1187 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) + if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) GEN_ERROR("Calling conv too large"); - (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val); + (yyval.UIntVal) = (yyvsp[0].UInt64Val); CHECK_FOR_ERROR ;} break; case 93: -#line 1194 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1194 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 94: -#line 1195 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1195 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 95: -#line 1196 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1196 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::InReg; ;} break; case 96: -#line 1197 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1197 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::StructRet; ;} break; case 97: -#line 1200 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1200 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::None; ;} break; case 98: -#line 1201 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1201 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs); + (yyval.ParamAttrs) = (yyvsp[-1].ParamAttrs) | (yyvsp[0].ParamAttrs); ;} break; case 99: -#line 1206 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1206 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoReturn; ;} break; case 100: -#line 1207 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1207 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoUnwind; ;} break; case 102: -#line 1211 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1211 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::None; ;} break; case 103: -#line 1212 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1212 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs); + (yyval.ParamAttrs) = (yyvsp[-1].ParamAttrs) | (yyvsp[0].ParamAttrs); ;} break; case 104: -#line 1219 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1219 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 105: -#line 1220 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1220 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val); + (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) GEN_ERROR("Alignment must be a power of two"); CHECK_FOR_ERROR @@ -3607,14 +3386,14 @@ break; case 106: -#line 1226 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1226 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 107: -#line 1227 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1227 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val); + (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) GEN_ERROR("Alignment must be a power of two"); CHECK_FOR_ERROR @@ -3622,57 +3401,57 @@ break; case 108: -#line 1235 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1235 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - for (unsigned i = 0, e = strlen((yyvsp[(2) - (2)].StrVal)); i != e; ++i) - if ((yyvsp[(2) - (2)].StrVal)[i] == '"' || (yyvsp[(2) - (2)].StrVal)[i] == '\\') + for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i) + if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\') GEN_ERROR("Invalid character in section name"); - (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal); + (yyval.StrVal) = (yyvsp[0].StrVal); CHECK_FOR_ERROR ;} break; case 109: -#line 1243 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1243 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 110: -#line 1244 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" - { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;} +#line 1244 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" + { (yyval.StrVal) = (yyvsp[0].StrVal); ;} break; case 111: -#line 1249 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1249 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" {;} break; case 112: -#line 1250 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1250 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" {;} break; case 113: -#line 1251 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1251 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - CurGV->setSection((yyvsp[(1) - (1)].StrVal)); - free((yyvsp[(1) - (1)].StrVal)); + CurGV->setSection((yyvsp[0].StrVal)); + free((yyvsp[0].StrVal)); CHECK_FOR_ERROR ;} break; case 114: -#line 1256 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1256 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val))) + if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) GEN_ERROR("Alignment must be a power of two"); - CurGV->setAlignment((yyvsp[(2) - (2)].UInt64Val)); + CurGV->setAlignment((yyvsp[0].UInt64Val)); CHECK_FOR_ERROR ;} break; case 119: -#line 1272 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1272 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR @@ -3680,39 +3459,39 @@ break; case 120: -#line 1276 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1276 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType)); + (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); CHECK_FOR_ERROR ;} break; case 121: -#line 1280 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1280 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Pointer type? - if (*(yyvsp[(1) - (2)].TypeVal) == Type::LabelTy) + if (*(yyvsp[-1].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); - (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(PointerType::get(*(yyvsp[(1) - (2)].TypeVal)))); - delete (yyvsp[(1) - (2)].TypeVal); + (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(PointerType::get(*(yyvsp[-1].TypeVal)))); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; case 122: -#line 1287 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1287 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... - const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal)); + const Type* tmp = getTypeVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR (yyval.TypeVal) = new PATypeHolder(tmp); ;} break; case 123: -#line 1292 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1292 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Type UpReference - if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); + if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder - UpRefs.push_back(UpRefRecord((unsigned)(yyvsp[(2) - (2)].UInt64Val), OT)); // Add to vector... + UpRefs.push_back(UpRefRecord((unsigned)(yyvsp[0].UInt64Val), OT)); // Add to vector... (yyval.TypeVal) = new PATypeHolder(OT); UR_OUT("New Upreference!\n"); CHECK_FOR_ERROR @@ -3720,14 +3499,14 @@ break; case 124: -#line 1300 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1300 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { std::vector Params; ParamAttrsList Attrs; - if ((yyvsp[(5) - (5)].ParamAttrs) != ParamAttr::None) - Attrs.addAttributes(0, (yyvsp[(5) - (5)].ParamAttrs)); + if ((yyvsp[0].ParamAttrs) != ParamAttr::None) + Attrs.addAttributes(0, (yyvsp[0].ParamAttrs)); unsigned index = 1; - TypeWithAttrsList::iterator I = (yyvsp[(3) - (5)].TypeWithAttrsList)->begin(), E = (yyvsp[(3) - (5)].TypeWithAttrsList)->end(); + TypeWithAttrsList::iterator I = (yyvsp[-2].TypeWithAttrsList)->begin(), E = (yyvsp[-2].TypeWithAttrsList)->end(); for (; I != E; ++I, ++index) { const Type *Ty = I->Ty->get(); Params.push_back(Ty); @@ -3741,22 +3520,22 @@ ParamAttrsList *ActualAttrs = 0; if (!Attrs.empty()) ActualAttrs = new ParamAttrsList(Attrs); - FunctionType *FT = FunctionType::get(*(yyvsp[(1) - (5)].TypeVal), Params, isVarArg, ActualAttrs); - delete (yyvsp[(3) - (5)].TypeWithAttrsList); // Delete the argument list - delete (yyvsp[(1) - (5)].TypeVal); // Delete the return type handle + FunctionType *FT = FunctionType::get(*(yyvsp[-4].TypeVal), Params, isVarArg, ActualAttrs); + delete (yyvsp[-2].TypeWithAttrsList); // Delete the argument list + delete (yyvsp[-4].TypeVal); // Delete the return type handle (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(FT)); CHECK_FOR_ERROR ;} break; case 125: -#line 1326 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1326 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { std::vector Params; ParamAttrsList Attrs; - if ((yyvsp[(5) - (5)].ParamAttrs) != ParamAttr::None) - Attrs.addAttributes(0, (yyvsp[(5) - (5)].ParamAttrs)); - TypeWithAttrsList::iterator I = (yyvsp[(3) - (5)].TypeWithAttrsList)->begin(), E = (yyvsp[(3) - (5)].TypeWithAttrsList)->end(); + if ((yyvsp[0].ParamAttrs) != ParamAttr::None) + Attrs.addAttributes(0, (yyvsp[0].ParamAttrs)); + TypeWithAttrsList::iterator I = (yyvsp[-2].TypeWithAttrsList)->begin(), E = (yyvsp[-2].TypeWithAttrsList)->end(); unsigned index = 1; for ( ; I != E; ++I, ++index) { const Type* Ty = I->Ty->get(); @@ -3772,54 +3551,54 @@ if (!Attrs.empty()) ActualAttrs = new ParamAttrsList(Attrs); - FunctionType *FT = FunctionType::get((yyvsp[(1) - (5)].PrimType), Params, isVarArg, ActualAttrs); - delete (yyvsp[(3) - (5)].TypeWithAttrsList); // Delete the argument list + FunctionType *FT = FunctionType::get((yyvsp[-4].PrimType), Params, isVarArg, ActualAttrs); + delete (yyvsp[-2].TypeWithAttrsList); // Delete the argument list (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(FT)); CHECK_FOR_ERROR ;} break; case 126: -#line 1353 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1353 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Sized array type? - (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (unsigned)(yyvsp[(2) - (5)].UInt64Val)))); - delete (yyvsp[(4) - (5)].TypeVal); + (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[-1].TypeVal), (unsigned)(yyvsp[-3].UInt64Val)))); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; case 127: -#line 1358 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1358 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Vector type? - const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get(); - if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val)) + const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get(); + if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val)) GEN_ERROR("Unsigned result not equal to signed result"); if (!ElemTy->isFloatingPoint() && !ElemTy->isInteger()) GEN_ERROR("Element type of a VectorType must be primitive"); - if (!isPowerOf2_32((yyvsp[(2) - (5)].UInt64Val))) + if (!isPowerOf2_32((yyvsp[-3].UInt64Val))) GEN_ERROR("Vector length should be a power of 2"); - (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(VectorType::get(*(yyvsp[(4) - (5)].TypeVal), (unsigned)(yyvsp[(2) - (5)].UInt64Val)))); - delete (yyvsp[(4) - (5)].TypeVal); + (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(VectorType::get(*(yyvsp[-1].TypeVal), (unsigned)(yyvsp[-3].UInt64Val)))); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; case 128: -#line 1370 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1370 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; - for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(), - E = (yyvsp[(2) - (3)].TypeList)->end(); I != E; ++I) + for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), + E = (yyvsp[-1].TypeList)->end(); I != E; ++I) Elements.push_back(*I); (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(StructType::get(Elements))); - delete (yyvsp[(2) - (3)].TypeList); + delete (yyvsp[-1].TypeList); CHECK_FOR_ERROR ;} break; case 129: -#line 1380 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1380 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR @@ -3827,21 +3606,21 @@ break; case 130: -#line 1384 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1384 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { std::vector Elements; - for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(), - E = (yyvsp[(3) - (5)].TypeList)->end(); I != E; ++I) + for (std::list::iterator I = (yyvsp[-2].TypeList)->begin(), + E = (yyvsp[-2].TypeList)->end(); I != E; ++I) Elements.push_back(*I); (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(StructType::get(Elements, true))); - delete (yyvsp[(3) - (5)].TypeList); + delete (yyvsp[-2].TypeList); CHECK_FOR_ERROR ;} break; case 131: -#line 1394 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1394 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true)); CHECK_FOR_ERROR @@ -3849,52 +3628,52 @@ break; case 132: -#line 1401 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1401 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.TypeWithAttrs).Ty = (yyvsp[(1) - (2)].TypeVal); - (yyval.TypeWithAttrs).Attrs = (yyvsp[(2) - (2)].ParamAttrs); + (yyval.TypeWithAttrs).Ty = (yyvsp[-1].TypeVal); + (yyval.TypeWithAttrs).Attrs = (yyvsp[0].ParamAttrs); ;} break; case 133: -#line 1408 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1408 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription()); - if (!(*(yyvsp[(1) - (1)].TypeVal))->isFirstClassType()) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); + if (!(*(yyvsp[0].TypeVal))->isFirstClassType()) GEN_ERROR("LLVM functions cannot return aggregate types"); - (yyval.TypeVal) = (yyvsp[(1) - (1)].TypeVal); + (yyval.TypeVal) = (yyvsp[0].TypeVal); ;} break; case 134: -#line 1415 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1415 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(Type::VoidTy); ;} break; case 135: -#line 1420 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1420 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); - (yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs)); + (yyval.TypeWithAttrsList)->push_back((yyvsp[0].TypeWithAttrs)); CHECK_FOR_ERROR ;} break; case 136: -#line 1425 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1425 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - ((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs)); + ((yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList))->push_back((yyvsp[0].TypeWithAttrs)); CHECK_FOR_ERROR ;} break; case 138: -#line 1433 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1433 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList); + (yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList); TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; TWA.Ty = new PATypeHolder(Type::VoidTy); (yyval.TypeWithAttrsList)->push_back(TWA); @@ -3903,7 +3682,7 @@ break; case 139: -#line 1440 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1440 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; @@ -3914,7 +3693,7 @@ break; case 140: -#line 1447 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1447 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); CHECK_FOR_ERROR @@ -3922,155 +3701,155 @@ break; case 141: -#line 1455 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1455 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); - (yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal)); - delete (yyvsp[(1) - (1)].TypeVal); + (yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); + delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR ;} break; case 142: -#line 1461 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1461 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal)); - delete (yyvsp[(3) - (3)].TypeVal); + ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); + delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR ;} break; case 143: -#line 1473 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1473 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); - const ArrayType *ATy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); + const ArrayType *ATy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (ATy == 0) GEN_ERROR("Cannot make array constant with type: '" + - (*(yyvsp[(1) - (4)].TypeVal))->getDescription() + "'"); + (*(yyvsp[-3].TypeVal))->getDescription() + "'"); const Type *ETy = ATy->getElementType(); int NumElements = ATy->getNumElements(); // Verify that we have the correct size... - if (NumElements != -1 && NumElements != (int)(yyvsp[(3) - (4)].ConstVector)->size()) + if (NumElements != -1 && NumElements != (int)(yyvsp[-1].ConstVector)->size()) GEN_ERROR("Type mismatch: constant sized array initialized with " + - utostr((yyvsp[(3) - (4)].ConstVector)->size()) + " arguments, but has size of " + + utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " + itostr(NumElements) + ""); // Verify all elements are correct type! - for (unsigned i = 0; i < (yyvsp[(3) - (4)].ConstVector)->size(); i++) { - if (ETy != (*(yyvsp[(3) - (4)].ConstVector))[i]->getType()) + for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { + if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType()) GEN_ERROR("Element #" + utostr(i) + " is not of type '" + ETy->getDescription() +"' as required!\nIt is of type '"+ - (*(yyvsp[(3) - (4)].ConstVector))[i]->getType()->getDescription() + "'."); + (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'."); } - (yyval.ConstVal) = ConstantArray::get(ATy, *(yyvsp[(3) - (4)].ConstVector)); - delete (yyvsp[(1) - (4)].TypeVal); delete (yyvsp[(3) - (4)].ConstVector); + (yyval.ConstVal) = ConstantArray::get(ATy, *(yyvsp[-1].ConstVector)); + delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector); CHECK_FOR_ERROR ;} break; case 144: -#line 1501 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1501 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); - const ArrayType *ATy = dyn_cast((yyvsp[(1) - (3)].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); + const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) GEN_ERROR("Cannot make array constant with type: '" + - (*(yyvsp[(1) - (3)].TypeVal))->getDescription() + "'"); + (*(yyvsp[-2].TypeVal))->getDescription() + "'"); int NumElements = ATy->getNumElements(); if (NumElements != -1 && NumElements != 0) GEN_ERROR("Type mismatch: constant sized array initialized with 0" " arguments, but has size of " + itostr(NumElements) +""); (yyval.ConstVal) = ConstantArray::get(ATy, std::vector()); - delete (yyvsp[(1) - (3)].TypeVal); + delete (yyvsp[-2].TypeVal); CHECK_FOR_ERROR ;} break; case 145: -#line 1517 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1517 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); - const ArrayType *ATy = dyn_cast((yyvsp[(1) - (3)].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); + const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) GEN_ERROR("Cannot make array constant with type: '" + - (*(yyvsp[(1) - (3)].TypeVal))->getDescription() + "'"); + (*(yyvsp[-2].TypeVal))->getDescription() + "'"); int NumElements = ATy->getNumElements(); const Type *ETy = ATy->getElementType(); - char *EndStr = UnEscapeLexed((yyvsp[(3) - (3)].StrVal), true); - if (NumElements != -1 && NumElements != (EndStr-(yyvsp[(3) - (3)].StrVal))) + char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); + if (NumElements != -1 && NumElements != (EndStr-(yyvsp[0].StrVal))) GEN_ERROR("Can't build string constant of size " + - itostr((int)(EndStr-(yyvsp[(3) - (3)].StrVal))) + + itostr((int)(EndStr-(yyvsp[0].StrVal))) + " when array has size " + itostr(NumElements) + ""); std::vector Vals; if (ETy == Type::Int8Ty) { - for (unsigned char *C = (unsigned char *)(yyvsp[(3) - (3)].StrVal); + for (unsigned char *C = (unsigned char *)(yyvsp[0].StrVal); C != (unsigned char*)EndStr; ++C) Vals.push_back(ConstantInt::get(ETy, *C)); } else { - free((yyvsp[(3) - (3)].StrVal)); + free((yyvsp[0].StrVal)); GEN_ERROR("Cannot build string arrays of non byte sized elements"); } - free((yyvsp[(3) - (3)].StrVal)); + free((yyvsp[0].StrVal)); (yyval.ConstVal) = ConstantArray::get(ATy, Vals); - delete (yyvsp[(1) - (3)].TypeVal); + delete (yyvsp[-2].TypeVal); CHECK_FOR_ERROR ;} break; case 146: -#line 1546 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1546 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); - const VectorType *PTy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); + const VectorType *PTy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (PTy == 0) GEN_ERROR("Cannot make packed constant with type: '" + - (*(yyvsp[(1) - (4)].TypeVal))->getDescription() + "'"); + (*(yyvsp[-3].TypeVal))->getDescription() + "'"); const Type *ETy = PTy->getElementType(); int NumElements = PTy->getNumElements(); // Verify that we have the correct size... - if (NumElements != -1 && NumElements != (int)(yyvsp[(3) - (4)].ConstVector)->size()) + if (NumElements != -1 && NumElements != (int)(yyvsp[-1].ConstVector)->size()) GEN_ERROR("Type mismatch: constant sized packed initialized with " + - utostr((yyvsp[(3) - (4)].ConstVector)->size()) + " arguments, but has size of " + + utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " + itostr(NumElements) + ""); // Verify all elements are correct type! - for (unsigned i = 0; i < (yyvsp[(3) - (4)].ConstVector)->size(); i++) { - if (ETy != (*(yyvsp[(3) - (4)].ConstVector))[i]->getType()) + for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { + if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType()) GEN_ERROR("Element #" + utostr(i) + " is not of type '" + ETy->getDescription() +"' as required!\nIt is of type '"+ - (*(yyvsp[(3) - (4)].ConstVector))[i]->getType()->getDescription() + "'."); + (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'."); } - (yyval.ConstVal) = ConstantVector::get(PTy, *(yyvsp[(3) - (4)].ConstVector)); - delete (yyvsp[(1) - (4)].TypeVal); delete (yyvsp[(3) - (4)].ConstVector); + (yyval.ConstVal) = ConstantVector::get(PTy, *(yyvsp[-1].ConstVector)); + delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector); CHECK_FOR_ERROR ;} break; case 147: -#line 1574 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1574 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); + const StructType *STy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (STy == 0) GEN_ERROR("Cannot make struct constant with type: '" + - (*(yyvsp[(1) - (4)].TypeVal))->getDescription() + "'"); + (*(yyvsp[-3].TypeVal))->getDescription() + "'"); - if ((yyvsp[(3) - (4)].ConstVector)->size() != STy->getNumContainedTypes()) + if ((yyvsp[-1].ConstVector)->size() != STy->getNumContainedTypes()) GEN_ERROR("Illegal number of initializers for structure type"); // Check to ensure that constants are compatible with the type initializer! - for (unsigned i = 0, e = (yyvsp[(3) - (4)].ConstVector)->size(); i != e; ++i) - if ((*(yyvsp[(3) - (4)].ConstVector))[i]->getType() != STy->getElementType(i)) + for (unsigned i = 0, e = (yyvsp[-1].ConstVector)->size(); i != e; ++i) + if ((*(yyvsp[-1].ConstVector))[i]->getType() != STy->getElementType(i)) GEN_ERROR("Expected type '" + STy->getElementType(i)->getDescription() + "' for element #" + utostr(i) + @@ -4080,21 +3859,21 @@ if (STy->isPacked()) GEN_ERROR("Unpacked Initializer to vector type '" + STy->getDescription() + "'"); - (yyval.ConstVal) = ConstantStruct::get(STy, *(yyvsp[(3) - (4)].ConstVector)); - delete (yyvsp[(1) - (4)].TypeVal); delete (yyvsp[(3) - (4)].ConstVector); + (yyval.ConstVal) = ConstantStruct::get(STy, *(yyvsp[-1].ConstVector)); + delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector); CHECK_FOR_ERROR ;} break; case 148: -#line 1599 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1599 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); - const StructType *STy = dyn_cast((yyvsp[(1) - (3)].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); + const StructType *STy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (STy == 0) GEN_ERROR("Cannot make struct constant with type: '" + - (*(yyvsp[(1) - (3)].TypeVal))->getDescription() + "'"); + (*(yyvsp[-2].TypeVal))->getDescription() + "'"); if (STy->getNumContainedTypes() != 0) GEN_ERROR("Illegal number of initializers for structure type"); @@ -4104,25 +3883,25 @@ GEN_ERROR("Unpacked Initializer to vector type '" + STy->getDescription() + "'"); (yyval.ConstVal) = ConstantStruct::get(STy, std::vector()); - delete (yyvsp[(1) - (3)].TypeVal); + delete (yyvsp[-2].TypeVal); CHECK_FOR_ERROR ;} break; case 149: -#line 1618 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1618 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get()); + const StructType *STy = dyn_cast((yyvsp[-5].TypeVal)->get()); if (STy == 0) GEN_ERROR("Cannot make struct constant with type: '" + - (*(yyvsp[(1) - (6)].TypeVal))->getDescription() + "'"); + (*(yyvsp[-5].TypeVal))->getDescription() + "'"); - if ((yyvsp[(4) - (6)].ConstVector)->size() != STy->getNumContainedTypes()) + if ((yyvsp[-2].ConstVector)->size() != STy->getNumContainedTypes()) GEN_ERROR("Illegal number of initializers for structure type"); // Check to ensure that constants are compatible with the type initializer! - for (unsigned i = 0, e = (yyvsp[(4) - (6)].ConstVector)->size(); i != e; ++i) - if ((*(yyvsp[(4) - (6)].ConstVector))[i]->getType() != STy->getElementType(i)) + for (unsigned i = 0, e = (yyvsp[-2].ConstVector)->size(); i != e; ++i) + if ((*(yyvsp[-2].ConstVector))[i]->getType() != STy->getElementType(i)) GEN_ERROR("Expected type '" + STy->getElementType(i)->getDescription() + "' for element #" + utostr(i) + @@ -4133,21 +3912,21 @@ GEN_ERROR("Vector initializer to non-vector type '" + STy->getDescription() + "'"); - (yyval.ConstVal) = ConstantStruct::get(STy, *(yyvsp[(4) - (6)].ConstVector)); - delete (yyvsp[(1) - (6)].TypeVal); delete (yyvsp[(4) - (6)].ConstVector); + (yyval.ConstVal) = ConstantStruct::get(STy, *(yyvsp[-2].ConstVector)); + delete (yyvsp[-5].TypeVal); delete (yyvsp[-2].ConstVector); CHECK_FOR_ERROR ;} break; case 150: -#line 1644 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1644 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription()); - const StructType *STy = dyn_cast((yyvsp[(1) - (5)].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription()); + const StructType *STy = dyn_cast((yyvsp[-4].TypeVal)->get()); if (STy == 0) GEN_ERROR("Cannot make struct constant with type: '" + - (*(yyvsp[(1) - (5)].TypeVal))->getDescription() + "'"); + (*(yyvsp[-4].TypeVal))->getDescription() + "'"); if (STy->getNumContainedTypes() != 0) GEN_ERROR("Illegal number of initializers for structure type"); @@ -4158,44 +3937,44 @@ STy->getDescription() + "'"); (yyval.ConstVal) = ConstantStruct::get(STy, std::vector()); - delete (yyvsp[(1) - (5)].TypeVal); + delete (yyvsp[-4].TypeVal); CHECK_FOR_ERROR ;} break; case 151: -#line 1664 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1664 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); - const PointerType *PTy = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal)->get()); if (PTy == 0) GEN_ERROR("Cannot make null pointer constant with type: '" + - (*(yyvsp[(1) - (2)].TypeVal))->getDescription() + "'"); + (*(yyvsp[-1].TypeVal))->getDescription() + "'"); (yyval.ConstVal) = ConstantPointerNull::get(PTy); - delete (yyvsp[(1) - (2)].TypeVal); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; case 152: -#line 1676 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1676 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); - (yyval.ConstVal) = UndefValue::get((yyvsp[(1) - (2)].TypeVal)->get()); - delete (yyvsp[(1) - (2)].TypeVal); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + (yyval.ConstVal) = UndefValue::get((yyvsp[-1].TypeVal)->get()); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; case 153: -#line 1683 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1683 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); - const PointerType *Ty = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + const PointerType *Ty = dyn_cast((yyvsp[-1].TypeVal)->get()); if (Ty == 0) GEN_ERROR("Global const reference must be a pointer type"); @@ -4209,7 +3988,7 @@ Function *SavedCurFn = CurFun.CurrentFunction; CurFun.CurrentFunction = 0; - Value *V = getExistingVal(Ty, (yyvsp[(2) - (2)].ValIDVal)); + Value *V = getExistingVal(Ty, (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR CurFun.CurrentFunction = SavedCurFn; @@ -4224,16 +4003,16 @@ // First check to see if the forward references value is already created! PerModuleInfo::GlobalRefsType::iterator I = - CurModule.GlobalRefs.find(std::make_pair(PT, (yyvsp[(2) - (2)].ValIDVal))); + CurModule.GlobalRefs.find(std::make_pair(PT, (yyvsp[0].ValIDVal))); if (I != CurModule.GlobalRefs.end()) { V = I->second; // Placeholder already exists, use it... - (yyvsp[(2) - (2)].ValIDVal).destroy(); + (yyvsp[0].ValIDVal).destroy(); } else { std::string Name; - if ((yyvsp[(2) - (2)].ValIDVal).Type == ValID::GlobalName) - Name = (yyvsp[(2) - (2)].ValIDVal).Name; - else if ((yyvsp[(2) - (2)].ValIDVal).Type != ValID::GlobalID) + if ((yyvsp[0].ValIDVal).Type == ValID::GlobalName) + Name = (yyvsp[0].ValIDVal).Name; + else if ((yyvsp[0].ValIDVal).Type != ValID::GlobalID) GEN_ERROR("Invalid reference to global"); // Create the forward referenced global. @@ -4249,287 +4028,287 @@ } // Keep track of the fact that we have a forward ref to recycle it - CurModule.GlobalRefs.insert(std::make_pair(std::make_pair(PT, (yyvsp[(2) - (2)].ValIDVal)), GV)); + CurModule.GlobalRefs.insert(std::make_pair(std::make_pair(PT, (yyvsp[0].ValIDVal)), GV)); V = GV; } } (yyval.ConstVal) = cast(V); - delete (yyvsp[(1) - (2)].TypeVal); // Free the type handle + delete (yyvsp[-1].TypeVal); // Free the type handle CHECK_FOR_ERROR ;} break; case 154: -#line 1749 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1749 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); - if ((yyvsp[(1) - (2)].TypeVal)->get() != (yyvsp[(2) - (2)].ConstVal)->getType()) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + if ((yyvsp[-1].TypeVal)->get() != (yyvsp[0].ConstVal)->getType()) GEN_ERROR("Mismatched types for constant expression: " + - (*(yyvsp[(1) - (2)].TypeVal))->getDescription() + " and " + (yyvsp[(2) - (2)].ConstVal)->getType()->getDescription()); - (yyval.ConstVal) = (yyvsp[(2) - (2)].ConstVal); - delete (yyvsp[(1) - (2)].TypeVal); + (*(yyvsp[-1].TypeVal))->getDescription() + " and " + (yyvsp[0].ConstVal)->getType()->getDescription()); + (yyval.ConstVal) = (yyvsp[0].ConstVal); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; case 155: -#line 1759 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1759 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); - const Type *Ty = (yyvsp[(1) - (2)].TypeVal)->get(); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + const Type *Ty = (yyvsp[-1].TypeVal)->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) GEN_ERROR("Cannot create a null initialized value of this type"); (yyval.ConstVal) = Constant::getNullValue(Ty); - delete (yyvsp[(1) - (2)].TypeVal); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; case 156: -#line 1769 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1769 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // integral constants - if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val))) + if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); - (yyval.ConstVal) = ConstantInt::get((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val), true); + (yyval.ConstVal) = ConstantInt::get((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val), true); CHECK_FOR_ERROR ;} break; case 157: -#line 1775 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1775 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants - uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); - if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { + uint32_t BitWidth = cast((yyvsp[-1].PrimType))->getBitWidth(); + if ((yyvsp[0].APIntVal)->getBitWidth() > BitWidth) { GEN_ERROR("Constant value does not fit in type"); } - (yyvsp[(2) - (2)].APIntVal)->sextOrTrunc(BitWidth); - (yyval.ConstVal) = ConstantInt::get(*(yyvsp[(2) - (2)].APIntVal)); - delete (yyvsp[(2) - (2)].APIntVal); + (yyvsp[0].APIntVal)->sextOrTrunc(BitWidth); + (yyval.ConstVal) = ConstantInt::get(*(yyvsp[0].APIntVal)); + delete (yyvsp[0].APIntVal); CHECK_FOR_ERROR ;} break; case 158: -#line 1785 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1785 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // integral constants - if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val))) + if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); - (yyval.ConstVal) = ConstantInt::get((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val), false); + (yyval.ConstVal) = ConstantInt::get((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val), false); CHECK_FOR_ERROR ;} break; case 159: -#line 1791 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1791 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants - uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); - if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { + uint32_t BitWidth = cast((yyvsp[-1].PrimType))->getBitWidth(); + if ((yyvsp[0].APIntVal)->getBitWidth() > BitWidth) { GEN_ERROR("Constant value does not fit in type"); } - (yyvsp[(2) - (2)].APIntVal)->zextOrTrunc(BitWidth); - (yyval.ConstVal) = ConstantInt::get(*(yyvsp[(2) - (2)].APIntVal)); - delete (yyvsp[(2) - (2)].APIntVal); + (yyvsp[0].APIntVal)->zextOrTrunc(BitWidth); + (yyval.ConstVal) = ConstantInt::get(*(yyvsp[0].APIntVal)); + delete (yyvsp[0].APIntVal); CHECK_FOR_ERROR ;} break; case 160: -#line 1801 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1801 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Boolean constants - assert(cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() == 1 && "Not Bool?"); + assert(cast((yyvsp[-1].PrimType))->getBitWidth() == 1 && "Not Bool?"); (yyval.ConstVal) = ConstantInt::getTrue(); CHECK_FOR_ERROR ;} break; case 161: -#line 1806 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1806 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Boolean constants - assert(cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() == 1 && "Not Bool?"); + assert(cast((yyvsp[-1].PrimType))->getBitWidth() == 1 && "Not Bool?"); (yyval.ConstVal) = ConstantInt::getFalse(); CHECK_FOR_ERROR ;} break; case 162: -#line 1811 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1811 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Float & Double constants - if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].FPVal))) + if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal))) GEN_ERROR("Floating point constant invalid for type"); - (yyval.ConstVal) = ConstantFP::get((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].FPVal)); + (yyval.ConstVal) = ConstantFP::get((yyvsp[-1].PrimType), (yyvsp[0].FPVal)); CHECK_FOR_ERROR ;} break; case 163: -#line 1819 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1819 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); - Constant *Val = (yyvsp[(3) - (6)].ConstVal); - const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get(); - if (!CastInst::castIsValid((yyvsp[(1) - (6)].CastOpVal), (yyvsp[(3) - (6)].ConstVal), DestTy)) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + Constant *Val = (yyvsp[-3].ConstVal); + const Type *DestTy = (yyvsp[-1].TypeVal)->get(); + if (!CastInst::castIsValid((yyvsp[-5].CastOpVal), (yyvsp[-3].ConstVal), DestTy)) GEN_ERROR("invalid cast opcode for cast from '" + Val->getType()->getDescription() + "' to '" + DestTy->getDescription() + "'"); - (yyval.ConstVal) = ConstantExpr::getCast((yyvsp[(1) - (6)].CastOpVal), (yyvsp[(3) - (6)].ConstVal), DestTy); - delete (yyvsp[(5) - (6)].TypeVal); + (yyval.ConstVal) = ConstantExpr::getCast((yyvsp[-5].CastOpVal), (yyvsp[-3].ConstVal), DestTy); + delete (yyvsp[-1].TypeVal); ;} break; case 164: -#line 1831 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1831 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if (!isa((yyvsp[(3) - (5)].ConstVal)->getType())) + if (!isa((yyvsp[-2].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); const Type *IdxTy = - GetElementPtrInst::getIndexedType((yyvsp[(3) - (5)].ConstVal)->getType(), &(*(yyvsp[(4) - (5)].ValueList))[0], (yyvsp[(4) - (5)].ValueList)->size(), + GetElementPtrInst::getIndexedType((yyvsp[-2].ConstVal)->getType(), &(*(yyvsp[-1].ValueList))[0], (yyvsp[-1].ValueList)->size(), true); if (!IdxTy) GEN_ERROR("Index list invalid for constant getelementptr"); SmallVector IdxVec; - for (unsigned i = 0, e = (yyvsp[(4) - (5)].ValueList)->size(); i != e; ++i) - if (Constant *C = dyn_cast((*(yyvsp[(4) - (5)].ValueList))[i])) + for (unsigned i = 0, e = (yyvsp[-1].ValueList)->size(); i != e; ++i) + if (Constant *C = dyn_cast((*(yyvsp[-1].ValueList))[i])) IdxVec.push_back(C); else GEN_ERROR("Indices to constant getelementptr must be constants"); - delete (yyvsp[(4) - (5)].ValueList); + delete (yyvsp[-1].ValueList); - (yyval.ConstVal) = ConstantExpr::getGetElementPtr((yyvsp[(3) - (5)].ConstVal), &IdxVec[0], IdxVec.size()); + (yyval.ConstVal) = ConstantExpr::getGetElementPtr((yyvsp[-2].ConstVal), &IdxVec[0], IdxVec.size()); CHECK_FOR_ERROR ;} break; case 165: -#line 1853 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1853 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty) + if ((yyvsp[-5].ConstVal)->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); - if ((yyvsp[(5) - (8)].ConstVal)->getType() != (yyvsp[(7) - (8)].ConstVal)->getType()) + if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Select operand types must match"); - (yyval.ConstVal) = ConstantExpr::getSelect((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal)); + (yyval.ConstVal) = ConstantExpr::getSelect((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; case 166: -#line 1861 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1861 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) + if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Binary operator types must match"); CHECK_FOR_ERROR; - (yyval.ConstVal) = ConstantExpr::get((yyvsp[(1) - (6)].BinaryOpVal), (yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); ;} break; case 167: -#line 1867 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1867 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) + if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Logical operator types must match"); - if (!(yyvsp[(3) - (6)].ConstVal)->getType()->isInteger()) { - if (Instruction::isShift((yyvsp[(1) - (6)].BinaryOpVal)) || !isa((yyvsp[(3) - (6)].ConstVal)->getType()) || - !cast((yyvsp[(3) - (6)].ConstVal)->getType())->getElementType()->isInteger()) + if (!(yyvsp[-3].ConstVal)->getType()->isInteger()) { + if (Instruction::isShift((yyvsp[-5].BinaryOpVal)) || !isa((yyvsp[-3].ConstVal)->getType()) || + !cast((yyvsp[-3].ConstVal)->getType())->getElementType()->isInteger()) GEN_ERROR("Logical operator requires integral operands"); } - (yyval.ConstVal) = ConstantExpr::get((yyvsp[(1) - (6)].BinaryOpVal), (yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; case 168: -#line 1878 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1878 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) + if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("icmp operand types must match"); - (yyval.ConstVal) = ConstantExpr::getICmp((yyvsp[(2) - (7)].IPredicate), (yyvsp[(4) - (7)].ConstVal), (yyvsp[(6) - (7)].ConstVal)); + (yyval.ConstVal) = ConstantExpr::getICmp((yyvsp[-5].IPredicate), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); ;} break; case 169: -#line 1883 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1883 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) + if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("fcmp operand types must match"); - (yyval.ConstVal) = ConstantExpr::getFCmp((yyvsp[(2) - (7)].FPredicate), (yyvsp[(4) - (7)].ConstVal), (yyvsp[(6) - (7)].ConstVal)); + (yyval.ConstVal) = ConstantExpr::getFCmp((yyvsp[-5].FPredicate), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); ;} break; case 170: -#line 1888 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1888 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal))) + if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid extractelement operands"); - (yyval.ConstVal) = ConstantExpr::getExtractElement((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal)); + (yyval.ConstVal) = ConstantExpr::getExtractElement((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; case 171: -#line 1894 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1894 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) + if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid insertelement operands"); - (yyval.ConstVal) = ConstantExpr::getInsertElement((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal)); + (yyval.ConstVal) = ConstantExpr::getInsertElement((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; case 172: -#line 1900 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1900 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) + if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid shufflevector operands"); - (yyval.ConstVal) = ConstantExpr::getShuffleVector((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal)); + (yyval.ConstVal) = ConstantExpr::getShuffleVector((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; case 173: -#line 1909 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1909 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); + ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; case 174: -#line 1913 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1913 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); - (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal)); + (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; case 175: -#line 1921 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1921 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 176: -#line 1921 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1921 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 177: -#line 1924 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1924 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 178: -#line 1924 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1924 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 179: -#line 1935 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1935 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -4538,7 +4317,7 @@ break; case 180: -#line 1940 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1940 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -4547,12 +4326,12 @@ break; case 183: -#line 1953 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1953 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = false; ;} break; case 184: -#line 1953 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1953 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CurFun.FunctionDone(); CHECK_FOR_ERROR @@ -4560,29 +4339,29 @@ break; case 185: -#line 1957 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1957 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; case 186: -#line 1957 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1957 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 187: -#line 1960 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1960 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 188: -#line 1963 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1963 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: // @@ -4592,84 +4371,84 @@ // If types are not resolved eagerly, then the two types will not be // determined to be the same type! // - ResolveTypeTo((yyvsp[(1) - (3)].StrVal), *(yyvsp[(3) - (3)].TypeVal)); + ResolveTypeTo((yyvsp[-2].StrVal), *(yyvsp[0].TypeVal)); - if (!setTypeName(*(yyvsp[(3) - (3)].TypeVal), (yyvsp[(1) - (3)].StrVal)) && !(yyvsp[(1) - (3)].StrVal)) { + if (!setTypeName(*(yyvsp[0].TypeVal), (yyvsp[-2].StrVal)) && !(yyvsp[-2].StrVal)) { CHECK_FOR_ERROR // If this is a named type that is not a redefinition, add it to the slot // table. - CurModule.Types.push_back(*(yyvsp[(3) - (3)].TypeVal)); + CurModule.Types.push_back(*(yyvsp[0].TypeVal)); } - delete (yyvsp[(3) - (3)].TypeVal); + delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR ;} break; case 189: -#line 1987 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1987 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType)); + ResolveTypeTo((yyvsp[-2].StrVal), (yyvsp[0].PrimType)); - if (!setTypeName((yyvsp[(3) - (3)].PrimType), (yyvsp[(1) - (3)].StrVal)) && !(yyvsp[(1) - (3)].StrVal)) { + if (!setTypeName((yyvsp[0].PrimType), (yyvsp[-2].StrVal)) && !(yyvsp[-2].StrVal)) { CHECK_FOR_ERROR // If this is a named type that is not a redefinition, add it to the slot // table. - CurModule.Types.push_back((yyvsp[(3) - (3)].PrimType)); + CurModule.Types.push_back((yyvsp[0].PrimType)); } CHECK_FOR_ERROR ;} break; case 190: -#line 1998 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1998 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { /* "Externally Visible" Linkage */ - if ((yyvsp[(5) - (5)].ConstVal) == 0) + if ((yyvsp[0].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); - CurGV = ParseGlobalVariable((yyvsp[(1) - (5)].StrVal), GlobalValue::ExternalLinkage, - (yyvsp[(2) - (5)].Visibility), (yyvsp[(4) - (5)].BoolVal), (yyvsp[(5) - (5)].ConstVal)->getType(), (yyvsp[(5) - (5)].ConstVal), (yyvsp[(3) - (5)].BoolVal)); + CurGV = ParseGlobalVariable((yyvsp[-4].StrVal), GlobalValue::ExternalLinkage, + (yyvsp[-3].Visibility), (yyvsp[-1].BoolVal), (yyvsp[0].ConstVal)->getType(), (yyvsp[0].ConstVal), (yyvsp[-2].BoolVal)); CHECK_FOR_ERROR ;} break; case 191: -#line 2005 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2005 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 192: -#line 2008 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2008 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if ((yyvsp[(6) - (6)].ConstVal) == 0) + if ((yyvsp[0].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); - CurGV = ParseGlobalVariable((yyvsp[(1) - (6)].StrVal), (yyvsp[(2) - (6)].Linkage), (yyvsp[(3) - (6)].Visibility), (yyvsp[(5) - (6)].BoolVal), (yyvsp[(6) - (6)].ConstVal)->getType(), (yyvsp[(6) - (6)].ConstVal), (yyvsp[(4) - (6)].BoolVal)); + CurGV = ParseGlobalVariable((yyvsp[-5].StrVal), (yyvsp[-4].Linkage), (yyvsp[-3].Visibility), (yyvsp[-1].BoolVal), (yyvsp[0].ConstVal)->getType(), (yyvsp[0].ConstVal), (yyvsp[-2].BoolVal)); CHECK_FOR_ERROR ;} break; case 193: -#line 2013 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2013 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 194: -#line 2016 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2016 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (6)].TypeVal))->getDescription()); - CurGV = ParseGlobalVariable((yyvsp[(1) - (6)].StrVal), (yyvsp[(2) - (6)].Linkage), (yyvsp[(3) - (6)].Visibility), (yyvsp[(5) - (6)].BoolVal), *(yyvsp[(6) - (6)].TypeVal), 0, (yyvsp[(4) - (6)].BoolVal)); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); + CurGV = ParseGlobalVariable((yyvsp[-5].StrVal), (yyvsp[-4].Linkage), (yyvsp[-3].Visibility), (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0, (yyvsp[-2].BoolVal)); CHECK_FOR_ERROR - delete (yyvsp[(6) - (6)].TypeVal); + delete (yyvsp[0].TypeVal); ;} break; case 195: -#line 2022 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2022 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR @@ -4677,26 +4456,26 @@ break; case 196: -#line 2026 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2026 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 197: -#line 2029 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2029 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 198: -#line 2035 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2035 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); - char *EndStr = UnEscapeLexed((yyvsp[(1) - (1)].StrVal), true); - std::string NewAsm((yyvsp[(1) - (1)].StrVal), EndStr); - free((yyvsp[(1) - (1)].StrVal)); + char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); + std::string NewAsm((yyvsp[0].StrVal), EndStr); + free((yyvsp[0].StrVal)); if (AsmSoFar.empty()) CurModule.CurrentModule->setModuleInlineAsm(NewAsm); @@ -4707,68 +4486,68 @@ break; case 199: -#line 2048 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2048 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - CurModule.CurrentModule->setTargetTriple((yyvsp[(3) - (3)].StrVal)); - free((yyvsp[(3) - (3)].StrVal)); + CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); + free((yyvsp[0].StrVal)); ;} break; case 200: -#line 2052 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2052 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - CurModule.CurrentModule->setDataLayout((yyvsp[(3) - (3)].StrVal)); - free((yyvsp[(3) - (3)].StrVal)); + CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); + free((yyvsp[0].StrVal)); ;} break; case 202: -#line 2059 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2059 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - CurModule.CurrentModule->addLibrary((yyvsp[(3) - (3)].StrVal)); - free((yyvsp[(3) - (3)].StrVal)); + CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); + free((yyvsp[0].StrVal)); CHECK_FOR_ERROR ;} break; case 203: -#line 2064 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2064 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - CurModule.CurrentModule->addLibrary((yyvsp[(1) - (1)].StrVal)); - free((yyvsp[(1) - (1)].StrVal)); + CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); + free((yyvsp[0].StrVal)); CHECK_FOR_ERROR ;} break; case 204: -#line 2069 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2069 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 205: -#line 2078 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2078 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); - if (*(yyvsp[(3) - (5)].TypeVal) == Type::VoidTy) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); + if (*(yyvsp[-2].TypeVal) == Type::VoidTy) GEN_ERROR("void typed arguments are invalid"); - ArgListEntry E; E.Attrs = (yyvsp[(4) - (5)].ParamAttrs); E.Ty = (yyvsp[(3) - (5)].TypeVal); E.Name = (yyvsp[(5) - (5)].StrVal); - (yyval.ArgList) = (yyvsp[(1) - (5)].ArgList); - (yyvsp[(1) - (5)].ArgList)->push_back(E); + ArgListEntry E; E.Attrs = (yyvsp[-1].ParamAttrs); E.Ty = (yyvsp[-2].TypeVal); E.Name = (yyvsp[0].StrVal); + (yyval.ArgList) = (yyvsp[-4].ArgList); + (yyvsp[-4].ArgList)->push_back(E); CHECK_FOR_ERROR ;} break; case 206: -#line 2088 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2088 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); - if (*(yyvsp[(1) - (3)].TypeVal) == Type::VoidTy) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); + if (*(yyvsp[-2].TypeVal) == Type::VoidTy) GEN_ERROR("void typed arguments are invalid"); - ArgListEntry E; E.Attrs = (yyvsp[(2) - (3)].ParamAttrs); E.Ty = (yyvsp[(1) - (3)].TypeVal); E.Name = (yyvsp[(3) - (3)].StrVal); + ArgListEntry E; E.Attrs = (yyvsp[-1].ParamAttrs); E.Ty = (yyvsp[-2].TypeVal); E.Name = (yyvsp[0].StrVal); (yyval.ArgList) = new ArgListType; (yyval.ArgList)->push_back(E); CHECK_FOR_ERROR @@ -4776,17 +4555,17 @@ break; case 207: -#line 2099 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2099 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList); + (yyval.ArgList) = (yyvsp[0].ArgList); CHECK_FOR_ERROR ;} break; case 208: -#line 2103 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2103 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList); + (yyval.ArgList) = (yyvsp[-2].ArgList); struct ArgListEntry E; E.Ty = new PATypeHolder(Type::VoidTy); E.Name = 0; @@ -4797,7 +4576,7 @@ break; case 209: -#line 2112 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2112 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new ArgListType; struct ArgListEntry E; @@ -4810,7 +4589,7 @@ break; case 210: -#line 2121 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2121 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR @@ -4818,24 +4597,24 @@ break; case 211: -#line 2127 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2127 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - UnEscapeLexed((yyvsp[(3) - (9)].StrVal)); - std::string FunctionName((yyvsp[(3) - (9)].StrVal)); - free((yyvsp[(3) - (9)].StrVal)); // Free strdup'd memory! + UnEscapeLexed((yyvsp[-6].StrVal)); + std::string FunctionName((yyvsp[-6].StrVal)); + free((yyvsp[-6].StrVal)); // Free strdup'd memory! // Check the function result for abstractness if this is a define. We should // have no abstract types at this point - if (!CurFun.isDeclare && CurModule.TypeIsUnresolved((yyvsp[(2) - (9)].TypeVal))) - GEN_ERROR("Reference to abstract result: "+ (yyvsp[(2) - (9)].TypeVal)->get()->getDescription()); + if (!CurFun.isDeclare && CurModule.TypeIsUnresolved((yyvsp[-7].TypeVal))) + GEN_ERROR("Reference to abstract result: "+ (yyvsp[-7].TypeVal)->get()->getDescription()); std::vector ParamTypeList; ParamAttrsList ParamAttrs; - if ((yyvsp[(7) - (9)].ParamAttrs) != ParamAttr::None) - ParamAttrs.addAttributes(0, (yyvsp[(7) - (9)].ParamAttrs)); - if ((yyvsp[(5) - (9)].ArgList)) { // If there are arguments... + if ((yyvsp[-2].ParamAttrs) != ParamAttr::None) + ParamAttrs.addAttributes(0, (yyvsp[-2].ParamAttrs)); + if ((yyvsp[-4].ArgList)) { // If there are arguments... unsigned index = 1; - for (ArgListType::iterator I = (yyvsp[(5) - (9)].ArgList)->begin(); I != (yyvsp[(5) - (9)].ArgList)->end(); ++I, ++index) { + for (ArgListType::iterator I = (yyvsp[-4].ArgList)->begin(); I != (yyvsp[-4].ArgList)->end(); ++I, ++index) { const Type* Ty = I->Ty->get(); if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty)) GEN_ERROR("Reference to abstract argument: " + Ty->getDescription()); @@ -4853,10 +4632,10 @@ if (!ParamAttrs.empty()) ActualAttrs = new ParamAttrsList(ParamAttrs); - FunctionType *FT = FunctionType::get(*(yyvsp[(2) - (9)].TypeVal), ParamTypeList, isVarArg, + FunctionType *FT = FunctionType::get(*(yyvsp[-7].TypeVal), ParamTypeList, isVarArg, ActualAttrs); const PointerType *PFT = PointerType::get(FT); - delete (yyvsp[(2) - (9)].TypeVal); + delete (yyvsp[-7].TypeVal); ValID ID; if (!FunctionName.empty()) { @@ -4905,26 +4684,26 @@ Fn->setLinkage(CurFun.Linkage); Fn->setVisibility(CurFun.Visibility); } - Fn->setCallingConv((yyvsp[(1) - (9)].UIntVal)); - Fn->setAlignment((yyvsp[(9) - (9)].UIntVal)); - if ((yyvsp[(8) - (9)].StrVal)) { - Fn->setSection((yyvsp[(8) - (9)].StrVal)); - free((yyvsp[(8) - (9)].StrVal)); + Fn->setCallingConv((yyvsp[-8].UIntVal)); + Fn->setAlignment((yyvsp[0].UIntVal)); + if ((yyvsp[-1].StrVal)) { + Fn->setSection((yyvsp[-1].StrVal)); + free((yyvsp[-1].StrVal)); } // Add all of the arguments we parsed to the function... - if ((yyvsp[(5) - (9)].ArgList)) { // Is null if empty... + if ((yyvsp[-4].ArgList)) { // Is null if empty... if (isVarArg) { // Nuke the last entry - assert((yyvsp[(5) - (9)].ArgList)->back().Ty->get() == Type::VoidTy && (yyvsp[(5) - (9)].ArgList)->back().Name == 0 && + assert((yyvsp[-4].ArgList)->back().Ty->get() == Type::VoidTy && (yyvsp[-4].ArgList)->back().Name == 0 && "Not a varargs marker!"); - delete (yyvsp[(5) - (9)].ArgList)->back().Ty; - (yyvsp[(5) - (9)].ArgList)->pop_back(); // Delete the last entry + delete (yyvsp[-4].ArgList)->back().Ty; + (yyvsp[-4].ArgList)->pop_back(); // Delete the last entry } Function::arg_iterator ArgIt = Fn->arg_begin(); Function::arg_iterator ArgEnd = Fn->arg_end(); unsigned Idx = 1; - for (ArgListType::iterator I = (yyvsp[(5) - (9)].ArgList)->begin(); - I != (yyvsp[(5) - (9)].ArgList)->end() && ArgIt != ArgEnd; ++I, ++ArgIt) { + for (ArgListType::iterator I = (yyvsp[-4].ArgList)->begin(); + I != (yyvsp[-4].ArgList)->end() && ArgIt != ArgEnd; ++I, ++ArgIt) { delete I->Ty; // Delete the typeholder... setValueName(ArgIt, I->Name); // Insert arg into symtab... CHECK_FOR_ERROR @@ -4932,37 +4711,37 @@ Idx++; } - delete (yyvsp[(5) - (9)].ArgList); // We're now done with the argument list + delete (yyvsp[-4].ArgList); // We're now done with the argument list } CHECK_FOR_ERROR ;} break; case 214: -#line 2247 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2247 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; // Make sure that we keep track of the linkage type even if there was a // previous "declare". - (yyval.FunctionVal)->setLinkage((yyvsp[(1) - (4)].Linkage)); - (yyval.FunctionVal)->setVisibility((yyvsp[(2) - (4)].Visibility)); + (yyval.FunctionVal)->setLinkage((yyvsp[-3].Linkage)); + (yyval.FunctionVal)->setVisibility((yyvsp[-2].Visibility)); ;} break; case 217: -#line 2258 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2258 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); + (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; case 218: -#line 2263 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2263 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage)); - CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility)); + CurFun.CurrentFunction->setLinkage((yyvsp[-2].Linkage)); + CurFun.CurrentFunction->setVisibility((yyvsp[-1].Visibility)); (yyval.FunctionVal) = CurFun.CurrentFunction; CurFun.FunctionDone(); CHECK_FOR_ERROR @@ -4970,7 +4749,7 @@ break; case 219: -#line 2275 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2275 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -4978,7 +4757,7 @@ break; case 220: -#line 2279 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2279 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -4986,31 +4765,31 @@ break; case 221: -#line 2284 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2284 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant - (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val)); + (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); CHECK_FOR_ERROR ;} break; case 222: -#line 2288 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2288 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val)); + (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); CHECK_FOR_ERROR ;} break; case 223: -#line 2292 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2292 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? - (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal)); + (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); CHECK_FOR_ERROR ;} break; case 224: -#line 2296 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2296 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR @@ -5018,7 +4797,7 @@ break; case 225: -#line 2300 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2300 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR @@ -5026,7 +4805,7 @@ break; case 226: -#line 2304 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2304 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR @@ -5034,7 +4813,7 @@ break; case 227: -#line 2308 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2308 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR @@ -5042,7 +4821,7 @@ break; case 228: -#line 2312 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2312 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR @@ -5050,10 +4829,10 @@ break; case 229: -#line 2316 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2316 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector - const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); - int NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); + const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType(); + int NumElements = (yyvsp[-1].ConstVector)->size(); VectorType* pt = VectorType::get(ETy, NumElements); PATypeHolder* PTy = new PATypeHolder( @@ -5065,127 +4844,127 @@ ); // Verify all elements are correct type! - for (unsigned i = 0; i < (yyvsp[(2) - (3)].ConstVector)->size(); i++) { - if (ETy != (*(yyvsp[(2) - (3)].ConstVector))[i]->getType()) + for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { + if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType()) GEN_ERROR("Element #" + utostr(i) + " is not of type '" + ETy->getDescription() +"' as required!\nIt is of type '" + - (*(yyvsp[(2) - (3)].ConstVector))[i]->getType()->getDescription() + "'."); + (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'."); } - (yyval.ValIDVal) = ValID::create(ConstantVector::get(pt, *(yyvsp[(2) - (3)].ConstVector))); - delete PTy; delete (yyvsp[(2) - (3)].ConstVector); + (yyval.ValIDVal) = ValID::create(ConstantVector::get(pt, *(yyvsp[-1].ConstVector))); + delete PTy; delete (yyvsp[-1].ConstVector); CHECK_FOR_ERROR ;} break; case 230: -#line 2341 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2341 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal)); + (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; case 231: -#line 2345 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2345 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - char *End = UnEscapeLexed((yyvsp[(3) - (5)].StrVal), true); - std::string AsmStr = std::string((yyvsp[(3) - (5)].StrVal), End); - End = UnEscapeLexed((yyvsp[(5) - (5)].StrVal), true); - std::string Constraints = std::string((yyvsp[(5) - (5)].StrVal), End); - (yyval.ValIDVal) = ValID::createInlineAsm(AsmStr, Constraints, (yyvsp[(2) - (5)].BoolVal)); - free((yyvsp[(3) - (5)].StrVal)); - free((yyvsp[(5) - (5)].StrVal)); + char *End = UnEscapeLexed((yyvsp[-2].StrVal), true); + std::string AsmStr = std::string((yyvsp[-2].StrVal), End); + End = UnEscapeLexed((yyvsp[0].StrVal), true); + std::string Constraints = std::string((yyvsp[0].StrVal), End); + (yyval.ValIDVal) = ValID::createInlineAsm(AsmStr, Constraints, (yyvsp[-3].BoolVal)); + free((yyvsp[-2].StrVal)); + free((yyvsp[0].StrVal)); CHECK_FOR_ERROR ;} break; case 232: -#line 2359 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2359 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? - (yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal)); + (yyval.ValIDVal) = ValID::createLocalID((yyvsp[0].UIntVal)); CHECK_FOR_ERROR ;} break; case 233: -#line 2363 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2363 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal)); + (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[0].UIntVal)); CHECK_FOR_ERROR ;} break; case 234: -#line 2367 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2367 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? - (yyval.ValIDVal) = ValID::createLocalName((yyvsp[(1) - (1)].StrVal)); + (yyval.ValIDVal) = ValID::createLocalName((yyvsp[0].StrVal)); CHECK_FOR_ERROR ;} break; case 235: -#line 2371 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2371 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? - (yyval.ValIDVal) = ValID::createGlobalName((yyvsp[(1) - (1)].StrVal)); + (yyval.ValIDVal) = ValID::createGlobalName((yyvsp[0].StrVal)); CHECK_FOR_ERROR ;} break; case 238: -#line 2383 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2383 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); - (yyval.ValueVal) = getVal(*(yyvsp[(1) - (2)].TypeVal), (yyvsp[(2) - (2)].ValIDVal)); - delete (yyvsp[(1) - (2)].TypeVal); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + (yyval.ValueVal) = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; case 239: -#line 2392 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2392 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); + (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; case 240: -#line 2396 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2396 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks - (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); + (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; case 241: -#line 2405 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2405 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal)); + setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal)); CHECK_FOR_ERROR - InsertValue((yyvsp[(3) - (3)].TermInstVal)); - (yyvsp[(1) - (3)].BasicBlockVal)->getInstList().push_back((yyvsp[(3) - (3)].TermInstVal)); - (yyval.BasicBlockVal) = (yyvsp[(1) - (3)].BasicBlockVal); + InsertValue((yyvsp[0].TermInstVal)); + (yyvsp[-2].BasicBlockVal)->getInstList().push_back((yyvsp[0].TermInstVal)); + (yyval.BasicBlockVal) = (yyvsp[-2].BasicBlockVal); CHECK_FOR_ERROR ;} break; case 242: -#line 2414 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2414 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal))) + if (CastInst *CI1 = dyn_cast((yyvsp[0].InstVal))) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) if (CI2->getParent() == 0) - (yyvsp[(1) - (2)].BasicBlockVal)->getInstList().push_back(CI2); - (yyvsp[(1) - (2)].BasicBlockVal)->getInstList().push_back((yyvsp[(2) - (2)].InstVal)); - (yyval.BasicBlockVal) = (yyvsp[(1) - (2)].BasicBlockVal); + (yyvsp[-1].BasicBlockVal)->getInstList().push_back(CI2); + (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal)); + (yyval.BasicBlockVal) = (yyvsp[-1].BasicBlockVal); CHECK_FOR_ERROR ;} break; case 243: -#line 2423 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2423 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Empty space between instruction lists (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum)); CHECK_FOR_ERROR @@ -5193,23 +4972,23 @@ break; case 244: -#line 2427 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2427 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Labelled (named) basic block - (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName((yyvsp[(1) - (1)].StrVal))); + (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName((yyvsp[0].StrVal))); CHECK_FOR_ERROR ;} break; case 245: -#line 2432 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2432 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Return with a result... - (yyval.TermInstVal) = new ReturnInst((yyvsp[(2) - (2)].ValueVal)); + (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; case 246: -#line 2436 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2436 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = new ReturnInst(); CHECK_FOR_ERROR @@ -5217,57 +4996,57 @@ break; case 247: -#line 2440 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2440 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... - BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal)); + BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR (yyval.TermInstVal) = new BranchInst(tmpBB); ;} break; case 248: -#line 2445 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2445 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - assert(cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() == 1 && "Not Bool?"); - BasicBlock* tmpBBA = getBBVal((yyvsp[(6) - (9)].ValIDVal)); + assert(cast((yyvsp[-7].PrimType))->getBitWidth() == 1 && "Not Bool?"); + BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR - BasicBlock* tmpBBB = getBBVal((yyvsp[(9) - (9)].ValIDVal)); + BasicBlock* tmpBBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - Value* tmpVal = getVal(Type::Int1Ty, (yyvsp[(3) - (9)].ValIDVal)); + Value* tmpVal = getVal(Type::Int1Ty, (yyvsp[-6].ValIDVal)); CHECK_FOR_ERROR (yyval.TermInstVal) = new BranchInst(tmpBBA, tmpBBB, tmpVal); ;} break; case 249: -#line 2455 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2455 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal)); + Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal)); CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal((yyvsp[(6) - (9)].ValIDVal)); + BasicBlock* tmpBB = getBBVal((yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR - SwitchInst *S = new SwitchInst(tmpVal, tmpBB, (yyvsp[(8) - (9)].JumpTable)->size()); + SwitchInst *S = new SwitchInst(tmpVal, tmpBB, (yyvsp[-1].JumpTable)->size()); (yyval.TermInstVal) = S; - std::vector >::iterator I = (yyvsp[(8) - (9)].JumpTable)->begin(), - E = (yyvsp[(8) - (9)].JumpTable)->end(); + std::vector >::iterator I = (yyvsp[-1].JumpTable)->begin(), + E = (yyvsp[-1].JumpTable)->end(); for (; I != E; ++I) { if (ConstantInt *CI = dyn_cast(I->first)) S->addCase(CI, I->second); else GEN_ERROR("Switch case is constant, but not a simple integer"); } - delete (yyvsp[(8) - (9)].JumpTable); + delete (yyvsp[-1].JumpTable); CHECK_FOR_ERROR ;} break; case 250: -#line 2474 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2474 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal)); + Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal)); CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal((yyvsp[(6) - (8)].ValIDVal)); + BasicBlock* tmpBB = getBBVal((yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR SwitchInst *S = new SwitchInst(tmpVal, tmpBB, 0); (yyval.TermInstVal) = S; @@ -5276,20 +5055,20 @@ break; case 251: -#line 2484 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2484 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax const PointerType *PFTy = 0; const FunctionType *Ty = 0; - if (!(PFTy = dyn_cast((yyvsp[(3) - (14)].TypeVal)->get())) || + if (!(PFTy = dyn_cast((yyvsp[-11].TypeVal)->get())) || !(Ty = dyn_cast(PFTy->getElementType()))) { // Pull out the types of all of the arguments... std::vector ParamTypes; ParamAttrsList ParamAttrs; - if ((yyvsp[(8) - (14)].ParamAttrs) != ParamAttr::None) - ParamAttrs.addAttributes(0, (yyvsp[(8) - (14)].ParamAttrs)); - ValueRefList::iterator I = (yyvsp[(6) - (14)].ValueRefList)->begin(), E = (yyvsp[(6) - (14)].ValueRefList)->end(); + if ((yyvsp[-6].ParamAttrs) != ParamAttr::None) + ParamAttrs.addAttributes(0, (yyvsp[-6].ParamAttrs)); + ValueRefList::iterator I = (yyvsp[-8].ValueRefList)->begin(), E = (yyvsp[-8].ValueRefList)->end(); unsigned index = 1; for (; I != E; ++I, ++index) { const Type *Ty = I->Val->getType(); @@ -5303,22 +5082,22 @@ ParamAttrsList *Attrs = 0; if (!ParamAttrs.empty()) Attrs = new ParamAttrsList(ParamAttrs); - Ty = FunctionType::get((yyvsp[(3) - (14)].TypeVal)->get(), ParamTypes, false, Attrs); + Ty = FunctionType::get((yyvsp[-11].TypeVal)->get(), ParamTypes, false, Attrs); PFTy = PointerType::get(Ty); } - delete (yyvsp[(3) - (14)].TypeVal); + delete (yyvsp[-11].TypeVal); - Value *V = getVal(PFTy, (yyvsp[(4) - (14)].ValIDVal)); // Get the function we're calling... + Value *V = getVal(PFTy, (yyvsp[-10].ValIDVal)); // Get the function we're calling... CHECK_FOR_ERROR - BasicBlock *Normal = getBBVal((yyvsp[(11) - (14)].ValIDVal)); + BasicBlock *Normal = getBBVal((yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR - BasicBlock *Except = getBBVal((yyvsp[(14) - (14)].ValIDVal)); + BasicBlock *Except = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR // Check the arguments ValueList Args; - if ((yyvsp[(6) - (14)].ValueRefList)->empty()) { // Has no arguments? + if ((yyvsp[-8].ValueRefList)->empty()) { // Has no arguments? // Make sure no arguments is a good thing! if (Ty->getNumParams() != 0) GEN_ERROR("No arguments passed to a function that " @@ -5328,7 +5107,7 @@ // correctly! FunctionType::param_iterator I = Ty->param_begin(); FunctionType::param_iterator E = Ty->param_end(); - ValueRefList::iterator ArgI = (yyvsp[(6) - (14)].ValueRefList)->begin(), ArgE = (yyvsp[(6) - (14)].ValueRefList)->end(); + ValueRefList::iterator ArgI = (yyvsp[-8].ValueRefList)->begin(), ArgE = (yyvsp[-8].ValueRefList)->end(); for (; ArgI != ArgE && I != E; ++ArgI, ++I) { if (ArgI->Val->getType() != *I) @@ -5347,15 +5126,15 @@ // Create the InvokeInst InvokeInst *II = new InvokeInst(V, Normal, Except, &Args[0], Args.size()); - II->setCallingConv((yyvsp[(2) - (14)].UIntVal)); + II->setCallingConv((yyvsp[-12].UIntVal)); (yyval.TermInstVal) = II; - delete (yyvsp[(6) - (14)].ValueRefList); + delete (yyvsp[-8].ValueRefList); CHECK_FOR_ERROR ;} break; case 252: -#line 2559 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2559 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR @@ -5363,7 +5142,7 @@ break; case 253: -#line 2563 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2563 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR @@ -5371,122 +5150,122 @@ break; case 254: -#line 2570 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2570 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable); - Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal))); + (yyval.JumpTable) = (yyvsp[-5].JumpTable); + Constant *V = cast(getExistingVal((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); CHECK_FOR_ERROR if (V == 0) GEN_ERROR("May only switch on a constant pool value"); - BasicBlock* tmpBB = getBBVal((yyvsp[(6) - (6)].ValIDVal)); + BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB)); ;} break; case 255: -#line 2581 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2581 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); - Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal))); + Constant *V = cast(getExistingVal((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); CHECK_FOR_ERROR if (V == 0) GEN_ERROR("May only switch on a constant pool value"); - BasicBlock* tmpBB = getBBVal((yyvsp[(5) - (5)].ValIDVal)); + BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB)); ;} break; case 256: -#line 2594 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2594 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... - setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal)); + setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal)); CHECK_FOR_ERROR - InsertValue((yyvsp[(2) - (2)].InstVal)); - (yyval.InstVal) = (yyvsp[(2) - (2)].InstVal); + InsertValue((yyvsp[0].InstVal)); + (yyval.InstVal) = (yyvsp[0].InstVal); CHECK_FOR_ERROR ;} break; case 257: -#line 2604 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2604 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-5].TypeVal))->getDescription()); (yyval.PHIList) = new std::list >(); - Value* tmpVal = getVal(*(yyvsp[(1) - (6)].TypeVal), (yyvsp[(3) - (6)].ValIDVal)); + Value* tmpVal = getVal(*(yyvsp[-5].TypeVal), (yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal((yyvsp[(5) - (6)].ValIDVal)); + BasicBlock* tmpBB = getBBVal((yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR (yyval.PHIList)->push_back(std::make_pair(tmpVal, tmpBB)); - delete (yyvsp[(1) - (6)].TypeVal); + delete (yyvsp[-5].TypeVal); ;} break; case 258: -#line 2615 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2615 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList); - Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal)); + (yyval.PHIList) = (yyvsp[-6].PHIList); + Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal((yyvsp[(6) - (7)].ValIDVal)); + BasicBlock* tmpBB = getBBVal((yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR - (yyvsp[(1) - (7)].PHIList)->push_back(std::make_pair(tmpVal, tmpBB)); + (yyvsp[-6].PHIList)->push_back(std::make_pair(tmpVal, tmpBB)); ;} break; case 259: -#line 2625 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2625 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); // Used for call and invoke instructions (yyval.ValueRefList) = new ValueRefList(); - ValueRefListEntry E; E.Attrs = (yyvsp[(3) - (3)].ParamAttrs); E.Val = getVal((yyvsp[(1) - (3)].TypeVal)->get(), (yyvsp[(2) - (3)].ValIDVal)); + ValueRefListEntry E; E.Attrs = (yyvsp[0].ParamAttrs); E.Val = getVal((yyvsp[-2].TypeVal)->get(), (yyvsp[-1].ValIDVal)); (yyval.ValueRefList)->push_back(E); - delete (yyvsp[(1) - (3)].TypeVal); + delete (yyvsp[-2].TypeVal); ;} break; case 260: -#line 2634 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2634 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); - (yyval.ValueRefList) = (yyvsp[(1) - (5)].ValueRefList); - ValueRefListEntry E; E.Attrs = (yyvsp[(5) - (5)].ParamAttrs); E.Val = getVal((yyvsp[(3) - (5)].TypeVal)->get(), (yyvsp[(4) - (5)].ValIDVal)); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); + (yyval.ValueRefList) = (yyvsp[-4].ValueRefList); + ValueRefListEntry E; E.Attrs = (yyvsp[0].ParamAttrs); E.Val = getVal((yyvsp[-2].TypeVal)->get(), (yyvsp[-1].ValIDVal)); (yyval.ValueRefList)->push_back(E); - delete (yyvsp[(3) - (5)].TypeVal); + delete (yyvsp[-2].TypeVal); CHECK_FOR_ERROR ;} break; case 261: -#line 2643 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2643 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueRefList) = new ValueRefList(); ;} break; case 262: -#line 2646 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2646 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); ;} break; case 263: -#line 2647 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2647 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList); - (yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal)); + (yyval.ValueList) = (yyvsp[-2].ValueList); + (yyval.ValueList)->push_back((yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; case 264: -#line 2654 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2654 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -5494,7 +5273,7 @@ break; case 265: -#line 2658 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2658 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -5502,191 +5281,191 @@ break; case 266: -#line 2663 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2663 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); - if (!(*(yyvsp[(2) - (5)].TypeVal))->isInteger() && !(*(yyvsp[(2) - (5)].TypeVal))->isFloatingPoint() && - !isa((*(yyvsp[(2) - (5)].TypeVal)).get())) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); + if (!(*(yyvsp[-3].TypeVal))->isInteger() && !(*(yyvsp[-3].TypeVal))->isFloatingPoint() && + !isa((*(yyvsp[-3].TypeVal)).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands"); - if (isa((*(yyvsp[(2) - (5)].TypeVal)).get()) && - ((yyvsp[(1) - (5)].BinaryOpVal) == Instruction::URem || - (yyvsp[(1) - (5)].BinaryOpVal) == Instruction::SRem || - (yyvsp[(1) - (5)].BinaryOpVal) == Instruction::FRem)) + if (isa((*(yyvsp[-3].TypeVal)).get()) && + ((yyvsp[-4].BinaryOpVal) == Instruction::URem || + (yyvsp[-4].BinaryOpVal) == Instruction::SRem || + (yyvsp[-4].BinaryOpVal) == Instruction::FRem)) GEN_ERROR("Remainder not supported on vector types"); - Value* val1 = getVal(*(yyvsp[(2) - (5)].TypeVal), (yyvsp[(3) - (5)].ValIDVal)); + Value* val1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR - Value* val2 = getVal(*(yyvsp[(2) - (5)].TypeVal), (yyvsp[(5) - (5)].ValIDVal)); + Value* val2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[(1) - (5)].BinaryOpVal), val1, val2); + (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), val1, val2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null"); - delete (yyvsp[(2) - (5)].TypeVal); + delete (yyvsp[-3].TypeVal); ;} break; case 267: -#line 2684 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2684 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); - if (!(*(yyvsp[(2) - (5)].TypeVal))->isInteger()) { - if (Instruction::isShift((yyvsp[(1) - (5)].BinaryOpVal)) || !isa((yyvsp[(2) - (5)].TypeVal)->get()) || - !cast((yyvsp[(2) - (5)].TypeVal)->get())->getElementType()->isInteger()) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); + if (!(*(yyvsp[-3].TypeVal))->isInteger()) { + if (Instruction::isShift((yyvsp[-4].BinaryOpVal)) || !isa((yyvsp[-3].TypeVal)->get()) || + !cast((yyvsp[-3].TypeVal)->get())->getElementType()->isInteger()) GEN_ERROR("Logical operator requires integral operands"); } - Value* tmpVal1 = getVal(*(yyvsp[(2) - (5)].TypeVal), (yyvsp[(3) - (5)].ValIDVal)); + Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR - Value* tmpVal2 = getVal(*(yyvsp[(2) - (5)].TypeVal), (yyvsp[(5) - (5)].ValIDVal)); + Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[(1) - (5)].BinaryOpVal), tmpVal1, tmpVal2); + (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null"); - delete (yyvsp[(2) - (5)].TypeVal); + delete (yyvsp[-3].TypeVal); ;} break; case 268: -#line 2701 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2701 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); - if (isa((*(yyvsp[(3) - (6)].TypeVal)).get())) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); + if (isa((*(yyvsp[-3].TypeVal)).get())) GEN_ERROR("Vector types not supported by icmp instruction"); - Value* tmpVal1 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(4) - (6)].ValIDVal)); + Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR - Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); + Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::create((yyvsp[-5].OtherOpVal), (yyvsp[-4].IPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("icmp operator returned null"); - delete (yyvsp[(3) - (6)].TypeVal); + delete (yyvsp[-3].TypeVal); ;} break; case 269: -#line 2715 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2715 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); - if (isa((*(yyvsp[(3) - (6)].TypeVal)).get())) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); + if (isa((*(yyvsp[-3].TypeVal)).get())) GEN_ERROR("Vector types not supported by fcmp instruction"); - Value* tmpVal1 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(4) - (6)].ValIDVal)); + Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR - Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); + Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::create((yyvsp[-5].OtherOpVal), (yyvsp[-4].FPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("fcmp operator returned null"); - delete (yyvsp[(3) - (6)].TypeVal); + delete (yyvsp[-3].TypeVal); ;} break; case 270: -#line 2729 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2729 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); - Value* Val = (yyvsp[(2) - (4)].ValueVal); - const Type* DestTy = (yyvsp[(4) - (4)].TypeVal)->get(); - if (!CastInst::castIsValid((yyvsp[(1) - (4)].CastOpVal), Val, DestTy)) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); + Value* Val = (yyvsp[-2].ValueVal); + const Type* DestTy = (yyvsp[0].TypeVal)->get(); + if (!CastInst::castIsValid((yyvsp[-3].CastOpVal), Val, DestTy)) GEN_ERROR("invalid cast opcode for cast from '" + Val->getType()->getDescription() + "' to '" + DestTy->getDescription() + "'"); - (yyval.InstVal) = CastInst::create((yyvsp[(1) - (4)].CastOpVal), Val, DestTy); - delete (yyvsp[(4) - (4)].TypeVal); + (yyval.InstVal) = CastInst::create((yyvsp[-3].CastOpVal), Val, DestTy); + delete (yyvsp[0].TypeVal); ;} break; case 271: -#line 2741 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2741 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if ((yyvsp[(2) - (6)].ValueVal)->getType() != Type::Int1Ty) + if ((yyvsp[-4].ValueVal)->getType() != Type::Int1Ty) GEN_ERROR("select condition must be boolean"); - if ((yyvsp[(4) - (6)].ValueVal)->getType() != (yyvsp[(6) - (6)].ValueVal)->getType()) + if ((yyvsp[-2].ValueVal)->getType() != (yyvsp[0].ValueVal)->getType()) GEN_ERROR("select value types should match"); - (yyval.InstVal) = new SelectInst((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal)); + (yyval.InstVal) = new SelectInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; case 272: -#line 2749 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2749 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); - (yyval.InstVal) = new VAArgInst((yyvsp[(2) - (4)].ValueVal), *(yyvsp[(4) - (4)].TypeVal)); - delete (yyvsp[(4) - (4)].TypeVal); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); + (yyval.InstVal) = new VAArgInst((yyvsp[-2].ValueVal), *(yyvsp[0].TypeVal)); + delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR ;} break; case 273: -#line 2756 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2756 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal))) + if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid extractelement operands"); - (yyval.InstVal) = new ExtractElementInst((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal)); + (yyval.InstVal) = new ExtractElementInst((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; case 274: -#line 2762 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2762 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) + if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid insertelement operands"); - (yyval.InstVal) = new InsertElementInst((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal)); + (yyval.InstVal) = new InsertElementInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; case 275: -#line 2768 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2768 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) + if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid shufflevector operands"); - (yyval.InstVal) = new ShuffleVectorInst((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal)); + (yyval.InstVal) = new ShuffleVectorInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; case 276: -#line 2774 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2774 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType(); + const Type *Ty = (yyvsp[0].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) GEN_ERROR("PHI node operands must be of first class type"); (yyval.InstVal) = new PHINode(Ty); - ((PHINode*)(yyval.InstVal))->reserveOperandSpace((yyvsp[(2) - (2)].PHIList)->size()); - while ((yyvsp[(2) - (2)].PHIList)->begin() != (yyvsp[(2) - (2)].PHIList)->end()) { - if ((yyvsp[(2) - (2)].PHIList)->front().first->getType() != Ty) + ((PHINode*)(yyval.InstVal))->reserveOperandSpace((yyvsp[0].PHIList)->size()); + while ((yyvsp[0].PHIList)->begin() != (yyvsp[0].PHIList)->end()) { + if ((yyvsp[0].PHIList)->front().first->getType() != Ty) GEN_ERROR("All elements of a PHI node must be of the same type"); - cast((yyval.InstVal))->addIncoming((yyvsp[(2) - (2)].PHIList)->front().first, (yyvsp[(2) - (2)].PHIList)->front().second); - (yyvsp[(2) - (2)].PHIList)->pop_front(); + cast((yyval.InstVal))->addIncoming((yyvsp[0].PHIList)->front().first, (yyvsp[0].PHIList)->front().second); + (yyvsp[0].PHIList)->pop_front(); } - delete (yyvsp[(2) - (2)].PHIList); // Free the list... + delete (yyvsp[0].PHIList); // Free the list... CHECK_FOR_ERROR ;} break; case 277: -#line 2790 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2790 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax const PointerType *PFTy = 0; const FunctionType *Ty = 0; - if (!(PFTy = dyn_cast((yyvsp[(3) - (8)].TypeVal)->get())) || + if (!(PFTy = dyn_cast((yyvsp[-5].TypeVal)->get())) || !(Ty = dyn_cast(PFTy->getElementType()))) { // Pull out the types of all of the arguments... std::vector ParamTypes; ParamAttrsList ParamAttrs; - if ((yyvsp[(8) - (8)].ParamAttrs) != ParamAttr::None) - ParamAttrs.addAttributes(0, (yyvsp[(8) - (8)].ParamAttrs)); + if ((yyvsp[0].ParamAttrs) != ParamAttr::None) + ParamAttrs.addAttributes(0, (yyvsp[0].ParamAttrs)); unsigned index = 1; - ValueRefList::iterator I = (yyvsp[(6) - (8)].ValueRefList)->begin(), E = (yyvsp[(6) - (8)].ValueRefList)->end(); + ValueRefList::iterator I = (yyvsp[-2].ValueRefList)->begin(), E = (yyvsp[-2].ValueRefList)->end(); for (; I != E; ++I, ++index) { const Type *Ty = I->Val->getType(); if (Ty == Type::VoidTy) @@ -5700,16 +5479,24 @@ if (!ParamAttrs.empty()) Attrs = new ParamAttrsList(ParamAttrs); - Ty = FunctionType::get((yyvsp[(3) - (8)].TypeVal)->get(), ParamTypes, false, Attrs); + Ty = FunctionType::get((yyvsp[-5].TypeVal)->get(), ParamTypes, false, Attrs); PFTy = PointerType::get(Ty); } - Value *V = getVal(PFTy, (yyvsp[(4) - (8)].ValIDVal)); // Get the function we're calling... + Value *V = getVal(PFTy, (yyvsp[-4].ValIDVal)); // Get the function we're calling... CHECK_FOR_ERROR + // Check for call to invalid intrinsic to avoid crashing later. + if (Function *theF = dyn_cast(V)) { + if (theF->hasName() && 0 == strncmp(theF->getName().c_str(), "llvm.", 5)&& + !theF->getIntrinsicID(true)) + GEN_ERROR("Call to invalid LLVM intrinsic function '" + + theF->getName() + "'"); + } + // Check the arguments ValueList Args; - if ((yyvsp[(6) - (8)].ValueRefList)->empty()) { // Has no arguments? + if ((yyvsp[-2].ValueRefList)->empty()) { // Has no arguments? // Make sure no arguments is a good thing! if (Ty->getNumParams() != 0) GEN_ERROR("No arguments passed to a function that " @@ -5720,7 +5507,7 @@ // FunctionType::param_iterator I = Ty->param_begin(); FunctionType::param_iterator E = Ty->param_end(); - ValueRefList::iterator ArgI = (yyvsp[(6) - (8)].ValueRefList)->begin(), ArgE = (yyvsp[(6) - (8)].ValueRefList)->end(); + ValueRefList::iterator ArgI = (yyvsp[-2].ValueRefList)->begin(), ArgE = (yyvsp[-2].ValueRefList)->end(); for (; ArgI != ArgE && I != E; ++ArgI, ++I) { if (ArgI->Val->getType() != *I) @@ -5737,25 +5524,25 @@ } // Create the call node CallInst *CI = new CallInst(V, &Args[0], Args.size()); - CI->setTailCall((yyvsp[(1) - (8)].BoolVal)); - CI->setCallingConv((yyvsp[(2) - (8)].UIntVal)); + CI->setTailCall((yyvsp[-7].BoolVal)); + CI->setCallingConv((yyvsp[-6].UIntVal)); (yyval.InstVal) = CI; - delete (yyvsp[(6) - (8)].ValueRefList); - delete (yyvsp[(3) - (8)].TypeVal); + delete (yyvsp[-2].ValueRefList); + delete (yyvsp[-5].TypeVal); CHECK_FOR_ERROR ;} break; case 278: -#line 2861 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2869 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - (yyval.InstVal) = (yyvsp[(1) - (1)].InstVal); + (yyval.InstVal) = (yyvsp[0].InstVal); CHECK_FOR_ERROR ;} break; case 279: -#line 2866 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2874 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -5763,7 +5550,7 @@ break; case 280: -#line 2870 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2878 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -5771,129 +5558,131 @@ break; case 281: -#line 2877 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2885 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); - (yyval.InstVal) = new MallocInst(*(yyvsp[(2) - (3)].TypeVal), 0, (yyvsp[(3) - (3)].UIntVal)); - delete (yyvsp[(2) - (3)].TypeVal); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + (yyval.InstVal) = new MallocInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; case 282: -#line 2884 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2892 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); - Value* tmpVal = getVal((yyvsp[(4) - (6)].PrimType), (yyvsp[(5) - (6)].ValIDVal)); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription()); + Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = new MallocInst(*(yyvsp[(2) - (6)].TypeVal), tmpVal, (yyvsp[(6) - (6)].UIntVal)); - delete (yyvsp[(2) - (6)].TypeVal); + (yyval.InstVal) = new MallocInst(*(yyvsp[-4].TypeVal), tmpVal, (yyvsp[0].UIntVal)); + delete (yyvsp[-4].TypeVal); ;} break; case 283: -#line 2892 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2900 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); - (yyval.InstVal) = new AllocaInst(*(yyvsp[(2) - (3)].TypeVal), 0, (yyvsp[(3) - (3)].UIntVal)); - delete (yyvsp[(2) - (3)].TypeVal); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + (yyval.InstVal) = new AllocaInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; case 284: -#line 2899 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2907 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); - Value* tmpVal = getVal((yyvsp[(4) - (6)].PrimType), (yyvsp[(5) - (6)].ValIDVal)); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription()); + Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = new AllocaInst(*(yyvsp[(2) - (6)].TypeVal), tmpVal, (yyvsp[(6) - (6)].UIntVal)); - delete (yyvsp[(2) - (6)].TypeVal); + (yyval.InstVal) = new AllocaInst(*(yyvsp[-4].TypeVal), tmpVal, (yyvsp[0].UIntVal)); + delete (yyvsp[-4].TypeVal); ;} break; case 285: -#line 2907 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2915 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { - if (!isa((yyvsp[(2) - (2)].ValueVal)->getType())) + if (!isa((yyvsp[0].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + - (yyvsp[(2) - (2)].ValueVal)->getType()->getDescription() + ""); - (yyval.InstVal) = new FreeInst((yyvsp[(2) - (2)].ValueVal)); + (yyvsp[0].ValueVal)->getType()->getDescription() + ""); + (yyval.InstVal) = new FreeInst((yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; case 286: -#line 2915 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2923 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (4)].TypeVal))->getDescription()); - if (!isa((yyvsp[(3) - (4)].TypeVal)->get())) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + if (!isa((yyvsp[-1].TypeVal)->get())) GEN_ERROR("Can't load from nonpointer type: " + - (*(yyvsp[(3) - (4)].TypeVal))->getDescription()); - if (!cast((yyvsp[(3) - (4)].TypeVal)->get())->getElementType()->isFirstClassType()) + (*(yyvsp[-1].TypeVal))->getDescription()); + if (!cast((yyvsp[-1].TypeVal)->get())->getElementType()->isFirstClassType()) GEN_ERROR("Can't load from pointer of non-first-class type: " + - (*(yyvsp[(3) - (4)].TypeVal))->getDescription()); - Value* tmpVal = getVal(*(yyvsp[(3) - (4)].TypeVal), (yyvsp[(4) - (4)].ValIDVal)); + (*(yyvsp[-1].TypeVal))->getDescription()); + Value* tmpVal = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = new LoadInst(tmpVal, "", (yyvsp[(1) - (4)].BoolVal)); - delete (yyvsp[(3) - (4)].TypeVal); + (yyval.InstVal) = new LoadInst(tmpVal, "", (yyvsp[-3].BoolVal)); + delete (yyvsp[-1].TypeVal); ;} break; case 287: -#line 2929 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2937 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); - const PointerType *PT = dyn_cast((yyvsp[(5) - (6)].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); + const PointerType *PT = dyn_cast((yyvsp[-1].TypeVal)->get()); if (!PT) GEN_ERROR("Can't store to a nonpointer type: " + - (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); + (*(yyvsp[-1].TypeVal))->getDescription()); const Type *ElTy = PT->getElementType(); - if (ElTy != (yyvsp[(3) - (6)].ValueVal)->getType()) - GEN_ERROR("Can't store '" + (yyvsp[(3) - (6)].ValueVal)->getType()->getDescription() + + if (ElTy != (yyvsp[-3].ValueVal)->getType()) + GEN_ERROR("Can't store '" + (yyvsp[-3].ValueVal)->getType()->getDescription() + "' into space of type '" + ElTy->getDescription() + "'"); - Value* tmpVal = getVal(*(yyvsp[(5) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); + Value* tmpVal = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = new StoreInst((yyvsp[(3) - (6)].ValueVal), tmpVal, (yyvsp[(1) - (6)].BoolVal)); - delete (yyvsp[(5) - (6)].TypeVal); + (yyval.InstVal) = new StoreInst((yyvsp[-3].ValueVal), tmpVal, (yyvsp[-5].BoolVal)); + delete (yyvsp[-1].TypeVal); ;} break; case 288: -#line 2946 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2954 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); - if (!isa((yyvsp[(2) - (4)].TypeVal)->get())) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); + if (!isa((yyvsp[-2].TypeVal)->get())) GEN_ERROR("getelementptr insn requires pointer operand"); - if (!GetElementPtrInst::getIndexedType(*(yyvsp[(2) - (4)].TypeVal), &(*(yyvsp[(4) - (4)].ValueList))[0], (yyvsp[(4) - (4)].ValueList)->size(), true)) + if (!GetElementPtrInst::getIndexedType(*(yyvsp[-2].TypeVal), &(*(yyvsp[0].ValueList))[0], (yyvsp[0].ValueList)->size(), true)) GEN_ERROR("Invalid getelementptr indices for type '" + - (*(yyvsp[(2) - (4)].TypeVal))->getDescription()+ "'"); - Value* tmpVal = getVal(*(yyvsp[(2) - (4)].TypeVal), (yyvsp[(3) - (4)].ValIDVal)); + (*(yyvsp[-2].TypeVal))->getDescription()+ "'"); + Value* tmpVal = getVal(*(yyvsp[-2].TypeVal), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = new GetElementPtrInst(tmpVal, &(*(yyvsp[(4) - (4)].ValueList))[0], (yyvsp[(4) - (4)].ValueList)->size()); - delete (yyvsp[(2) - (4)].TypeVal); - delete (yyvsp[(4) - (4)].ValueList); + (yyval.InstVal) = new GetElementPtrInst(tmpVal, &(*(yyvsp[0].ValueList))[0], (yyvsp[0].ValueList)->size()); + delete (yyvsp[-2].TypeVal); + delete (yyvsp[0].ValueList); ;} break; -/* Line 1267 of yacc.c. */ -#line 5891 "llvmAsmParser.tab.c" default: break; } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - YYPOPSTACK (yylen); - yylen = 0; +/* Line 1126 of yacc.c. */ +#line 5681 "llvmAsmParser.tab.c" + + yyvsp -= yylen; + yyssp -= yylen; + + YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -5922,41 +5711,110 @@ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + char *yymsg = 0; +# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +#if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +#endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= yysize1 < yysize; + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; } - } - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= yysize1 < yysize; + yysize = yysize1; + + if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yymsg; + int yyi = 0; + while ((*yyp = *yyf)) + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + { + yyerror (YY_("syntax error")); goto yyexhaustedlab; - } - } -#endif + } + } + else +#endif /* YYERROR_VERBOSE */ + yyerror (YY_("syntax error")); } @@ -5967,15 +5825,14 @@ error, discard it. */ if (yychar <= YYEOF) - { + { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; - } + } else { - yydestruct ("Error: discarding", - yytoken, &yylval); + yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } @@ -5993,14 +5850,11 @@ /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ - if (/*CONSTCOND*/ 0) + if (0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); +yyvsp -= yylen; + yyssp -= yylen; yystate = *yyssp; goto yyerrlab1; @@ -6030,9 +5884,8 @@ YYABORT; - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); + yydestruct ("Error: popping", yystos[yystate], yyvsp); + YYPOPSTACK; yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } @@ -6043,7 +5896,7 @@ *++yyvsp = yylval; - /* Shift the error token. */ + /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; @@ -6078,30 +5931,21 @@ if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); - YYPOPSTACK (1); + YYPOPSTACK; } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } -#line 2963 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2971 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.65 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.66 --- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.65 Thu Apr 12 13:32:50 2007 +++ llvm/lib/AsmParser/llvmAsmParser.h.cvs Mon Apr 16 01:56:07 2007 @@ -1,9 +1,7 @@ -/* A Bison parser, made by GNU Bison 2.3. */ +/* A Bison parser, made by GNU Bison 2.1. */ -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,18 +18,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE @@ -310,10 +300,9 @@ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 938 "/home/laurov/llvm/llvm/lib/AsmParser/llvmAsmParser.y" -{ +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 938 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; llvm::BasicBlock *BasicBlockVal; @@ -358,10 +347,9 @@ llvm::Instruction::OtherOps OtherOpVal; llvm::ICmpInst::Predicate IPredicate; llvm::FCmpInst::Predicate FPredicate; -} -/* Line 1529 of yacc.c. */ -#line 364 "llvmAsmParser.tab.h" - YYSTYPE; +} YYSTYPE; +/* Line 1447 of yacc.c. */ +#line 353 "llvmAsmParser.tab.h" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -369,3 +357,5 @@ extern YYSTYPE llvmAsmlval; + + Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.85 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.86 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.85 Thu Apr 12 13:32:50 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Mon Apr 16 01:56:07 2007 @@ -2821,6 +2821,14 @@ Value *V = getVal(PFTy, $4); // Get the function we're calling... CHECK_FOR_ERROR + // Check for call to invalid intrinsic to avoid crashing later. + if (Function *theF = dyn_cast(V)) { + if (theF->hasName() && 0 == strncmp(theF->getName().c_str(), "llvm.", 5)&& + !theF->getIntrinsicID(true)) + GEN_ERROR("Call to invalid LLVM intrinsic function '" + + theF->getName() + "'"); + } + // Check the arguments ValueList Args; if ($6->empty()) { // Has no arguments? From reid at x10sys.com Mon Apr 16 02:09:05 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 02:09:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Message-ID: <200704160709.l3G795o4018931@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Function.cpp updated: 1.119 -> 1.120 --- Log message: Fix test/CodeGen/Generic/vector-constantexpr.ll --- Diffs of the changes: (+2 -0) Function.cpp | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.119 llvm/lib/VMCore/Function.cpp:1.120 --- llvm/lib/VMCore/Function.cpp:1.119 Mon Apr 16 01:54:34 2007 +++ llvm/lib/VMCore/Function.cpp Mon Apr 16 02:08:44 2007 @@ -226,6 +226,8 @@ /// unsigned Function::getIntrinsicID(bool noAssert) const { const ValueName *ValName = this->getValueName(); + if (!ValName) + return 0; unsigned Len = ValName->getKeyLength(); const char *Name = ValName->getKeyData(); From baldrick at free.fr Mon Apr 16 08:02:48 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 16 Apr 2007 08:02:48 -0500 Subject: [llvm-commits] CVS: llvm/docs/ExceptionHandling.html Message-ID: <200704161302.l3GD2mux002618@zion.cs.uiuc.edu> Changes in directory llvm/docs: ExceptionHandling.html updated: 1.3 -> 1.4 --- Log message: Fix typos. --- Diffs of the changes: (+4 -4) ExceptionHandling.html | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/docs/ExceptionHandling.html diff -u llvm/docs/ExceptionHandling.html:1.3 llvm/docs/ExceptionHandling.html:1.4 --- llvm/docs/ExceptionHandling.html:1.3 Sat Apr 14 07:30:27 2007 +++ llvm/docs/ExceptionHandling.html Mon Apr 16 08:02:27 2007 @@ -121,8 +121,8 @@ personalities. An exception handling personality is defined by way of a personality function (ex. for C++ __gxx_personality_v0) which receives the context of the exception, an exception structure containing -the exception object type and value, and a reference the exception table for the -current function. The personality function for the current compile unit is +the exception object type and value, and a reference to the exception table for +the current function. The personality function for the current compile unit is specified in a common exception frame.

The organization of an exception table is language dependent. For C++, an @@ -195,7 +195,7 @@

The term used to define a the place where an invoke continues after an exception is called a landing pad. LLVM landing pads are conceptually -alternative entry points into where a exception structure reference and a type +alternative function entry points where a exception structure reference and a type info index are passed in as arguments. The landing pad saves the exception structure reference and then proceeds to select the catch block that corresponds to the type info of the exception object.

@@ -453,7 +453,7 @@ Chris Lattner
LLVM Compiler Infrastructure
- Last modified: $Date: 2007/04/14 12:30:27 $ + Last modified: $Date: 2007/04/16 13:02:27 $ From reid at x10sys.com Mon Apr 16 09:06:41 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 09:06:41 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/Alpha.td Message-ID: <200704161406.l3GE6fbC004104@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: Alpha.td updated: 1.12 -> 1.13 --- Log message: For PR1336: http://llvm.org/PR1336 : Subtarget option names must be given in lower case in order to be recognized. Fixes test/CodeGen/Alpha/ctlz.ll --- Diffs of the changes: (+1 -1) Alpha.td | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/Alpha/Alpha.td diff -u llvm/lib/Target/Alpha/Alpha.td:1.12 llvm/lib/Target/Alpha/Alpha.td:1.13 --- llvm/lib/Target/Alpha/Alpha.td:1.12 Wed Jan 24 15:09:16 2007 +++ llvm/lib/Target/Alpha/Alpha.td Mon Apr 16 09:06:19 2007 @@ -20,7 +20,7 @@ // Subtarget Features //===----------------------------------------------------------------------===// -def FeatureCIX : SubtargetFeature<"CIX", "HasCT", "true", +def FeatureCIX : SubtargetFeature<"cix", "HasCT", "true", "Enable CIX extentions">; //===----------------------------------------------------------------------===// From reid at x10sys.com Mon Apr 16 09:08:14 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 09:08:14 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Alpha/ctlz.ll Message-ID: <200704161408.l3GE8EL4004213@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Alpha: ctlz.ll updated: 1.8 -> 1.9 --- Log message: For PR1336: http://llvm.org/PR1336 : Un-XFAIL as Alpha feature now specified in lower case. --- Diffs of the changes: (+0 -1) ctlz.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/CodeGen/Alpha/ctlz.ll diff -u llvm/test/CodeGen/Alpha/ctlz.ll:1.8 llvm/test/CodeGen/Alpha/ctlz.ll:1.9 --- llvm/test/CodeGen/Alpha/ctlz.ll:1.8 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/Alpha/ctlz.ll Mon Apr 16 09:07:53 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev6 | not grep -i ctlz ; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev56 | not grep -i ctlz ; RUN: llvm-as < %s | llc -march=alpha -mattr=-CIX | not grep -i ctlz -; XFAIL: * declare i32 @llvm.ctlz.i8(i8) From reid at x10sys.com Mon Apr 16 09:14:52 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 09:14:52 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2004-02-14-InefficientStackPointer.llx Message-ID: <200704161414.l3GEEqYH004398@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: 2004-02-14-InefficientStackPointer.llx updated: 1.3 -> 1.4 --- Log message: For PR1336: http://llvm.org/PR1336 : Ignore case for register name compare. --- Diffs of the changes: (+1 -2) 2004-02-14-InefficientStackPointer.llx | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/test/CodeGen/X86/2004-02-14-InefficientStackPointer.llx diff -u llvm/test/CodeGen/X86/2004-02-14-InefficientStackPointer.llx:1.3 llvm/test/CodeGen/X86/2004-02-14-InefficientStackPointer.llx:1.4 --- llvm/test/CodeGen/X86/2004-02-14-InefficientStackPointer.llx:1.3 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/X86/2004-02-14-InefficientStackPointer.llx Mon Apr 16 09:14:31 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep ESP | not grep sub -; XFAIL: * +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep -i ESP | not grep sub int %test(int %X) { ret int %X From reid at x10sys.com Mon Apr 16 09:17:25 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 09:17:25 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/fp-stack-ret.ll Message-ID: <200704161417.l3GEHP7T004444@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: fp-stack-ret.ll updated: 1.3 -> 1.4 --- Log message: Wrap long line. --- Diffs of the changes: (+2 -1) fp-stack-ret.ll | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/test/CodeGen/X86/fp-stack-ret.ll diff -u llvm/test/CodeGen/X86/fp-stack-ret.ll:1.3 llvm/test/CodeGen/X86/fp-stack-ret.ll:1.4 --- llvm/test/CodeGen/X86/fp-stack-ret.ll:1.3 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/X86/fp-stack-ret.ll Mon Apr 16 09:17:04 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin8 -mcpu=yonah -march=x86 > %t +; RUN: llvm-as < %s | \ +; RUN: llc -mtriple=i686-apple-darwin8 -mcpu=yonah -march=x86 > %t ; RUN: grep fldl %t | wc -l | grep 1 ; RUN: not grep xmm %t && ; RUN: grep {sub.*esp} %t | wc -l | grep 1 From reid at x10sys.com Mon Apr 16 09:18:58 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 09:18:58 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/fp_constant_op.llx Message-ID: <200704161418.l3GEIwcN004486@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: fp_constant_op.llx updated: 1.5 -> 1.6 --- Log message: For PR1336: http://llvm.org/PR1336 : Ignore case for instruction mnemonic comparison. --- Diffs of the changes: (+1 -2) fp_constant_op.llx | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/test/CodeGen/X86/fp_constant_op.llx diff -u llvm/test/CodeGen/X86/fp_constant_op.llx:1.5 llvm/test/CodeGen/X86/fp_constant_op.llx:1.6 --- llvm/test/CodeGen/X86/fp_constant_op.llx:1.5 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/X86/fp_constant_op.llx Mon Apr 16 09:18:37 2007 @@ -1,6 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \ -; RUN: grep ST | not grep {fadd\\|fsub\\|fdiv\\|fmul} -; XFAIL: * +; RUN: grep -i ST | not grep {fadd\\|fsub\\|fdiv\\|fmul} ; Test that the load of the constant is folded into the operation. From reid at x10sys.com Mon Apr 16 09:20:49 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 09:20:49 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/fp_load_fold.llx Message-ID: <200704161420.l3GEKnic004534@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: fp_load_fold.llx updated: 1.5 -> 1.6 --- Log message: For PR1336: http://llvm.org/PR1336 : Ignore case for instruction mnemonic comparison. --- Diffs of the changes: (+1 -2) fp_load_fold.llx | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/test/CodeGen/X86/fp_load_fold.llx diff -u llvm/test/CodeGen/X86/fp_load_fold.llx:1.5 llvm/test/CodeGen/X86/fp_load_fold.llx:1.6 --- llvm/test/CodeGen/X86/fp_load_fold.llx:1.5 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/X86/fp_load_fold.llx Mon Apr 16 09:20:28 2007 @@ -1,6 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \ -; RUN: grep ST | not grep {fadd\\|fsub\\|fdiv\\|fmul} -; XFAIL: * +; RUN: grep -i ST | not grep {fadd\\|fsub\\|fdiv\\|fmul} ; Test that the load of the memory location is folded into the operation. From reid at x10sys.com Mon Apr 16 09:23:28 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 09:23:28 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/sse-fcopysign.ll Message-ID: <200704161423.l3GENSGQ004580@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: sse-fcopysign.ll updated: 1.6 -> 1.7 --- Log message: For PR1336: http://llvm.org/PR1336 : Rename test functions to not conflict with an instruction mnemonic. --- Diffs of the changes: (+2 -3) sse-fcopysign.ll | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/test/CodeGen/X86/sse-fcopysign.ll diff -u llvm/test/CodeGen/X86/sse-fcopysign.ll:1.6 llvm/test/CodeGen/X86/sse-fcopysign.ll:1.7 --- llvm/test/CodeGen/X86/sse-fcopysign.ll:1.6 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/X86/sse-fcopysign.ll Mon Apr 16 09:23:07 2007 @@ -1,12 +1,11 @@ ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep test -; XFAIL: * -define float @test1(float %a, float %b) { +define float @tst1(float %a, float %b) { %tmp = tail call float @copysignf( float %b, float %a ) ret float %tmp } -define double @test2(double %a, float %b, float %c) { +define double @tst2(double %a, float %b, float %c) { %tmp1 = add float %b, %c %tmp2 = fpext float %tmp1 to double %tmp = tail call double @copysign( double %a, double %tmp2 ) From llvm at cs.uiuc.edu Mon Apr 16 09:39:47 2007 From: llvm at cs.uiuc.edu (LLVM) Date: Mon, 16 Apr 2007 09:39:47 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Threads/ Message-ID: <200704161439.l3GEdlZG004952@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Threads: --- Log message: Directory /var/cvs/llvm/llvm-test/SingleSource/UnitTests/Threads added to the repository --- Diffs of the changes: (+0 -0) 0 files changed From reid at x10sys.com Mon Apr 16 09:46:39 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 09:46:39 -0500 Subject: [llvm-commits] CVS: llvm/test/Assembler/2003-11-24-SymbolTableCrash.llx Message-ID: <200704161446.l3GEkdcb005096@zion.cs.uiuc.edu> Changes in directory llvm/test/Assembler: 2003-11-24-SymbolTableCrash.llx updated: 1.1 -> 1.2 --- Log message: Syntax upgrade and fix for PR1336: http://llvm.org/PR1336 . --- Diffs of the changes: (+5 -4) 2003-11-24-SymbolTableCrash.llx | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) Index: llvm/test/Assembler/2003-11-24-SymbolTableCrash.llx diff -u llvm/test/Assembler/2003-11-24-SymbolTableCrash.llx:1.1 llvm/test/Assembler/2003-11-24-SymbolTableCrash.llx:1.2 --- llvm/test/Assembler/2003-11-24-SymbolTableCrash.llx:1.1 Mon Nov 24 21:58:49 2003 +++ llvm/test/Assembler/2003-11-24-SymbolTableCrash.llx Mon Apr 16 09:46:17 2007 @@ -1,10 +1,11 @@ -; RUN: llvm-as < %s 2>&1 | not grep Asserti +; RUN: llvm-as < %s |& not grep Asserti +; RUN: llvm-as < %s |& grep Redefinition -void %test() { - %tmp.1 = add int 0, 1 +define void @test() { + %tmp.1 = add i32 0, 1 br label %return return: - %tmp.1 = add int 0, 1 + %tmp.1 = add i32 0, 1 ret void } From reid at x10sys.com Mon Apr 16 10:01:02 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:01:02 -0500 Subject: [llvm-commits] CVS: llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx 2002-12-15-GlobalResolve.ll 2003-04-15-ConstantInitAssertion.llx 2003-05-21-MalformedShiftCrash.llx 2003-05-21-MalformedStructCrash.llx 2003-12-30-TypeMapInvalidMemory.llx 2004-03-30-UnclosedFunctionCrash.llx 2005-01-31-CallingAggregateFunction.ll 2006-09-28-CrashOnInvalid.ll 2007-01-02-Undefined-Arg-Type.ll 2007-01-16-CrashOnBadCast.ll 2007-01-16-CrashOnBadCast2.ll 2007-01-21-UpgradeNoArgs.ll 2007-01-22-UpgradeMalformedShift.ll 2007-01-22-UpgradeMalformedStruct.ll 2007-01-22-UpgradeTypeMapInvalidMemory.ll 2007-03-18-InvalidNumberedVar.ll Message-ID: <200704161501.l3GF12GG005439@zion.cs.uiuc.edu> Changes in directory llvm/test/Assembler: 2002-07-25-ParserAssertionFailure.llx updated: 1.4 -> 1.5 2002-12-15-GlobalResolve.ll updated: 1.5 -> 1.6 2003-04-15-ConstantInitAssertion.llx updated: 1.4 -> 1.5 2003-05-21-MalformedShiftCrash.llx updated: 1.6 -> 1.7 2003-05-21-MalformedStructCrash.llx updated: 1.5 -> 1.6 2003-12-30-TypeMapInvalidMemory.llx updated: 1.9 -> 1.10 2004-03-30-UnclosedFunctionCrash.llx updated: 1.1 -> 1.2 2005-01-31-CallingAggregateFunction.ll updated: 1.4 -> 1.5 2006-09-28-CrashOnInvalid.ll updated: 1.3 -> 1.4 2007-01-02-Undefined-Arg-Type.ll updated: 1.4 -> 1.5 2007-01-16-CrashOnBadCast.ll updated: 1.3 -> 1.4 2007-01-16-CrashOnBadCast2.ll updated: 1.3 -> 1.4 2007-01-21-UpgradeNoArgs.ll updated: 1.1 -> 1.2 2007-01-22-UpgradeMalformedShift.ll updated: 1.1 -> 1.2 2007-01-22-UpgradeMalformedStruct.ll updated: 1.1 -> 1.2 2007-01-22-UpgradeTypeMapInvalidMemory.ll updated: 1.1 -> 1.2 2007-03-18-InvalidNumberedVar.ll updated: 1.1 -> 1.2 --- Log message: Fix the syntax for these tests. Noticed by Duncan Sands. --- Diffs of the changes: (+20 -18) 2002-07-25-ParserAssertionFailure.llx | 2 +- 2002-12-15-GlobalResolve.ll | 4 ++-- 2003-04-15-ConstantInitAssertion.llx | 2 +- 2003-05-21-MalformedShiftCrash.llx | 2 +- 2003-05-21-MalformedStructCrash.llx | 2 +- 2003-12-30-TypeMapInvalidMemory.llx | 3 ++- 2004-03-30-UnclosedFunctionCrash.llx | 2 +- 2005-01-31-CallingAggregateFunction.ll | 2 +- 2006-09-28-CrashOnInvalid.ll | 2 +- 2007-01-02-Undefined-Arg-Type.ll | 2 +- 2007-01-16-CrashOnBadCast.ll | 2 +- 2007-01-16-CrashOnBadCast2.ll | 2 +- 2007-01-21-UpgradeNoArgs.ll | 2 +- 2007-01-22-UpgradeMalformedShift.ll | 2 +- 2007-01-22-UpgradeMalformedStruct.ll | 2 +- 2007-01-22-UpgradeTypeMapInvalidMemory.ll | 3 ++- 2007-03-18-InvalidNumberedVar.ll | 2 +- 17 files changed, 20 insertions(+), 18 deletions(-) Index: llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx diff -u llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx:1.4 llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx:1.5 --- llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx:1.4 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx Mon Apr 16 10:00:39 2007 @@ -1,6 +1,6 @@ ; Make sure we don't get an assertion failure, even though this is a parse ; error -; RUN: llvm-as 2>&1 < %s -o /dev/null -f | grep 'No arguments' +; RUN: llvm-as < %s -o /dev/null -f |& grep 'No arguments' %ty = type void (i32) Index: llvm/test/Assembler/2002-12-15-GlobalResolve.ll diff -u llvm/test/Assembler/2002-12-15-GlobalResolve.ll:1.5 llvm/test/Assembler/2002-12-15-GlobalResolve.ll:1.6 --- llvm/test/Assembler/2002-12-15-GlobalResolve.ll:1.5 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2002-12-15-GlobalResolve.ll Mon Apr 16 10:00:39 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s 2>/dev/null | llvm-as -o /dev/null -f && -; RUN: llvm-upgrade < %s 2>&1 | grep "Renaming global variable 'X' to" +; RUN: llvm-upgrade < %s 2>/dev/null | llvm-as -o /dev/null -f +; RUN: llvm-upgrade < %s |& grep {Renaming global variable 'X' to} %X = external global uint * %X = external global %T* Index: llvm/test/Assembler/2003-04-15-ConstantInitAssertion.llx diff -u llvm/test/Assembler/2003-04-15-ConstantInitAssertion.llx:1.4 llvm/test/Assembler/2003-04-15-ConstantInitAssertion.llx:1.5 --- llvm/test/Assembler/2003-04-15-ConstantInitAssertion.llx:1.4 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2003-04-15-ConstantInitAssertion.llx Mon Apr 16 10:00:39 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as 2>&1 < %s >/dev/null | grep "Expected type 'i32' for element #0" +; RUN: llvm-as < %s >/dev/null |& grep "Expected type 'i32' for element #0" ; Test the case of a misformed constant initializer ; This should cause an assembler error, not an assertion failure! constant { i32 } { float 1.0 } Index: llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx diff -u llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx:1.6 llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx:1.7 --- llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx:1.6 Thu Feb 1 20:16:22 2007 +++ llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx Mon Apr 16 10:00:39 2007 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: llvm-as 2>&1 < %s > /dev/null | grep "Logical operator requires integral" +; RUN: llvm-as < %s > /dev/null |& grep "Logical operator requires integral" global i32 ashr (float 1.0, float 2.0) Index: llvm/test/Assembler/2003-05-21-MalformedStructCrash.llx diff -u llvm/test/Assembler/2003-05-21-MalformedStructCrash.llx:1.5 llvm/test/Assembler/2003-05-21-MalformedStructCrash.llx:1.6 --- llvm/test/Assembler/2003-05-21-MalformedStructCrash.llx:1.5 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2003-05-21-MalformedStructCrash.llx Mon Apr 16 10:00:39 2007 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: llvm-as 2>&1 < %s > /dev/null | grep "Illegal number of init" +; RUN: llvm-as < %s > /dev/null |& grep "Illegal number of init" global {} { i32 7, float 1.0, i32 7, i32 8 } Index: llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx diff -u llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.9 llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.10 --- llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.9 Thu Mar 29 20:35:32 2007 +++ llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx Mon Apr 16 10:00:39 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-as 2>&1 < %s -o /dev/null -f | grep 'Undefined type remains' +; RUN: llvm-as < %s -o /dev/null -f |& grep 'Undefined type remains' +; END. @d_reduction_0_dparser_gram = global { i32 (i8*, i8**, i32, i32, { Index: llvm/test/Assembler/2004-03-30-UnclosedFunctionCrash.llx diff -u llvm/test/Assembler/2004-03-30-UnclosedFunctionCrash.llx:1.1 llvm/test/Assembler/2004-03-30-UnclosedFunctionCrash.llx:1.2 --- llvm/test/Assembler/2004-03-30-UnclosedFunctionCrash.llx:1.1 Tue Mar 30 14:58:00 2004 +++ llvm/test/Assembler/2004-03-30-UnclosedFunctionCrash.llx Mon Apr 16 10:00:39 2007 @@ -1,3 +1,3 @@ -; RUN: llvm-as %s 2>&1 | grep error +; RUN: llvm-as %s |& grep error void %foo() { Index: llvm/test/Assembler/2005-01-31-CallingAggregateFunction.ll diff -u llvm/test/Assembler/2005-01-31-CallingAggregateFunction.ll:1.4 llvm/test/Assembler/2005-01-31-CallingAggregateFunction.ll:1.5 --- llvm/test/Assembler/2005-01-31-CallingAggregateFunction.ll:1.4 Sun Apr 15 05:07:55 2007 +++ llvm/test/Assembler/2005-01-31-CallingAggregateFunction.ll Mon Apr 16 10:00:39 2007 @@ -1,5 +1,5 @@ ; RUN: ignore llvm-as < %s -o /dev/null -f |& \ -; RUN: grep "LLVM functions cannot return aggregate types" +; RUN: grep {LLVM functions cannot return aggregate types} define void @test() { call {} @foo() Index: llvm/test/Assembler/2006-09-28-CrashOnInvalid.ll diff -u llvm/test/Assembler/2006-09-28-CrashOnInvalid.ll:1.3 llvm/test/Assembler/2006-09-28-CrashOnInvalid.ll:1.4 --- llvm/test/Assembler/2006-09-28-CrashOnInvalid.ll:1.3 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2006-09-28-CrashOnInvalid.ll Mon Apr 16 10:00:39 2007 @@ -1,6 +1,6 @@ ; Test for PR902. This program is erroneous, but should not crash llvm-as. ; This tests that a simple error is caught and processed correctly. -; RUN: llvm-as < %s 2>&1 >/dev/null | grep 'FP constant invalid for type' +; RUN: llvm-as < %s >/dev/null |& grep {FP constant invalid for type} define void @test() { add i32 1, 2.0 Index: llvm/test/Assembler/2007-01-02-Undefined-Arg-Type.ll diff -u llvm/test/Assembler/2007-01-02-Undefined-Arg-Type.ll:1.4 llvm/test/Assembler/2007-01-02-Undefined-Arg-Type.ll:1.5 --- llvm/test/Assembler/2007-01-02-Undefined-Arg-Type.ll:1.4 Tue Mar 27 21:38:26 2007 +++ llvm/test/Assembler/2007-01-02-Undefined-Arg-Type.ll Mon Apr 16 10:00:39 2007 @@ -1,5 +1,5 @@ ; The assembler should catch an undefined argument type . -; RUN: llvm-as < %s -o /dev/null -f 2>&1 | grep "Reference to abstract argument" +; RUN: llvm-as < %s -o /dev/null -f |& grep {Reference to abstract argument} ; %typedef.bc_struct = type opaque Index: llvm/test/Assembler/2007-01-16-CrashOnBadCast.ll diff -u llvm/test/Assembler/2007-01-16-CrashOnBadCast.ll:1.3 llvm/test/Assembler/2007-01-16-CrashOnBadCast.ll:1.4 --- llvm/test/Assembler/2007-01-16-CrashOnBadCast.ll:1.3 Sun Apr 15 05:07:55 2007 +++ llvm/test/Assembler/2007-01-16-CrashOnBadCast.ll Mon Apr 16 10:00:39 2007 @@ -1,5 +1,5 @@ ; PR1117 -; RUN: llvm-as < %s -o /dev/null -f |& grep "invalid cast opcode for cast from" +; RUN: llvm-as < %s -o /dev/null -f |& grep {invalid cast opcode for cast from} define i8* @nada(i64 %X) { %result = trunc i64 %X to i8* Index: llvm/test/Assembler/2007-01-16-CrashOnBadCast2.ll diff -u llvm/test/Assembler/2007-01-16-CrashOnBadCast2.ll:1.3 llvm/test/Assembler/2007-01-16-CrashOnBadCast2.ll:1.4 --- llvm/test/Assembler/2007-01-16-CrashOnBadCast2.ll:1.3 Sun Apr 15 05:07:55 2007 +++ llvm/test/Assembler/2007-01-16-CrashOnBadCast2.ll Mon Apr 16 10:00:39 2007 @@ -1,4 +1,4 @@ ; PR1117 -; RUN: llvm-as < %s -o /dev/null -f |& grep "invalid cast opcode for cast from" +; RUN: llvm-as < %s -o /dev/null -f |& grep {invalid cast opcode for cast from} @X = constant i8* trunc (i64 0 to i8*) Index: llvm/test/Assembler/2007-01-21-UpgradeNoArgs.ll diff -u llvm/test/Assembler/2007-01-21-UpgradeNoArgs.ll:1.1 llvm/test/Assembler/2007-01-21-UpgradeNoArgs.ll:1.2 --- llvm/test/Assembler/2007-01-21-UpgradeNoArgs.ll:1.1 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2007-01-21-UpgradeNoArgs.ll Mon Apr 16 10:00:39 2007 @@ -1,6 +1,6 @@ ; Make sure we don't get an assertion failure, even though this is a parse ; error -; RUN: llvm-upgrade 2>&1 < %s > /dev/null | grep 'No arguments passed to a ' +; RUN: llvm-upgrade < %s > /dev/null |& grep {No arguments passed to a } %ty = type void (int) Index: llvm/test/Assembler/2007-01-22-UpgradeMalformedShift.ll diff -u llvm/test/Assembler/2007-01-22-UpgradeMalformedShift.ll:1.1 llvm/test/Assembler/2007-01-22-UpgradeMalformedShift.ll:1.2 --- llvm/test/Assembler/2007-01-22-UpgradeMalformedShift.ll:1.1 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2007-01-22-UpgradeMalformedShift.ll Mon Apr 16 10:00:39 2007 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: llvm-upgrade 2>&1 < %s > /dev/null | grep "Shift constant expression" +; RUN: llvm-upgrade < %s > /dev/null |& grep {Shift constant expression} global int shr (float 1.0, ubyte 2) Index: llvm/test/Assembler/2007-01-22-UpgradeMalformedStruct.ll diff -u llvm/test/Assembler/2007-01-22-UpgradeMalformedStruct.ll:1.1 llvm/test/Assembler/2007-01-22-UpgradeMalformedStruct.ll:1.2 --- llvm/test/Assembler/2007-01-22-UpgradeMalformedStruct.ll:1.1 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2007-01-22-UpgradeMalformedStruct.ll Mon Apr 16 10:00:39 2007 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: llvm-upgrade 2>&1 < %s > /dev/null | grep "Illegal number of init" +; RUN: llvm-upgrade < %s > /dev/null |& grep {Illegal number of init} global {} { int 7, float 1.0, int 7, int 8 } Index: llvm/test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll diff -u llvm/test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll:1.1 llvm/test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll:1.2 --- llvm/test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll:1.1 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll Mon Apr 16 10:00:39 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade 2>&1 < %s -o /dev/null -f | grep 'Reference to an undef' +; RUN: llvm-upgrade < %s -o /dev/null -f |& grep {Reference to an undef} +; END. %d_reduction_0_dparser_gram = global { int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)*, int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyt! e*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)** } { int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, i! nt, int }*)* null, int (sbyte*, sbyte**, int, int, { %struct.G! rammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)** null } Index: llvm/test/Assembler/2007-03-18-InvalidNumberedVar.ll diff -u llvm/test/Assembler/2007-03-18-InvalidNumberedVar.ll:1.1 llvm/test/Assembler/2007-03-18-InvalidNumberedVar.ll:1.2 --- llvm/test/Assembler/2007-03-18-InvalidNumberedVar.ll:1.1 Mon Mar 19 13:41:37 2007 +++ llvm/test/Assembler/2007-03-18-InvalidNumberedVar.ll Mon Apr 16 10:00:39 2007 @@ -1,5 +1,5 @@ ; PR 1258 -; RUN: llvm-as < %s 2>&1 >/dev/null -f | grep "Numbered.*does not match" +; RUN: llvm-as < %s >/dev/null -f |& grep {Numbered.*does not match} define i32 @test1(i32 %a, i32 %b) { entry: From reid at x10sys.com Mon Apr 16 10:16:27 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:16:27 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr 2005-01-02-VAArgError-ICE.c 2006-09-21-IncompleteElementType.c 2006-09-25-DebugFilename.c.tr Message-ID: <200704161516.l3GFGRAh005766@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2003-11-19-AddressOfRegister.c.tr updated: 1.1 -> 1.2 2005-01-02-VAArgError-ICE.c updated: 1.1 -> 1.2 2006-09-21-IncompleteElementType.c updated: 1.1 -> 1.2 2006-09-25-DebugFilename.c.tr updated: 1.1 -> 1.2 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix test syntax per new rules. --- Diffs of the changes: (+6 -5) 2003-11-19-AddressOfRegister.c.tr | 2 +- 2005-01-02-VAArgError-ICE.c | 2 +- 2006-09-21-IncompleteElementType.c | 2 +- 2006-09-25-DebugFilename.c.tr | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) Index: llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr diff -u llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr:1.1 llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr:1.2 --- llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr:1.1 Wed Nov 19 15:37:52 2003 +++ llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr Mon Apr 16 10:15:51 2007 @@ -1,4 +1,4 @@ -// RUN: %llvmgcc -xc %s -S -o /dev/null 2>&1 | not grep 'warning' +// RUN: %llvmgcc -xc %s -S -o /dev/null |& not grep 'warning' struct item { short delta[4]; Index: llvm/test/CFrontend/2005-01-02-VAArgError-ICE.c diff -u llvm/test/CFrontend/2005-01-02-VAArgError-ICE.c:1.1 llvm/test/CFrontend/2005-01-02-VAArgError-ICE.c:1.2 --- llvm/test/CFrontend/2005-01-02-VAArgError-ICE.c:1.1 Sun Jan 2 22:39:16 2005 +++ llvm/test/CFrontend/2005-01-02-VAArgError-ICE.c Mon Apr 16 10:15:51 2007 @@ -1,6 +1,6 @@ // This file is erroneous, but should not cause the compiler to ICE. // PR481 -// RUN: %llvmgcc %s -S -o /dev/null 2>&1 | not grep 'internal compiler error' +// RUN: %llvmgcc %s -S -o /dev/null |& not grep {internal compiler error} #include int flags(int a, int b, ...) { Index: llvm/test/CFrontend/2006-09-21-IncompleteElementType.c diff -u llvm/test/CFrontend/2006-09-21-IncompleteElementType.c:1.1 llvm/test/CFrontend/2006-09-21-IncompleteElementType.c:1.2 --- llvm/test/CFrontend/2006-09-21-IncompleteElementType.c:1.1 Fri Sep 22 00:34:25 2006 +++ llvm/test/CFrontend/2006-09-21-IncompleteElementType.c Mon Apr 16 10:15:51 2007 @@ -1,3 +1,3 @@ -// RUN: %llvmgcc %s -S -o /dev/null 2>&1 | not grep 'internal compiler error' +// RUN: %llvmgcc %s -S -o /dev/null |& not grep {internal compiler error} struct A X[(927 - 37) / sizeof(struct A)]; Index: llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr diff -u llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr:1.1 llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr:1.2 --- llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr:1.1 Mon Sep 25 14:12:01 2006 +++ llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr Mon Apr 16 10:15:51 2007 @@ -1,5 +1,6 @@ -// RUN: %llvmgcc -xc %s -S -o /dev/null 2>&1 | grep fluffy | grep '2006-09-25-DebugFilename.c.tr' +// RUN: %llvmgcc -xc %s -S -o /dev/null |& \ +// RUN: grep fluffy | grep 2006-09-25-DebugFilename.c.tr #include "2006-09-25-DebugFilename.h" int func1() { return hfunc1(); } -int func2() { fluffy; return hfunc1(); } +int func2() { int fluffy; return hfunc1(); } From reid at x10sys.com Mon Apr 16 10:16:36 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:16:36 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll addrmode.ll iabs.ll lsr-code-insertion.ll Message-ID: <200704161516.l3GFGakp005782@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: 2007-03-13-InstrSched.ll updated: 1.4 -> 1.5 addrmode.ll updated: 1.1 -> 1.2 iabs.ll updated: 1.1 -> 1.2 lsr-code-insertion.ll updated: 1.1 -> 1.2 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix test syntax per new rules. --- Diffs of the changes: (+11 -9) 2007-03-13-InstrSched.ll | 3 ++- addrmode.ll | 3 +-- iabs.ll | 6 ++++-- lsr-code-insertion.ll | 8 ++++---- 4 files changed, 11 insertions(+), 9 deletions(-) Index: llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll diff -u llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll:1.4 llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll:1.5 --- llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll:1.4 Wed Apr 4 03:49:10 2007 +++ llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll Mon Apr 16 10:15:51 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -relocation-model=pic -mattr=+v6 -stats 2>&1 | grep 'asm-printer' | grep 41 +; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -relocation-model=pic \ +; RUN: -mattr=+v6 -stats |& grep asm-printer | grep 41 define void @test(i32 %tmp56222, i32 %tmp36224, i32 %tmp46223, i32 %i.0196.0.ph, i32 %tmp8, i32* %tmp1011, i32** %tmp1, i32* %d2.1.out, i32* %d3.1.out, i32* %d0.1.out, i32* %d1.1.out) { newFuncRoot: Index: llvm/test/CodeGen/ARM/addrmode.ll diff -u llvm/test/CodeGen/ARM/addrmode.ll:1.1 llvm/test/CodeGen/ARM/addrmode.ll:1.2 --- llvm/test/CodeGen/ARM/addrmode.ll:1.1 Wed Mar 14 18:26:40 2007 +++ llvm/test/CodeGen/ARM/addrmode.ll Mon Apr 16 10:15:51 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm -stats 2>&1 | grep 'asm-printer' | grep 4 +; RUN: llvm-as < %s | llc -march=arm -stats |& grep asm-printer | grep 4 define i32 @t1(i32 %a) { %b = mul i32 %a, 9 Index: llvm/test/CodeGen/ARM/iabs.ll diff -u llvm/test/CodeGen/ARM/iabs.ll:1.1 llvm/test/CodeGen/ARM/iabs.ll:1.2 --- llvm/test/CodeGen/ARM/iabs.ll:1.1 Wed Apr 11 00:02:57 2007 +++ llvm/test/CodeGen/ARM/iabs.ll Mon Apr 16 10:15:51 2007 @@ -1,5 +1,7 @@ -; RUN: llvm-as < %s | llc -march=arm -stats 2>&1 | grep '3 .*Number of machine instrs printed' && -; RUN: llvm-as < %s | llc -march=thumb -stats 2>&1 | grep '4 .*Number of machine instrs printed' +; RUN: llvm-as < %s | llc -march=arm -stats |& \ +; RUN: grep {3 .*Number of machine instrs printed} +; RUN: llvm-as < %s | llc -march=thumb -stats |& \ +; RUN: grep {4 .*Number of machine instrs printed} ;; Integer absolute value, should produce something as good as: ARM: ;; add r3, r0, r0, asr #31 Index: llvm/test/CodeGen/ARM/lsr-code-insertion.ll diff -u llvm/test/CodeGen/ARM/lsr-code-insertion.ll:1.1 llvm/test/CodeGen/ARM/lsr-code-insertion.ll:1.2 --- llvm/test/CodeGen/ARM/lsr-code-insertion.ll:1.1 Fri Apr 13 15:38:14 2007 +++ llvm/test/CodeGen/ARM/lsr-code-insertion.ll Mon Apr 16 10:15:51 2007 @@ -1,7 +1,7 @@ -; RUN: llvm-as < %s | llc -stats 2>&1 | grep '40.*Number of machine instrs printed' -; This test really wants to check that the resultant "cond_true" block only has a single -; store in it, and that cond_true55 only has code to materialize the constant and do -; a store. We do *not* want something like this: +; RUN: llvm-as < %s | llc -stats |& grep {40.*Number of machine instrs printed} +; This test really wants to check that the resultant "cond_true" block only +; has a single store in it, and that cond_true55 only has code to materialize +; the constant and do a store. We do *not* want something like this: ; ;LBB1_3: @cond_true ; add r8, r0, r6 From reid at x10sys.com Mon Apr 16 10:16:37 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:16:37 -0500 Subject: [llvm-commits] CVS: llvm/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll 2003-12-11-ConstExprGEP.ll 2006-03-03-BadArraySubscript.ll modref.ll Message-ID: <200704161516.l3GFGbXw005810@zion.cs.uiuc.edu> Changes in directory llvm/test/Analysis/BasicAA: 2003-11-04-SimpleCases.ll updated: 1.3 -> 1.4 2003-12-11-ConstExprGEP.ll updated: 1.4 -> 1.5 2006-03-03-BadArraySubscript.ll updated: 1.2 -> 1.3 modref.ll updated: 1.4 -> 1.5 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix test syntax per new rules. --- Diffs of the changes: (+9 -5) 2003-11-04-SimpleCases.ll | 3 ++- 2003-12-11-ConstExprGEP.ll | 3 ++- 2006-03-03-BadArraySubscript.ll | 3 ++- modref.ll | 5 +++-- 4 files changed, 9 insertions(+), 5 deletions(-) Index: llvm/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll diff -u llvm/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll:1.3 llvm/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll:1.4 --- llvm/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll:1.3 Fri Dec 1 22:23:07 2006 +++ llvm/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll Mon Apr 16 10:15:51 2007 @@ -1,7 +1,8 @@ ; This testcase consists of alias relations which should be completely ; resolvable by basicaa. -; RUN: llvm-upgrade < %s | llvm-as | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May: +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -aa-eval -print-may-aliases -disable-output |& not grep May: %T = type { uint, [10 x ubyte] } Index: llvm/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll diff -u llvm/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll:1.4 llvm/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll:1.5 --- llvm/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll:1.4 Fri Dec 1 22:23:07 2006 +++ llvm/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll Mon Apr 16 10:15:51 2007 @@ -1,7 +1,8 @@ ; This testcase consists of alias relations which should be completely ; resolvable by basicaa, but require analysis of getelementptr constant exprs. -; RUN: llvm-upgrade < %s | llvm-as | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May: +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -aa-eval -print-may-aliases -disable-output |& not grep May: %T = type { uint, [10 x ubyte] } Index: llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll diff -u llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll:1.2 llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll:1.3 --- llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll:1.2 Fri Dec 1 22:23:07 2006 +++ llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll Mon Apr 16 10:15:51 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -aa-eval -disable-output 2>&1 | grep '2 no alias respon' +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -aa-eval -disable-output |& grep '2 no alias respon' ;; TEST that A[1][0] may alias A[0][i]. Index: llvm/test/Analysis/BasicAA/modref.ll diff -u llvm/test/Analysis/BasicAA/modref.ll:1.4 llvm/test/Analysis/BasicAA/modref.ll:1.5 --- llvm/test/Analysis/BasicAA/modref.ll:1.4 Fri Dec 1 22:23:07 2006 +++ llvm/test/Analysis/BasicAA/modref.ll Mon Apr 16 10:15:51 2007 @@ -1,6 +1,7 @@ ; A very rudimentary test on AliasAnalysis::getModRefInfo. -; RUN: llvm-upgrade < %s | llvm-as | opt -print-all-alias-modref-info -aa-eval -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -print-all-alias-modref-info -aa-eval -disable-output 2>&1 | not grep NoModRef +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -print-all-alias-modref-info -aa-eval -disable-output |& +; RUN: not grep NoModRef int %callee() { %X = alloca { int, int } From reid at x10sys.com Mon Apr 16 10:16:37 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:16:37 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/TailCallElim/ackermann.ll Message-ID: <200704161516.l3GFGbU6005802@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/TailCallElim: ackermann.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix test syntax per new rules. --- Diffs of the changes: (+2 -1) ackermann.ll | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/test/Transforms/TailCallElim/ackermann.ll diff -u llvm/test/Transforms/TailCallElim/ackermann.ll:1.2 llvm/test/Transforms/TailCallElim/ackermann.ll:1.3 --- llvm/test/Transforms/TailCallElim/ackermann.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/TailCallElim/ackermann.ll Mon Apr 16 10:15:52 2007 @@ -1,5 +1,6 @@ ; This function contains two tail calls, which should be eliminated -; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim -stats -disable-output 2>&1 | grep '2 tailcallelim' +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -tailcallelim -stats -disable-output |& grep {2 tailcallelim} int %Ack(int %M.1, int %N.1) { entry: From reid at x10sys.com Mon Apr 16 10:16:37 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:16:37 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LICM/scalar_promote.ll Message-ID: <200704161516.l3GFGbfj005791@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LICM: scalar_promote.ll updated: 1.4 -> 1.5 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix test syntax per new rules. --- Diffs of the changes: (+2 -1) scalar_promote.ll | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/test/Transforms/LICM/scalar_promote.ll diff -u llvm/test/Transforms/LICM/scalar_promote.ll:1.4 llvm/test/Transforms/LICM/scalar_promote.ll:1.5 --- llvm/test/Transforms/LICM/scalar_promote.ll:1.4 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/LICM/scalar_promote.ll Mon Apr 16 10:15:52 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -licm -stats 2>&1 | grep "memory locations promoted to register" +; RUN: llvm-upgrade < %s | llvm-as | opt -licm -stats |& \ +; RUN: grep {memory locations promoted to register} %X = global int 7 From reid at x10sys.com Mon Apr 16 10:16:37 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:16:37 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.llx 2006-03-02-InstrSchedBug.ll 2006-05-01-SchedCausingSpills.ll 2006-05-02-InstrSched1.ll 2006-05-02-InstrSched2.ll iabs.ll Message-ID: <200704161516.l3GFGbBT005812@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: 2003-08-03-CallArgLiveRanges.llx updated: 1.4 -> 1.5 2006-03-02-InstrSchedBug.ll updated: 1.2 -> 1.3 2006-05-01-SchedCausingSpills.ll updated: 1.2 -> 1.3 2006-05-02-InstrSched1.ll updated: 1.4 -> 1.5 2006-05-02-InstrSched2.ll updated: 1.4 -> 1.5 iabs.ll updated: 1.1 -> 1.2 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix test syntax per new rules. --- Diffs of the changes: (+13 -6) 2003-08-03-CallArgLiveRanges.llx | 2 +- 2006-03-02-InstrSchedBug.ll | 3 ++- 2006-05-01-SchedCausingSpills.ll | 3 ++- 2006-05-02-InstrSched1.ll | 5 ++++- 2006-05-02-InstrSched2.ll | 3 ++- iabs.ll | 3 ++- 6 files changed, 13 insertions(+), 6 deletions(-) Index: llvm/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.llx diff -u llvm/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.llx:1.4 llvm/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.llx:1.5 --- llvm/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.llx:1.4 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.llx Mon Apr 16 10:15:51 2007 @@ -3,7 +3,7 @@ ; it makes a ton of annoying overlapping live ranges. This code should not ; cause spills! ; -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats 2>&1 | not grep spilled +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats |& not grep spilled target endian = little target pointersize = 32 Index: llvm/test/CodeGen/X86/2006-03-02-InstrSchedBug.ll diff -u llvm/test/CodeGen/X86/2006-03-02-InstrSchedBug.ll:1.2 llvm/test/CodeGen/X86/2006-03-02-InstrSchedBug.ll:1.3 --- llvm/test/CodeGen/X86/2006-03-02-InstrSchedBug.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/2006-03-02-InstrSchedBug.ll Mon Apr 16 10:15:51 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats 2>&1 | grep 'asm-printer' | grep 7 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats |& \ +; RUN: grep asm-printer | grep 7 int %g(int %a, int %b) { %tmp.1 = shl int %b, ubyte 1 Index: llvm/test/CodeGen/X86/2006-05-01-SchedCausingSpills.ll diff -u llvm/test/CodeGen/X86/2006-05-01-SchedCausingSpills.ll:1.2 llvm/test/CodeGen/X86/2006-05-01-SchedCausingSpills.ll:1.3 --- llvm/test/CodeGen/X86/2006-05-01-SchedCausingSpills.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/2006-05-01-SchedCausingSpills.ll Mon Apr 16 10:15:51 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah -stats 2>&1 | not grep 'Number of register spills' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah -stats |& \ +; RUN: not grep {Number of register spills} int %foo(<4 x float>* %a, <4 x float>* %b, <4 x float>* %c, <4 x float>* %d) { %tmp44 = load <4 x float>* %a ; <<4 x float>> [#uses=9] Index: llvm/test/CodeGen/X86/2006-05-02-InstrSched1.ll diff -u llvm/test/CodeGen/X86/2006-05-02-InstrSched1.ll:1.4 llvm/test/CodeGen/X86/2006-05-02-InstrSched1.ll:1.5 --- llvm/test/CodeGen/X86/2006-05-02-InstrSched1.ll:1.4 Mon Jan 1 23:53:06 2007 +++ llvm/test/CodeGen/X86/2006-05-02-InstrSched1.ll Mon Apr 16 10:15:51 2007 @@ -1,4 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static -stats 2>&1 | grep "asm-printer" | grep 14 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: llc -march=x86 -relocation-model=static -stats |& \ +; RUN: grep asm-printer | grep 14 +; %size20 = external global uint ; [#uses=1] %in5 = external global ubyte* ; [#uses=1] Index: llvm/test/CodeGen/X86/2006-05-02-InstrSched2.ll diff -u llvm/test/CodeGen/X86/2006-05-02-InstrSched2.ll:1.4 llvm/test/CodeGen/X86/2006-05-02-InstrSched2.ll:1.5 --- llvm/test/CodeGen/X86/2006-05-02-InstrSched2.ll:1.4 Mon Jan 8 17:57:40 2007 +++ llvm/test/CodeGen/X86/2006-05-02-InstrSched2.ll Mon Apr 16 10:15:51 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats 2>&1 | grep "asm-printer" | grep 18 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats |& \ +; RUN: grep asm-printer | grep 18 void %_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(sbyte* %tmp435.i, uint* %tmp449.i.out) { newFuncRoot: Index: llvm/test/CodeGen/X86/iabs.ll diff -u llvm/test/CodeGen/X86/iabs.ll:1.1 llvm/test/CodeGen/X86/iabs.ll:1.2 --- llvm/test/CodeGen/X86/iabs.ll:1.1 Wed Apr 11 00:02:57 2007 +++ llvm/test/CodeGen/X86/iabs.ll Mon Apr 16 10:15:51 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-as < %s | llc -march=x86-64 -stats 2>&1 | grep '6 .*Number of machine instrs printed' +; RUN: llvm-as < %s | llc -march=x86-64 -stats |& \ +; RUN: grep {6 .*Number of machine instrs printed} ;; Integer absolute value, should produce something at least as good as: ;; movl %edi, %eax From reid at x10sys.com Mon Apr 16 10:16:37 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:16:37 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/iabs.ll rlwimi3.ll Message-ID: <200704161516.l3GFGbN7005825@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: iabs.ll updated: 1.1 -> 1.2 rlwimi3.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix test syntax per new rules. --- Diffs of the changes: (+4 -2) iabs.ll | 3 ++- rlwimi3.ll | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/test/CodeGen/PowerPC/iabs.ll diff -u llvm/test/CodeGen/PowerPC/iabs.ll:1.1 llvm/test/CodeGen/PowerPC/iabs.ll:1.2 --- llvm/test/CodeGen/PowerPC/iabs.ll:1.1 Wed Apr 11 00:02:57 2007 +++ llvm/test/CodeGen/PowerPC/iabs.ll Mon Apr 16 10:15:51 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-as < %s | llc -march=ppc32 -stats 2>&1 | grep '4 .*Number of machine instrs printed' +; RUN: llvm-as < %s | llc -march=ppc32 -stats |& \ +; RUN: grep {4 .*Number of machine instrs printed} ;; Integer absolute value, should produce something as good as: ;; srawi r2, r3, 31 Index: llvm/test/CodeGen/PowerPC/rlwimi3.ll diff -u llvm/test/CodeGen/PowerPC/rlwimi3.ll:1.2 llvm/test/CodeGen/PowerPC/rlwimi3.ll:1.3 --- llvm/test/CodeGen/PowerPC/rlwimi3.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/rlwimi3.ll Mon Apr 16 10:15:51 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -stats 2>&1 | grep 'Number of machine instrs printed' | grep 12 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -stats |& \ +; RUN: grep {Number of machine instrs printed} | grep 12 ushort %Trans16Bit(uint %srcA, uint %srcB, uint %alpha) { %tmp1 = shl uint %srcA, ubyte 15 ; [#uses=1] From reid at x10sys.com Mon Apr 16 10:16:37 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:16:37 -0500 Subject: [llvm-commits] CVS: llvm/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr Message-ID: <200704161516.l3GFGba9005830@zion.cs.uiuc.edu> Changes in directory llvm/test/C++Frontend: 2003-08-29-ArgPassingBug.cpp.tr updated: 1.3 -> 1.4 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix test syntax per new rules. --- Diffs of the changes: (+1 -1) 2003-08-29-ArgPassingBug.cpp.tr | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr diff -u llvm/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr:1.3 llvm/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr:1.4 --- llvm/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr:1.3 Tue Sep 30 14:56:36 2003 +++ llvm/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr Mon Apr 16 10:15:51 2007 @@ -1,5 +1,5 @@ -// RUN: %llvmgcc -xc++ -c -o /dev/null %s 2>&1 | not grep WARNING +// RUN: %llvmgcc -xc++ -c -o /dev/null %s |& not grep WARNING struct iterator { iterator(); From reid at x10sys.com Mon Apr 16 10:32:49 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:49 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr 2005-05-06-CountBuiltins.c Message-ID: <200704161532.l3GFWnpl006237@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2003-11-19-AddressOfRegister.c.tr updated: 1.2 -> 1.3 2005-05-06-CountBuiltins.c updated: 1.1 -> 1.2 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+2 -2) 2003-11-19-AddressOfRegister.c.tr | 2 +- 2005-05-06-CountBuiltins.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr diff -u llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr:1.2 llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr:1.3 --- llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr:1.2 Mon Apr 16 10:15:51 2007 +++ llvm/test/CFrontend/2003-11-19-AddressOfRegister.c.tr Mon Apr 16 10:31:48 2007 @@ -1,4 +1,4 @@ -// RUN: %llvmgcc -xc %s -S -o /dev/null |& not grep 'warning' +// RUN: %llvmgcc -xc %s -S -o /dev/null |& not grep warning struct item { short delta[4]; Index: llvm/test/CFrontend/2005-05-06-CountBuiltins.c diff -u llvm/test/CFrontend/2005-05-06-CountBuiltins.c:1.1 llvm/test/CFrontend/2005-05-06-CountBuiltins.c:1.2 --- llvm/test/CFrontend/2005-05-06-CountBuiltins.c:1.1 Fri May 6 21:16:08 2005 +++ llvm/test/CFrontend/2005-05-06-CountBuiltins.c Mon Apr 16 10:31:48 2007 @@ -1,4 +1,4 @@ -// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | not grep 'call.*__builtin' +// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | not grep call.*__builtin int G, H, I; void foo(int P) { From reid at x10sys.com Mon Apr 16 10:32:49 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:49 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll Message-ID: <200704161532.l3GFWnes006243@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: 2007-04-14-BitTestsBadMask.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+2 -2) 2007-04-14-BitTestsBadMask.ll | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll diff -u llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll:1.2 llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll:1.3 --- llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll:1.2 Sat Apr 14 18:40:49 2007 +++ llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll Mon Apr 16 10:31:48 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-as < %s | llc -march=x86 | grep '8388635' && -; RUN: llvm-as < %s | llc -march=x86-64 | grep '4294981120' +; RUN: llvm-as < %s | llc -march=x86 | grep 8388635 && +; RUN: llvm-as < %s | llc -march=x86-64 | grep 4294981120 ; PR 1325 ; FIXME: this is xfailed until we figure out ppc bootstrap From reid at x10sys.com Mon Apr 16 10:32:49 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:49 -0500 Subject: [llvm-commits] CVS: llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll Message-ID: <200704161532.l3GFWnAu006248@zion.cs.uiuc.edu> Changes in directory llvm/test/Analysis/BasicAA: 2006-03-03-BadArraySubscript.ll updated: 1.3 -> 1.4 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+1 -1) 2006-03-03-BadArraySubscript.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll diff -u llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll:1.3 llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll:1.4 --- llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll:1.3 Mon Apr 16 10:15:51 2007 +++ llvm/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll Mon Apr 16 10:31:48 2007 @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | \ -; RUN: opt -aa-eval -disable-output |& grep '2 no alias respon' +; RUN: opt -aa-eval -disable-output |& grep {2 no alias respon} ;; TEST that A[1][0] may alias A[0][i]. From reid at x10sys.com Mon Apr 16 10:32:50 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:50 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/Reassociate/inverses.ll Message-ID: <200704161532.l3GFWo7J006253@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/Reassociate: inverses.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+2 -1) inverses.ll | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/test/Transforms/Reassociate/inverses.ll diff -u llvm/test/Transforms/Reassociate/inverses.ll:1.2 llvm/test/Transforms/Reassociate/inverses.ll:1.3 --- llvm/test/Transforms/Reassociate/inverses.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/Reassociate/inverses.ll Mon Apr 16 10:31:49 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -dce | llvm-dis | not grep '\(and\|sub\)' +; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -dce | llvm-dis | \ +; RUN: not grep {\\(and\\|sub\\)} int %test1(int %a, int %b) { %tmp.2 = and int %b, %a From reid at x10sys.com Mon Apr 16 10:32:55 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:55 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll Message-ID: <200704161532.l3GFWtOo006258@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/CBackend: 2004-12-03-ExternStatics.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+1 -1) 2004-12-03-ExternStatics.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll diff -u llvm/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll:1.2 llvm/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll:1.3 --- llvm/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll Mon Apr 16 10:31:48 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep 'extern.*msg' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep extern.*msg ; This is PR472 From reid at x10sys.com Mon Apr 16 10:32:56 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:56 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll Message-ID: <200704161532.l3GFWuKY006263@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/Mem2Reg: PromoteMemToRegister.ll updated: 1.4 -> 1.5 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+1 -1) PromoteMemToRegister.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll diff -u llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll:1.4 llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll:1.5 --- llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll:1.4 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,5 @@ ; Simple sanity check testcase. Both alloca's should be eliminated. -; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep 'alloca' +; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep alloca implementation From reid at x10sys.com Mon Apr 16 10:32:56 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:56 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/SimplifyLibCalls/FFS.ll FPrintF.ll MemCpy.ll MemMove.ll Printf.ll Puts.ll SPrintF.ll StrCat.ll StrChr.ll StrCmp.ll StrCpy.ll StrLen.ll StrNCmp.ll ToAscii.ll memcmp.ll Message-ID: <200704161532.l3GFWuur006296@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/SimplifyLibCalls: FFS.ll updated: 1.5 -> 1.6 FPrintF.ll updated: 1.2 -> 1.3 MemCpy.ll updated: 1.4 -> 1.5 MemMove.ll updated: 1.4 -> 1.5 Printf.ll updated: 1.1 -> 1.2 Puts.ll updated: 1.4 -> 1.5 SPrintF.ll updated: 1.3 -> 1.4 StrCat.ll updated: 1.2 -> 1.3 StrChr.ll updated: 1.3 -> 1.4 StrCmp.ll updated: 1.2 -> 1.3 StrCpy.ll updated: 1.3 -> 1.4 StrLen.ll updated: 1.6 -> 1.7 StrNCmp.ll updated: 1.3 -> 1.4 ToAscii.ll updated: 1.2 -> 1.3 memcmp.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+30 -19) FFS.ll | 3 ++- FPrintF.ll | 3 ++- MemCpy.ll | 4 ++-- MemMove.ll | 4 ++-- Printf.ll | 5 +++-- Puts.ll | 3 ++- SPrintF.ll | 4 ++-- StrCat.ll | 3 ++- StrChr.ll | 3 ++- StrCmp.ll | 3 ++- StrCpy.ll | 3 ++- StrLen.ll | 2 +- StrNCmp.ll | 3 ++- ToAscii.ll | 3 ++- memcmp.ll | 3 ++- 15 files changed, 30 insertions(+), 19 deletions(-) Index: llvm/test/Transforms/SimplifyLibCalls/FFS.ll diff -u llvm/test/Transforms/SimplifyLibCalls/FFS.ll:1.5 llvm/test/Transforms/SimplifyLibCalls/FFS.ll:1.6 --- llvm/test/Transforms/SimplifyLibCalls/FFS.ll:1.5 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/FFS.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Test that the ToAsciiOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*%ffs' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*%ffs} declare int %ffs(int) declare int %ffsl(int) Index: llvm/test/Transforms/SimplifyLibCalls/FPrintF.ll diff -u llvm/test/Transforms/SimplifyLibCalls/FPrintF.ll:1.2 llvm/test/Transforms/SimplifyLibCalls/FPrintF.ll:1.3 --- llvm/test/Transforms/SimplifyLibCalls/FPrintF.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/FPrintF.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Test that the FPrintFOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*fprintf' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*fprintf} ; %struct._IO_FILE = type { int, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct._IO_marker*, %struct._IO_FILE*, int, int, int, ushort, sbyte, [1 x sbyte], sbyte*, long, sbyte*, sbyte*, int, [52 x sbyte] } Index: llvm/test/Transforms/SimplifyLibCalls/MemCpy.ll diff -u llvm/test/Transforms/SimplifyLibCalls/MemCpy.ll:1.4 llvm/test/Transforms/SimplifyLibCalls/MemCpy.ll:1.5 --- llvm/test/Transforms/SimplifyLibCalls/MemCpy.ll:1.4 Sat Dec 2 14:41:53 2006 +++ llvm/test/Transforms/SimplifyLibCalls/MemCpy.ll Mon Apr 16 10:31:49 2007 @@ -1,6 +1,6 @@ ; Test that the StrCatOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memcpy.i32' +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls | \ +; RUN: llvm-dis | not grep {call.*llvm.memcpy.i32} declare void %llvm.memcpy.i32(sbyte*,sbyte*,uint,uint) %h = constant [2 x sbyte] c"h\00" Index: llvm/test/Transforms/SimplifyLibCalls/MemMove.ll diff -u llvm/test/Transforms/SimplifyLibCalls/MemMove.ll:1.4 llvm/test/Transforms/SimplifyLibCalls/MemMove.ll:1.5 --- llvm/test/Transforms/SimplifyLibCalls/MemMove.ll:1.4 Sat Dec 2 14:41:53 2006 +++ llvm/test/Transforms/SimplifyLibCalls/MemMove.ll Mon Apr 16 10:31:49 2007 @@ -1,6 +1,6 @@ ; Test that the StrCatOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memmove.i32' +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls | \ +; RUN: llvm-dis | not grep {call.*llvm.memmove.i32} declare void %llvm.memmove.i32(sbyte*,sbyte*,uint,uint) %h = constant [2 x sbyte] c"h\00" Index: llvm/test/Transforms/SimplifyLibCalls/Printf.ll diff -u llvm/test/Transforms/SimplifyLibCalls/Printf.ll:1.1 llvm/test/Transforms/SimplifyLibCalls/Printf.ll:1.2 --- llvm/test/Transforms/SimplifyLibCalls/Printf.ll:1.1 Fri Apr 13 20:17:38 2007 +++ llvm/test/Transforms/SimplifyLibCalls/Printf.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep putchar && -; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*printf' +; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep putchar +; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*printf} @str = internal constant [13 x i8] c"hello world\0A\00" ; <[13 x i8]*> [#uses=1] @str1 = internal constant [2 x i8] c"h\00" ; <[2 x i8]*> [#uses=1] Index: llvm/test/Transforms/SimplifyLibCalls/Puts.ll diff -u llvm/test/Transforms/SimplifyLibCalls/Puts.ll:1.4 llvm/test/Transforms/SimplifyLibCalls/Puts.ll:1.5 --- llvm/test/Transforms/SimplifyLibCalls/Puts.ll:1.4 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/Puts.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Test that the PutsCatOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*fputs' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*fputs} ; %struct._IO_FILE = type { int, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct._IO_marker*, %struct._IO_FILE*, int, int, int, ushort, sbyte, [1 x sbyte], sbyte*, long, sbyte*, sbyte*, int, [52 x sbyte] } %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, int } Index: llvm/test/Transforms/SimplifyLibCalls/SPrintF.ll diff -u llvm/test/Transforms/SimplifyLibCalls/SPrintF.ll:1.3 llvm/test/Transforms/SimplifyLibCalls/SPrintF.ll:1.4 --- llvm/test/Transforms/SimplifyLibCalls/SPrintF.ll:1.3 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/SPrintF.ll Mon Apr 16 10:31:49 2007 @@ -1,6 +1,6 @@ ; Test that the SPrintFOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*sprintf' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*sprintf} declare int %sprintf(sbyte*,sbyte*,...) declare int %puts(sbyte*) Index: llvm/test/Transforms/SimplifyLibCalls/StrCat.ll diff -u llvm/test/Transforms/SimplifyLibCalls/StrCat.ll:1.2 llvm/test/Transforms/SimplifyLibCalls/StrCat.ll:1.3 --- llvm/test/Transforms/SimplifyLibCalls/StrCat.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/StrCat.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Test that the StrCatOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcat' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*strcat} declare sbyte* %strcat(sbyte*,sbyte*) declare int %puts(sbyte*) Index: llvm/test/Transforms/SimplifyLibCalls/StrChr.ll diff -u llvm/test/Transforms/SimplifyLibCalls/StrChr.ll:1.3 llvm/test/Transforms/SimplifyLibCalls/StrChr.ll:1.4 --- llvm/test/Transforms/SimplifyLibCalls/StrChr.ll:1.3 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/StrChr.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Test that the StrChrOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*%strchr' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*%strchr} declare sbyte* %strchr(sbyte*,int) declare int %puts(sbyte*) Index: llvm/test/Transforms/SimplifyLibCalls/StrCmp.ll diff -u llvm/test/Transforms/SimplifyLibCalls/StrCmp.ll:1.2 llvm/test/Transforms/SimplifyLibCalls/StrCmp.ll:1.3 --- llvm/test/Transforms/SimplifyLibCalls/StrCmp.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/StrCmp.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Test that the StrCmpOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcmp' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*strcmp} declare int %strcmp(sbyte*,sbyte*) declare int %puts(sbyte*) Index: llvm/test/Transforms/SimplifyLibCalls/StrCpy.ll diff -u llvm/test/Transforms/SimplifyLibCalls/StrCpy.ll:1.3 llvm/test/Transforms/SimplifyLibCalls/StrCpy.ll:1.4 --- llvm/test/Transforms/SimplifyLibCalls/StrCpy.ll:1.3 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/StrCpy.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Test that the StrCpyOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcpy' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*strcpy} declare sbyte* %strcpy(sbyte*,sbyte*) declare int %puts(sbyte*) Index: llvm/test/Transforms/SimplifyLibCalls/StrLen.ll diff -u llvm/test/Transforms/SimplifyLibCalls/StrLen.ll:1.6 llvm/test/Transforms/SimplifyLibCalls/StrLen.ll:1.7 --- llvm/test/Transforms/SimplifyLibCalls/StrLen.ll:1.6 Fri Jan 26 02:25:06 2007 +++ llvm/test/Transforms/SimplifyLibCalls/StrLen.ll Mon Apr 16 10:31:49 2007 @@ -1,6 +1,6 @@ ; Test that the StrCatOptimizer works correctly ; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ -; RUN: not grep 'call.*strlen' +; RUN: not grep {call.*strlen} target datalayout = "e-p:32:32" Index: llvm/test/Transforms/SimplifyLibCalls/StrNCmp.ll diff -u llvm/test/Transforms/SimplifyLibCalls/StrNCmp.ll:1.3 llvm/test/Transforms/SimplifyLibCalls/StrNCmp.ll:1.4 --- llvm/test/Transforms/SimplifyLibCalls/StrNCmp.ll:1.3 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/StrNCmp.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Test that the StrNCmpOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strncmp' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*strncmp} declare int %strncmp(sbyte*,sbyte*,int) declare int %puts(sbyte*) Index: llvm/test/Transforms/SimplifyLibCalls/ToAscii.ll diff -u llvm/test/Transforms/SimplifyLibCalls/ToAscii.ll:1.2 llvm/test/Transforms/SimplifyLibCalls/ToAscii.ll:1.3 --- llvm/test/Transforms/SimplifyLibCalls/ToAscii.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/ToAscii.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Test that the ToAsciiOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*toascii' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*toascii} declare int %toascii(int) Index: llvm/test/Transforms/SimplifyLibCalls/memcmp.ll diff -u llvm/test/Transforms/SimplifyLibCalls/memcmp.ll:1.2 llvm/test/Transforms/SimplifyLibCalls/memcmp.ll:1.3 --- llvm/test/Transforms/SimplifyLibCalls/memcmp.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/SimplifyLibCalls/memcmp.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Test that the memcmpOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*memcmp' && +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*memcmp} ; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls -disable-output declare int %memcmp(sbyte*,sbyte*,int) From reid at x10sys.com Mon Apr 16 10:32:58 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:58 -0500 Subject: [llvm-commits] CVS: llvm/test/TableGen/DagDefSubst.ll DagIntSubst.ll Message-ID: <200704161532.l3GFWwJh006309@zion.cs.uiuc.edu> Changes in directory llvm/test/TableGen: DagDefSubst.ll updated: 1.1 -> 1.2 DagIntSubst.ll updated: 1.1 -> 1.2 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+3 -3) DagDefSubst.ll | 4 ++-- DagIntSubst.ll | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/TableGen/DagDefSubst.ll diff -u llvm/test/TableGen/DagDefSubst.ll:1.1 llvm/test/TableGen/DagDefSubst.ll:1.2 --- llvm/test/TableGen/DagDefSubst.ll:1.1 Thu Mar 30 16:49:59 2006 +++ llvm/test/TableGen/DagDefSubst.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,5 @@ -// RUN: tblgen %s | grep 'dag d = (X Y)' && -// RUN: tblgen %s | grep 'dag e = (Y X)' +// RUN: tblgen %s | grep {dag d = (X Y)} +// RUN: tblgen %s | grep {dag e = (Y X)} def X; class yclass; Index: llvm/test/TableGen/DagIntSubst.ll diff -u llvm/test/TableGen/DagIntSubst.ll:1.1 llvm/test/TableGen/DagIntSubst.ll:1.2 --- llvm/test/TableGen/DagIntSubst.ll:1.1 Tue Jan 31 00:01:40 2006 +++ llvm/test/TableGen/DagIntSubst.ll Mon Apr 16 10:31:49 2007 @@ -1,4 +1,4 @@ -// RUN: tblgen %s | grep 'dag d = (X 13)' +// RUN: tblgen %s | grep {dag d = (X 13)} def X; class C { From reid at x10sys.com Mon Apr 16 10:32:58 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:58 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2005-01-17-CycleInDAG.ll 2005-12-03-IndirectTailCall.ll 2006-03-01-InstrSchedBug.ll 2006-05-08-InstrSched.ll 2007-01-13-StackPtrIndex.ll 2007-02-04-OrAddrMode.ll overlap-add.ll setuge.ll shift-one.ll trunc-to-bool.ll vec_shuffle-10.ll Message-ID: <200704161532.l3GFWwMK006328@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: 2005-01-17-CycleInDAG.ll updated: 1.3 -> 1.4 2005-12-03-IndirectTailCall.ll updated: 1.5 -> 1.6 2006-03-01-InstrSchedBug.ll updated: 1.2 -> 1.3 2006-05-08-InstrSched.ll updated: 1.5 -> 1.6 2007-01-13-StackPtrIndex.ll updated: 1.5 -> 1.6 2007-02-04-OrAddrMode.ll updated: 1.3 -> 1.4 overlap-add.ll updated: 1.6 -> 1.7 setuge.ll updated: 1.2 -> 1.3 shift-one.ll updated: 1.2 -> 1.3 trunc-to-bool.ll updated: 1.10 -> 1.11 vec_shuffle-10.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+18 -16) 2005-01-17-CycleInDAG.ll | 2 +- 2005-12-03-IndirectTailCall.ll | 2 +- 2006-03-01-InstrSchedBug.ll | 2 +- 2006-05-08-InstrSched.ll | 3 ++- 2007-01-13-StackPtrIndex.ll | 4 ++-- 2007-02-04-OrAddrMode.ll | 2 +- overlap-add.ll | 2 +- setuge.ll | 2 +- shift-one.ll | 2 +- trunc-to-bool.ll | 3 +-- vec_shuffle-10.ll | 10 ++++++---- 11 files changed, 18 insertions(+), 16 deletions(-) Index: llvm/test/CodeGen/X86/2005-01-17-CycleInDAG.ll diff -u llvm/test/CodeGen/X86/2005-01-17-CycleInDAG.ll:1.3 llvm/test/CodeGen/X86/2005-01-17-CycleInDAG.ll:1.4 --- llvm/test/CodeGen/X86/2005-01-17-CycleInDAG.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/2005-01-17-CycleInDAG.ll Mon Apr 16 10:31:49 2007 @@ -3,7 +3,7 @@ ; is invalid code (there is no correct way to order the instruction). Check ; that we do not fold the load into the sub. -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'sub.*GLOBAL' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep sub.*GLOBAL %GLOBAL = external global int Index: llvm/test/CodeGen/X86/2005-12-03-IndirectTailCall.ll diff -u llvm/test/CodeGen/X86/2005-12-03-IndirectTailCall.ll:1.5 llvm/test/CodeGen/X86/2005-12-03-IndirectTailCall.ll:1.6 --- llvm/test/CodeGen/X86/2005-12-03-IndirectTailCall.ll:1.5 Wed Feb 28 12:38:58 2007 +++ llvm/test/CodeGen/X86/2005-12-03-IndirectTailCall.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,5 @@ ; XFAIL: * -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'jmp \*ecx' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep {jmp \\*ecx} declare int %putchar(int) int %main(){ Index: llvm/test/CodeGen/X86/2006-03-01-InstrSchedBug.ll diff -u llvm/test/CodeGen/X86/2006-03-01-InstrSchedBug.ll:1.2 llvm/test/CodeGen/X86/2006-03-01-InstrSchedBug.ll:1.3 --- llvm/test/CodeGen/X86/2006-03-01-InstrSchedBug.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/2006-03-01-InstrSchedBug.ll Mon Apr 16 10:31:49 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'subl.*%esp' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep {subl.*%esp} int %f(int %a, int %b) { %tmp.2 = mul int %a, %a Index: llvm/test/CodeGen/X86/2006-05-08-InstrSched.ll diff -u llvm/test/CodeGen/X86/2006-05-08-InstrSched.ll:1.5 llvm/test/CodeGen/X86/2006-05-08-InstrSched.ll:1.6 --- llvm/test/CodeGen/X86/2006-05-08-InstrSched.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/2006-05-08-InstrSched.ll Mon Apr 16 10:31:49 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | not grep 'subl.*%esp' +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: llc -march=x86 -relocation-model=static | not grep {subl.*%esp} %A = external global ushort* %B = external global uint Index: llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll diff -u llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll:1.5 llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll:1.6 --- llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll:1.5 Tue Mar 27 21:38:26 2007 +++ llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-as < %s | llc -march=x86-64 -sched=none | grep leaq && -; RUN: llvm-as < %s | llc -march=x86-64 -sched=none | not grep ',%rsp)' +; RUN: llvm-as < %s | llc -march=x86-64 -sched=none | grep leaq +; RUN: llvm-as < %s | llc -march=x86-64 -sched=none | not grep {,%rsp)} ; PR1103 target datalayout = "e-p:64:64" Index: llvm/test/CodeGen/X86/2007-02-04-OrAddrMode.ll diff -u llvm/test/CodeGen/X86/2007-02-04-OrAddrMode.ll:1.3 llvm/test/CodeGen/X86/2007-02-04-OrAddrMode.ll:1.4 --- llvm/test/CodeGen/X86/2007-02-04-OrAddrMode.ll:1.3 Sun Apr 15 17:16:46 2007 +++ llvm/test/CodeGen/X86/2007-02-04-OrAddrMode.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llc -march=x86 | grep {orl \$1, %eax} -; RUN: llvm-as < %s | llc -march=x86 | grep {leal 3(,%eax,8)' +; RUN: llvm-as < %s | llc -march=x86 | grep {leal 3(,%eax,8)} ;; This example can't fold the or into an LEA. define i32 @test(float ** %tmp2, i32 %tmp12) { Index: llvm/test/CodeGen/X86/overlap-add.ll diff -u llvm/test/CodeGen/X86/overlap-add.ll:1.6 llvm/test/CodeGen/X86/overlap-add.ll:1.7 --- llvm/test/CodeGen/X86/overlap-add.ll:1.6 Mon Feb 5 04:09:41 2007 +++ llvm/test/CodeGen/X86/overlap-add.ll Mon Apr 16 10:31:49 2007 @@ -7,7 +7,7 @@ ; Check that the shift gets turned into an LEA. ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \ -; RUN: not grep 'mov E.X, E.X' +; RUN: not grep {mov E.X, E.X} ; FIXME: We need live variable information about flags to do this xform safely. :( ; XFAIL: * Index: llvm/test/CodeGen/X86/setuge.ll diff -u llvm/test/CodeGen/X86/setuge.ll:1.2 llvm/test/CodeGen/X86/setuge.ll:1.3 --- llvm/test/CodeGen/X86/setuge.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/setuge.ll Mon Apr 16 10:31:49 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'set' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep set declare bool %llvm.isunordered.f32(float, float) Index: llvm/test/CodeGen/X86/shift-one.ll diff -u llvm/test/CodeGen/X86/shift-one.ll:1.2 llvm/test/CodeGen/X86/shift-one.ll:1.3 --- llvm/test/CodeGen/X86/shift-one.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/shift-one.ll Mon Apr 16 10:31:49 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'leal' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep leal %x = external global int Index: llvm/test/CodeGen/X86/trunc-to-bool.ll diff -u llvm/test/CodeGen/X86/trunc-to-bool.ll:1.10 llvm/test/CodeGen/X86/trunc-to-bool.ll:1.11 --- llvm/test/CodeGen/X86/trunc-to-bool.ll:1.10 Thu Feb 1 20:16:22 2007 +++ llvm/test/CodeGen/X86/trunc-to-bool.ll Mon Apr 16 10:31:49 2007 @@ -1,8 +1,7 @@ ; An integer truncation to i1 should be done with an and instruction to make ; sure only the LSBit survives. Test that this is the case both for a returned ; value and as the operand of a branch. -; RUN: llvm-as < %s | llc -march=x86 && -; RUN: llvm-as < %s | llc -march=x86 | grep '\(and\)\|\(test.*\$1\)' | \ +; RUN: llvm-as < %s | llc -march=x86 | grep {\\(and\\)\\|\\(test.*\\\$1\\)} | \ ; RUN: wc -l | grep 6 define i1 @test1(i32 %X) zext { Index: llvm/test/CodeGen/X86/vec_shuffle-10.ll diff -u llvm/test/CodeGen/X86/vec_shuffle-10.ll:1.2 llvm/test/CodeGen/X86/vec_shuffle-10.ll:1.3 --- llvm/test/CodeGen/X86/vec_shuffle-10.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_shuffle-10.ll Mon Apr 16 10:31:49 2007 @@ -1,7 +1,9 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpcklps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpckhps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep 'sub.*esp' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ +; RUN: grep unpcklps | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ +; RUN: grep unpckhps | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ +; RUN: not grep {sub.*esp} void %test(<4 x float>* %res, <4 x float>* %A, <4 x float>* %B) { %tmp = load <4 x float>* %B ; <<4 x float>> [#uses=2] From reid at x10sys.com Mon Apr 16 10:32:58 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:58 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll logicaltest.ll Message-ID: <200704161532.l3GFWwbG006335@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/ConstProp: 2002-09-03-SetCC-Bools.ll updated: 1.4 -> 1.5 logicaltest.ll updated: 1.5 -> 1.6 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+4 -2) 2002-09-03-SetCC-Bools.ll | 3 ++- logicaltest.ll | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll diff -u llvm/test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll:1.4 llvm/test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll:1.5 --- llvm/test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll:1.4 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll Mon Apr 16 10:31:49 2007 @@ -1,6 +1,7 @@ ; SetCC on boolean values was not implemented! -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep 'set' +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | \ +; RUN: not grep set bool "test1"() { %A = setle bool true, false Index: llvm/test/Transforms/ConstProp/logicaltest.ll diff -u llvm/test/Transforms/ConstProp/logicaltest.ll:1.5 llvm/test/Transforms/ConstProp/logicaltest.ll:1.6 --- llvm/test/Transforms/ConstProp/logicaltest.ll:1.5 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/ConstProp/logicaltest.ll Mon Apr 16 10:31:49 2007 @@ -1,6 +1,7 @@ ; Ensure constant propogation of logical instructions is working correctly. -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not egrep 'and|or|xor' +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | \ +; RUN: not egrep {and|or|xor} int "test1"() { %R = and int 4,1234 ret int %R } From reid at x10sys.com Mon Apr 16 10:32:59 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:59 -0500 Subject: [llvm-commits] CVS: llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx 2003-04-15-ConstantInitAssertion.llx 2003-12-30-TypeMapInvalidMemory.llx ConstantExprFold.llx Message-ID: <200704161532.l3GFWxAE006357@zion.cs.uiuc.edu> Changes in directory llvm/test/Assembler: 2002-07-25-ParserAssertionFailure.llx updated: 1.5 -> 1.6 2003-04-15-ConstantInitAssertion.llx updated: 1.5 -> 1.6 2003-12-30-TypeMapInvalidMemory.llx updated: 1.10 -> 1.11 ConstantExprFold.llx updated: 1.6 -> 1.7 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+4 -5) 2002-07-25-ParserAssertionFailure.llx | 2 +- 2003-04-15-ConstantInitAssertion.llx | 2 +- 2003-12-30-TypeMapInvalidMemory.llx | 2 +- ConstantExprFold.llx | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) Index: llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx diff -u llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx:1.5 llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx:1.6 --- llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx:1.5 Mon Apr 16 10:00:39 2007 +++ llvm/test/Assembler/2002-07-25-ParserAssertionFailure.llx Mon Apr 16 10:31:48 2007 @@ -1,6 +1,6 @@ ; Make sure we don't get an assertion failure, even though this is a parse ; error -; RUN: llvm-as < %s -o /dev/null -f |& grep 'No arguments' +; RUN: llvm-as < %s -o /dev/null -f |& grep {No arguments} %ty = type void (i32) Index: llvm/test/Assembler/2003-04-15-ConstantInitAssertion.llx diff -u llvm/test/Assembler/2003-04-15-ConstantInitAssertion.llx:1.5 llvm/test/Assembler/2003-04-15-ConstantInitAssertion.llx:1.6 --- llvm/test/Assembler/2003-04-15-ConstantInitAssertion.llx:1.5 Mon Apr 16 10:00:39 2007 +++ llvm/test/Assembler/2003-04-15-ConstantInitAssertion.llx Mon Apr 16 10:31:48 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s >/dev/null |& grep "Expected type 'i32' for element #0" +; RUN: llvm-as < %s >/dev/null |& grep {Expected type 'i32' for element #0} ; Test the case of a misformed constant initializer ; This should cause an assembler error, not an assertion failure! constant { i32 } { float 1.0 } Index: llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx diff -u llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.10 llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.11 --- llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.10 Mon Apr 16 10:00:39 2007 +++ llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx Mon Apr 16 10:31:48 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f |& grep 'Undefined type remains' +; RUN: llvm-as < %s -o /dev/null -f |& grep {Undefined type remains} ; END. @d_reduction_0_dparser_gram = global { Index: llvm/test/Assembler/ConstantExprFold.llx diff -u llvm/test/Assembler/ConstantExprFold.llx:1.6 llvm/test/Assembler/ConstantExprFold.llx:1.7 --- llvm/test/Assembler/ConstantExprFold.llx:1.6 Sat Dec 2 14:34:08 2006 +++ llvm/test/Assembler/ConstantExprFold.llx Mon Apr 16 10:31:48 2007 @@ -1,8 +1,7 @@ ; This test checks to make sure that constant exprs fold in some simple ; situations -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep '(' && -; RUN: llvm-upgrade < %s | llvm-as +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep {(} %A = global long 0 From reid at x10sys.com Mon Apr 16 10:32:59 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:59 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Alpha/ctpop.ll Message-ID: <200704161532.l3GFWxvI006349@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Alpha: ctpop.ll updated: 1.10 -> 1.11 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+1 -1) ctpop.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CodeGen/Alpha/ctpop.ll diff -u llvm/test/CodeGen/Alpha/ctpop.ll:1.10 llvm/test/CodeGen/Alpha/ctpop.ll:1.11 --- llvm/test/CodeGen/Alpha/ctpop.ll:1.10 Sun Apr 15 22:18:25 2007 +++ llvm/test/CodeGen/Alpha/ctpop.ll Mon Apr 16 10:31:48 2007 @@ -7,7 +7,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev56 | \ ; RUN: not grep -i ctpop ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | \ -; RUN: not grep -i 'ctpop' +; RUN: not grep -i ctpop ; XFAIL: * declare long %llvm.ctpop.i64(long) From reid at x10sys.com Mon Apr 16 10:33:00 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:33:00 -0500 Subject: [llvm-commits] CVS: llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp 2007-01-06-ELF-Thunk-Sections.cpp Message-ID: <200704161533.l3GFX0is006381@zion.cs.uiuc.edu> Changes in directory llvm/test/C++Frontend: 2005-01-03-StaticInitializers.cpp updated: 1.2 -> 1.3 2007-01-06-ELF-Thunk-Sections.cpp updated: 1.3 -> 1.4 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+2 -3) 2005-01-03-StaticInitializers.cpp | 2 +- 2007-01-06-ELF-Thunk-Sections.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp diff -u llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp:1.2 llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp:1.3 --- llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp:1.2 Sat Feb 19 01:31:54 2005 +++ llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp Mon Apr 16 10:31:48 2007 @@ -1,4 +1,4 @@ -// RUN: %llvmgxx %s -S -o - | not grep 'llvm.global_ctor' +// RUN: %llvmgxx %s -S -o - | not grep llvm.global_ctor struct S { int A[2]; Index: llvm/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp diff -u llvm/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp:1.3 llvm/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp:1.4 --- llvm/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp:1.3 Mon Jan 8 18:05:55 2007 +++ llvm/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp Mon Apr 16 10:31:48 2007 @@ -1,5 +1,4 @@ -// RUN: %llvmgxx %s -emit-llvm -S -o - && -// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep 'gnu.linkonce.' +// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep gnu.linkonce. // PR1085 class From reid at x10sys.com Mon Apr 16 10:32:59 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:59 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll and-imm.ll small-arguments.ll Message-ID: <200704161532.l3GFWxBH006371@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: 2004-12-12-ZeroSizeCommon.ll updated: 1.2 -> 1.3 and-imm.ll updated: 1.3 -> 1.4 small-arguments.ll updated: 1.9 -> 1.10 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+3 -4) 2004-12-12-ZeroSizeCommon.ll | 2 +- and-imm.ll | 2 +- small-arguments.ll | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) Index: llvm/test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll diff -u llvm/test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll:1.2 llvm/test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll:1.3 --- llvm/test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll Mon Apr 16 10:31:49 2007 @@ -1,3 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep '.comm.*X,0' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep .comm.*X,0 %X = linkonce global {} {} Index: llvm/test/CodeGen/PowerPC/and-imm.ll diff -u llvm/test/CodeGen/PowerPC/and-imm.ll:1.3 llvm/test/CodeGen/PowerPC/and-imm.ll:1.4 --- llvm/test/CodeGen/PowerPC/and-imm.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/and-imm.ll Mon Apr 16 10:31:49 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'ori\|lis' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep {ori\\|lis} int %test(int %X) { %Y = and int %X, 32769 ; andi. r3, r3, 32769 Index: llvm/test/CodeGen/PowerPC/small-arguments.ll diff -u llvm/test/CodeGen/PowerPC/small-arguments.ll:1.9 llvm/test/CodeGen/PowerPC/small-arguments.ll:1.10 --- llvm/test/CodeGen/PowerPC/small-arguments.ll:1.9 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/PowerPC/small-arguments.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -march=ppc32 && -; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'extsh\|rlwinm' +; RUN: llvm-as < %s | llc -march=ppc32 | not grep {extsh\\|rlwinm} declare i16 @foo() sext From reid at x10sys.com Mon Apr 16 10:32:59 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:59 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/IndVarsSimplify/2003-12-10-IndVarDeadCode.ll Message-ID: <200704161532.l3GFWxNP006368@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/IndVarsSimplify: 2003-12-10-IndVarDeadCode.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+2 -1) 2003-12-10-IndVarDeadCode.ll | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/test/Transforms/IndVarsSimplify/2003-12-10-IndVarDeadCode.ll diff -u llvm/test/Transforms/IndVarsSimplify/2003-12-10-IndVarDeadCode.ll:1.2 llvm/test/Transforms/IndVarsSimplify/2003-12-10-IndVarDeadCode.ll:1.3 --- llvm/test/Transforms/IndVarsSimplify/2003-12-10-IndVarDeadCode.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/IndVarsSimplify/2003-12-10-IndVarDeadCode.ll Mon Apr 16 10:31:49 2007 @@ -1,7 +1,8 @@ ; The induction variable canonicalization pass shouldn't leave dead ; instructions laying around! ; -; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | not grep '#uses=0' +; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | \ +; RUN: not grep {#uses=0} int %mul(int %x, int %y) { entry: From reid at x10sys.com Mon Apr 16 10:32:59 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 10:32:59 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopStrengthReduce/invariant_value_first.ll invariant_value_first_arg.ll variable_stride.ll Message-ID: <200704161532.l3GFWxqi006344@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LoopStrengthReduce: invariant_value_first.ll updated: 1.2 -> 1.3 invariant_value_first_arg.ll updated: 1.2 -> 1.3 variable_stride.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Fix syntax of tests to ensure grep pattern is properly quoted. --- Diffs of the changes: (+5 -3) invariant_value_first.ll | 3 ++- invariant_value_first_arg.ll | 3 ++- variable_stride.ll | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/test/Transforms/LoopStrengthReduce/invariant_value_first.ll diff -u llvm/test/Transforms/LoopStrengthReduce/invariant_value_first.ll:1.2 llvm/test/Transforms/LoopStrengthReduce/invariant_value_first.ll:1.3 --- llvm/test/Transforms/LoopStrengthReduce/invariant_value_first.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/LoopStrengthReduce/invariant_value_first.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Check that the index of 'P[outer]' is pulled out of the loop. -; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'getelementptr.*%outer.*%INDVAR' +; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | \ +; RUN: not grep {getelementptr.*%outer.*%INDVAR} declare bool %pred() declare int %foo() Index: llvm/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll diff -u llvm/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll:1.2 llvm/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll:1.3 --- llvm/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,6 @@ ; Check that the index of 'P[outer]' is pulled out of the loop. -; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'getelementptr.*%outer.*%INDVAR' +; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | \ +; RUN: not grep {getelementptr.*%outer.*%INDVAR} declare bool %pred() Index: llvm/test/Transforms/LoopStrengthReduce/variable_stride.ll diff -u llvm/test/Transforms/LoopStrengthReduce/variable_stride.ll:1.2 llvm/test/Transforms/LoopStrengthReduce/variable_stride.ll:1.3 --- llvm/test/Transforms/LoopStrengthReduce/variable_stride.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/LoopStrengthReduce/variable_stride.ll Mon Apr 16 10:31:49 2007 @@ -1,5 +1,5 @@ ; Check that variable strides are reduced to adds instead of multiplies. -; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'mul' +; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep mul declare bool %pred(int) From baldrick at free.fr Mon Apr 16 10:37:21 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 16 Apr 2007 10:37:21 -0500 Subject: [llvm-commits] CVS: llvm/test/lib/llvm.exp Message-ID: <200704161537.l3GFbL9f006478@zion.cs.uiuc.edu> Changes in directory llvm/test/lib: llvm.exp updated: 1.13 -> 1.14 --- Log message: Change ne into !=. --- Diffs of the changes: (+1 -1) llvm.exp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/lib/llvm.exp diff -u llvm/test/lib/llvm.exp:1.13 llvm/test/lib/llvm.exp:1.14 --- llvm/test/lib/llvm.exp:1.13 Sun Apr 15 15:43:36 2007 +++ llvm/test/lib/llvm.exp Mon Apr 16 10:37:00 2007 @@ -12,7 +12,7 @@ switch "$code" { CHILDSTATUS { set status [lindex $::errorCode 2] - if { $status ne 0 } { + if { $status != 0 } { set resultmsg "$test: exit($status)$errmsg" } } From clattner at apple.com Mon Apr 16 11:00:44 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 16 Apr 2007 09:00:44 -0700 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Function.cpp In-Reply-To: <200704160655.l3G6t5uT017955@zion.cs.uiuc.edu> References: <200704160655.l3G6t5uT017955@zion.cs.uiuc.edu> Message-ID: <25B9A059-E8D6-443A-9755-894A5D5950EC@apple.com> > -unsigned Function::getIntrinsicID() const { > +unsigned Function::getIntrinsicID(bool noAssert) const { > const ValueName *ValName = this->getValueName(); > unsigned Len = ValName->getKeyLength(); > const char *Name = ValName->getKeyData(); > > - if (Len < 5 || Name[4] != '.' || Name[0] != 'l' || Name[1] != 'l' > + if (Len <= 5 || Name[4] != '.' || Name[0] != 'l' || Name[1] != 'l' I don't think this is right. It will incorrectly return 0 for "llvm." even if noAssert is false. -Chris > || Name[2] != 'v' || Name[3] != 'm') > return 0; // All intrinsics start with 'llvm.' > > - assert(Len != 5 && "'llvm.' is an invalid intrinsic name!"); > + assert((Len != 5 || noAssert) && "'llvm.' is an invalid > intrinsic name!"); > > #define GET_FUNCTION_RECOGNIZER > #include "llvm/Intrinsics.gen" > #undef GET_FUNCTION_RECOGNIZER > + assert(noAssert && "Invalid LLVM intrinsic name"); > return 0; > } > > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Mon Apr 16 11:02:06 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 16 Apr 2007 09:02:06 -0700 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y In-Reply-To: <200704160656.l3G6u3KV017978@zion.cs.uiuc.edu> References: <200704160656.l3G6u3KV017978@zion.cs.uiuc.edu> Message-ID: <4A69B547-A9B7-4E19-B29B-1BC6DB6F6068@apple.com> > + // Check for call to invalid intrinsic to avoid crashing later. > + if (Function *theF = dyn_cast(V)) { > + if (theF->hasName() && 0 == strncmp(theF->getName().c_str(), > "llvm.", 5)&& Please don't use getName().c_str(). This requires construction of a temporary std::string (i.e. heap traffic). Instead, plz use Value::getValueName() etc. -Chris > + !theF->getIntrinsicID(true)) > + GEN_ERROR("Call to invalid LLVM intrinsic function '" + > + theF->getName() + "'"); > + } > + > // Check the arguments > ValueList Args; > if ($6->empty()) { // Has no > arguments? > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From baldrick at free.fr Mon Apr 16 11:06:39 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 16 Apr 2007 11:06:39 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c Message-ID: <200704161606.l3GG6dYS007204@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2004-11-27-StaticFunctionRedeclare.c updated: 1.2 -> 1.3 --- Log message: Use %s, not explicit name. --- Diffs of the changes: (+1 -1) 2004-11-27-StaticFunctionRedeclare.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c diff -u llvm/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c:1.2 llvm/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c:1.3 --- llvm/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c:1.2 Sun Apr 15 15:08:37 2007 +++ llvm/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c Mon Apr 16 11:06:17 2007 @@ -1,4 +1,4 @@ -// RUN: %llvmgcc -c -emit-llvm 2004-11-27-StaticFunctionRedeclare.c -o - | \ +// RUN: %llvmgcc -c -emit-llvm %s -o - | \ // RUN: opt -std-compile-opts | llvm-dis | not grep {declare int.*func} // There should not be an unresolved reference to func here. Believe it or not, From lauro.venancio at gmail.com Mon Apr 16 11:39:03 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Mon, 16 Apr 2007 11:39:03 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Threads/Makefile tls.c Message-ID: <200704161639.l3GGd3KI008369@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Threads: Makefile added (r1.1) tls.c added (r1.1) --- Log message: Move TLS test to Threads directory. --- Diffs of the changes: (+27 -0) Makefile | 7 +++++++ tls.c | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+) Index: llvm-test/SingleSource/UnitTests/Threads/Makefile diff -c /dev/null llvm-test/SingleSource/UnitTests/Threads/Makefile:1.1 *** /dev/null Mon Apr 16 11:38:41 2007 --- llvm-test/SingleSource/UnitTests/Threads/Makefile Mon Apr 16 11:38:31 2007 *************** *** 0 **** --- 1,7 ---- + # SingleSource/UnitTests/Threads/Makefile + LEVEL = ../../.. + + include $(LEVEL)/Makefile.config + LDFLAGS += -lpthread + + include $(LEVEL)/SingleSource/Makefile.singlesrc Index: llvm-test/SingleSource/UnitTests/Threads/tls.c diff -c /dev/null llvm-test/SingleSource/UnitTests/Threads/tls.c:1.1 *** /dev/null Mon Apr 16 11:39:03 2007 --- llvm-test/SingleSource/UnitTests/Threads/tls.c Mon Apr 16 11:38:31 2007 *************** *** 0 **** --- 1,20 ---- + #include + #include + + void *f(void *a){ + static __thread int i = 1; + i++; + return (void *)i; + } + + int main() { + pthread_t t; + int ret; + pthread_create(&t, NULL, f, NULL); + pthread_join(t, (void **) &ret); + printf("Thread 1: %d\n",ret); + pthread_create(&t, NULL, f, NULL); + pthread_join(t, (void **) &ret); + printf("Thread 2: %d\n",ret); + return 0; + } From lauro.venancio at gmail.com Mon Apr 16 11:39:03 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Mon, 16 Apr 2007 11:39:03 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Makefile tls.c Message-ID: <200704161639.l3GGd3lR008375@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests: Makefile updated: 1.15 -> 1.16 tls.c (r1.1) removed --- Log message: Move TLS test to Threads directory. --- Diffs of the changes: (+1 -2) Makefile | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm-test/SingleSource/UnitTests/Makefile diff -u llvm-test/SingleSource/UnitTests/Makefile:1.15 llvm-test/SingleSource/UnitTests/Makefile:1.16 --- llvm-test/SingleSource/UnitTests/Makefile:1.15 Wed Apr 11 13:56:46 2007 +++ llvm-test/SingleSource/UnitTests/Makefile Mon Apr 16 11:38:31 2007 @@ -13,8 +13,7 @@ DIRS += Vector endif -DIRS += SignlessTypes +DIRS += SignlessTypes Threads -LDFLAGS += -lpthread PROGRAM_REQUIRED_TO_EXIT_OK := 1 include $(LEVEL)/SingleSource/Makefile.singlesrc From clattner at apple.com Mon Apr 16 11:42:59 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 16 Apr 2007 09:42:59 -0700 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Threads/Makefile tls.c In-Reply-To: <200704161639.l3GGd3KI008369@zion.cs.uiuc.edu> References: <200704161639.l3GGd3KI008369@zion.cs.uiuc.edu> Message-ID: <8291BD0F-48E3-44CE-88A7-E4BC92541A81@apple.com> Thanks Lauro! -Chris On Apr 16, 2007, at 9:39 AM, Lauro Ramos Venancio wrote: > > > Changes in directory llvm-test/SingleSource/UnitTests/Threads: > > Makefile added (r1.1) > tls.c added (r1.1) > --- > Log message: > > Move TLS test to Threads directory. > > > --- > Diffs of the changes: (+27 -0) > > Makefile | 7 +++++++ > tls.c | 20 ++++++++++++++++++++ > 2 files changed, 27 insertions(+) > > > Index: llvm-test/SingleSource/UnitTests/Threads/Makefile > diff -c /dev/null llvm-test/SingleSource/UnitTests/Threads/Makefile: > 1.1 > *** /dev/null Mon Apr 16 11:38:41 2007 > --- llvm-test/SingleSource/UnitTests/Threads/Makefile Mon Apr 16 > 11:38:31 2007 > *************** > *** 0 **** > --- 1,7 ---- > + # SingleSource/UnitTests/Threads/Makefile > + LEVEL = ../../.. > + > + include $(LEVEL)/Makefile.config > + LDFLAGS += -lpthread > + > + include $(LEVEL)/SingleSource/Makefile.singlesrc > > > Index: llvm-test/SingleSource/UnitTests/Threads/tls.c > diff -c /dev/null llvm-test/SingleSource/UnitTests/Threads/tls.c:1.1 > *** /dev/null Mon Apr 16 11:39:03 2007 > --- llvm-test/SingleSource/UnitTests/Threads/tls.c Mon Apr 16 > 11:38:31 2007 > *************** > *** 0 **** > --- 1,20 ---- > + #include > + #include > + > + void *f(void *a){ > + static __thread int i = 1; > + i++; > + return (void *)i; > + } > + > + int main() { > + pthread_t t; > + int ret; > + pthread_create(&t, NULL, f, NULL); > + pthread_join(t, (void **) &ret); > + printf("Thread 1: %d\n",ret); > + pthread_create(&t, NULL, f, NULL); > + pthread_join(t, (void **) &ret); > + printf("Thread 2: %d\n",ret); > + return 0; > + } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From baldrick at free.fr Mon Apr 16 11:45:33 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 16 Apr 2007 11:45:33 -0500 Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200704161645.l3GGjXcK008520@zion.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.99 -> 1.100 --- Log message: Look for site.exp in the build directory, not the source directory. --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.99 llvm/test/Makefile:1.100 --- llvm/test/Makefile:1.99 Sun Apr 15 14:27:27 2007 +++ llvm/test/Makefile Mon Apr 16 11:45:12 2007 @@ -48,7 +48,7 @@ SUBDIR := $(shell dirname $(CLEANED_TESTONE)) TESTPATH := $(LLVM_SRC_ROOT)/test/$(CLEANED_TESTONE) check-one: site.exp $(TCLSH) - $(Verb)( echo "source $(LLVM_SRC_ROOT)/test/site.exp" ; \ + $(Verb)( echo "source $(LLVM_OBJ_ROOT)/test/site.exp" ; \ echo "set subdir $(SUBDIR)" ; \ echo "proc pass { msg } { puts \"PASS: \$$msg\" } "; \ echo "proc fail { msg } { puts \"FAIL: \$$msg\" }" ; \ From reid at x10sys.com Mon Apr 16 11:57:15 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 11:57:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Message-ID: <200704161657.l3GGvFdC008922@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Function.cpp updated: 1.120 -> 1.121 --- Log message: Don't return 0 if the len == 5, let the assert handle that case. Thanks, Chris. --- Diffs of the changes: (+1 -1) Function.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.120 llvm/lib/VMCore/Function.cpp:1.121 --- llvm/lib/VMCore/Function.cpp:1.120 Mon Apr 16 02:08:44 2007 +++ llvm/lib/VMCore/Function.cpp Mon Apr 16 11:56:54 2007 @@ -231,7 +231,7 @@ unsigned Len = ValName->getKeyLength(); const char *Name = ValName->getKeyData(); - if (Len <= 5 || Name[4] != '.' || Name[0] != 'l' || Name[1] != 'l' + if (Len < 5 || Name[4] != '.' || Name[0] != 'l' || Name[1] != 'l' || Name[2] != 'v' || Name[3] != 'm') return 0; // All intrinsics start with 'llvm.' From lauro.venancio at gmail.com Mon Apr 16 11:58:08 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Mon, 16 Apr 2007 11:58:08 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/align.ll Message-ID: <200704161658.l3GGw81j008947@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: align.ll updated: 1.4 -> 1.5 --- Log message: Fix align test. --- Diffs of the changes: (+2 -3) align.ll | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/test/CodeGen/ARM/align.ll diff -u llvm/test/CodeGen/ARM/align.ll:1.4 llvm/test/CodeGen/ARM/align.ll:1.5 --- llvm/test/CodeGen/ARM/align.ll:1.4 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/ARM/align.ll Mon Apr 16 11:57:47 2007 @@ -1,12 +1,11 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ ; RUN: grep align.*1 | wc | grep 1 -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux | \ +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux-gnueabi | \ ; RUN: grep align.*2 | wc | grep 2 -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux | \ +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux-gnueabi | \ ; RUN: grep align.*3 | wc | grep 2 ; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin | \ ; RUN: grep align.*2 | wc | grep 4 -; XFAIL: * %a = global bool true %b = global sbyte 1 From reid at x10sys.com Mon Apr 16 12:00:52 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:00:52 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704161700.l3GH0qYS009088@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.109 -> 1.110 --- Log message: Add Raju Subbian. --- Diffs of the changes: (+4 -4) DevMtgMay2007.html | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.109 llvm-www/DevMtgMay2007.html:1.110 --- llvm-www/DevMtgMay2007.html:1.109 Fri Apr 13 22:59:36 2007 +++ llvm-www/DevMtgMay2007.html Mon Apr 16 12:00:32 2007 @@ -327,6 +327,7 @@ Alex RosenbergSony Mark SchimmelWind River Reid SpencerIndependent + Raju SubbianWind River Mark ThomasAerospace Sarah ThompsonNASA, Ames Research Center Bill WendlingApple Inc. @@ -335,16 +336,15 @@ -

Total confirmed: 36

+

Total confirmed: 37

-
Unconfirmed Attendees
NameOrganization
Lang HamesUniversity of Sydney
Michael McCrackenUCSD, Ph.D. Candidate
Unconfirmed 1Wind River
Unconfirmed 1NASA, Ames
-

Total unconfirmed: 4

+

Total unconfirmed: 3

@@ -354,6 +354,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
Last modified: $Date: 2007/04/14 03:59:36 $ +
Last modified: $Date: 2007/04/16 17:00:32 $ From lauro.venancio at gmail.com Mon Apr 16 12:08:27 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Mon, 16 Apr 2007 12:08:27 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/hello.ll Message-ID: <200704161708.l3GH8R8k009311@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: hello.ll updated: 1.6 -> 1.7 --- Log message: Fix hello.ll test. --- Diffs of the changes: (+3 -3) hello.ll | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/CodeGen/ARM/hello.ll diff -u llvm/test/CodeGen/ARM/hello.ll:1.6 llvm/test/CodeGen/ARM/hello.ll:1.7 --- llvm/test/CodeGen/ARM/hello.ll:1.6 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/ARM/hello.ll Mon Apr 16 12:08:00 2007 @@ -1,8 +1,8 @@ ; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -mtriple=arm-linux | grep mov | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -mtriple=arm-linux --disable-fp-elim | grep mov | wc -l | grep 2 +; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnueabi | grep mov | wc -l | grep 1 +; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnu --disable-fp-elim | grep mov \ +; RUN: | wc -l | grep 3 ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep mov | wc -l | grep 2 -; XFAIL: * @str = internal constant [12 x i8] c"Hello World\00" From reid at x10sys.com Mon Apr 16 12:38:07 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:07 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2006-01-13-Includes.c Message-ID: <200704161738.l3GHc7fm010238@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2006-01-13-Includes.c updated: 1.7 -> 1.8 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+1 -1) 2006-01-13-Includes.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CFrontend/2006-01-13-Includes.c diff -u llvm/test/CFrontend/2006-01-13-Includes.c:1.7 llvm/test/CFrontend/2006-01-13-Includes.c:1.8 --- llvm/test/CFrontend/2006-01-13-Includes.c:1.7 Fri Feb 9 09:15:21 2007 +++ llvm/test/CFrontend/2006-01-13-Includes.c Mon Apr 16 12:36:06 2007 @@ -1,5 +1,5 @@ // RUN: %llvmgcc %s -g -S -o - | llvm-as | opt -std-compile-opts | \ -// RUN: llvm-dis | grep "test/CFrontend" +// RUN: llvm-dis | grep {test/CFrontend} // PR676 #include From reid at x10sys.com Mon Apr 16 12:38:08 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:08 -0500 Subject: [llvm-commits] CVS: llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx 2003-05-21-MalformedStructCrash.llx Message-ID: <200704161738.l3GHc8ZD010245@zion.cs.uiuc.edu> Changes in directory llvm/test/Assembler: 2003-05-21-MalformedShiftCrash.llx updated: 1.7 -> 1.8 2003-05-21-MalformedStructCrash.llx updated: 1.6 -> 1.7 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+2 -2) 2003-05-21-MalformedShiftCrash.llx | 2 +- 2003-05-21-MalformedStructCrash.llx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx diff -u llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx:1.7 llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx:1.8 --- llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx:1.7 Mon Apr 16 10:00:39 2007 +++ llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: llvm-as < %s > /dev/null |& grep "Logical operator requires integral" +; RUN: llvm-as < %s > /dev/null |& grep {Logical operator requires integral} global i32 ashr (float 1.0, float 2.0) Index: llvm/test/Assembler/2003-05-21-MalformedStructCrash.llx diff -u llvm/test/Assembler/2003-05-21-MalformedStructCrash.llx:1.6 llvm/test/Assembler/2003-05-21-MalformedStructCrash.llx:1.7 --- llvm/test/Assembler/2003-05-21-MalformedStructCrash.llx:1.6 Mon Apr 16 10:00:39 2007 +++ llvm/test/Assembler/2003-05-21-MalformedStructCrash.llx Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: llvm-as < %s > /dev/null |& grep "Illegal number of init" +; RUN: llvm-as < %s > /dev/null |& grep {Illegal number of init} global {} { i32 7, float 1.0, i32 7, i32 8 } From reid at x10sys.com Mon Apr 16 12:38:09 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:09 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/GCSE/vectorops.ll Message-ID: <200704161738.l3GHc9mi010254@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/GCSE: vectorops.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+2 -2) vectorops.ll | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Transforms/GCSE/vectorops.ll diff -u llvm/test/Transforms/GCSE/vectorops.ll:1.2 llvm/test/Transforms/GCSE/vectorops.ll:1.3 --- llvm/test/Transforms/GCSE/vectorops.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/GCSE/vectorops.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -gcse -instcombine -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -gcse -instcombine | llvm-dis | not grep sub +; RUN: llvm-upgrade < %s | llvm-as | opt -gcse -instcombine | \ +; RUN: llvm-dis | not grep sub uint %test_extractelement(<4 x uint> %V) { %R = extractelement <4 x uint> %V, uint 1 From reid at x10sys.com Mon Apr 16 12:38:09 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:09 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/2006-07-03-schedulers.ll 2006-11-06-MemIntrinsicExpand.ll 2007-04-14-BitTestsBadMask.ll fpowi-promote.ll switch-lower-feature-2.ll switch-lower-feature.ll vector-identity-shuffle.ll vector.ll Message-ID: <200704161738.l3GHc9oj010269@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: 2006-07-03-schedulers.ll updated: 1.3 -> 1.4 2006-11-06-MemIntrinsicExpand.ll updated: 1.3 -> 1.4 2007-04-14-BitTestsBadMask.ll updated: 1.3 -> 1.4 fpowi-promote.ll updated: 1.1 -> 1.2 switch-lower-feature-2.ll updated: 1.2 -> 1.3 switch-lower-feature.ll updated: 1.3 -> 1.4 vector-identity-shuffle.ll updated: 1.4 -> 1.5 vector.ll updated: 1.12 -> 1.13 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+29 -29) 2006-07-03-schedulers.ll | 12 ++++++------ 2006-11-06-MemIntrinsicExpand.ll | 1 - 2007-04-14-BitTestsBadMask.ll | 2 +- fpowi-promote.ll | 2 +- switch-lower-feature-2.ll | 19 ++++++++++--------- switch-lower-feature.ll | 8 ++++---- vector-identity-shuffle.ll | 4 ++-- vector.ll | 10 +++++----- 8 files changed, 29 insertions(+), 29 deletions(-) Index: llvm/test/CodeGen/Generic/2006-07-03-schedulers.ll diff -u llvm/test/CodeGen/Generic/2006-07-03-schedulers.ll:1.3 llvm/test/CodeGen/Generic/2006-07-03-schedulers.ll:1.4 --- llvm/test/CodeGen/Generic/2006-07-03-schedulers.ll:1.3 Sat Dec 2 14:38:10 2006 +++ llvm/test/CodeGen/Generic/2006-07-03-schedulers.ll Mon Apr 16 12:36:06 2007 @@ -1,9 +1,9 @@ -; RUN: llvm-upgrade %s | llvm-as | llc -sched=none && -; RUN: llvm-upgrade %s | llvm-as | llc -sched=default && -; RUN: llvm-upgrade %s | llvm-as | llc -sched=simple && -; RUN: llvm-upgrade %s | llvm-as | llc -sched=simple-noitin && -; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-td && -; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-tdrr && +; RUN: llvm-upgrade %s | llvm-as | llc -sched=none +; RUN: llvm-upgrade %s | llvm-as | llc -sched=default +; RUN: llvm-upgrade %s | llvm-as | llc -sched=simple +; RUN: llvm-upgrade %s | llvm-as | llc -sched=simple-noitin +; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-td +; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-tdrr ; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-burr ; PR859 Index: llvm/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll diff -u llvm/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll:1.3 llvm/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll:1.4 --- llvm/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep adc ; PR987 Index: llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll diff -u llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll:1.3 llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll:1.4 --- llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll:1.3 Mon Apr 16 10:31:48 2007 +++ llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 | grep 8388635 && +; RUN: llvm-as < %s | llc -march=x86 | grep 8388635 ; RUN: llvm-as < %s | llc -march=x86-64 | grep 4294981120 ; PR 1325 Index: llvm/test/CodeGen/Generic/fpowi-promote.ll diff -u llvm/test/CodeGen/Generic/fpowi-promote.ll:1.1 llvm/test/CodeGen/Generic/fpowi-promote.ll:1.2 --- llvm/test/CodeGen/Generic/fpowi-promote.ll:1.1 Sat Mar 3 17:42:50 2007 +++ llvm/test/CodeGen/Generic/fpowi-promote.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc && +; RUN: llvm-as < %s | llc ; RUN: llvm-as < %s | llc -march=x86 -mcpu=i386 ; PR1239 Index: llvm/test/CodeGen/Generic/switch-lower-feature-2.ll diff -u llvm/test/CodeGen/Generic/switch-lower-feature-2.ll:1.2 llvm/test/CodeGen/Generic/switch-lower-feature-2.ll:1.3 --- llvm/test/CodeGen/Generic/switch-lower-feature-2.ll:1.2 Thu Apr 5 11:43:09 2007 +++ llvm/test/CodeGen/Generic/switch-lower-feature-2.ll Mon Apr 16 12:36:06 2007 @@ -1,12 +1,13 @@ -; RUN: llvm-as < %s | llc -march=x86 -o - | grep jb | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep \$6 | wc -l | grep 2 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep 1024 | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep 1023 | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep 119 | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep JTI | wc -l | grep 2 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep jg | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep ja | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep js | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=x86 -o %t -f +; RUN: grep jb %t | wc -l | grep 1 +; RUN: grep \\\$6 %t | wc -l | grep 2 +; RUN: grep 1024 %t | wc -l | grep 1 +; RUN: grep 1023 %t | wc -l | grep 1 +; RUN: grep 119 %t | wc -l | grep 1 +; RUN: grep JTI %t | wc -l | grep 2 +; RUN: grep jg %t | wc -l | grep 1 +; RUN: grep ja %t | wc -l | grep 1 +; RUN: grep js %t | wc -l | grep 1 target triple = "i686-pc-linux-gnu" Index: llvm/test/CodeGen/Generic/switch-lower-feature.ll diff -u llvm/test/CodeGen/Generic/switch-lower-feature.ll:1.3 llvm/test/CodeGen/Generic/switch-lower-feature.ll:1.4 --- llvm/test/CodeGen/Generic/switch-lower-feature.ll:1.3 Mon Apr 9 07:31:58 2007 +++ llvm/test/CodeGen/Generic/switch-lower-feature.ll Mon Apr 16 12:36:06 2007 @@ -1,7 +1,7 @@ -; RUN: llvm-as < %s | llc -march=x86 -o - | grep \$7 | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep \$6 | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep 1024 | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=x86 -o - | grep jb | wc -l | grep 2 && +; RUN: llvm-as < %s | llc -march=x86 -o - | grep \$7 | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=x86 -o - | grep \$6 | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=x86 -o - | grep 1024 | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=x86 -o - | grep jb | wc -l | grep 2 ; RUN: llvm-as < %s | llc -march=x86 -o - | grep je | wc -l | grep 1 define i32 @main(i32 %tmp158) { Index: llvm/test/CodeGen/Generic/vector-identity-shuffle.ll diff -u llvm/test/CodeGen/Generic/vector-identity-shuffle.ll:1.4 llvm/test/CodeGen/Generic/vector-identity-shuffle.ll:1.5 --- llvm/test/CodeGen/Generic/vector-identity-shuffle.ll:1.4 Fri Dec 22 16:48:44 2006 +++ llvm/test/CodeGen/Generic/vector-identity-shuffle.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep test: && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vperm && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep test: +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vperm ; RUN: llvm-upgrade < %s | llvm-as | llc void %test(<4 x float> *%tmp2.i) { Index: llvm/test/CodeGen/Generic/vector.ll diff -u llvm/test/CodeGen/Generic/vector.ll:1.12 llvm/test/CodeGen/Generic/vector.ll:1.13 --- llvm/test/CodeGen/Generic/vector.ll:1.12 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/Generic/vector.ll Mon Apr 16 12:36:06 2007 @@ -1,9 +1,9 @@ ; Test that vectors are scalarized/lowered correctly. -; RUN: llvm-upgrade < %s | llvm-as | llc && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple a-b-c && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 && +; RUN: llvm-upgrade < %s | llvm-as | llc +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple a-b-c +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g3 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah %f1 = type <1 x float> From reid at x10sys.com Mon Apr 16 12:38:10 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:10 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopStrengthReduce/nested-reduce.ll Message-ID: <200704161738.l3GHcAFR010274@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LoopStrengthReduce: nested-reduce.ll updated: 1.3 -> 1.4 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+0 -1) nested-reduce.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Transforms/LoopStrengthReduce/nested-reduce.ll diff -u llvm/test/Transforms/LoopStrengthReduce/nested-reduce.ll:1.3 llvm/test/Transforms/LoopStrengthReduce/nested-reduce.ll:1.4 --- llvm/test/Transforms/LoopStrengthReduce/nested-reduce.ll:1.3 Sun Dec 31 00:01:59 2006 +++ llvm/test/Transforms/LoopStrengthReduce/nested-reduce.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce && ; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep mul ; Make sure we don't get a multiply by 6 in this loop. From reid at x10sys.com Mon Apr 16 12:38:11 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:11 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopRotate/PhiRename-1.ll Message-ID: <200704161738.l3GHcBW4010279@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LoopRotate: PhiRename-1.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+2 -2) PhiRename-1.ll | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Transforms/LoopRotate/PhiRename-1.ll diff -u llvm/test/Transforms/LoopRotate/PhiRename-1.ll:1.2 llvm/test/Transforms/LoopRotate/PhiRename-1.ll:1.3 --- llvm/test/Transforms/LoopRotate/PhiRename-1.ll:1.2 Mon Apr 9 18:40:15 2007 +++ llvm/test/Transforms/LoopRotate/PhiRename-1.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-as < %s | opt -loop-rotate -disable-output && -; RUN: llvm-as < %s | opt -loop-rotate | llvm-dis | not grep "\[ .tmp224" +; RUN: llvm-as < %s | opt -loop-rotate | llvm-dis | not grep {\\\[ .tmp224} +; END. target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } From reid at x10sys.com Mon Apr 16 12:38:11 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:11 -0500 Subject: [llvm-commits] CVS: llvm/test/Feature/fold-fpcast.ll forwardreftest.ll inlineasm.ll Message-ID: <200704161738.l3GHcBks010293@zion.cs.uiuc.edu> Changes in directory llvm/test/Feature: fold-fpcast.ll updated: 1.3 -> 1.4 forwardreftest.ll updated: 1.10 -> 1.11 inlineasm.ll updated: 1.4 -> 1.5 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+3 -5) fold-fpcast.ll | 1 - forwardreftest.ll | 1 - inlineasm.ll | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) Index: llvm/test/Feature/fold-fpcast.ll diff -u llvm/test/Feature/fold-fpcast.ll:1.3 llvm/test/Feature/fold-fpcast.ll:1.4 --- llvm/test/Feature/fold-fpcast.ll:1.3 Sat Apr 14 04:45:16 2007 +++ llvm/test/Feature/fold-fpcast.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis -o /dev/null -f && ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep bitcast int %test1() { Index: llvm/test/Feature/forwardreftest.ll diff -u llvm/test/Feature/forwardreftest.ll:1.10 llvm/test/Feature/forwardreftest.ll:1.11 --- llvm/test/Feature/forwardreftest.ll:1.10 Wed Apr 11 17:40:46 2007 +++ llvm/test/Feature/forwardreftest.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis -o /dev/null -f && ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll Index: llvm/test/Feature/inlineasm.ll diff -u llvm/test/Feature/inlineasm.ll:1.4 llvm/test/Feature/inlineasm.ll:1.5 --- llvm/test/Feature/inlineasm.ll:1.4 Fri Dec 1 22:23:07 2006 +++ llvm/test/Feature/inlineasm.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,6 @@ -; RUN: llvm-upgrade %s -o - | llvm-as -o /dev/null -f && -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > Output/t1.ll && -; RUN: llvm-as Output/t1.ll -o - | llvm-dis > Output/t2.ll && +; RUN: llvm-upgrade %s -o - | llvm-as -o /dev/null -f +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > Output/t1.ll +; RUN: llvm-as Output/t1.ll -o - | llvm-dis > Output/t2.ll ; RUN: diff Output/t1.ll Output/t2.ll From reid at x10sys.com Mon Apr 16 12:38:11 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:11 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/2007-04-04-BadFoldBitcastIntoMalloc.ll add.ll add2.ll Message-ID: <200704161738.l3GHcBcA010301@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: 2007-04-04-BadFoldBitcastIntoMalloc.ll updated: 1.4 -> 1.5 add.ll updated: 1.38 -> 1.39 add2.ll updated: 1.1 -> 1.2 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+0 -3) 2007-04-04-BadFoldBitcastIntoMalloc.ll | 1 - add.ll | 1 - add2.ll | 1 - 3 files changed, 3 deletions(-) Index: llvm/test/Transforms/InstCombine/2007-04-04-BadFoldBitcastIntoMalloc.ll diff -u llvm/test/Transforms/InstCombine/2007-04-04-BadFoldBitcastIntoMalloc.ll:1.4 llvm/test/Transforms/InstCombine/2007-04-04-BadFoldBitcastIntoMalloc.ll:1.5 --- llvm/test/Transforms/InstCombine/2007-04-04-BadFoldBitcastIntoMalloc.ll:1.4 Sat Apr 14 15:13:02 2007 +++ llvm/test/Transforms/InstCombine/2007-04-04-BadFoldBitcastIntoMalloc.ll Mon Apr 16 12:36:07 2007 @@ -2,7 +2,6 @@ ; a malloc messes up the element count, causing an extra 4GB to be allocated on ; 64-bit targets. ; -; RUN: llvm-as < %s | opt -instcombine -disable-output && ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep {= add } target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" Index: llvm/test/Transforms/InstCombine/add.ll diff -u llvm/test/Transforms/InstCombine/add.ll:1.38 llvm/test/Transforms/InstCombine/add.ll:1.39 --- llvm/test/Transforms/InstCombine/add.ll:1.38 Sun Apr 15 02:38:21 2007 +++ llvm/test/Transforms/InstCombine/add.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,5 @@ ; This test makes sure that add instructions are properly eliminated. -; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output && ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \ ; RUN: grep -v OK | not grep add ; END. Index: llvm/test/Transforms/InstCombine/add2.ll diff -u llvm/test/Transforms/InstCombine/add2.ll:1.1 llvm/test/Transforms/InstCombine/add2.ll:1.2 --- llvm/test/Transforms/InstCombine/add2.ll:1.1 Sun Mar 4 18:01:38 2007 +++ llvm/test/Transforms/InstCombine/add2.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-as < %s | opt -instcombine -disable-output && ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \ ; RUN: grep -v OK | not grep add From reid at x10sys.com Mon Apr 16 12:38:11 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:11 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll 2006-10-25-AddSetCC.ll predsimplify.ll Message-ID: <200704161738.l3GHcBN5010285@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/PredicateSimplifier: 2006-10-22-IntOr.ll updated: 1.4 -> 1.5 2006-10-25-AddSetCC.ll updated: 1.2 -> 1.3 predsimplify.ll updated: 1.4 -> 1.5 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+11 -7) 2006-10-22-IntOr.ll | 7 ++++--- 2006-10-25-AddSetCC.ll | 5 +++-- predsimplify.ll | 6 ++++-- 3 files changed, 11 insertions(+), 7 deletions(-) Index: llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll diff -u llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll:1.4 llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll:1.5 --- llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll:1.4 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll Mon Apr 16 12:36:08 2007 @@ -1,6 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | not grep fail && -; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 3 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -predsimplify -instcombine -simplifycfg -o %t -f +; RUN: grep -v declare %t | not grep fail +; RUN: grep -v declare %t | grep -c pass | grep 3 int %test1(int %x, int %y) { entry: Index: llvm/test/Transforms/PredicateSimplifier/2006-10-25-AddSetCC.ll diff -u llvm/test/Transforms/PredicateSimplifier/2006-10-25-AddSetCC.ll:1.2 llvm/test/Transforms/PredicateSimplifier/2006-10-25-AddSetCC.ll:1.3 --- llvm/test/Transforms/PredicateSimplifier/2006-10-25-AddSetCC.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/PredicateSimplifier/2006-10-25-AddSetCC.ll Mon Apr 16 12:36:08 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -predsimplify -instcombine -simplifycfg | llvm-dis | \ +; RUN: grep -v declare | grep -c pass | grep 2 int %test(int %x, int %y) { entry: Index: llvm/test/Transforms/PredicateSimplifier/predsimplify.ll diff -u llvm/test/Transforms/PredicateSimplifier/predsimplify.ll:1.4 llvm/test/Transforms/PredicateSimplifier/predsimplify.ll:1.5 --- llvm/test/Transforms/PredicateSimplifier/predsimplify.ll:1.4 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/PredicateSimplifier/predsimplify.ll Mon Apr 16 12:36:08 2007 @@ -1,5 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | not grep fail && -; RUN: llvm-upgrade < %s | llvm-as | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 4 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -predsimplify -instcombine -simplifycfg | llvm-dis > %t +; RUN: grep -v declare %t | not grep fail +; RUN: grep -v declare %t | grep -c pass | grep 4 void %test1(int %x) { entry: From reid at x10sys.com Mon Apr 16 12:38:11 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:11 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/TailCallElim/return-undef.ll Message-ID: <200704161738.l3GHcBDr010305@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/TailCallElim: return-undef.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+3 -2) return-undef.ll | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/test/Transforms/TailCallElim/return-undef.ll diff -u llvm/test/Transforms/TailCallElim/return-undef.ll:1.2 llvm/test/Transforms/TailCallElim/return-undef.ll:1.3 --- llvm/test/Transforms/TailCallElim/return-undef.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/TailCallElim/return-undef.ll Mon Apr 16 12:36:08 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | grep sub && -; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | not grep call +; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis > %t +; RUN: grep sub %t +; RUN: not grep call %t int %test(int %X) { %Y = sub int %X, 1 From reid at x10sys.com Mon Apr 16 12:38:13 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:13 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/ConstProp/bitcast.ll Message-ID: <200704161738.l3GHcDpk010347@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/ConstProp: bitcast.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+0 -1) bitcast.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Transforms/ConstProp/bitcast.ll diff -u llvm/test/Transforms/ConstProp/bitcast.ll:1.2 llvm/test/Transforms/ConstProp/bitcast.ll:1.3 --- llvm/test/Transforms/ConstProp/bitcast.ll:1.2 Sun Dec 31 00:01:59 2006 +++ llvm/test/Transforms/ConstProp/bitcast.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis && ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 0x36A0000000000000 %A = global float bitcast (int 1 to float) From reid at x10sys.com Mon Apr 16 12:38:14 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:14 -0500 Subject: [llvm-commits] CVS: llvm/test/Analysis/BasicAA/modref.ll Message-ID: <200704161738.l3GHcEnq010368@zion.cs.uiuc.edu> Changes in directory llvm/test/Analysis/BasicAA: modref.ll updated: 1.5 -> 1.6 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+1 -1) modref.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Analysis/BasicAA/modref.ll diff -u llvm/test/Analysis/BasicAA/modref.ll:1.5 llvm/test/Analysis/BasicAA/modref.ll:1.6 --- llvm/test/Analysis/BasicAA/modref.ll:1.5 Mon Apr 16 10:15:51 2007 +++ llvm/test/Analysis/BasicAA/modref.ll Mon Apr 16 12:36:06 2007 @@ -1,6 +1,6 @@ ; A very rudimentary test on AliasAnalysis::getModRefInfo. ; RUN: llvm-upgrade < %s | llvm-as | \ -; RUN: opt -print-all-alias-modref-info -aa-eval -disable-output |& +; RUN: opt -print-all-alias-modref-info -aa-eval -disable-output |& \ ; RUN: not grep NoModRef int %callee() { From reid at x10sys.com Mon Apr 16 12:38:14 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:14 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Alpha/weak.ll Message-ID: <200704161738.l3GHcEx1010381@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Alpha: weak.ll updated: 1.1 -> 1.2 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+1 -2) weak.ll | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/test/CodeGen/Alpha/weak.ll diff -u llvm/test/CodeGen/Alpha/weak.ll:1.1 llvm/test/CodeGen/Alpha/weak.ll:1.2 --- llvm/test/CodeGen/Alpha/weak.ll:1.1 Thu Dec 7 11:37:54 2006 +++ llvm/test/CodeGen/Alpha/weak.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep .weak.*f && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep .weak.*f ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep .weak.*h implementation ; Functions: From reid at x10sys.com Mon Apr 16 12:38:15 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:15 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-04-03-PEIBug.ll 2007-04-03-UndefinedSymbol.ll alloca.ll arguments.ll bits.ll branch.ll call_nolink.ll clz.ll compare-call.ll constants.ll div.ll dyn-stackalloc.ll fcopysign.ll fp.ll fparith.ll fpcmp.ll fpcmp_ueq.ll fpconv.ll fpmem.ll hello.ll imm.ll insn-sched1.ll ldm.ll ldr_ext.ll ldr_frame.ll ldr_pre.ll load.ll long-setcc.ll long_shift.ll pack.ll section.ll vfp.ll Message-ID: <200704161738.l3GHcF3C010427@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: 2007-04-03-PEIBug.ll updated: 1.1 -> 1.2 2007-04-03-UndefinedSymbol.ll updated: 1.1 -> 1.2 alloca.ll updated: 1.5 -> 1.6 arguments.ll updated: 1.2 -> 1.3 bits.ll updated: 1.3 -> 1.4 branch.ll updated: 1.5 -> 1.6 call_nolink.ll updated: 1.2 -> 1.3 clz.ll updated: 1.1 -> 1.2 compare-call.ll updated: 1.1 -> 1.2 constants.ll updated: 1.10 -> 1.11 div.ll updated: 1.2 -> 1.3 dyn-stackalloc.ll updated: 1.3 -> 1.4 fcopysign.ll updated: 1.7 -> 1.8 fp.ll updated: 1.15 -> 1.16 fparith.ll updated: 1.7 -> 1.8 fpcmp.ll updated: 1.7 -> 1.8 fpcmp_ueq.ll updated: 1.4 -> 1.5 fpconv.ll updated: 1.6 -> 1.7 fpmem.ll updated: 1.5 -> 1.6 hello.ll updated: 1.7 -> 1.8 imm.ll updated: 1.1 -> 1.2 insn-sched1.ll updated: 1.5 -> 1.6 ldm.ll updated: 1.5 -> 1.6 ldr_ext.ll updated: 1.4 -> 1.5 ldr_frame.ll updated: 1.3 -> 1.4 ldr_pre.ll updated: 1.1 -> 1.2 load.ll updated: 1.2 -> 1.3 long-setcc.ll updated: 1.3 -> 1.4 long_shift.ll updated: 1.4 -> 1.5 pack.ll updated: 1.2 -> 1.3 section.ll updated: 1.9 -> 1.10 vfp.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+137 -140) 2007-04-03-PEIBug.ll | 2 +- 2007-04-03-UndefinedSymbol.ll | 3 ++- alloca.ll | 7 ++++--- arguments.ll | 9 +++++---- bits.ll | 12 ++++++------ branch.ll | 10 +++++----- call_nolink.ll | 4 ++-- clz.ll | 3 +-- compare-call.ll | 4 ++-- constants.ll | 22 ++++++++++++++-------- div.ll | 10 +++++----- dyn-stackalloc.ll | 8 ++++---- fcopysign.ll | 7 +++---- fp.ll | 30 ++++++++++++------------------ fparith.ll | 19 +++++++++---------- fpcmp.ll | 16 ++++++++-------- fpcmp_ueq.ll | 3 +-- fpconv.ll | 22 +++++++++++----------- fpmem.ll | 10 ++++++---- hello.ll | 6 +++--- imm.ll | 1 - insn-sched1.ll | 5 +++-- ldm.ll | 10 ++++++---- ldr_ext.ll | 17 ++++++++--------- ldr_frame.ll | 4 +--- ldr_pre.ll | 4 ++-- load.ll | 10 +++++----- long-setcc.ll | 4 +--- long_shift.ll | 10 +++++----- pack.ll | 2 +- section.ll | 1 - vfp.ll | 2 +- 32 files changed, 137 insertions(+), 140 deletions(-) Index: llvm/test/CodeGen/ARM/2007-04-03-PEIBug.ll diff -u llvm/test/CodeGen/ARM/2007-04-03-PEIBug.ll:1.1 llvm/test/CodeGen/ARM/2007-04-03-PEIBug.ll:1.2 --- llvm/test/CodeGen/ARM/2007-04-03-PEIBug.ll:1.1 Tue Apr 3 16:38:03 2007 +++ llvm/test/CodeGen/ARM/2007-04-03-PEIBug.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=arm | not grep "add.*#0" +; RUN: llvm-as < %s | llc -march=arm | not grep {add.*#0} define i32 @foo() { entry: Index: llvm/test/CodeGen/ARM/2007-04-03-UndefinedSymbol.ll diff -u llvm/test/CodeGen/ARM/2007-04-03-UndefinedSymbol.ll:1.1 llvm/test/CodeGen/ARM/2007-04-03-UndefinedSymbol.ll:1.2 --- llvm/test/CodeGen/ARM/2007-04-03-UndefinedSymbol.ll:1.1 Tue Apr 3 18:40:54 2007 +++ llvm/test/CodeGen/ARM/2007-04-03-UndefinedSymbol.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -relocation-model=pic | not grep "LPC9" +; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -relocation-model=pic | \ +; RUN: not grep LPC9 %struct.B = type { i32 } %struct.anon = type { void (%struct.B*)*, i32 } Index: llvm/test/CodeGen/ARM/alloca.ll diff -u llvm/test/CodeGen/ARM/alloca.ll:1.5 llvm/test/CodeGen/ARM/alloca.ll:1.6 --- llvm/test/CodeGen/ARM/alloca.ll:1.5 Fri Feb 2 18:16:21 2007 +++ llvm/test/CodeGen/ARM/alloca.ll Mon Apr 16 12:36:06 2007 @@ -1,6 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mtriple=arm-linux-gnu | grep "mov r11, sp" && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mtriple=arm-linux-gnu | grep "mov sp, r11" +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mtriple=arm-linux-gnu | \ +; RUN: grep {mov r11, sp} +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mtriple=arm-linux-gnu | \ +; RUN: grep {mov sp, r11} void %f(uint %a) { entry: Index: llvm/test/CodeGen/ARM/arguments.ll diff -u llvm/test/CodeGen/ARM/arguments.ll:1.2 llvm/test/CodeGen/ARM/arguments.ll:1.3 --- llvm/test/CodeGen/ARM/arguments.ll:1.2 Tue Feb 13 13:52:28 2007 +++ llvm/test/CodeGen/ARM/arguments.ll Mon Apr 16 12:36:06 2007 @@ -1,10 +1,11 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnueabi | grep "mov r0, r2" | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep "mov r0, r1" | wc -l | grep 1 +; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnueabi | \ +; RUN: grep {mov r0, r2} | wc -l | grep 1 +; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | \ +; RUN: grep {mov r0, r1} | wc -l | grep 1 define i32 @f(i32 %a, i64 %b) { %tmp = call i32 @g(i64 %b) ret i32 %tmp } -declare i32 @g(i64) \ No newline at end of file +declare i32 @g(i64) Index: llvm/test/CodeGen/ARM/bits.ll diff -u llvm/test/CodeGen/ARM/bits.ll:1.3 llvm/test/CodeGen/ARM/bits.ll:1.4 --- llvm/test/CodeGen/ARM/bits.ll:1.3 Thu Feb 1 20:16:22 2007 +++ llvm/test/CodeGen/ARM/bits.ll Mon Apr 16 12:36:06 2007 @@ -1,9 +1,9 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm | grep and | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=arm | grep orr | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=arm | grep eor | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=arm | grep mov.*lsl | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=arm | grep mov.*asr | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=arm > %t +; RUN: grep and %t | wc -l | grep 1 +; RUN: grep orr %t | wc -l | grep 1 +; RUN: grep eor %t | wc -l | grep 1 +; RUN: grep mov.*lsl %t | wc -l | grep 1 +; RUN: grep mov.*asr %t | wc -l | grep 1 define i32 @f1(i32 %a, i32 %b) { entry: Index: llvm/test/CodeGen/ARM/branch.ll diff -u llvm/test/CodeGen/ARM/branch.ll:1.5 llvm/test/CodeGen/ARM/branch.ll:1.6 --- llvm/test/CodeGen/ARM/branch.ll:1.5 Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/branch.ll Mon Apr 16 12:36:06 2007 @@ -1,8 +1,8 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bne && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bge && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bhs && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep blo +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm > %t +; RUN: grep bne %t +; RUN: grep bge %t +; RUN: grep bhs %t +; RUN: grep blo %t void %f1(int %a, int %b, int* %v) { entry: Index: llvm/test/CodeGen/ARM/call_nolink.ll diff -u llvm/test/CodeGen/ARM/call_nolink.ll:1.2 llvm/test/CodeGen/ARM/call_nolink.ll:1.3 --- llvm/test/CodeGen/ARM/call_nolink.ll:1.2 Tue Mar 27 21:38:26 2007 +++ llvm/test/CodeGen/ARM/call_nolink.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-linux-gnueabi | not grep "bx lr" +; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-linux-gnueabi | \ +; RUN: not grep {bx lr} %struct.anon = type { i32 (i32, i32, i32)*, i32, i32, [3 x i32], i8*, i8*, i8* } @r = external global [14 x i32] ; <[14 x i32]*> [#uses=4] Index: llvm/test/CodeGen/ARM/clz.ll diff -u llvm/test/CodeGen/ARM/clz.ll:1.1 llvm/test/CodeGen/ARM/clz.ll:1.2 --- llvm/test/CodeGen/ARM/clz.ll:1.1 Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/clz.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v5t | grep "clz" +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v5t | grep clz declare uint %llvm.ctlz.i32(uint) Index: llvm/test/CodeGen/ARM/compare-call.ll diff -u llvm/test/CodeGen/ARM/compare-call.ll:1.1 llvm/test/CodeGen/ARM/compare-call.ll:1.2 --- llvm/test/CodeGen/ARM/compare-call.ll:1.1 Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/compare-call.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6,+vfp2 | grep fcmpes +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6,+vfp2 | \ +; RUN: grep fcmpes void %test3(float* %glob, int %X) { entry: Index: llvm/test/CodeGen/ARM/constants.ll diff -u llvm/test/CodeGen/ARM/constants.ll:1.10 llvm/test/CodeGen/ARM/constants.ll:1.11 --- llvm/test/CodeGen/ARM/constants.ll:1.10 Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/constants.ll Mon Apr 16 12:36:06 2007 @@ -1,11 +1,17 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #0" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #255$" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0.*256" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "orr.*256" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, .*-1073741761" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, .*1008" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "cmp r0, #1, 16" | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep {mov r0, #0} | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep {mov r0, #255$} | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep {mov r0.*256} | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep {orr.*256} | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep {mov r0, .*-1073741761} | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep {mov r0, .*1008} | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep {cmp r0, #1, 16} | wc -l | grep 1 uint %f1() { ret uint 0 Index: llvm/test/CodeGen/ARM/div.ll diff -u llvm/test/CodeGen/ARM/div.ll:1.2 llvm/test/CodeGen/ARM/div.ll:1.3 --- llvm/test/CodeGen/ARM/div.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/ARM/div.ll Mon Apr 16 12:36:06 2007 @@ -1,8 +1,8 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __divsi3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __udivsi3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __modsi3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __umodsi3 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm > %t +; RUN: grep __divsi3 %t +; RUN: grep __udivsi3 %t +; RUN: grep __modsi3 %t +; RUN: grep __umodsi3 %t int %f1(int %a, int %b) { entry: Index: llvm/test/CodeGen/ARM/dyn-stackalloc.ll diff -u llvm/test/CodeGen/ARM/dyn-stackalloc.ll:1.3 llvm/test/CodeGen/ARM/dyn-stackalloc.ll:1.4 --- llvm/test/CodeGen/ARM/dyn-stackalloc.ll:1.3 Thu Feb 22 21:15:39 2007 +++ llvm/test/CodeGen/ARM/dyn-stackalloc.ll Mon Apr 16 12:36:06 2007 @@ -1,7 +1,7 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=thumb && -; RUN: llvm-as < %s | llc -march=thumb | not grep "ldr sp" && -; RUN: llvm-as < %s | llc -mtriple=thumb-apple-darwin | not grep "sub.*r7" && +; RUN: llvm-as < %s | llc -march=arm +; RUN: llvm-as < %s | llc -march=thumb | not grep {ldr sp} +; RUN: llvm-as < %s | llc -mtriple=thumb-apple-darwin | \ +; RUN: not grep {sub.*r7} ; RUN: llvm-as < %s | llc -march=thumb | grep 4294967280 %struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* } Index: llvm/test/CodeGen/ARM/fcopysign.ll diff -u llvm/test/CodeGen/ARM/fcopysign.ll:1.7 llvm/test/CodeGen/ARM/fcopysign.ll:1.8 --- llvm/test/CodeGen/ARM/fcopysign.ll:1.7 Tue Jan 30 10:16:01 2007 +++ llvm/test/CodeGen/ARM/fcopysign.ll Mon Apr 16 12:36:06 2007 @@ -1,7 +1,6 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm | grep bic | wc -l | grep 2 && -; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 && -; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | grep fneg | wc -l | grep 2 +; RUN: llvm-as < %s | llc -march=arm | grep bic | wc -l | grep 2 +; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | \ +; RUN: grep fneg | wc -l | grep 2 define float @test1(float %x, double %y) { %tmp = fpext float %x to double Index: llvm/test/CodeGen/ARM/fp.ll diff -u llvm/test/CodeGen/ARM/fp.ll:1.15 llvm/test/CodeGen/ARM/fp.ll:1.16 --- llvm/test/CodeGen/ARM/fp.ll:1.15 Sun Apr 15 14:11:47 2007 +++ llvm/test/CodeGen/ARM/fp.ll Mon Apr 16 12:36:06 2007 @@ -1,21 +1,15 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ -; RUN: grep fmsr | wc -l | grep 4 -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ -; RUN: grep fsitos -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ -; RUN: grep fmrs -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ -; RUN: grep fsitod -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ -; RUN: grep fmrrd | wc -l | grep 5 -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ -; RUN: grep fmdrr | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fldd -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep flds -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fuitod -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fuitos -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ -; RUN: grep 1065353216 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t +; RUN: grep fmsr %t | wc -l | grep 4 +; RUN: grep fsitos %t +; RUN: grep fmrs %t +; RUN: grep fsitod %t +; RUN: grep fmrrd %t | wc -l | grep 5 +; RUN: grep fmdrr %t | wc -l | grep 2 +; RUN: grep fldd %t +; RUN: grep flds %t +; RUN: grep fuitod %t +; RUN: grep fuitos %t +; RUN: grep 1065353216 %t float %f(int %a) { entry: Index: llvm/test/CodeGen/ARM/fparith.ll diff -u llvm/test/CodeGen/ARM/fparith.ll:1.7 llvm/test/CodeGen/ARM/fparith.ll:1.8 --- llvm/test/CodeGen/ARM/fparith.ll:1.7 Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/fparith.ll Mon Apr 16 12:36:06 2007 @@ -1,13 +1,12 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fadds && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep faddd && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fmuls && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fmuld && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fnegs && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fnegd && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fdivs && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fdivd +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t +; RUN: grep fadds %t +; RUN: grep faddd %t +; RUN: grep fmuls %t +; RUN: grep fmuld %t +; RUN: grep fnegs %t +; RUN: grep fnegd %t +; RUN: grep fdivs %t +; RUN: grep fdivd %t float %f1(float %a, float %b) { Index: llvm/test/CodeGen/ARM/fpcmp.ll diff -u llvm/test/CodeGen/ARM/fpcmp.ll:1.7 llvm/test/CodeGen/ARM/fpcmp.ll:1.8 --- llvm/test/CodeGen/ARM/fpcmp.ll:1.7 Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/fpcmp.ll Mon Apr 16 12:36:06 2007 @@ -1,11 +1,11 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep movmi && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep moveq && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep movgt && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep movge && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep movne && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fcmped | wc -l | grep 1 -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fcmpes | wc -l | grep 6 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t +; RUN: grep movmi %t +; RUN: grep moveq %t +; RUN: grep movgt %t +; RUN: grep movge %t +; RUN: grep movne %t +; RUN: grep fcmped %t | wc -l | grep 1 +; RUN: grep fcmpes %t | wc -l | grep 6 int %f1(float %a) { entry: Index: llvm/test/CodeGen/ARM/fpcmp_ueq.ll diff -u llvm/test/CodeGen/ARM/fpcmp_ueq.ll:1.4 llvm/test/CodeGen/ARM/fpcmp_ueq.ll:1.5 --- llvm/test/CodeGen/ARM/fpcmp_ueq.ll:1.4 Fri Jan 26 02:25:05 2007 +++ llvm/test/CodeGen/ARM/fpcmp_ueq.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm | grep moveq && +; RUN: llvm-as < %s | llc -march=arm | grep moveq ; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 | grep movvs define i32 @f7(float %a, float %b) { Index: llvm/test/CodeGen/ARM/fpconv.ll diff -u llvm/test/CodeGen/ARM/fpconv.ll:1.6 llvm/test/CodeGen/ARM/fpconv.ll:1.7 --- llvm/test/CodeGen/ARM/fpconv.ll:1.6 Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/fpconv.ll Mon Apr 16 12:36:06 2007 @@ -1,14 +1,14 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fcvtsd && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fcvtds && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep ftosizs && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep ftouizs && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep ftosizd && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep ftouizd && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fsitos && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fsitod && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fuitos && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fuitod +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t +; RUN: grep fcvtsd %t +; RUN: grep fcvtds %t +; RUN: grep ftosizs %t +; RUN: grep ftouizs %t +; RUN: grep ftosizd %t +; RUN: grep ftouizd %t +; RUN: grep fsitos %t +; RUN: grep fsitod %t +; RUN: grep fuitos %t +; RUN: grep fuitod %t float %f1(double %x) { entry: Index: llvm/test/CodeGen/ARM/fpmem.ll diff -u llvm/test/CodeGen/ARM/fpmem.ll:1.5 llvm/test/CodeGen/ARM/fpmem.ll:1.6 --- llvm/test/CodeGen/ARM/fpmem.ll:1.5 Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/fpmem.ll Mon Apr 16 12:36:06 2007 @@ -1,7 +1,9 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #0" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep "flds.*\[" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep "fsts.*\[" | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep {mov r0, #0} | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ +; RUN: grep {flds.*\\\[} | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ +; RUN: grep {fsts.*\\\[} | wc -l | grep 1 float %f1(float %a) { entry: Index: llvm/test/CodeGen/ARM/hello.ll diff -u llvm/test/CodeGen/ARM/hello.ll:1.7 llvm/test/CodeGen/ARM/hello.ll:1.8 --- llvm/test/CodeGen/ARM/hello.ll:1.7 Mon Apr 16 12:08:00 2007 +++ llvm/test/CodeGen/ARM/hello.ll Mon Apr 16 12:36:06 2007 @@ -1,7 +1,7 @@ -; RUN: llvm-as < %s | llc -march=arm && +; RUN: llvm-as < %s | llc -march=arm ; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnueabi | grep mov | wc -l | grep 1 -; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnu --disable-fp-elim | grep mov \ -; RUN: | wc -l | grep 3 +; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnu --disable-fp-elim | \ +; RUN: grep mov | wc -l | grep 3 ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep mov | wc -l | grep 2 @str = internal constant [12 x i8] c"Hello World\00" Index: llvm/test/CodeGen/ARM/imm.ll diff -u llvm/test/CodeGen/ARM/imm.ll:1.1 llvm/test/CodeGen/ARM/imm.ll:1.2 --- llvm/test/CodeGen/ARM/imm.ll:1.1 Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/imm.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | not grep CPI int %test1(int %A) { Index: llvm/test/CodeGen/ARM/insn-sched1.ll diff -u llvm/test/CodeGen/ARM/insn-sched1.ll:1.5 llvm/test/CodeGen/ARM/insn-sched1.ll:1.6 --- llvm/test/CodeGen/ARM/insn-sched1.ll:1.5 Thu Mar 8 13:27:32 2007 +++ llvm/test/CodeGen/ARM/insn-sched1.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin -mattr=+v6 | grep mov | wc -l | grep 3 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin -mattr=+v6 |\ +; RUN: grep mov | wc -l | grep 3 int %test(int %x) { %tmp = cast int %x to short Index: llvm/test/CodeGen/ARM/ldm.ll diff -u llvm/test/CodeGen/ARM/ldm.ll:1.5 llvm/test/CodeGen/ARM/ldm.ll:1.6 --- llvm/test/CodeGen/ARM/ldm.ll:1.5 Wed Jan 31 16:27:07 2007 +++ llvm/test/CodeGen/ARM/ldm.ll Mon Apr 16 12:36:06 2007 @@ -1,7 +1,9 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldmia" | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldmib" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin | grep "ldmfd sp\!" | wc -l | grep 3 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep ldmia | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep ldmib | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin | \ +; RUN: grep {ldmfd sp\!} | wc -l | grep 3 %X = external global [0 x int] Index: llvm/test/CodeGen/ARM/ldr_ext.ll diff -u llvm/test/CodeGen/ARM/ldr_ext.ll:1.4 llvm/test/CodeGen/ARM/ldr_ext.ll:1.5 --- llvm/test/CodeGen/ARM/ldr_ext.ll:1.4 Thu Feb 22 21:15:39 2007 +++ llvm/test/CodeGen/ARM/ldr_ext.ll Mon Apr 16 12:36:06 2007 @@ -1,12 +1,11 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm | grep "ldrb" | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=arm | grep "ldrh" | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=arm | grep "ldrsb" | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=arm | grep "ldrsh" | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=thumb | grep "ldrb" | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=thumb | grep "ldrh" | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=thumb | grep "ldrsb" | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=thumb | grep "ldrsh" | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=arm | grep ldrb | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=arm | grep ldrh | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=arm | grep ldrsb | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=arm | grep ldrsh | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=thumb | grep ldrb | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=thumb | grep ldrh | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=thumb | grep ldrsb | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=thumb | grep ldrsh | wc -l | grep 1 define i32 @test1(i8* %v.pntr.s0.u1) { %tmp.u = load i8* %v.pntr.s0.u1 Index: llvm/test/CodeGen/ARM/ldr_frame.ll diff -u llvm/test/CodeGen/ARM/ldr_frame.ll:1.3 llvm/test/CodeGen/ARM/ldr_frame.ll:1.4 --- llvm/test/CodeGen/ARM/ldr_frame.ll:1.3 Thu Feb 22 21:15:39 2007 +++ llvm/test/CodeGen/ARM/ldr_frame.ll Mon Apr 16 12:36:06 2007 @@ -1,6 +1,4 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm | not grep mov && -; RUN: llvm-as < %s | llc -march=thumb && +; RUN: llvm-as < %s | llc -march=arm | not grep mov ; RUN: llvm-as < %s | llc -march=thumb | grep cpy | wc -l | grep 2 define i32 @f1() { Index: llvm/test/CodeGen/ARM/ldr_pre.ll diff -u llvm/test/CodeGen/ARM/ldr_pre.ll:1.1 llvm/test/CodeGen/ARM/ldr_pre.ll:1.2 --- llvm/test/CodeGen/ARM/ldr_pre.ll:1.1 Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/ldr_pre.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldr.*\!" | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ +; RUN: grep {ldr.*\\!} | wc -l | grep 2 int *%test1(int *%X, int *%dest) { %Y = getelementptr int* %X, int 4 Index: llvm/test/CodeGen/ARM/load.ll diff -u llvm/test/CodeGen/ARM/load.ll:1.2 llvm/test/CodeGen/ARM/load.ll:1.3 --- llvm/test/CodeGen/ARM/load.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/ARM/load.ll Mon Apr 16 12:36:06 2007 @@ -1,8 +1,8 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrsb && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrb && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrsh && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrh +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm > %t +; RUN: grep ldrsb %t +; RUN: grep ldrb %t +; RUN: grep ldrsh %t +; RUN: grep ldrh %t int %f1(sbyte* %p) { entry: Index: llvm/test/CodeGen/ARM/long-setcc.ll diff -u llvm/test/CodeGen/ARM/long-setcc.ll:1.3 llvm/test/CodeGen/ARM/long-setcc.ll:1.4 --- llvm/test/CodeGen/ARM/long-setcc.ll:1.3 Wed Apr 11 11:12:27 2007 +++ llvm/test/CodeGen/ARM/long-setcc.ll Mon Apr 16 12:36:06 2007 @@ -1,6 +1,4 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm | grep cmp | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=thumb && +; RUN: llvm-as < %s | llc -march=arm | grep cmp | wc -l | grep 1 ; RUN: llvm-as < %s | llc -march=thumb | grep cmp | wc -l | grep 1 Index: llvm/test/CodeGen/ARM/long_shift.ll diff -u llvm/test/CodeGen/ARM/long_shift.ll:1.4 llvm/test/CodeGen/ARM/long_shift.ll:1.5 --- llvm/test/CodeGen/ARM/long_shift.ll:1.4 Thu Feb 22 21:15:39 2007 +++ llvm/test/CodeGen/ARM/long_shift.ll Mon Apr 16 12:36:06 2007 @@ -1,9 +1,9 @@ -; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm | grep rrx | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=arm | grep __ashldi3 && -; RUN: llvm-as < %s | llc -march=arm | grep __ashrdi3 && -; RUN: llvm-as < %s | llc -march=arm | grep __lshrdi3 && ; RUN: llvm-as < %s | llc -march=thumb +; RUN: llvm-as < %s | llc -march=arm > %t +; RUN: grep rrx %t | wc -l | grep 1 +; RUN: grep __ashldi3 %t +; RUN: grep __ashrdi3 %t +; RUN: grep __lshrdi3 %t define i64 @f0(i64 %A, i64 %B) { %tmp = bitcast i64 %A to i64 Index: llvm/test/CodeGen/ARM/pack.ll diff -u llvm/test/CodeGen/ARM/pack.ll:1.2 llvm/test/CodeGen/ARM/pack.ll:1.3 --- llvm/test/CodeGen/ARM/pack.ll:1.2 Sun Apr 15 14:11:47 2007 +++ llvm/test/CodeGen/ARM/pack.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 | \ -; RUN: grep pkhbt | wc -l | grep 5 && +; RUN: grep pkhbt | wc -l | grep 5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 | \ ; RUN: grep pkhtb | wc -l | grep 4 ; END. Index: llvm/test/CodeGen/ARM/section.ll diff -u llvm/test/CodeGen/ARM/section.ll:1.9 llvm/test/CodeGen/ARM/section.ll:1.10 --- llvm/test/CodeGen/ARM/section.ll:1.9 Sun Apr 15 14:11:47 2007 +++ llvm/test/CodeGen/ARM/section.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux ; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux | \ ; RUN: grep {__DTOR_END__:} ; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux | \ Index: llvm/test/CodeGen/ARM/vfp.ll diff -u llvm/test/CodeGen/ARM/vfp.ll:1.2 llvm/test/CodeGen/ARM/vfp.ll:1.3 --- llvm/test/CodeGen/ARM/vfp.ll:1.2 Sun Apr 15 14:11:47 2007 +++ llvm/test/CodeGen/ARM/vfp.ll Mon Apr 16 12:36:06 2007 @@ -7,7 +7,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ ; RUN: grep fuito | wc -l | grep 2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ -; RUN: grep fto.i | wc -l | grep 4 && +; RUN: grep fto.i | wc -l | grep 4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ ; RUN: grep bmi | wc -l | grep 1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ From reid at x10sys.com Mon Apr 16 12:38:16 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:16 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/IndVarsSimplify/loop_evaluate_2.ll Message-ID: <200704161738.l3GHcGWL010439@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/IndVarsSimplify: loop_evaluate_2.ll updated: 1.1 -> 1.2 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+1 -1) loop_evaluate_2.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Transforms/IndVarsSimplify/loop_evaluate_2.ll diff -u llvm/test/Transforms/IndVarsSimplify/loop_evaluate_2.ll:1.1 llvm/test/Transforms/IndVarsSimplify/loop_evaluate_2.ll:1.2 --- llvm/test/Transforms/IndVarsSimplify/loop_evaluate_2.ll:1.1 Sat Mar 3 18:54:06 2007 +++ llvm/test/Transforms/IndVarsSimplify/loop_evaluate_2.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | grep select && +; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | grep select ; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | not grep br ; PR1179 From reid at x10sys.com Mon Apr 16 12:38:12 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:12 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/SimplifyLibCalls/floor.ll Message-ID: <200704161738.l3GHcCHZ010315@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/SimplifyLibCalls: floor.ll updated: 1.5 -> 1.6 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+7 -12) floor.ll | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-) Index: llvm/test/Transforms/SimplifyLibCalls/floor.ll diff -u llvm/test/Transforms/SimplifyLibCalls/floor.ll:1.5 llvm/test/Transforms/SimplifyLibCalls/floor.ll:1.6 --- llvm/test/Transforms/SimplifyLibCalls/floor.ll:1.5 Sun Apr 15 00:16:38 2007 +++ llvm/test/Transforms/SimplifyLibCalls/floor.ll Mon Apr 16 12:36:08 2007 @@ -1,15 +1,10 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ -; RUN: not grep {call.*floor(} && -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ -; RUN: grep {call.*floorf(} -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ -; RUN: not grep {call.*ceil(} && -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ -; RUN: grep {call.*ceilf(} -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ -; RUN: not grep {call.*nearbyint(} && -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ -; RUN: grep {call.*nearbyintf(} +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis > %t +; RUN: not grep {call.*floor(} %t +; RUN: grep {call.*floorf(} %t +; RUN: not grep {call.*ceil(} %t +; RUN: grep {call.*ceilf(} %t +; RUN: not grep {call.*nearbyint(} %t +; RUN: grep {call.*nearbyintf(} %t ; XFAIL: sparc declare double %floor(double) From reid at x10sys.com Mon Apr 16 12:38:12 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:12 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/DeadArgElim/dead_vaargs.ll Message-ID: <200704161738.l3GHcCTF010318@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/DeadArgElim: dead_vaargs.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+1 -2) dead_vaargs.ll | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/test/Transforms/DeadArgElim/dead_vaargs.ll diff -u llvm/test/Transforms/DeadArgElim/dead_vaargs.ll:1.2 llvm/test/Transforms/DeadArgElim/dead_vaargs.ll:1.3 --- llvm/test/Transforms/DeadArgElim/dead_vaargs.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/DeadArgElim/dead_vaargs.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim | llvm-dis | not grep 47 && +; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim | llvm-dis | not grep 47 ; RUN: llvm-upgrade < %s | llvm-as | opt -deadargelim | llvm-dis | not grep 1.0 int %bar(int %A) { From reid at x10sys.com Mon Apr 16 12:38:12 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:12 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LowerInvoke/basictest.ll Message-ID: <200704161738.l3GHcCVn010322@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LowerInvoke: basictest.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+0 -1) basictest.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Transforms/LowerInvoke/basictest.ll diff -u llvm/test/Transforms/LowerInvoke/basictest.ll:1.2 llvm/test/Transforms/LowerInvoke/basictest.ll:1.3 --- llvm/test/Transforms/LowerInvoke/basictest.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/LowerInvoke/basictest.ll Mon Apr 16 12:36:08 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -disable-output && ; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -disable-output -enable-correct-eh-support implementation From reid at x10sys.com Mon Apr 16 12:38:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:17 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/SPARC/ctpop.ll xnor.ll Message-ID: <200704161738.l3GHcHUw010554@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/SPARC: ctpop.ll updated: 1.2 -> 1.3 xnor.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+8 -6) ctpop.ll | 10 ++++++---- xnor.ll | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) Index: llvm/test/CodeGen/SPARC/ctpop.ll diff -u llvm/test/CodeGen/SPARC/ctpop.ll:1.2 llvm/test/CodeGen/SPARC/ctpop.ll:1.3 --- llvm/test/CodeGen/SPARC/ctpop.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/SPARC/ctpop.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,9 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc -mattr=-v9 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc -mattr=v9 -enable-sparc-v9-insts && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc -mattr=-v9 | not grep popc && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc -mattr=v9 -enable-sparc-v9-insts | grep popc +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: llc -march=sparc -mattr=v9 -enable-sparc-v9-insts +; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc -mattr=-v9 | \ +; RUN: not grep popc +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: llc -march=sparc -mattr=v9 -enable-sparc-v9-insts | grep popc declare uint %llvm.ctpop.i32(uint) uint %test(uint %X) { Index: llvm/test/CodeGen/SPARC/xnor.ll diff -u llvm/test/CodeGen/SPARC/xnor.ll:1.2 llvm/test/CodeGen/SPARC/xnor.ll:1.3 --- llvm/test/CodeGen/SPARC/xnor.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/SPARC/xnor.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc | grep xnor | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc | \ +; RUN: grep xnor | wc -l | grep 2 int %test1(int %X, int %Y) { %A = xor int %X, %Y From reid at x10sys.com Mon Apr 16 12:38:13 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:13 -0500 Subject: [llvm-commits] CVS: llvm/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll Message-ID: <200704161738.l3GHcDkC010352@zion.cs.uiuc.edu> Changes in directory llvm/test/Analysis/LoopInfo: 2003-05-15-NestingProblem.ll updated: 1.5 -> 1.6 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+2 -1) 2003-05-15-NestingProblem.ll | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll diff -u llvm/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll:1.5 llvm/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll:1.6 --- llvm/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll Mon Apr 16 12:36:06 2007 @@ -1,7 +1,8 @@ ; This testcase was incorrectly computing that the loopentry.7 loop was ; not a child of the loopentry.6 loop. ; -; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -loops | grep "^ Loop Containing: %loopentry.7" +; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -loops | \ +; RUN: grep {^ Loop Containing: %loopentry.7} void %getAndMoveToFrontDecode() { ; No predecessors! br label %endif.2 From reid at x10sys.com Mon Apr 16 12:38:15 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:15 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/Inline/dynamic_alloca_test.ll Message-ID: <200704161738.l3GHcFbx010411@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/Inline: dynamic_alloca_test.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+2 -2) dynamic_alloca_test.ll | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Transforms/Inline/dynamic_alloca_test.ll diff -u llvm/test/Transforms/Inline/dynamic_alloca_test.ll:1.2 llvm/test/Transforms/Inline/dynamic_alloca_test.ll:1.3 --- llvm/test/Transforms/Inline/dynamic_alloca_test.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/Inline/dynamic_alloca_test.ll Mon Apr 16 12:36:07 2007 @@ -1,8 +1,8 @@ ; Test that functions with dynamic allocas get inlined in a case where ; naively inlining it would result in a miscompilation. -; RUN: llvm-upgrade < %s | llvm-as | opt -inline && -; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | grep llvm.stacksave && +; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \ +; RUN: grep llvm.stacksave ; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep callee declare void %ext(int*) From reid at x10sys.com Mon Apr 16 12:38:16 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:16 -0500 Subject: [llvm-commits] CVS: llvm/test/C++Frontend/2003-10-21-InnerClass.cpp.tr Message-ID: <200704161738.l3GHcGvY010452@zion.cs.uiuc.edu> Changes in directory llvm/test/C++Frontend: 2003-10-21-InnerClass.cpp.tr updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+1 -1) 2003-10-21-InnerClass.cpp.tr | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/C++Frontend/2003-10-21-InnerClass.cpp.tr diff -u llvm/test/C++Frontend/2003-10-21-InnerClass.cpp.tr:1.2 llvm/test/C++Frontend/2003-10-21-InnerClass.cpp.tr:1.3 --- llvm/test/C++Frontend/2003-10-21-InnerClass.cpp.tr:1.2 Sun Apr 15 15:41:31 2007 +++ llvm/test/C++Frontend/2003-10-21-InnerClass.cpp.tr Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ -// RUN: %llvmgcc -xc++ -S -o - %s | grep "struct.X::Y" +// RUN: %llvmgcc -xc++ -S -o - %s | grep {struct.X::Y} struct X { struct Y { From reid at x10sys.com Mon Apr 16 12:38:14 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:14 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll 2006-06-12-MultipleExitsSameBlock.ll basictest.ll Message-ID: <200704161738.l3GHcEj4010387@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LCSSA: 2006-06-03-IncorrectIDFPhis.ll updated: 1.5 -> 1.6 2006-06-12-MultipleExitsSameBlock.ll updated: 1.4 -> 1.5 basictest.ll updated: 1.8 -> 1.9 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+6 -6) 2006-06-03-IncorrectIDFPhis.ll | 4 ++-- 2006-06-12-MultipleExitsSameBlock.ll | 4 ++-- basictest.ll | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll diff -u llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll:1.5 llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll:1.6 --- llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll:1.5 Fri Jan 26 02:25:06 2007 +++ llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \ -; RUN: grep "%SJE.0.0.lcssa = phi .struct.SetJmpMapEntry" && +; RUN: grep {%SJE.0.0.lcssa = phi .struct.SetJmpMapEntry} ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \ -; RUN: grep "%SJE.0.0.lcssa1 = phi .struct.SetJmpMapEntry" +; RUN: grep {%SJE.0.0.lcssa1 = phi .struct.SetJmpMapEntry} %struct.SetJmpMapEntry = type { sbyte*, uint, %struct.SetJmpMapEntry* } Index: llvm/test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll diff -u llvm/test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll:1.4 llvm/test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll:1.5 --- llvm/test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll:1.4 Fri Jan 26 02:25:06 2007 +++ llvm/test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \ -; RUN: grep "%X.1.lcssa" && +; RUN: grep {%X.1.lcssa} ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \ -; RUN: not grep "%X.1.lcssa1" +; RUN: not grep {%X.1.lcssa1} declare bool %c1() declare bool %c2() Index: llvm/test/Transforms/LCSSA/basictest.ll diff -u llvm/test/Transforms/LCSSA/basictest.ll:1.8 llvm/test/Transforms/LCSSA/basictest.ll:1.9 --- llvm/test/Transforms/LCSSA/basictest.ll:1.8 Fri Jan 26 02:25:06 2007 +++ llvm/test/Transforms/LCSSA/basictest.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \ -; RUN: grep "X3.lcssa = phi i32" && +; RUN: grep {X3.lcssa = phi i32} ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \ -; RUN: grep "X4 = add i32 3, %X3.lcssa" +; RUN: grep {X4 = add i32 3, %X3.lcssa} void %lcssa(bool %S2) { entry: From reid at x10sys.com Mon Apr 16 12:38:16 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:16 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/Reassociate/mul-factor3.ll mulfactor2.ll shift-factor.ll Message-ID: <200704161738.l3GHcGsv010479@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/Reassociate: mul-factor3.ll updated: 1.2 -> 1.3 mulfactor2.ll updated: 1.3 -> 1.4 shift-factor.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+13 -6) mul-factor3.ll | 6 ++++-- mulfactor2.ll | 7 +++++-- shift-factor.ll | 6 ++++-- 3 files changed, 13 insertions(+), 6 deletions(-) Index: llvm/test/Transforms/Reassociate/mul-factor3.ll diff -u llvm/test/Transforms/Reassociate/mul-factor3.ll:1.2 llvm/test/Transforms/Reassociate/mul-factor3.ll:1.3 --- llvm/test/Transforms/Reassociate/mul-factor3.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/Reassociate/mul-factor3.ll Mon Apr 16 12:36:08 2007 @@ -1,7 +1,9 @@ ; This should be one add and two multiplies. -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -reassociate -instcombine | llvm-dis > %t +; RUN: grep mul %t | wc -l | grep 2 +; RUN: grep add %t | wc -l | grep 1 int %test(int %A, int %B, int %C) { %aa = mul int %A, %A Index: llvm/test/Transforms/Reassociate/mulfactor2.ll diff -u llvm/test/Transforms/Reassociate/mulfactor2.ll:1.3 llvm/test/Transforms/Reassociate/mulfactor2.ll:1.4 --- llvm/test/Transforms/Reassociate/mulfactor2.ll:1.3 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/Reassociate/mulfactor2.ll Mon Apr 16 12:36:08 2007 @@ -1,7 +1,10 @@ ; This should turn into one multiply and one add. -; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -instcombine -reassociate -instcombine | llvm-dis -o %t +; RUN: grep mul %t | wc -l | grep 1 +; RUN: grep add %t | wc -l | grep 1 + int %main(int %t) { %tmp.3 = mul int %t, 12 ; [#uses=1] %tmp.4 = add int %tmp.3, 5 ; [#uses=1] Index: llvm/test/Transforms/Reassociate/shift-factor.ll diff -u llvm/test/Transforms/Reassociate/shift-factor.ll:1.2 llvm/test/Transforms/Reassociate/shift-factor.ll:1.3 --- llvm/test/Transforms/Reassociate/shift-factor.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/Reassociate/shift-factor.ll Mon Apr 16 12:36:08 2007 @@ -1,6 +1,8 @@ ; There should be exactly one shift and one add left. -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep shl | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: opt -reassociate -instcombine | llvm-dis > %t +; RUN: grep shl %t | wc -l | grep 1 +; RUN: grep add %t | wc -l | grep 1 int %test(int %X, int %Y) { %tmp.2 = shl int %X, ubyte 1 ; [#uses=1] From reid at x10sys.com Mon Apr 16 12:38:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:17 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/TailDup/if-tail-dup.ll Message-ID: <200704161738.l3GHcHJm010560@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/TailDup: if-tail-dup.ll updated: 1.3 -> 1.4 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+4 -4) if-tail-dup.ll | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/test/Transforms/TailDup/if-tail-dup.ll diff -u llvm/test/Transforms/TailDup/if-tail-dup.ll:1.3 llvm/test/Transforms/TailDup/if-tail-dup.ll:1.4 --- llvm/test/Transforms/TailDup/if-tail-dup.ll:1.3 Sat Apr 14 23:59:55 2007 +++ llvm/test/Transforms/TailDup/if-tail-dup.ll Mon Apr 16 12:36:08 2007 @@ -1,7 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | llc -march=x86 | \ -; RUN: grep {je } && -; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | llc -march=x86 | \ -; RUN: not grep jmp +; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | \ +; RUN: llc -march=x86 -o %t -f +; RUN: grep {je } %t +; RUN: not grep jmp %t ; END. ; This should have no unconditional jumps in it. The C source is: From reid at x10sys.com Mon Apr 16 12:38:16 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:16 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/ScalarRepl/AggregatePromote.ll vector_promote.ll Message-ID: <200704161738.l3GHcGsJ010520@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/ScalarRepl: AggregatePromote.ll updated: 1.2 -> 1.3 vector_promote.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+4 -5) AggregatePromote.ll | 4 ++-- vector_promote.ll | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) Index: llvm/test/Transforms/ScalarRepl/AggregatePromote.ll diff -u llvm/test/Transforms/ScalarRepl/AggregatePromote.ll:1.2 llvm/test/Transforms/ScalarRepl/AggregatePromote.ll:1.3 --- llvm/test/Transforms/ScalarRepl/AggregatePromote.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/ScalarRepl/AggregatePromote.ll Mon Apr 16 12:36:08 2007 @@ -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 -disable-output +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: not grep alloca target endian = big target pointersize = 32 Index: llvm/test/Transforms/ScalarRepl/vector_promote.ll diff -u llvm/test/Transforms/ScalarRepl/vector_promote.ll:1.2 llvm/test/Transforms/ScalarRepl/vector_promote.ll:1.3 --- llvm/test/Transforms/ScalarRepl/vector_promote.ll:1.2 Fri Dec 1 22:23:10 2006 +++ llvm/test/Transforms/ScalarRepl/vector_promote.ll Mon Apr 16 12:36:08 2007 @@ -1,6 +1,5 @@ - -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: not grep alloca void %test(<4 x float>* %F, float %f) { entry: From reid at x10sys.com Mon Apr 16 12:38:16 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:16 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopUnroll/2006-08-24-MultiBlockLoop.ll Message-ID: <200704161738.l3GHcG9O010526@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LoopUnroll: 2006-08-24-MultiBlockLoop.ll updated: 1.2 -> 1.3 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+1 -1) 2006-08-24-MultiBlockLoop.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Transforms/LoopUnroll/2006-08-24-MultiBlockLoop.ll diff -u llvm/test/Transforms/LoopUnroll/2006-08-24-MultiBlockLoop.ll:1.2 llvm/test/Transforms/LoopUnroll/2006-08-24-MultiBlockLoop.ll:1.3 --- llvm/test/Transforms/LoopUnroll/2006-08-24-MultiBlockLoop.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/LoopUnroll/2006-08-24-MultiBlockLoop.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unroll | llvm-dis | grep "bb72.2" +; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unroll | llvm-dis | grep bb72.2 void %vorbis_encode_noisebias_setup() { entry: From reid at x10sys.com Mon Apr 16 12:38:16 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:16 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/GlobalOpt/ctor-list-opt.ll Message-ID: <200704161738.l3GHcGN7010471@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/GlobalOpt: ctor-list-opt.ll updated: 1.9 -> 1.10 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+0 -1) ctor-list-opt.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Transforms/GlobalOpt/ctor-list-opt.ll diff -u llvm/test/Transforms/GlobalOpt/ctor-list-opt.ll:1.9 llvm/test/Transforms/GlobalOpt/ctor-list-opt.ll:1.10 --- llvm/test/Transforms/GlobalOpt/ctor-list-opt.ll:1.9 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/GlobalOpt/ctor-list-opt.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt -disable-output && ; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep CTOR %llvm.global_ctors = appending global [10 x { int, void ()* }] [ From reid at x10sys.com Mon Apr 16 12:38:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:17 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LowerSwitch/feature.ll Message-ID: <200704161738.l3GHcHp7010662@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LowerSwitch: feature.ll updated: 1.1 -> 1.2 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+4 -3) feature.ll | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/test/Transforms/LowerSwitch/feature.ll diff -u llvm/test/Transforms/LowerSwitch/feature.ll:1.1 llvm/test/Transforms/LowerSwitch/feature.ll:1.2 --- llvm/test/Transforms/LowerSwitch/feature.ll:1.1 Sat Mar 10 10:46:28 2007 +++ llvm/test/Transforms/LowerSwitch/feature.ll Mon Apr 16 12:36:08 2007 @@ -1,6 +1,7 @@ -; RUN: llvm-as %s -o - | opt -lowerswitch | llvm-dis | grep slt | wc -l | grep 10 && -; RUN: llvm-as %s -o - | opt -lowerswitch | llvm-dis | grep ule | wc -l | grep 3 && -; RUN: llvm-as %s -o - | opt -lowerswitch | llvm-dis | grep eq | wc -l | grep 9 +; RUN: llvm-as %s -o - | opt -lowerswitch | llvm-dis > %t +; RUN: grep slt %t | wc -l | grep 10 +; RUN: grep ule %t | wc -l | grep 3 +; RUN: grep eq %t | wc -l | grep 9 define i32 @main(i32 %tmp158) { entry: From reid at x10sys.com Mon Apr 16 12:38:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:17 -0500 Subject: [llvm-commits] CVS: llvm/test/Linker/basiclink.ll Message-ID: <200704161738.l3GHcHn1010602@zion.cs.uiuc.edu> Changes in directory llvm/test/Linker: basiclink.ll updated: 1.3 -> 1.4 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+2 -2) basiclink.ll | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Linker/basiclink.ll diff -u llvm/test/Linker/basiclink.ll:1.3 llvm/test/Linker/basiclink.ll:1.4 --- llvm/test/Linker/basiclink.ll:1.3 Tue Jan 30 10:16:01 2007 +++ llvm/test/Linker/basiclink.ll Mon Apr 16 12:36:07 2007 @@ -1,8 +1,8 @@ ; Test linking two functions with different prototypes and two globals ; in different modules. This is for PR411 ; RUN: llvm-as %s -o %t.bar.bc -f -; RUN: echo "define i32* @foo(i32 %x) { ret i32* @baz } @baz = external global i32" | \ -; RUN: llvm-as -o %t.foo.bc -f +; RUN: echo {define i32* @foo(i32 %x) \{ ret i32* @baz \} \ +; RUN: @baz = external global i32 } | llvm-as -o %t.foo.bc -f ; RUN: llvm-link %t.bar.bc %t.foo.bc -o %t.bc -f ; RUN: llvm-link %t.foo.bc %t.bar.bc -o %t.bc -f declare i32* @foo(...) From reid at x10sys.com Mon Apr 16 12:38:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:17 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/2006-08-11-RetVector.ll 2006-10-13-Miscompile.ll 2006-12-07-LargeAlloca.ll 2006-12-07-SelectCrash.ll 2007-01-04-ArgExtension.ll 2007-01-29-lbrx-asm.ll 2007-01-31-InlineAsmAddrMode.ll addc.ll addi-reassoc.ll align.ll and-branch.ll and-elim.ll and_add.ll and_sext.ll buildvec_canonicalize.ll cmp-cmp.ll div-2.ll eqv-andc-orc-nor.ll fold-li.ll fp-int-fp.ll fpcopy.ll inlineasm-copy.ll inverted-bool-compares.ll load-constant-addr.ll mem_update.ll mul-neg-power-2.ll mulhs.ll or-addressing-mode.ll reg-coalesce-simple.ll rlwimi.ll rlwimi2.ll rlwinm.ll rlwinm2.ll rotl-2.ll rotl.ll stfiwx.ll store-load-fwd.ll subc.ll unsafe-math.ll vec_br_cmp.ll vec_constants.ll vec_mul.ll vec_perf_shuffle.ll vec_shuffle.ll vec_spat.ll vec_vrsave.ll Message-ID: <200704161738.l3GHcHlR010668@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: 2006-08-11-RetVector.ll updated: 1.2 -> 1.3 2006-10-13-Miscompile.ll updated: 1.2 -> 1.3 2006-12-07-LargeAlloca.ll updated: 1.2 -> 1.3 2006-12-07-SelectCrash.ll updated: 1.2 -> 1.3 2007-01-04-ArgExtension.ll updated: 1.3 -> 1.4 2007-01-29-lbrx-asm.ll updated: 1.2 -> 1.3 2007-01-31-InlineAsmAddrMode.ll updated: 1.2 -> 1.3 addc.ll updated: 1.3 -> 1.4 addi-reassoc.ll updated: 1.2 -> 1.3 align.ll updated: 1.2 -> 1.3 and-branch.ll updated: 1.2 -> 1.3 and-elim.ll updated: 1.7 -> 1.8 and_add.ll updated: 1.2 -> 1.3 and_sext.ll updated: 1.8 -> 1.9 buildvec_canonicalize.ll updated: 1.3 -> 1.4 cmp-cmp.ll updated: 1.2 -> 1.3 div-2.ll updated: 1.5 -> 1.6 eqv-andc-orc-nor.ll updated: 1.5 -> 1.6 fold-li.ll updated: 1.2 -> 1.3 fp-int-fp.ll updated: 1.2 -> 1.3 fpcopy.ll updated: 1.2 -> 1.3 inlineasm-copy.ll updated: 1.2 -> 1.3 inverted-bool-compares.ll updated: 1.2 -> 1.3 load-constant-addr.ll updated: 1.2 -> 1.3 mem_update.ll updated: 1.5 -> 1.6 mul-neg-power-2.ll updated: 1.2 -> 1.3 mulhs.ll updated: 1.3 -> 1.4 or-addressing-mode.ll updated: 1.2 -> 1.3 reg-coalesce-simple.ll updated: 1.2 -> 1.3 rlwimi.ll updated: 1.5 -> 1.6 rlwimi2.ll updated: 1.3 -> 1.4 rlwinm.ll updated: 1.5 -> 1.6 rlwinm2.ll updated: 1.3 -> 1.4 rotl-2.ll updated: 1.1 -> 1.2 rotl.ll updated: 1.6 -> 1.7 stfiwx.ll updated: 1.3 -> 1.4 store-load-fwd.ll updated: 1.2 -> 1.3 subc.ll updated: 1.3 -> 1.4 unsafe-math.ll updated: 1.2 -> 1.3 vec_br_cmp.ll updated: 1.2 -> 1.3 vec_constants.ll updated: 1.6 -> 1.7 vec_mul.ll updated: 1.3 -> 1.4 vec_perf_shuffle.ll updated: 1.2 -> 1.3 vec_shuffle.ll updated: 1.8 -> 1.9 vec_spat.ll updated: 1.6 -> 1.7 vec_vrsave.ll updated: 1.3 -> 1.4 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+117 -104) 2006-08-11-RetVector.ll | 2 +- 2006-10-13-Miscompile.ll | 1 - 2006-12-07-LargeAlloca.ll | 4 ++-- 2006-12-07-SelectCrash.ll | 4 ++-- 2007-01-04-ArgExtension.ll | 2 +- 2007-01-29-lbrx-asm.ll | 2 +- 2007-01-31-InlineAsmAddrMode.ll | 2 +- addc.ll | 11 ++++++----- addi-reassoc.ll | 1 - align.ll | 9 ++++++--- and-branch.ll | 1 - and-elim.ll | 1 - and_add.ll | 7 ++++--- and_sext.ll | 3 +-- buildvec_canonicalize.ll | 8 ++++++-- cmp-cmp.ll | 1 - div-2.ll | 2 +- eqv-andc-orc-nor.ll | 15 ++++++++++----- fold-li.ll | 4 ++-- fp-int-fp.ll | 1 - fpcopy.ll | 1 - inlineasm-copy.ll | 1 - inverted-bool-compares.ll | 3 +-- load-constant-addr.ll | 2 +- mem_update.ll | 8 ++++---- mul-neg-power-2.ll | 1 - mulhs.ll | 9 +++++---- or-addressing-mode.ll | 3 +-- reg-coalesce-simple.ll | 1 - rlwimi.ll | 2 +- rlwimi2.ll | 7 ++++--- rlwinm.ll | 11 ++++++----- rlwinm2.ll | 13 +++++++------ rotl-2.ll | 4 ++-- rotl.ll | 3 +-- stfiwx.ll | 13 +++++++++---- store-load-fwd.ll | 1 - subc.ll | 11 ++++++----- unsafe-math.ll | 5 +++-- vec_br_cmp.ll | 5 +++-- vec_constants.ll | 1 - vec_mul.ll | 3 +-- vec_perf_shuffle.ll | 1 - vec_shuffle.ll | 14 ++++++++------ vec_spat.ll | 10 ++++++---- vec_vrsave.ll | 7 ++++--- 46 files changed, 117 insertions(+), 104 deletions(-) Index: llvm/test/CodeGen/PowerPC/2006-08-11-RetVector.ll diff -u llvm/test/CodeGen/PowerPC/2006-08-11-RetVector.ll:1.2 llvm/test/CodeGen/PowerPC/2006-08-11-RetVector.ll:1.3 --- llvm/test/CodeGen/PowerPC/2006-08-11-RetVector.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/2006-08-11-RetVector.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vsldoi && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vsldoi ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vor <4 x float> %func(<4 x float> %fp0, <4 x float> %fp1) { Index: llvm/test/CodeGen/PowerPC/2006-10-13-Miscompile.ll diff -u llvm/test/CodeGen/PowerPC/2006-10-13-Miscompile.ll:1.2 llvm/test/CodeGen/PowerPC/2006-10-13-Miscompile.ll:1.3 --- llvm/test/CodeGen/PowerPC/2006-10-13-Miscompile.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/2006-10-13-Miscompile.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep IMPLICIT_DEF void %foo(long %X) { Index: llvm/test/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll diff -u llvm/test/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll:1.2 llvm/test/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll:1.3 --- llvm/test/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll:1.2 Fri Dec 29 14:01:32 2006 +++ llvm/test/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 ; RUN: llvm-upgrade < %s | llvm-as | llc void %bitap() { Index: llvm/test/CodeGen/PowerPC/2006-12-07-SelectCrash.ll diff -u llvm/test/CodeGen/PowerPC/2006-12-07-SelectCrash.ll:1.2 llvm/test/CodeGen/PowerPC/2006-12-07-SelectCrash.ll:1.3 --- llvm/test/CodeGen/PowerPC/2006-12-07-SelectCrash.ll:1.2 Mon Dec 18 20:03:04 2006 +++ llvm/test/CodeGen/PowerPC/2006-12-07-SelectCrash.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 ; RUN: llvm-upgrade < %s | llvm-as | llc %qsz.b = external global bool ; [#uses=1] Index: llvm/test/CodeGen/PowerPC/2007-01-04-ArgExtension.ll diff -u llvm/test/CodeGen/PowerPC/2007-01-04-ArgExtension.ll:1.3 llvm/test/CodeGen/PowerPC/2007-01-04-ArgExtension.ll:1.4 --- llvm/test/CodeGen/PowerPC/2007-01-04-ArgExtension.ll:1.3 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/PowerPC/2007-01-04-ArgExtension.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=ppc32 | grep extsb && +; RUN: llvm-as < %s | llc -march=ppc32 | grep extsb ; RUN: llvm-as < %s | llc -march=ppc32 | grep extsh define i32 @p1(i8 %c, i16 %s) { Index: llvm/test/CodeGen/PowerPC/2007-01-29-lbrx-asm.ll diff -u llvm/test/CodeGen/PowerPC/2007-01-29-lbrx-asm.ll:1.2 llvm/test/CodeGen/PowerPC/2007-01-29-lbrx-asm.ll:1.3 --- llvm/test/CodeGen/PowerPC/2007-01-29-lbrx-asm.ll:1.2 Tue Jan 30 00:32:25 2007 +++ llvm/test/CodeGen/PowerPC/2007-01-29-lbrx-asm.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=ppc32 && +; RUN: llvm-as < %s | llc -march=ppc32 ; RUN: llvm-as < %s | llc -march=ppc64 define i16 @test(i8* %d1, i16* %d2) { Index: llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll diff -u llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll:1.2 llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll:1.3 --- llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll:1.2 Tue Mar 27 21:38:26 2007 +++ llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=ppc32 && +; RUN: llvm-as < %s | llc -march=ppc32 ; RUN: llvm-as < %s | llc -march=ppc64 ; Test two things: 1) that a frameidx can be rewritten in an inline asm Index: llvm/test/CodeGen/PowerPC/addc.ll diff -u llvm/test/CodeGen/PowerPC/addc.ll:1.3 llvm/test/CodeGen/PowerPC/addc.ll:1.4 --- llvm/test/CodeGen/PowerPC/addc.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/addc.ll Mon Apr 16 12:36:06 2007 @@ -1,9 +1,10 @@ ; All of these should be codegen'd without loading immediates -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addc | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep adde | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addze | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addme | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addic | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f +; RUN: grep addc %t | wc -l | grep 1 +; RUN: grep adde %t | wc -l | grep 1 +; RUN: grep addze %t | wc -l | grep 1 +; RUN: grep addme %t | wc -l | grep 1 +; RUN: grep addic %t | wc -l | grep 2 implementation ; Functions: Index: llvm/test/CodeGen/PowerPC/addi-reassoc.ll diff -u llvm/test/CodeGen/PowerPC/addi-reassoc.ll:1.2 llvm/test/CodeGen/PowerPC/addi-reassoc.ll:1.3 --- llvm/test/CodeGen/PowerPC/addi-reassoc.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/addi-reassoc.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep addi %struct.X = type { [5 x sbyte] } Index: llvm/test/CodeGen/PowerPC/align.ll diff -u llvm/test/CodeGen/PowerPC/align.ll:1.2 llvm/test/CodeGen/PowerPC/align.ll:1.3 --- llvm/test/CodeGen/PowerPC/align.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/align.ll Mon Apr 16 12:36:06 2007 @@ -1,6 +1,9 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep "align.4" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep "align.2" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep "align.3" | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \ +; RUN: grep align.4 | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \ +; RUN: grep align.2 | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \ +; RUN: grep align.3 | wc -l | grep 1 %A = global <4 x uint> < uint 10, uint 20, uint 30, uint 40 > Index: llvm/test/CodeGen/PowerPC/and-branch.ll diff -u llvm/test/CodeGen/PowerPC/and-branch.ll:1.2 llvm/test/CodeGen/PowerPC/and-branch.ll:1.3 --- llvm/test/CodeGen/PowerPC/and-branch.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/and-branch.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mfcr void %foo(int %X, int %Y, int %Z) { Index: llvm/test/CodeGen/PowerPC/and-elim.ll diff -u llvm/test/CodeGen/PowerPC/and-elim.ll:1.7 llvm/test/CodeGen/PowerPC/and-elim.ll:1.8 --- llvm/test/CodeGen/PowerPC/and-elim.ll:1.7 Thu Feb 1 20:16:22 2007 +++ llvm/test/CodeGen/PowerPC/and-elim.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-as < %s | llc -march=ppc32 && ; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwin define void @test(i8* %P) { Index: llvm/test/CodeGen/PowerPC/and_add.ll diff -u llvm/test/CodeGen/PowerPC/and_add.ll:1.2 llvm/test/CodeGen/PowerPC/and_add.ll:1.3 --- llvm/test/CodeGen/PowerPC/and_add.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/and_add.ll Mon Apr 16 12:36:06 2007 @@ -1,6 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep slwi && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep addi && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwinm +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f +; RUN: grep slwi %t +; RUN: not grep addi %t +; RUN: not grep rlwinm %t int %test(int %A) { %B = mul int %A, 8 ;; shift Index: llvm/test/CodeGen/PowerPC/and_sext.ll diff -u llvm/test/CodeGen/PowerPC/and_sext.ll:1.8 llvm/test/CodeGen/PowerPC/and_sext.ll:1.9 --- llvm/test/CodeGen/PowerPC/and_sext.ll:1.8 Thu Feb 1 20:16:22 2007 +++ llvm/test/CodeGen/PowerPC/and_sext.ll Mon Apr 16 12:36:06 2007 @@ -1,6 +1,5 @@ ; These tests should not contain a sign extend. -; RUN: llvm-as < %s | llc -march=ppc32 && -; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsh && +; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsh ; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsb define i32 @test1(i32 %mode.0.i.0) { Index: llvm/test/CodeGen/PowerPC/buildvec_canonicalize.ll diff -u llvm/test/CodeGen/PowerPC/buildvec_canonicalize.ll:1.3 llvm/test/CodeGen/PowerPC/buildvec_canonicalize.ll:1.4 --- llvm/test/CodeGen/PowerPC/buildvec_canonicalize.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/buildvec_canonicalize.ll Mon Apr 16 12:36:06 2007 @@ -1,8 +1,12 @@ ; There should be exactly one vxor here. -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | grep vxor | wc -l | grep 1 && +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \ +; RUN: grep vxor | wc -l | grep 1 ; There should be exactly one vsplti here. -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | grep vsplti | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \ +; RUN: grep vsplti | wc -l | grep 1 void %VXOR(<4 x float>* %P1, <4 x int>* %P2, <4 x float>* %P3) { Index: llvm/test/CodeGen/PowerPC/cmp-cmp.ll diff -u llvm/test/CodeGen/PowerPC/cmp-cmp.ll:1.2 llvm/test/CodeGen/PowerPC/cmp-cmp.ll:1.3 --- llvm/test/CodeGen/PowerPC/cmp-cmp.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/cmp-cmp.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mfcr void %test(long %X) { Index: llvm/test/CodeGen/PowerPC/div-2.ll diff -u llvm/test/CodeGen/PowerPC/div-2.ll:1.5 llvm/test/CodeGen/PowerPC/div-2.ll:1.6 --- llvm/test/CodeGen/PowerPC/div-2.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/div-2.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep blr int %test1(int %X) { Index: llvm/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll diff -u llvm/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll:1.5 llvm/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll:1.6 --- llvm/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll Mon Apr 16 12:36:06 2007 @@ -1,8 +1,13 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep eqv | wc -l | grep 3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep andc | wc -l | grep 3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep orc | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep nor | wc -l | grep 3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep nand | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \ +; RUN: grep eqv | wc -l | grep 3 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | \ +; RUN: grep andc | wc -l | grep 3 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \ +; RUN: grep orc | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | \ +; RUN: grep nor | wc -l | grep 3 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \ +; RUN: grep nand | wc -l | grep 1 int %EQV1(int %X, int %Y) { %A = xor int %X, %Y Index: llvm/test/CodeGen/PowerPC/fold-li.ll diff -u llvm/test/CodeGen/PowerPC/fold-li.ll:1.2 llvm/test/CodeGen/PowerPC/fold-li.ll:1.3 --- llvm/test/CodeGen/PowerPC/fold-li.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/fold-li.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep -v align | not grep li +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \ +; RUN: grep -v align | not grep li ;; Test that immediates are folded into these instructions correctly. Index: llvm/test/CodeGen/PowerPC/fp-int-fp.ll diff -u llvm/test/CodeGen/PowerPC/fp-int-fp.ll:1.2 llvm/test/CodeGen/PowerPC/fp-int-fp.ll:1.3 --- llvm/test/CodeGen/PowerPC/fp-int-fp.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/fp-int-fp.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep r1 double %test1(double %X) { Index: llvm/test/CodeGen/PowerPC/fpcopy.ll diff -u llvm/test/CodeGen/PowerPC/fpcopy.ll:1.2 llvm/test/CodeGen/PowerPC/fpcopy.ll:1.3 --- llvm/test/CodeGen/PowerPC/fpcopy.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/fpcopy.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep fmr double %test(float %F) { Index: llvm/test/CodeGen/PowerPC/inlineasm-copy.ll diff -u llvm/test/CodeGen/PowerPC/inlineasm-copy.ll:1.2 llvm/test/CodeGen/PowerPC/inlineasm-copy.ll:1.3 --- llvm/test/CodeGen/PowerPC/inlineasm-copy.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/inlineasm-copy.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mr int %test(int %Y, int %X) { Index: llvm/test/CodeGen/PowerPC/inverted-bool-compares.ll diff -u llvm/test/CodeGen/PowerPC/inverted-bool-compares.ll:1.2 llvm/test/CodeGen/PowerPC/inverted-bool-compares.ll:1.3 --- llvm/test/CodeGen/PowerPC/inverted-bool-compares.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/inverted-bool-compares.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep xori && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep xori int %test(bool %B, int* %P) { br bool %B, label %T, label %F Index: llvm/test/CodeGen/PowerPC/load-constant-addr.ll diff -u llvm/test/CodeGen/PowerPC/load-constant-addr.ll:1.2 llvm/test/CodeGen/PowerPC/load-constant-addr.ll:1.3 --- llvm/test/CodeGen/PowerPC/load-constant-addr.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/load-constant-addr.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,5 @@ ; Should fold the ori into the lfs. -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep lfs && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep lfs ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep ori float %test() { Index: llvm/test/CodeGen/PowerPC/mem_update.ll diff -u llvm/test/CodeGen/PowerPC/mem_update.ll:1.5 llvm/test/CodeGen/PowerPC/mem_update.ll:1.6 --- llvm/test/CodeGen/PowerPC/mem_update.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/mem_update.ll Mon Apr 16 12:36:06 2007 @@ -1,7 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -enable-ppc-preinc && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -enable-ppc-preinc | not grep addi && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -enable-ppc-preinc && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -enable-ppc-preinc | not grep addi +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -enable-ppc-preinc | \ +; RUN: not grep addi +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -enable-ppc-preinc | \ +; RUN: not grep addi %Glob = global ulong 4 int *%test0(int *%X, int *%dest) { Index: llvm/test/CodeGen/PowerPC/mul-neg-power-2.ll diff -u llvm/test/CodeGen/PowerPC/mul-neg-power-2.ll:1.2 llvm/test/CodeGen/PowerPC/mul-neg-power-2.ll:1.3 --- llvm/test/CodeGen/PowerPC/mul-neg-power-2.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/mul-neg-power-2.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mul int %test1(int %a) { Index: llvm/test/CodeGen/PowerPC/mulhs.ll diff -u llvm/test/CodeGen/PowerPC/mulhs.ll:1.3 llvm/test/CodeGen/PowerPC/mulhs.ll:1.4 --- llvm/test/CodeGen/PowerPC/mulhs.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/mulhs.ll Mon Apr 16 12:36:06 2007 @@ -1,8 +1,9 @@ ; All of these ands and shifts should be folded into rlwimi's -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mulhwu && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep add && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep mulhw | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f +; RUN: not grep mulhwu %t +; RUN: not grep srawi %t +; RUN: not grep add %t +; RUN: grep mulhw %t | wc -l | grep 1 implementation ; Functions: Index: llvm/test/CodeGen/PowerPC/or-addressing-mode.ll diff -u llvm/test/CodeGen/PowerPC/or-addressing-mode.ll:1.2 llvm/test/CodeGen/PowerPC/or-addressing-mode.ll:1.3 --- llvm/test/CodeGen/PowerPC/or-addressing-mode.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/or-addressing-mode.ll Mon Apr 16 12:36:06 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc && -; RUN: llvm-upgrade < %s | llvm-as | llc | not grep ori && +; RUN: llvm-upgrade < %s | llvm-as | llc | not grep ori ; RUN: llvm-upgrade < %s | llvm-as | llc | not grep rlwimi int %test1(sbyte* %P) { ;; or -> lwzx Index: llvm/test/CodeGen/PowerPC/reg-coalesce-simple.ll diff -u llvm/test/CodeGen/PowerPC/reg-coalesce-simple.ll:1.2 llvm/test/CodeGen/PowerPC/reg-coalesce-simple.ll:1.3 --- llvm/test/CodeGen/PowerPC/reg-coalesce-simple.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/reg-coalesce-simple.ll Mon Apr 16 12:36:06 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep or %struct.foo = type { int, int, [0 x ubyte] } Index: llvm/test/CodeGen/PowerPC/rlwimi.ll diff -u llvm/test/CodeGen/PowerPC/rlwimi.ll:1.5 llvm/test/CodeGen/PowerPC/rlwimi.ll:1.6 --- llvm/test/CodeGen/PowerPC/rlwimi.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/rlwimi.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,5 @@ ; All of these ands and shifts should be folded into rlwimi's -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep and && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep and ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwimi | wc -l | grep 8 implementation ; Functions: Index: llvm/test/CodeGen/PowerPC/rlwimi2.ll diff -u llvm/test/CodeGen/PowerPC/rlwimi2.ll:1.3 llvm/test/CodeGen/PowerPC/rlwimi2.ll:1.4 --- llvm/test/CodeGen/PowerPC/rlwimi2.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/rlwimi2.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,8 @@ ; All of these ands and shifts should be folded into rlwimi's -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwimi | wc -l | grep 3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep srwi | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep slwi +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f +; RUN: grep rlwimi %t | wc -l | grep 3 +; RUN: grep srwi %t | wc -l | grep 1 +; RUN: not grep slwi %t implementation ; Functions: Index: llvm/test/CodeGen/PowerPC/rlwinm.ll diff -u llvm/test/CodeGen/PowerPC/rlwinm.ll:1.5 llvm/test/CodeGen/PowerPC/rlwinm.ll:1.6 --- llvm/test/CodeGen/PowerPC/rlwinm.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/rlwinm.ll Mon Apr 16 12:36:07 2007 @@ -1,9 +1,10 @@ ; All of these ands and shifts should be folded into rlwimi's -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep and && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srwi && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep slwi && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwinm | wc -l | grep 8 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f +; RUN: not grep and %t +; RUN: not grep srawi %t +; RUN: not grep srwi %t +; RUN: not grep slwi %t +; RUN: grep rlwinm %t | wc -l | grep 8 implementation ; Functions: Index: llvm/test/CodeGen/PowerPC/rlwinm2.ll diff -u llvm/test/CodeGen/PowerPC/rlwinm2.ll:1.3 llvm/test/CodeGen/PowerPC/rlwinm2.ll:1.4 --- llvm/test/CodeGen/PowerPC/rlwinm2.ll:1.3 Thu Feb 1 20:16:22 2007 +++ llvm/test/CodeGen/PowerPC/rlwinm2.ll Mon Apr 16 12:36:07 2007 @@ -1,10 +1,11 @@ ; All of these ands and shifts should be folded into rlw[i]nm instructions -; RUN: llvm-as < %s | llc -march=ppc32 | not grep and && -; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi && -; RUN: llvm-as < %s | llc -march=ppc32 | not grep srwi && -; RUN: llvm-as < %s | llc -march=ppc32 | not grep slwi && -; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=ppc32 -o %t -f +; RUN: not grep and %t +; RUN: not grep srawi %t +; RUN: not grep srwi %t +; RUN: not grep slwi %t +; RUN: grep rlwnm %t | wc -l | grep 1 +; RUN: grep rlwinm %t | wc -l | grep 1 define i32 @test1(i32 %X, i32 %Y) { entry: Index: llvm/test/CodeGen/PowerPC/rotl-2.ll diff -u llvm/test/CodeGen/PowerPC/rotl-2.ll:1.1 llvm/test/CodeGen/PowerPC/rotl-2.ll:1.2 --- llvm/test/CodeGen/PowerPC/rotl-2.ll:1.1 Mon Apr 2 17:08:54 2007 +++ llvm/test/CodeGen/PowerPC/rotl-2.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | wc -l | grep 4 && -; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | wc -l | grep 2 && +; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | wc -l | grep 4 +; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | wc -l | grep 2 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep or define i32 @rotl32(i32 %A, i8 %Amt) { Index: llvm/test/CodeGen/PowerPC/rotl.ll diff -u llvm/test/CodeGen/PowerPC/rotl.ll:1.6 llvm/test/CodeGen/PowerPC/rotl.ll:1.7 --- llvm/test/CodeGen/PowerPC/rotl.ll:1.6 Thu Feb 1 20:16:22 2007 +++ llvm/test/CodeGen/PowerPC/rotl.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -march=ppc32 | not grep or && -; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | wc -l | grep 2 && +; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | wc -l | grep 2 ; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | wc -l | grep 2 define i32 @rotlw(i32 %x, i32 %sh) { Index: llvm/test/CodeGen/PowerPC/stfiwx.ll diff -u llvm/test/CodeGen/PowerPC/stfiwx.ll:1.3 llvm/test/CodeGen/PowerPC/stfiwx.ll:1.4 --- llvm/test/CodeGen/PowerPC/stfiwx.ll:1.3 Wed Dec 20 18:01:42 2006 +++ llvm/test/CodeGen/PowerPC/stfiwx.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,12 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx | grep stfiwx && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx | not grep r1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx | not grep stfiwx && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx | grep r1 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx -o %t1 -f +; RUN: grep stfiwx %t1 +; RUN: not grep r1 %t1 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx \ +; RUN: -o %t2 -f +; RUN: not grep stfiwx %t2 +; RUN: grep r1 %t2 void %test(float %a, int* %b) { %tmp.2 = cast float %a to int Index: llvm/test/CodeGen/PowerPC/store-load-fwd.ll diff -u llvm/test/CodeGen/PowerPC/store-load-fwd.ll:1.2 llvm/test/CodeGen/PowerPC/store-load-fwd.ll:1.3 --- llvm/test/CodeGen/PowerPC/store-load-fwd.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/store-load-fwd.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep lwz int %test(int* %P) { store int 1, int* %P Index: llvm/test/CodeGen/PowerPC/subc.ll diff -u llvm/test/CodeGen/PowerPC/subc.ll:1.3 llvm/test/CodeGen/PowerPC/subc.ll:1.4 --- llvm/test/CodeGen/PowerPC/subc.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/subc.ll Mon Apr 16 12:36:07 2007 @@ -1,9 +1,10 @@ ; All of these should be codegen'd without loading immediates -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep subfc | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep subfe | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep subfze | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep subfme | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep subfic | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f +; RUN: grep subfc %t | wc -l | grep 1 +; RUN: grep subfe %t | wc -l | grep 1 +; RUN: grep subfze %t | wc -l | grep 1 +; RUN: grep subfme %t | wc -l | grep 1 +; RUN: grep subfic %t | wc -l | grep 2 implementation ; Functions: long %sub_ll(long %a, long %b) { Index: llvm/test/CodeGen/PowerPC/unsafe-math.ll diff -u llvm/test/CodeGen/PowerPC/unsafe-math.ll:1.2 llvm/test/CodeGen/PowerPC/unsafe-math.ll:1.3 --- llvm/test/CodeGen/PowerPC/unsafe-math.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/PowerPC/unsafe-math.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-as < %s | llc -march=ppc32 | grep fmul | wc -l | grep 2 && -; RUN: llvm-as < %s | llc -march=ppc32 -enable-unsafe-fp-math | grep fmul | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=ppc32 | grep fmul | wc -l | grep 2 +; RUN: llvm-as < %s | llc -march=ppc32 -enable-unsafe-fp-math | \ +; RUN: grep fmul | wc -l | grep 1 define double @foo(double %X) { %tmp1 = mul double %X, 1.23 Index: llvm/test/CodeGen/PowerPC/vec_br_cmp.ll diff -u llvm/test/CodeGen/PowerPC/vec_br_cmp.ll:1.2 llvm/test/CodeGen/PowerPC/vec_br_cmp.ll:1.3 --- llvm/test/CodeGen/PowerPC/vec_br_cmp.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/vec_br_cmp.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vcmpeqfp. && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep mfcr +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 -o %t -f +; RUN: grep vcmpeqfp. %t +; RUN: not grep mfcr %t ; A predicate compare used immediately by a branch should not generate an mfcr. Index: llvm/test/CodeGen/PowerPC/vec_constants.ll diff -u llvm/test/CodeGen/PowerPC/vec_constants.ll:1.6 llvm/test/CodeGen/PowerPC/vec_constants.ll:1.7 --- llvm/test/CodeGen/PowerPC/vec_constants.ll:1.6 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/vec_constants.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep CPI Index: llvm/test/CodeGen/PowerPC/vec_mul.ll diff -u llvm/test/CodeGen/PowerPC/vec_mul.ll:1.3 llvm/test/CodeGen/PowerPC/vec_mul.ll:1.4 --- llvm/test/CodeGen/PowerPC/vec_mul.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/vec_mul.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep mullw && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep mullw ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vmsumuhm <4 x int> %test_v4i32(<4 x int>* %X, <4 x int>* %Y) { Index: llvm/test/CodeGen/PowerPC/vec_perf_shuffle.ll diff -u llvm/test/CodeGen/PowerPC/vec_perf_shuffle.ll:1.2 llvm/test/CodeGen/PowerPC/vec_perf_shuffle.ll:1.3 --- llvm/test/CodeGen/PowerPC/vec_perf_shuffle.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/vec_perf_shuffle.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vperm <4 x float> %test_uu72(<4 x float> *%P1, <4 x float> *%P2) { Index: llvm/test/CodeGen/PowerPC/vec_shuffle.ll diff -u llvm/test/CodeGen/PowerPC/vec_shuffle.ll:1.8 llvm/test/CodeGen/PowerPC/vec_shuffle.ll:1.9 --- llvm/test/CodeGen/PowerPC/vec_shuffle.ll:1.8 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/vec_shuffle.ll Mon Apr 16 12:36:07 2007 @@ -1,9 +1,11 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llc -march=ppc32 -mcpu=g5 | not grep vperm && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vsldoi | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vmrgh | wc -l | grep 7 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vmrgl | wc -l | grep 6 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vpkuhum | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vpkuwum | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | \ +; RUN: llc -march=ppc32 -mcpu=g5 | not grep vperm +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 > %t +; RUN: grep vsldoi %t | wc -l | grep 2 +; RUN: grep vmrgh %t | wc -l | grep 7 +; RUN: grep vmrgl %t | wc -l | grep 6 +; RUN: grep vpkuhum %t | wc -l | grep 1 +; RUN: grep vpkuwum %t | wc -l | grep 1 void %VSLDOI_xy(<8 x short>* %A, <8 x short>* %B) { entry: Index: llvm/test/CodeGen/PowerPC/vec_spat.ll diff -u llvm/test/CodeGen/PowerPC/vec_spat.ll:1.6 llvm/test/CodeGen/PowerPC/vec_spat.ll:1.7 --- llvm/test/CodeGen/PowerPC/vec_spat.ll:1.6 Sun Dec 31 00:01:59 2006 +++ llvm/test/CodeGen/PowerPC/vec_spat.ll Mon Apr 16 12:36:07 2007 @@ -1,8 +1,10 @@ ; Test that vectors are scalarized/lowered correctly. -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vspltw | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g3 | grep stfs | wc -l | grep 4 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vsplti | wc -l | grep 3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vsplth | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g3 | \ +; RUN: grep stfs | wc -l | grep 4 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 -o %t -f +; RUN: grep vspltw %t | wc -l | grep 2 +; RUN: grep vsplti %t | wc -l | grep 3 +; RUN: grep vsplth %t | wc -l | grep 1 %f4 = type <4 x float> %i4 = type <4 x int> Index: llvm/test/CodeGen/PowerPC/vec_vrsave.ll diff -u llvm/test/CodeGen/PowerPC/vec_vrsave.ll:1.3 llvm/test/CodeGen/PowerPC/vec_vrsave.ll:1.4 --- llvm/test/CodeGen/PowerPC/vec_vrsave.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/vec_vrsave.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vrlw && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep spr && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vrsave +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 -o %t -f +; RUN: grep vrlw %t +; RUN: not grep spr %t +; RUN: not grep vrsave %t <4 x int> %test_rol() { ret <4 x int> < int -11534337, int -11534337, int -11534337, int -11534337 > From reid at x10sys.com Mon Apr 16 12:38:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:38:17 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll bitcast.ll bswap.ll cmp-test.ll compare-add.ll compare_folding.llx fp-stack-ret.ll long-setcc.ll mul-shift-reassoc.ll packed_struct.ll rdtsc.ll scalar_sse_minmax.ll select.ll store-fp-constant.ll test-hidden.ll test-pic-1.ll test-pic-2.ll test-pic-3.ll test-pic-4.ll test-pic-5.ll test-pic-6.ll test-pic-cpool.ll test-pic-jtbl.ll vec_clear.ll vec_extract.ll vec_ins_extract.ll vec_insert.ll vec_set-2.ll vec_set-3.ll vec_set-5.ll vec_set-6.ll vec_shuffle-2.ll vec_shuffle-3.ll vec_shuffle-4.ll vec_shuffle-5.ll vec_shuffle-6.ll vec_shuffle-7.ll vec_shuffle-8.ll vec_shuffle-9.ll vec_shuffle.ll vec_splat.ll vec_ss_load_fold.ll x86-64-mem.ll Message-ID: <200704161738.l3GHcHDP010621@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: 2006-10-19-SwitchUnnecessaryBranching.ll updated: 1.5 -> 1.6 bitcast.ll updated: 1.2 -> 1.3 bswap.ll updated: 1.5 -> 1.6 cmp-test.ll updated: 1.2 -> 1.3 compare-add.ll updated: 1.2 -> 1.3 compare_folding.llx updated: 1.5 -> 1.6 fp-stack-ret.ll updated: 1.4 -> 1.5 long-setcc.ll updated: 1.2 -> 1.3 mul-shift-reassoc.ll updated: 1.3 -> 1.4 packed_struct.ll updated: 1.4 -> 1.5 rdtsc.ll updated: 1.5 -> 1.6 scalar_sse_minmax.ll updated: 1.3 -> 1.4 select.ll updated: 1.6 -> 1.7 store-fp-constant.ll updated: 1.3 -> 1.4 test-hidden.ll updated: 1.4 -> 1.5 test-pic-1.ll updated: 1.3 -> 1.4 test-pic-2.ll updated: 1.2 -> 1.3 test-pic-3.ll updated: 1.2 -> 1.3 test-pic-4.ll updated: 1.3 -> 1.4 test-pic-5.ll updated: 1.2 -> 1.3 test-pic-6.ll updated: 1.2 -> 1.3 test-pic-cpool.ll updated: 1.3 -> 1.4 test-pic-jtbl.ll updated: 1.2 -> 1.3 vec_clear.ll updated: 1.3 -> 1.4 vec_extract.ll updated: 1.5 -> 1.6 vec_ins_extract.ll updated: 1.4 -> 1.5 vec_insert.ll updated: 1.3 -> 1.4 vec_set-2.ll updated: 1.3 -> 1.4 vec_set-3.ll updated: 1.4 -> 1.5 vec_set-5.ll updated: 1.2 -> 1.3 vec_set-6.ll updated: 1.2 -> 1.3 vec_shuffle-2.ll updated: 1.4 -> 1.5 vec_shuffle-3.ll updated: 1.3 -> 1.4 vec_shuffle-4.ll updated: 1.5 -> 1.6 vec_shuffle-5.ll updated: 1.3 -> 1.4 vec_shuffle-6.ll updated: 1.5 -> 1.6 vec_shuffle-7.ll updated: 1.2 -> 1.3 vec_shuffle-8.ll updated: 1.2 -> 1.3 vec_shuffle-9.ll updated: 1.2 -> 1.3 vec_shuffle.ll updated: 1.9 -> 1.10 vec_splat.ll updated: 1.7 -> 1.8 vec_ss_load_fold.ll updated: 1.3 -> 1.4 x86-64-mem.ll updated: 1.3 -> 1.4 --- Log message: For PR1319: http://llvm.org/PR1319 : Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. --- Diffs of the changes: (+128 -112) 2006-10-19-SwitchUnnecessaryBranching.ll | 3 ++- bitcast.ll | 3 +-- bswap.ll | 3 ++- cmp-test.ll | 3 +-- compare-add.ll | 1 - compare_folding.llx | 6 ++++-- fp-stack-ret.ll | 2 +- long-setcc.ll | 5 ++--- mul-shift-reassoc.ll | 2 +- packed_struct.ll | 10 +++++----- rdtsc.ll | 2 +- scalar_sse_minmax.ll | 6 ++++-- select.ll | 2 +- store-fp-constant.ll | 2 +- test-hidden.ll | 7 ++++--- test-pic-1.ll | 2 +- test-pic-2.ll | 9 +++++---- test-pic-3.ll | 9 +++++---- test-pic-4.ll | 4 ++-- test-pic-5.ll | 9 +++++---- test-pic-6.ll | 9 +++++---- test-pic-cpool.ll | 11 ++++++----- test-pic-jtbl.ll | 13 +++++++------ vec_clear.ll | 1 - vec_extract.ll | 9 +++++---- vec_ins_extract.ll | 2 -- vec_insert.ll | 5 +++-- vec_set-2.ll | 2 +- vec_set-3.ll | 7 +++---- vec_set-5.ll | 7 ++++--- vec_set-6.ll | 5 +++-- vec_shuffle-2.ll | 7 ++++--- vec_shuffle-3.ll | 5 +++-- vec_shuffle-4.ll | 6 +++--- vec_shuffle-5.ll | 5 +++-- vec_shuffle-6.ll | 8 ++++---- vec_shuffle-7.ll | 6 +++--- vec_shuffle-8.ll | 4 ++-- vec_shuffle-9.ll | 6 +++--- vec_shuffle.ll | 7 ++++--- vec_splat.ll | 2 +- vec_ss_load_fold.ll | 5 +++-- x86-64-mem.ll | 18 ++++++++++-------- 43 files changed, 128 insertions(+), 112 deletions(-) Index: llvm/test/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll diff -u llvm/test/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll:1.5 llvm/test/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll:1.6 --- llvm/test/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll:1.5 Fri Feb 16 18:44:34 2007 +++ llvm/test/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | %prcontext je 1 | grep "BB1_1:" +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | %prcontext je 1 | \ +; RUN: grep BB1_1: %str = internal constant [14 x sbyte] c"Hello world!\0A\00" ; <[14 x sbyte]*> [#uses=1] %str = internal constant [13 x sbyte] c"Blah world!\0A\00" ; <[13 x sbyte]*> [#uses=1] Index: llvm/test/CodeGen/X86/bitcast.ll diff -u llvm/test/CodeGen/X86/bitcast.ll:1.2 llvm/test/CodeGen/X86/bitcast.ll:1.3 --- llvm/test/CodeGen/X86/bitcast.ll:1.2 Fri Dec 29 14:01:32 2006 +++ llvm/test/CodeGen/X86/bitcast.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 ; PR1033 Index: llvm/test/CodeGen/X86/bswap.ll diff -u llvm/test/CodeGen/X86/bswap.ll:1.5 llvm/test/CodeGen/X86/bswap.ll:1.6 --- llvm/test/CodeGen/X86/bswap.ll:1.5 Sun Apr 1 20:09:19 2007 +++ llvm/test/CodeGen/X86/bswap.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,7 @@ ; bswap should be constant folded when it is passed a constant argument -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep bswapl | wc -l | grep 3 && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \ +; RUN: grep bswapl | wc -l | grep 3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep rolw | wc -l | grep 1 declare ushort %llvm.bswap.i16(ushort) Index: llvm/test/CodeGen/X86/cmp-test.ll diff -u llvm/test/CodeGen/X86/cmp-test.ll:1.2 llvm/test/CodeGen/X86/cmp-test.ll:1.3 --- llvm/test/CodeGen/X86/cmp-test.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/cmp-test.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep cmp | wc -l | grep 1 && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep cmp | wc -l | grep 1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep test | wc -l | grep 1 int %f1(int %X, int* %y) { Index: llvm/test/CodeGen/X86/compare-add.ll diff -u llvm/test/CodeGen/X86/compare-add.ll:1.2 llvm/test/CodeGen/X86/compare-add.ll:1.3 --- llvm/test/CodeGen/X86/compare-add.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/compare-add.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep add bool %X(int %X) { %Y = add int %X, 14 Index: llvm/test/CodeGen/X86/compare_folding.llx diff -u llvm/test/CodeGen/X86/compare_folding.llx:1.5 llvm/test/CodeGen/X86/compare_folding.llx:1.6 --- llvm/test/CodeGen/X86/compare_folding.llx:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/compare_folding.llx Mon Apr 16 12:36:07 2007 @@ -1,5 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah | grep movsd | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah | grep ucomisd +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah | \ +; RUN: grep movsd | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah | \ +; RUN: grep ucomisd declare bool %llvm.isunordered.f64(double,double) bool %test1(double %X, double %Y) { ;; Returns isunordered(X,Y) Index: llvm/test/CodeGen/X86/fp-stack-ret.ll diff -u llvm/test/CodeGen/X86/fp-stack-ret.ll:1.4 llvm/test/CodeGen/X86/fp-stack-ret.ll:1.5 --- llvm/test/CodeGen/X86/fp-stack-ret.ll:1.4 Mon Apr 16 09:17:04 2007 +++ llvm/test/CodeGen/X86/fp-stack-ret.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,7 @@ ; RUN: llvm-as < %s | \ ; RUN: llc -mtriple=i686-apple-darwin8 -mcpu=yonah -march=x86 > %t ; RUN: grep fldl %t | wc -l | grep 1 -; RUN: not grep xmm %t && +; RUN: not grep xmm %t ; RUN: grep {sub.*esp} %t | wc -l | grep 1 ; These testcases shouldn't require loading into an XMM register then storing Index: llvm/test/CodeGen/X86/long-setcc.ll diff -u llvm/test/CodeGen/X86/long-setcc.ll:1.2 llvm/test/CodeGen/X86/long-setcc.ll:1.3 --- llvm/test/CodeGen/X86/long-setcc.ll:1.2 Wed Apr 11 11:10:48 2007 +++ llvm/test/CodeGen/X86/long-setcc.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,5 @@ -; RUN: llvm-as < %s | llc -march=x86 && -; RUN: llvm-as < %s | llc -march=x86 | grep cmp | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=x86 | grep shr | wc -l | grep 1 && +; RUN: llvm-as < %s | llc -march=x86 | grep cmp | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=x86 | grep shr | wc -l | grep 1 ; RUN: llvm-as < %s | llc -march=x86 | grep xor | wc -l | grep 1 define i1 @t1(i64 %x) { Index: llvm/test/CodeGen/X86/mul-shift-reassoc.ll diff -u llvm/test/CodeGen/X86/mul-shift-reassoc.ll:1.3 llvm/test/CodeGen/X86/mul-shift-reassoc.ll:1.4 --- llvm/test/CodeGen/X86/mul-shift-reassoc.ll:1.3 Wed Mar 28 13:03:14 2007 +++ llvm/test/CodeGen/X86/mul-shift-reassoc.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep lea && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep lea ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep add int %test(int %X, int %Y) { Index: llvm/test/CodeGen/X86/packed_struct.ll diff -u llvm/test/CodeGen/X86/packed_struct.ll:1.4 llvm/test/CodeGen/X86/packed_struct.ll:1.5 --- llvm/test/CodeGen/X86/packed_struct.ll:1.4 Fri Jan 5 12:35:20 2007 +++ llvm/test/CodeGen/X86/packed_struct.ll Mon Apr 16 12:36:07 2007 @@ -1,8 +1,8 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep "foos+5" && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep "foos+1" && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep "foos+9" && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep "bara+19" && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep "bara+4" +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep foos+5 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep foos+1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep foos+9 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep bara+19 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep bara+4 ; make sure we compute the correct offset for a packed structure Index: llvm/test/CodeGen/X86/rdtsc.ll diff -u llvm/test/CodeGen/X86/rdtsc.ll:1.5 llvm/test/CodeGen/X86/rdtsc.ll:1.6 --- llvm/test/CodeGen/X86/rdtsc.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/rdtsc.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep rdtsc && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep rdtsc ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | grep rdtsc declare ulong %llvm.readcyclecounter() Index: llvm/test/CodeGen/X86/scalar_sse_minmax.ll diff -u llvm/test/CodeGen/X86/scalar_sse_minmax.ll:1.3 llvm/test/CodeGen/X86/scalar_sse_minmax.ll:1.4 --- llvm/test/CodeGen/X86/scalar_sse_minmax.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/scalar_sse_minmax.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse1,+sse2 | grep mins | wc -l | grep 3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse1,+sse2 | grep maxs | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse1,+sse2 | \ +; RUN: grep mins | wc -l | grep 3 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse1,+sse2 | \ +; RUN: grep maxs | wc -l | grep 2 declare bool %llvm.isunordered.f64( double %x, double %y ) declare bool %llvm.isunordered.f32( float %x, float %y ) Index: llvm/test/CodeGen/X86/select.ll diff -u llvm/test/CodeGen/X86/select.ll:1.6 llvm/test/CodeGen/X86/select.ll:1.7 --- llvm/test/CodeGen/X86/select.ll:1.6 Tue Jan 30 10:16:01 2007 +++ llvm/test/CodeGen/X86/select.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=pentium bool %boolSel(bool %A, bool %B, bool %C) { Index: llvm/test/CodeGen/X86/store-fp-constant.ll diff -u llvm/test/CodeGen/X86/store-fp-constant.ll:1.3 llvm/test/CodeGen/X86/store-fp-constant.ll:1.4 --- llvm/test/CodeGen/X86/store-fp-constant.ll:1.3 Mon Dec 11 21:59:46 2006 +++ llvm/test/CodeGen/X86/store-fp-constant.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep rodata && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep rodata ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep literal ; ; Check that no FP constants in this testcase ends up in the Index: llvm/test/CodeGen/X86/test-hidden.ll diff -u llvm/test/CodeGen/X86/test-hidden.ll:1.4 llvm/test/CodeGen/X86/test-hidden.ll:1.5 --- llvm/test/CodeGen/X86/test-hidden.ll:1.4 Tue Mar 27 21:38:26 2007 +++ llvm/test/CodeGen/X86/test-hidden.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,7 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu | grep ".hidden" | wc -l | grep 2 && -; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin8.8.0 | grep ".private_extern" | wc -l | grep 2 +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu | \ +; RUN: grep .hidden | wc -l | grep 2 +; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin8.8.0 | \ +; RUN: grep .private_extern | wc -l | grep 2 %struct.Person = type { i32 } @a = hidden global i32 0 Index: llvm/test/CodeGen/X86/test-pic-1.ll diff -u llvm/test/CodeGen/X86/test-pic-1.ll:1.3 llvm/test/CodeGen/X86/test-pic-1.ll:1.4 --- llvm/test/CodeGen/X86/test-pic-1.ll:1.3 Sun Apr 15 17:16:46 2007 +++ llvm/test/CodeGen/X86/test-pic-1.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | \ -; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f +; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t ; RUN: grep piclabel %t | wc -l | grep 3 ; RUN: grep GOT %t | wc -l | grep 3 Index: llvm/test/CodeGen/X86/test-pic-2.ll diff -u llvm/test/CodeGen/X86/test-pic-2.ll:1.2 llvm/test/CodeGen/X86/test-pic-2.ll:1.3 --- llvm/test/CodeGen/X86/test-pic-2.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/X86/test-pic-2.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,8 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOTOFF | wc -l | grep 4 +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | wc -l | grep 3 +; RUN: grep GOTOFF %t | wc -l | grep 4 @ptr = internal global i32* null @dst = internal global i32 0 Index: llvm/test/CodeGen/X86/test-pic-3.ll diff -u llvm/test/CodeGen/X86/test-pic-3.ll:1.2 llvm/test/CodeGen/X86/test-pic-3.ll:1.3 --- llvm/test/CodeGen/X86/test-pic-3.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/X86/test-pic-3.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,8 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep PLT | wc -l | grep 1 +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | wc -l | grep 3 +; RUN: grep PLT %t | wc -l | grep 1 define void @bar() { entry: Index: llvm/test/CodeGen/X86/test-pic-4.ll diff -u llvm/test/CodeGen/X86/test-pic-4.ll:1.3 llvm/test/CodeGen/X86/test-pic-4.ll:1.4 --- llvm/test/CodeGen/X86/test-pic-4.ll:1.3 Sun Apr 15 17:16:46 2007 +++ llvm/test/CodeGen/X86/test-pic-4.ll Mon Apr 16 12:36:07 2007 @@ -3,8 +3,8 @@ ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t ; RUN: grep piclabel %t | wc -l | grep 3 ; RUN: grep PLT %t | wc -l | grep 1 -; RUN: grep "GOT" %t | wc -l | grep 1 -; RUN: not grep "GOTOFF" %t +; RUN: grep GOT %t | wc -l | grep 1 +; RUN: not grep GOTOFF %t @pfoo = external global void(...)* Index: llvm/test/CodeGen/X86/test-pic-5.ll diff -u llvm/test/CodeGen/X86/test-pic-5.ll:1.2 llvm/test/CodeGen/X86/test-pic-5.ll:1.3 --- llvm/test/CodeGen/X86/test-pic-5.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/X86/test-pic-5.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,8 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep PLT | wc -l | grep 1 +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | wc -l | grep 3 +; RUN: grep PLT %t | wc -l | grep 1 @ptr = external global i32* Index: llvm/test/CodeGen/X86/test-pic-6.ll diff -u llvm/test/CodeGen/X86/test-pic-6.ll:1.2 llvm/test/CodeGen/X86/test-pic-6.ll:1.3 --- llvm/test/CodeGen/X86/test-pic-6.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/X86/test-pic-6.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,8 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOT | wc -l | grep 3 +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | wc -l | grep 3 +; RUN: grep GOT %t | wc -l | grep 3 @ptr = global i32* null @dst = global i32 0 Index: llvm/test/CodeGen/X86/test-pic-cpool.ll diff -u llvm/test/CodeGen/X86/test-pic-cpool.ll:1.3 llvm/test/CodeGen/X86/test-pic-cpool.ll:1.4 --- llvm/test/CodeGen/X86/test-pic-cpool.ll:1.3 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/X86/test-pic-cpool.ll Mon Apr 16 12:36:07 2007 @@ -1,8 +1,9 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOTOFF | wc -l | grep 2 && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep CPI | wc -l | grep 4 +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | wc -l | grep 3 +; RUN: grep GOTOFF %t | wc -l | grep 2 +; RUN: grep CPI %t | wc -l | grep 4 define double @foo(i32 %a.u) { entry: Index: llvm/test/CodeGen/X86/test-pic-jtbl.ll diff -u llvm/test/CodeGen/X86/test-pic-jtbl.ll:1.2 llvm/test/CodeGen/X86/test-pic-jtbl.ll:1.3 --- llvm/test/CodeGen/X86/test-pic-jtbl.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/X86/test-pic-jtbl.ll Mon Apr 16 12:36:07 2007 @@ -1,9 +1,10 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep PLT | wc -l | grep 13 && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOTOFF | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep JTI | wc -l | grep 15 +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | wc -l | grep 3 +; RUN: grep PLT %t | wc -l | grep 13 +; RUN: grep GOTOFF %t | wc -l | grep 1 +; RUN: grep JTI %t | wc -l | grep 15 define void @bar(i32 %n.u) { entry: Index: llvm/test/CodeGen/X86/vec_clear.ll diff -u llvm/test/CodeGen/X86/vec_clear.ll:1.3 llvm/test/CodeGen/X86/vec_clear.ll:1.4 --- llvm/test/CodeGen/X86/vec_clear.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_clear.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep and <4 x float> %test(<4 x float>* %v1) { %tmp = load <4 x float>* %v1 Index: llvm/test/CodeGen/X86/vec_extract.ll diff -u llvm/test/CodeGen/X86/vec_extract.ll:1.5 llvm/test/CodeGen/X86/vec_extract.ll:1.6 --- llvm/test/CodeGen/X86/vec_extract.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_extract.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,8 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 3 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movhlps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpckhpd | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep movss %t | wc -l | grep 3 +; RUN: grep movhlps %t | wc -l | grep 1 +; RUN: grep pshufd %t | wc -l | grep 1 +; RUN: grep unpckhpd %t | wc -l | grep 1 void %test1(<4 x float>* %F, float* %f) { %tmp = load <4 x float>* %F Index: llvm/test/CodeGen/X86/vec_ins_extract.ll diff -u llvm/test/CodeGen/X86/vec_ins_extract.ll:1.4 llvm/test/CodeGen/X86/vec_ins_extract.ll:1.5 --- llvm/test/CodeGen/X86/vec_ins_extract.ll:1.4 Sun Dec 31 00:01:59 2006 +++ llvm/test/CodeGen/X86/vec_ins_extract.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,4 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -instcombine | \ -; RUN: llc -march=x86 -mcpu=yonah && -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -instcombine | \ ; RUN: llc -march=x86 -mcpu=yonah | not grep sub.*esp ; This checks that various insert/extract idiom work without going to the Index: llvm/test/CodeGen/X86/vec_insert.ll diff -u llvm/test/CodeGen/X86/vec_insert.ll:1.3 llvm/test/CodeGen/X86/vec_insert.ll:1.4 --- llvm/test/CodeGen/X86/vec_insert.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_insert.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pinsrw | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep movss %t | wc -l | grep 1 +; RUN: grep pinsrw %t | wc -l | grep 2 void %test(<4 x float>* %F, int %I) { %tmp = load <4 x float>* %F Index: llvm/test/CodeGen/X86/vec_set-2.ll diff -u llvm/test/CodeGen/X86/vec_set-2.ll:1.3 llvm/test/CodeGen/X86/vec_set-2.ll:1.4 --- llvm/test/CodeGen/X86/vec_set-2.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_set-2.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 1 && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movd | wc -l | grep 1 <4 x float> %test1(float %a) { Index: llvm/test/CodeGen/X86/vec_set-3.ll diff -u llvm/test/CodeGen/X86/vec_set-3.ll:1.4 llvm/test/CodeGen/X86/vec_set-3.ll:1.5 --- llvm/test/CodeGen/X86/vec_set-3.ll:1.4 Tue Jan 30 10:16:01 2007 +++ llvm/test/CodeGen/X86/vec_set-3.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ -; RUN: grep shufps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ -; RUN: grep pshufd | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep shufps %t | wc -l | grep 1 +; RUN: grep pshufd %t | wc -l | grep 1 <4 x float> %test(float %a) { %tmp = insertelement <4 x float> zeroinitializer, float %a, uint 1 Index: llvm/test/CodeGen/X86/vec_set-5.ll diff -u llvm/test/CodeGen/X86/vec_set-5.ll:1.2 llvm/test/CodeGen/X86/vec_set-5.ll:1.3 --- llvm/test/CodeGen/X86/vec_set-5.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_set-5.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movlhps | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpcklps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep punpckldq | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep movlhps %t | wc -l | grep 2 +; RUN: grep unpcklps %t | wc -l | grep 1 +; RUN: grep punpckldq %t | wc -l | grep 1 <4 x float> %test1(float %a, float %b) { %tmp = insertelement <4 x float> zeroinitializer, float %a, uint 0 Index: llvm/test/CodeGen/X86/vec_set-6.ll diff -u llvm/test/CodeGen/X86/vec_set-6.ll:1.2 llvm/test/CodeGen/X86/vec_set-6.ll:1.3 --- llvm/test/CodeGen/X86/vec_set-6.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_set-6.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpcklps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep unpcklps %t | wc -l | grep 1 +; RUN: grep shufps %t | wc -l | grep 1 <4 x float> %test(float %a, float %b, float %c) { %tmp = insertelement <4 x float> zeroinitializer, float %a, uint 1 Index: llvm/test/CodeGen/X86/vec_shuffle-2.ll diff -u llvm/test/CodeGen/X86/vec_shuffle-2.ll:1.4 llvm/test/CodeGen/X86/vec_shuffle-2.ll:1.5 --- llvm/test/CodeGen/X86/vec_shuffle-2.ll:1.4 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_shuffle-2.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshufhw | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshuflw | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movhps | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep pshufhw %t | wc -l | grep 1 +; RUN: grep pshuflw %t | wc -l | grep 1 +; RUN: grep movhps %t | wc -l | grep 1 void %test1(<2 x long>* %res, <2 x long>* %A) { %tmp = load <2 x long>* %A Index: llvm/test/CodeGen/X86/vec_shuffle-3.ll diff -u llvm/test/CodeGen/X86/vec_shuffle-3.ll:1.3 llvm/test/CodeGen/X86/vec_shuffle-3.ll:1.4 --- llvm/test/CodeGen/X86/vec_shuffle-3.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_shuffle-3.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movlhps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movhlps | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep movlhps %t | wc -l | grep 1 +; RUN: grep movhlps %t | wc -l | grep 1 <4 x float> %test1(<4 x float>* %x, <4 x float>* %y) { %tmp = load <4 x float>* %y Index: llvm/test/CodeGen/X86/vec_shuffle-4.ll diff -u llvm/test/CodeGen/X86/vec_shuffle-4.ll:1.5 llvm/test/CodeGen/X86/vec_shuffle-4.ll:1.6 --- llvm/test/CodeGen/X86/vec_shuffle-4.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_shuffle-4.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shuf | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep unpck +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 > %t +; RUN: grep shuf %t | wc -l | grep 2 +; RUN: not grep unpck %t void %test(<4 x float>* %res, <4 x float>* %A, <4 x float>* %B, <4 x float>* %C) { %tmp3 = load <4 x float>* %B %tmp5 = load <4 x float>* %C Index: llvm/test/CodeGen/X86/vec_shuffle-5.ll diff -u llvm/test/CodeGen/X86/vec_shuffle-5.ll:1.3 llvm/test/CodeGen/X86/vec_shuffle-5.ll:1.4 --- llvm/test/CodeGen/X86/vec_shuffle-5.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_shuffle-5.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movhlps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep movhlps %t | wc -l | grep 1 +; RUN: grep shufps %t | wc -l | grep 1 void %test() { %tmp1 = load <4 x float>* null Index: llvm/test/CodeGen/X86/vec_shuffle-6.ll diff -u llvm/test/CodeGen/X86/vec_shuffle-6.ll:1.5 llvm/test/CodeGen/X86/vec_shuffle-6.ll:1.6 --- llvm/test/CodeGen/X86/vec_shuffle-6.ll:1.5 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_shuffle-6.ll Mon Apr 16 12:36:07 2007 @@ -1,7 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movapd | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movaps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movups | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep movapd %t | wc -l | grep 1 +; RUN: grep movaps %t | wc -l | grep 1 +; RUN: grep movups %t | wc -l | grep 2 target triple = "i686-apple-darwin" Index: llvm/test/CodeGen/X86/vec_shuffle-7.ll diff -u llvm/test/CodeGen/X86/vec_shuffle-7.ll:1.2 llvm/test/CodeGen/X86/vec_shuffle-7.ll:1.3 --- llvm/test/CodeGen/X86/vec_shuffle-7.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_shuffle-7.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep xorps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep shufps +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep xorps %t | wc -l | grep 1 +; RUN: not grep shufps %t void %test() { cast <4 x int> zeroinitializer to <4 x float> Index: llvm/test/CodeGen/X86/vec_shuffle-8.ll diff -u llvm/test/CodeGen/X86/vec_shuffle-8.ll:1.2 llvm/test/CodeGen/X86/vec_shuffle-8.ll:1.3 --- llvm/test/CodeGen/X86/vec_shuffle-8.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_shuffle-8.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep shufps +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ +; RUN: not grep shufps void %test(<4 x float>* %res, <4 x float>* %A) { %tmp1 = load <4 x float>* %A Index: llvm/test/CodeGen/X86/vec_shuffle-9.ll diff -u llvm/test/CodeGen/X86/vec_shuffle-9.ll:1.2 llvm/test/CodeGen/X86/vec_shuffle-9.ll:1.3 --- llvm/test/CodeGen/X86/vec_shuffle-9.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_shuffle-9.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep punpck | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep pextrw +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep punpck %t | wc -l | grep 2 +; RUN: not grep pextrw %t <4 x int> %test(sbyte** %ptr) { entry: Index: llvm/test/CodeGen/X86/vec_shuffle.ll diff -u llvm/test/CodeGen/X86/vec_shuffle.ll:1.9 llvm/test/CodeGen/X86/vec_shuffle.ll:1.10 --- llvm/test/CodeGen/X86/vec_shuffle.ll:1.9 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_shuffle.ll Mon Apr 16 12:36:07 2007 @@ -1,6 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufp | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep movups | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshufhw | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f +; RUN: grep shufp %t | wc -l | grep 1 +; RUN: grep movups %t | wc -l | grep 1 +; RUN: grep pshufhw %t | wc -l | grep 1 void %test_v4sf(<4 x float>* %P, float %X, float %Y) { %tmp = insertelement <4 x float> zeroinitializer, float %X, uint 0 Index: llvm/test/CodeGen/X86/vec_splat.ll diff -u llvm/test/CodeGen/X86/vec_splat.ll:1.7 llvm/test/CodeGen/X86/vec_splat.ll:1.8 --- llvm/test/CodeGen/X86/vec_splat.ll:1.7 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_splat.ll Mon Apr 16 12:36:07 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse3 | grep movddup void %test_v4sf(<4 x float>* %P, <4 x float>* %Q, float %X) { Index: llvm/test/CodeGen/X86/vec_ss_load_fold.ll diff -u llvm/test/CodeGen/X86/vec_ss_load_fold.ll:1.3 llvm/test/CodeGen/X86/vec_ss_load_fold.ll:1.4 --- llvm/test/CodeGen/X86/vec_ss_load_fold.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/vec_ss_load_fold.ll Mon Apr 16 12:36:07 2007 @@ -1,5 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse,+sse2 | grep minss | grep CPI | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse,+sse2 | grep CPI | not grep movss +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse,+sse2 -o %t -f +; RUN: grep minss %t | grep CPI | wc -l | grep 2 +; RUN: grep CPI %t | not grep movss target endian = little target pointersize = 32 Index: llvm/test/CodeGen/X86/x86-64-mem.ll diff -u llvm/test/CodeGen/X86/x86-64-mem.ll:1.3 llvm/test/CodeGen/X86/x86-64-mem.ll:1.4 --- llvm/test/CodeGen/X86/x86-64-mem.ll:1.3 Mon Dec 4 12:06:24 2006 +++ llvm/test/CodeGen/X86/x86-64-mem.ll Mon Apr 16 12:36:07 2007 @@ -1,11 +1,13 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin | grep GOTPCREL | wc -l | grep 4 && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin | grep rip | wc -l | grep 6 && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin | grep movq | wc -l | grep 6 && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin | grep leaq | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin -relocation-model=static | grep rip | wc -l | grep 4 && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin -relocation-model=static | grep movl | wc -l | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin -relocation-model=static | grep movq | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=x86_64-apple-darwin -o %t1 -f +; RUN: grep GOTPCREL %t1 | wc -l | grep 4 +; RUN: grep rip %t1 | wc -l | grep 6 +; RUN: grep movq %t1 | wc -l | grep 6 +; RUN: grep leaq %t1 | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: llc -mtriple=x86_64-apple-darwin -relocation-model=static -o %t2 -f +; RUN: grep rip %t2 | wc -l | grep 4 +; RUN: grep movl %t2 | wc -l | grep 2 +; RUN: grep movq %t2 | wc -l | grep 2 %ptr = external global int* %src = external global [0 x int] From reid at x10sys.com Mon Apr 16 12:46:11 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:46:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Message-ID: <200704161746.l3GHkBHv010871@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.y updated: 1.340 -> 1.341 --- Log message: Use a more optimal way to get the name of a function. Thanks, Chris. --- Diffs of the changes: (+2 -1) llvmAsmParser.y | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.340 llvm/lib/AsmParser/llvmAsmParser.y:1.341 --- llvm/lib/AsmParser/llvmAsmParser.y:1.340 Mon Apr 16 01:55:42 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y Mon Apr 16 12:45:50 2007 @@ -2823,7 +2823,8 @@ // Check for call to invalid intrinsic to avoid crashing later. if (Function *theF = dyn_cast(V)) { - if (theF->hasName() && 0 == strncmp(theF->getName().c_str(), "llvm.", 5)&& + if (theF->hasName() && + 0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5) && !theF->getIntrinsicID(true)) GEN_ERROR("Call to invalid LLVM intrinsic function '" + theF->getName() + "'"); From reid at x10sys.com Mon Apr 16 12:47:27 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:47:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs llvmAsmParser.y.cvs Message-ID: <200704161747.l3GHlRZx010905@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.cpp.cvs updated: 1.85 -> 1.86 llvmAsmParser.y.cvs updated: 1.86 -> 1.87 --- Log message: Regenerate. --- Diffs of the changes: (+19 -17) llvmAsmParser.cpp.cvs | 33 +++++++++++++++++---------------- llvmAsmParser.y.cvs | 3 ++- 2 files changed, 19 insertions(+), 17 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.85 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.86 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.85 Mon Apr 16 01:56:07 2007 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Mon Apr 16 12:47:06 2007 @@ -1716,8 +1716,8 @@ 2396, 2405, 2414, 2423, 2427, 2432, 2436, 2440, 2445, 2455, 2474, 2483, 2559, 2563, 2570, 2581, 2594, 2604, 2615, 2625, 2634, 2643, 2646, 2647, 2654, 2658, 2663, 2684, 2701, 2715, - 2729, 2741, 2749, 2756, 2762, 2768, 2774, 2789, 2869, 2874, - 2878, 2885, 2892, 2900, 2907, 2915, 2923, 2937, 2954 + 2729, 2741, 2749, 2756, 2762, 2768, 2774, 2789, 2870, 2875, + 2879, 2886, 2893, 2901, 2908, 2916, 2924, 2938, 2955 }; #endif @@ -5488,7 +5488,8 @@ // Check for call to invalid intrinsic to avoid crashing later. if (Function *theF = dyn_cast(V)) { - if (theF->hasName() && 0 == strncmp(theF->getName().c_str(), "llvm.", 5)&& + if (theF->hasName() && + 0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5) && !theF->getIntrinsicID(true)) GEN_ERROR("Call to invalid LLVM intrinsic function '" + theF->getName() + "'"); @@ -5534,7 +5535,7 @@ break; case 278: -#line 2869 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2870 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[0].InstVal); CHECK_FOR_ERROR @@ -5542,7 +5543,7 @@ break; case 279: -#line 2874 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2875 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -5550,7 +5551,7 @@ break; case 280: -#line 2878 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2879 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -5558,7 +5559,7 @@ break; case 281: -#line 2885 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2886 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); @@ -5569,7 +5570,7 @@ break; case 282: -#line 2892 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2893 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription()); @@ -5581,7 +5582,7 @@ break; case 283: -#line 2900 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2901 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); @@ -5592,7 +5593,7 @@ break; case 284: -#line 2907 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2908 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription()); @@ -5604,7 +5605,7 @@ break; case 285: -#line 2915 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2916 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[0].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -5615,7 +5616,7 @@ break; case 286: -#line 2923 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2924 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); @@ -5633,7 +5634,7 @@ break; case 287: -#line 2937 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2938 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); @@ -5654,7 +5655,7 @@ break; case 288: -#line 2954 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2955 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); @@ -5677,7 +5678,7 @@ } /* Line 1126 of yacc.c. */ -#line 5681 "llvmAsmParser.tab.c" +#line 5682 "llvmAsmParser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -5945,7 +5946,7 @@ } -#line 2971 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" +#line 2972 "/proj/llvm/llvm-2/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.86 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.87 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.86 Mon Apr 16 01:56:07 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Mon Apr 16 12:47:06 2007 @@ -2823,7 +2823,8 @@ // Check for call to invalid intrinsic to avoid crashing later. if (Function *theF = dyn_cast(V)) { - if (theF->hasName() && 0 == strncmp(theF->getName().c_str(), "llvm.", 5)&& + if (theF->hasName() && + 0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5) && !theF->getIntrinsicID(true)) GEN_ERROR("Call to invalid LLVM intrinsic function '" + theF->getName() + "'"); From reid at x10sys.com Mon Apr 16 12:51:46 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 12:51:46 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Alpha/ctpop.ll Message-ID: <200704161751.l3GHpkpM011000@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Alpha: ctpop.ll updated: 1.11 -> 1.12 --- Log message: For PR1336: http://llvm.org/PR1336 : Un-XFAIL because this passes now. --- Diffs of the changes: (+0 -1) ctpop.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/CodeGen/Alpha/ctpop.ll diff -u llvm/test/CodeGen/Alpha/ctpop.ll:1.11 llvm/test/CodeGen/Alpha/ctpop.ll:1.12 --- llvm/test/CodeGen/Alpha/ctpop.ll:1.11 Mon Apr 16 10:31:48 2007 +++ llvm/test/CodeGen/Alpha/ctpop.ll Mon Apr 16 12:51:25 2007 @@ -8,7 +8,6 @@ ; RUN: not grep -i ctpop ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | \ ; RUN: not grep -i ctpop -; XFAIL: * declare long %llvm.ctpop.i64(long) From asl at math.spbu.ru Mon Apr 16 13:11:37 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachOWriter.h README.txt Message-ID: <200704161811.l3GIBb0w011438@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachOWriter.h updated: 1.2 -> 1.3 README.txt updated: 1.3 -> 1.4 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+24 -24) MachOWriter.h | 10 +++++----- README.txt | 38 +++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 24 deletions(-) Index: llvm/lib/CodeGen/MachOWriter.h diff -u llvm/lib/CodeGen/MachOWriter.h:1.2 llvm/lib/CodeGen/MachOWriter.h:1.3 --- llvm/lib/CodeGen/MachOWriter.h:1.2 Wed Feb 28 01:40:50 2007 +++ llvm/lib/CodeGen/MachOWriter.h Mon Apr 16 13:10:22 2007 @@ -254,19 +254,19 @@ // The following constants are getting pulled in by one of the // system headers, which creates a neat clash with the enum. #if !defined(VM_PROT_NONE) -#define VM_PROT_NONE 0x00 +#define VM_PROT_NONE 0x00 #endif #if !defined(VM_PROT_READ) -#define VM_PROT_READ 0x01 +#define VM_PROT_READ 0x01 #endif #if !defined(VM_PROT_WRITE) -#define VM_PROT_WRITE 0x02 +#define VM_PROT_WRITE 0x02 #endif #if !defined(VM_PROT_EXECUTE) -#define VM_PROT_EXECUTE 0x04 +#define VM_PROT_EXECUTE 0x04 #endif #if !defined(VM_PROT_ALL) -#define VM_PROT_ALL 0x07 +#define VM_PROT_ALL 0x07 #endif // Constants for the vm protection fields Index: llvm/lib/CodeGen/README.txt diff -u llvm/lib/CodeGen/README.txt:1.3 llvm/lib/CodeGen/README.txt:1.4 --- llvm/lib/CodeGen/README.txt:1.3 Wed Mar 28 21:48:56 2007 +++ llvm/lib/CodeGen/README.txt Mon Apr 16 13:10:22 2007 @@ -2,29 +2,29 @@ Common register allocation / spilling problem: - mul lr, r4, lr - str lr, [sp, #+52] - ldr lr, [r1, #+32] - sxth r3, r3 - ldr r4, [sp, #+52] - mla r4, r3, lr, r4 + mul lr, r4, lr + str lr, [sp, #+52] + ldr lr, [r1, #+32] + sxth r3, r3 + ldr r4, [sp, #+52] + mla r4, r3, lr, r4 can be: - mul lr, r4, lr + mul lr, r4, lr mov r4, lr - str lr, [sp, #+52] - ldr lr, [r1, #+32] - sxth r3, r3 - mla r4, r3, lr, r4 + str lr, [sp, #+52] + ldr lr, [r1, #+32] + sxth r3, r3 + mla r4, r3, lr, r4 and then "merge" mul and mov: - mul r4, r4, lr - str lr, [sp, #+52] - ldr lr, [r1, #+32] - sxth r3, r3 - mla r4, r3, lr, r4 + mul r4, r4, lr + str lr, [sp, #+52] + ldr lr, [r1, #+32] + sxth r3, r3 + mla r4, r3, lr, r4 It also increase the likelyhood the store may become dead. @@ -70,13 +70,13 @@ bb27 ... ... - %reg1037 = ADDri %reg1039, 1 - %reg1038 = ADDrs %reg1032, %reg1039, %NOREG, 10 + %reg1037 = ADDri %reg1039, 1 + %reg1038 = ADDrs %reg1032, %reg1039, %NOREG, 10 Successors according to CFG: 0x8b03bf0 (#5) bb76 (0x8b03bf0, LLVM BB @0x8b032d0, ID#5): Predecessors according to CFG: 0x8b0c5f0 (#3) 0x8b0a7c0 (#4) - %reg1039 = PHI %reg1070, mbb, %reg1037, mbb + %reg1039 = PHI %reg1070, mbb, %reg1037, mbb Note ADDri is not a two-address instruction. However, its result %reg1037 is an operand of the PHI node in bb76 and its operand %reg1039 is the result of the From asl at math.spbu.ru Mon Apr 16 13:11:37 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:37 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/LoopPass.h Message-ID: <200704161811.l3GIBbXP011434@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: LoopPass.h updated: 1.13 -> 1.14 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+1 -1) LoopPass.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/Analysis/LoopPass.h diff -u llvm/include/llvm/Analysis/LoopPass.h:1.13 llvm/include/llvm/Analysis/LoopPass.h:1.14 --- llvm/include/llvm/Analysis/LoopPass.h:1.13 Tue Mar 6 13:11:25 2007 +++ llvm/include/llvm/Analysis/LoopPass.h Mon Apr 16 13:10:22 2007 @@ -55,7 +55,7 @@ /// Assign pass manager to manager this pass virtual void assignPassManager(PMStack &PMS, - PassManagerType PMT = PMT_LoopPassManager); + PassManagerType PMT = PMT_LoopPassManager); }; From asl at math.spbu.ru Mon Apr 16 13:11:38 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:38 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CallGraphSCCPass.h Pass.h PassSupport.h Message-ID: <200704161811.l3GIBcpQ011450@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: CallGraphSCCPass.h updated: 1.10 -> 1.11 Pass.h updated: 1.81 -> 1.82 PassSupport.h updated: 1.37 -> 1.38 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+9 -7) CallGraphSCCPass.h | 2 +- Pass.h | 8 ++++---- PassSupport.h | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) Index: llvm/include/llvm/CallGraphSCCPass.h diff -u llvm/include/llvm/CallGraphSCCPass.h:1.10 llvm/include/llvm/CallGraphSCCPass.h:1.11 --- llvm/include/llvm/CallGraphSCCPass.h:1.10 Thu Jan 25 19:08:18 2007 +++ llvm/include/llvm/CallGraphSCCPass.h Mon Apr 16 13:10:22 2007 @@ -52,7 +52,7 @@ /// Assign pass manager to manager this pass virtual void assignPassManager(PMStack &PMS, - PassManagerType PMT = PMT_CallGraphPassManager); + PassManagerType PMT = PMT_CallGraphPassManager); /// getAnalysisUsage - For this class, we declare that we require and preserve /// the call graph. If the derived class implements this method, it should Index: llvm/include/llvm/Pass.h diff -u llvm/include/llvm/Pass.h:1.81 llvm/include/llvm/Pass.h:1.82 --- llvm/include/llvm/Pass.h:1.81 Mon Mar 5 19:55:46 2007 +++ llvm/include/llvm/Pass.h Mon Apr 16 13:10:22 2007 @@ -123,7 +123,7 @@ /// Each pass is responsible for assigning a pass manager to itself. /// PMS is the stack of available pass manager. virtual void assignPassManager(PMStack &PMS, - PassManagerType T = PMT_Unknown) {} + PassManagerType T = PMT_Unknown) {} /// Check if available pass managers are suitable for this pass or not. virtual void preparePassManager(PMStack &PMS) {} @@ -215,7 +215,7 @@ virtual bool runPass(BasicBlock&) { return false; } virtual void assignPassManager(PMStack &PMS, - PassManagerType T = PMT_ModulePassManager); + PassManagerType T = PMT_ModulePassManager); // Force out-of-line virtual method. virtual ~ModulePass(); }; @@ -282,7 +282,7 @@ bool run(Function &F); virtual void assignPassManager(PMStack &PMS, - PassManagerType T = PMT_FunctionPassManager); + PassManagerType T = PMT_FunctionPassManager); }; @@ -337,7 +337,7 @@ virtual bool runPass(BasicBlock &BB); virtual void assignPassManager(PMStack &PMS, - PassManagerType T = PMT_BasicBlockPassManager); + PassManagerType T = PMT_BasicBlockPassManager); }; /// PMStack Index: llvm/include/llvm/PassSupport.h diff -u llvm/include/llvm/PassSupport.h:1.37 llvm/include/llvm/PassSupport.h:1.38 --- llvm/include/llvm/PassSupport.h:1.37 Fri Mar 23 13:44:11 2007 +++ llvm/include/llvm/PassSupport.h Mon Apr 16 13:10:22 2007 @@ -137,8 +137,10 @@ /// const PassInfo *getPassInfo() const { return &PIObj; } + typedef Pass* (*NormalCtor_t)(); + RegisterPassBase(const char *Name, const char *Arg, const std::type_info &TI, - Pass *(*NormalCtor)() = 0, bool CFGOnly = false) + NormalCtor_t NormalCtor = 0, bool CFGOnly = false) : PIObj(Name, Arg, TI, NormalCtor, CFGOnly) { registerPass(); } @@ -164,7 +166,7 @@ // Register Pass using default constructor... RegisterPass(const char *PassArg, const char *Name, bool CFGOnly = false) : RegisterPassBase(Name, PassArg, typeid(PassName), - callDefaultCtor, CFGOnly) { + (RegisterPassBase::NormalCtor_t)callDefaultCtor, CFGOnly) { } }; From asl at math.spbu.ru Mon Apr 16 13:11:39 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:39 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200704161811.l3GIBdFW011457@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.122 -> 1.123 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+2 -2) TargetLowering.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.122 llvm/include/llvm/Target/TargetLowering.h:1.123 --- llvm/include/llvm/Target/TargetLowering.h:1.122 Mon Apr 9 18:34:08 2007 +++ llvm/include/llvm/Target/TargetLowering.h Mon Apr 16 13:10:22 2007 @@ -884,9 +884,9 @@ // Div utility functions // SDOperand BuildSDIV(SDNode *N, SelectionDAG &DAG, - std::vector* Created) const; + std::vector* Created) const; SDOperand BuildUDIV(SDNode *N, SelectionDAG &DAG, - std::vector* Created) const; + std::vector* Created) const; //===--------------------------------------------------------------------===// From asl at math.spbu.ru Mon Apr 16 13:11:39 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/MSIL/MSILWriter.cpp MSILWriter.h Message-ID: <200704161811.l3GIBdPi011462@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/MSIL: MSILWriter.cpp updated: 1.3 -> 1.4 MSILWriter.h updated: 1.1 -> 1.2 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+3 -3) MSILWriter.cpp | 4 ++-- MSILWriter.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/MSIL/MSILWriter.cpp diff -u llvm/lib/Target/MSIL/MSILWriter.cpp:1.3 llvm/lib/Target/MSIL/MSILWriter.cpp:1.4 --- llvm/lib/Target/MSIL/MSILWriter.cpp:1.3 Tue Apr 10 21:44:19 2007 +++ llvm/lib/Target/MSIL/MSILWriter.cpp Mon Apr 16 13:10:23 2007 @@ -1,6 +1,6 @@ //===-- MSILWriter.cpp - Library for converting LLVM code to MSIL ---------===// // -// The LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file was developed by Roman Samoilov and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. @@ -1333,7 +1333,7 @@ } //===----------------------------------------------------------------------===// -// External Interface declaration +// External Interface declaration //===----------------------------------------------------------------------===// bool MSILTarget::addPassesToEmitWholeFile(PassManager &PM, std::ostream &o, Index: llvm/lib/Target/MSIL/MSILWriter.h diff -u llvm/lib/Target/MSIL/MSILWriter.h:1.1 llvm/lib/Target/MSIL/MSILWriter.h:1.2 --- llvm/lib/Target/MSIL/MSILWriter.h:1.1 Wed Mar 21 16:38:25 2007 +++ llvm/lib/Target/MSIL/MSILWriter.h Mon Apr 16 13:10:23 2007 @@ -1,6 +1,6 @@ //===-- MSILWriter.h - TargetMachine for the MSIL ---------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file was developed by Roman Samoilov and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. From asl at math.spbu.ru Mon Apr 16 13:11:39 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/CodeExtractor.cpp LowerAllocations.cpp LowerInvoke.cpp LowerSelect.cpp LowerSwitch.cpp Mem2Reg.cpp Message-ID: <200704161811.l3GIBdWF011477@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: CodeExtractor.cpp updated: 1.52 -> 1.53 LowerAllocations.cpp updated: 1.72 -> 1.73 LowerInvoke.cpp updated: 1.57 -> 1.58 LowerSelect.cpp updated: 1.11 -> 1.12 LowerSwitch.cpp updated: 1.36 -> 1.37 Mem2Reg.cpp updated: 1.22 -> 1.23 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+6 -6) CodeExtractor.cpp | 2 +- LowerAllocations.cpp | 2 +- LowerInvoke.cpp | 2 +- LowerSelect.cpp | 2 +- LowerSwitch.cpp | 2 +- Mem2Reg.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/lib/Transforms/Utils/CodeExtractor.cpp diff -u llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.52 llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.53 --- llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.52 Sat Apr 7 00:31:27 2007 +++ llvm/lib/Transforms/Utils/CodeExtractor.cpp Mon Apr 16 13:10:23 2007 @@ -151,7 +151,7 @@ for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) if (DT->getNode(I)->getIDom()->getBlock() == OldPred) { DT->changeImmediateDominator(DT->getNode(I), DT->getNode(NewBB)); - EF->setImmediateDominator(I, NewBB); + EF->setImmediateDominator(I, NewBB); } } Index: llvm/lib/Transforms/Utils/LowerAllocations.cpp diff -u llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.72 llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.73 --- llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.72 Fri Mar 2 17:03:17 2007 +++ llvm/lib/Transforms/Utils/LowerAllocations.cpp Mon Apr 16 13:10:23 2007 @@ -43,7 +43,7 @@ AU.addRequired(); AU.setPreservesCFG(); - // This is a cluster of orthogonal Transforms: + // This is a cluster of orthogonal Transforms: AU.addPreserved(); AU.addPreservedID(PromoteMemoryToRegisterID); AU.addPreservedID(LowerSelectID); Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.57 llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.58 --- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.57 Thu Feb 22 10:21:18 2007 +++ llvm/lib/Transforms/Utils/LowerInvoke.cpp Mon Apr 16 13:10:23 2007 @@ -80,7 +80,7 @@ bool runOnFunction(Function &F); virtual void getAnalysisUsage(AnalysisUsage &AU) const { - // This is a cluster of orthogonal Transforms + // This is a cluster of orthogonal Transforms AU.addPreservedID(PromoteMemoryToRegisterID); AU.addPreservedID(LowerSelectID); AU.addPreservedID(LowerSwitchID); Index: llvm/lib/Transforms/Utils/LowerSelect.cpp diff -u llvm/lib/Transforms/Utils/LowerSelect.cpp:1.11 llvm/lib/Transforms/Utils/LowerSelect.cpp:1.12 --- llvm/lib/Transforms/Utils/LowerSelect.cpp:1.11 Sat Feb 10 19:37:51 2007 +++ llvm/lib/Transforms/Utils/LowerSelect.cpp Mon Apr 16 13:10:23 2007 @@ -37,7 +37,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { // This certainly destroys the CFG. - // This is a cluster of orthogonal Transforms: + // This is a cluster of orthogonal Transforms: AU.addPreserved(); AU.addPreservedID(PromoteMemoryToRegisterID); AU.addPreservedID(LowerSwitchID); Index: llvm/lib/Transforms/Utils/LowerSwitch.cpp diff -u llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.36 llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.37 --- llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.36 Mon Mar 12 12:56:27 2007 +++ llvm/lib/Transforms/Utils/LowerSwitch.cpp Mon Apr 16 13:10:23 2007 @@ -33,7 +33,7 @@ virtual bool runOnFunction(Function &F); virtual void getAnalysisUsage(AnalysisUsage &AU) const { - // This is a cluster of orthogonal Transforms + // This is a cluster of orthogonal Transforms AU.addPreserved(); AU.addPreservedID(PromoteMemoryToRegisterID); AU.addPreservedID(LowerSelectID); Index: llvm/lib/Transforms/Utils/Mem2Reg.cpp diff -u llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.22 llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.23 --- llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.22 Tue Dec 19 16:17:40 2006 +++ llvm/lib/Transforms/Utils/Mem2Reg.cpp Mon Apr 16 13:10:23 2007 @@ -40,7 +40,7 @@ AU.addRequired(); AU.addRequired(); AU.setPreservesCFG(); - // This is a cluster of orthogonal Transforms + // This is a cluster of orthogonal Transforms AU.addPreserved(); AU.addPreservedID(LowerSelectID); AU.addPreservedID(LowerSwitchID); From asl at math.spbu.ru Mon Apr 16 13:11:39 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LowerPacked.cpp Reg2Mem.cpp Message-ID: <200704161811.l3GIBdlF011484@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LowerPacked.cpp updated: 1.20 -> 1.21 Reg2Mem.cpp updated: 1.11 -> 1.12 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+5 -5) LowerPacked.cpp | 2 +- Reg2Mem.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/lib/Transforms/Scalar/LowerPacked.cpp diff -u llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.20 llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.21 --- llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.20 Wed Feb 14 21:39:18 2007 +++ llvm/lib/Transforms/Scalar/LowerPacked.cpp Mon Apr 16 13:10:23 2007 @@ -379,7 +379,7 @@ new AllocaInst(PTy->getElementType(), ConstantInt::get(Type::Int32Ty, PTy->getNumElements()), EI.getName() + ".alloca", - EI.getParent()->getParent()->getEntryBlock().begin()); + EI.getParent()->getParent()->getEntryBlock().begin()); for (unsigned i = 0; i < PTy->getNumElements(); ++i) { GetElementPtrInst *GEP = new GetElementPtrInst(alloca, ConstantInt::get(Type::Int32Ty, i), Index: llvm/lib/Transforms/Scalar/Reg2Mem.cpp diff -u llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.11 llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.12 --- llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.11 Mon Feb 5 17:32:05 2007 +++ llvm/lib/Transforms/Scalar/Reg2Mem.cpp Mon Apr 16 13:10:23 2007 @@ -44,7 +44,7 @@ for(Value::use_iterator ii = i->use_begin(), ie = i->use_end(); ii != ie; ++ii) if (cast(*ii)->getParent() != bb || - isa(*ii)) + isa(*ii)) return true; return false; } @@ -52,9 +52,9 @@ virtual bool runOnFunction(Function &F) { if (!F.isDeclaration()) { //give us a clean block - BasicBlock* bbold = &F.getEntryBlock(); - BasicBlock* bbnew = new BasicBlock("allocablock", &F, &F.getEntryBlock()); - new BranchInst(bbold, bbnew); + BasicBlock* bbold = &F.getEntryBlock(); + BasicBlock* bbnew = new BasicBlock("allocablock", &F, &F.getEntryBlock()); + new BranchInst(bbold, bbnew); //find the instructions std::list worklist; From asl at math.spbu.ru Mon Apr 16 13:11:40 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:40 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64Bundling.cpp IA64ISelDAGToDAG.cpp IA64ISelLowering.cpp Message-ID: <200704161811.l3GIBee6011503@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64Bundling.cpp updated: 1.7 -> 1.8 IA64ISelDAGToDAG.cpp updated: 1.64 -> 1.65 IA64ISelLowering.cpp updated: 1.56 -> 1.57 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+39 -31) IA64Bundling.cpp | 8 +++---- IA64ISelDAGToDAG.cpp | 52 +++++++++++++++++++++++++++++---------------------- IA64ISelLowering.cpp | 10 ++++----- 3 files changed, 39 insertions(+), 31 deletions(-) Index: llvm/lib/Target/IA64/IA64Bundling.cpp diff -u llvm/lib/Target/IA64/IA64Bundling.cpp:1.7 llvm/lib/Target/IA64/IA64Bundling.cpp:1.8 --- llvm/lib/Target/IA64/IA64Bundling.cpp:1.7 Tue Dec 19 16:59:26 2006 +++ llvm/lib/Target/IA64/IA64Bundling.cpp Mon Apr 16 13:10:23 2007 @@ -56,10 +56,10 @@ return Changed; } - std::set PendingRegWrites; // XXX: ugly global, but - // pending writes can cross basic blocks. Note that - // taken branches end instruction groups. So we - // only need to worry about 'fallthrough' code + // XXX: ugly global, but pending writes can cross basic blocks. Note that + // taken branches end instruction groups. So we only need to worry about + // 'fallthrough' code + std::set PendingRegWrites; }; } // end of anonymous namespace Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.64 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.65 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.64 Tue Dec 19 16:59:26 2006 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Mon Apr 16 13:10:23 2007 @@ -352,9 +352,10 @@ Chain = targetEntryPoint.getValue(1); SDOperand targetGPAddr= SDOperand(CurDAG->getTargetNode(IA64::ADDS, MVT::i64, - FnDescriptor, CurDAG->getConstant(8, MVT::i64)), 0); + FnDescriptor, + CurDAG->getConstant(8, MVT::i64)), 0); Chain = targetGPAddr.getValue(1); - SDOperand targetGP= + SDOperand targetGP = SDOperand(CurDAG->getTargetNode(IA64::LD8, MVT::i64, targetGPAddr), 0); Chain = targetGP.getValue(1); @@ -418,14 +419,14 @@ int FI = cast(N)->getIndex(); if (N->hasOneUse()) return CurDAG->SelectNodeTo(N, IA64::MOV, MVT::i64, - CurDAG->getTargetFrameIndex(FI, MVT::i64)); + CurDAG->getTargetFrameIndex(FI, MVT::i64)); else return CurDAG->getTargetNode(IA64::MOV, MVT::i64, CurDAG->getTargetFrameIndex(FI, MVT::i64)); } case ISD::ConstantPool: { // TODO: nuke the constant pool - // (ia64 doesn't need one) + // (ia64 doesn't need one) ConstantPoolSDNode *CP = cast(N); Constant *C = CP->getConstVal(); SDOperand CPI = CurDAG->getTargetConstantPool(C, MVT::i64, @@ -437,18 +438,24 @@ case ISD::GlobalAddress: { GlobalValue *GV = cast(N)->getGlobal(); SDOperand GA = CurDAG->getTargetGlobalAddress(GV, MVT::i64); - SDOperand Tmp = SDOperand(CurDAG->getTargetNode(IA64::ADDL_GA, MVT::i64, - CurDAG->getRegister(IA64::r1, MVT::i64), GA), 0); + SDOperand Tmp = + SDOperand(CurDAG->getTargetNode(IA64::ADDL_GA, MVT::i64, + CurDAG->getRegister(IA64::r1, + MVT::i64), GA), 0); return CurDAG->getTargetNode(IA64::LD8, MVT::i64, Tmp); } -/* XXX case ISD::ExternalSymbol: { - SDOperand EA = CurDAG->getTargetExternalSymbol(cast(N)->getSymbol(), - MVT::i64); - SDOperand Tmp = CurDAG->getTargetNode(IA64::ADDL_EA, MVT::i64, - CurDAG->getRegister(IA64::r1, MVT::i64), EA); - return CurDAG->getTargetNode(IA64::LD8, MVT::i64, Tmp); - } +/* XXX + case ISD::ExternalSymbol: { + SDOperand EA = CurDAG->getTargetExternalSymbol( + cast(N)->getSymbol(), + MVT::i64); + SDOperand Tmp = CurDAG->getTargetNode(IA64::ADDL_EA, MVT::i64, + CurDAG->getRegister(IA64::r1, + MVT::i64), + EA); + return CurDAG->getTargetNode(IA64::LD8, MVT::i64, Tmp); + } */ case ISD::LOAD: { // FIXME: load -1, not 1, for bools? @@ -504,15 +511,16 @@ default: assert(0 && "unknown type in store"); case MVT::i1: { // this is a bool Opc = IA64::ST1; // we store either 0 or 1 as a byte - // first load zero! - SDOperand Initial = CurDAG->getCopyFromReg(Chain, IA64::r0, MVT::i64); - Chain = Initial.getValue(1); - // then load 1 into the same reg iff the predicate to store is 1 + // first load zero! + SDOperand Initial = CurDAG->getCopyFromReg(Chain, IA64::r0, MVT::i64); + Chain = Initial.getValue(1); + // then load 1 into the same reg iff the predicate to store is 1 SDOperand Tmp = ST->getValue(); AddToISelQueue(Tmp); - Tmp = SDOperand(CurDAG->getTargetNode(IA64::TPCADDS, MVT::i64, Initial, - CurDAG->getTargetConstant(1, MVT::i64), - Tmp), 0); + Tmp = + SDOperand(CurDAG->getTargetNode(IA64::TPCADDS, MVT::i64, Initial, + CurDAG->getTargetConstant(1, MVT::i64), + Tmp), 0); return CurDAG->SelectNodeTo(N, Opc, MVT::Other, Address, Tmp, Chain); } case MVT::i64: Opc = IA64::ST8; break; @@ -551,14 +559,14 @@ case ISD::CALLSEQ_END: { int64_t Amt = cast(N->getOperand(1))->getValue(); unsigned Opc = N->getOpcode() == ISD::CALLSEQ_START ? - IA64::ADJUSTCALLSTACKDOWN : IA64::ADJUSTCALLSTACKUP; + IA64::ADJUSTCALLSTACKDOWN : IA64::ADJUSTCALLSTACKUP; SDOperand N0 = N->getOperand(0); AddToISelQueue(N0); return CurDAG->SelectNodeTo(N, Opc, MVT::Other, getI64Imm(Amt), N0); } case ISD::BR: - // FIXME: we don't need long branches all the time! + // FIXME: we don't need long branches all the time! SDOperand N0 = N->getOperand(0); AddToISelQueue(N0); return CurDAG->SelectNodeTo(N, IA64::BRL_NOTCALL, MVT::Other, Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.56 llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.57 --- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.56 Wed Mar 7 10:25:09 2007 +++ llvm/lib/Target/IA64/IA64ISelLowering.cpp Mon Apr 16 13:10:23 2007 @@ -366,9 +366,9 @@ ValToStore = Val; } else { RegValuesToPass.push_back(Val); - if(1 /* TODO: if(calling external or varadic function)*/ ) { - ValToConvert = Val; // additionally pass this FP value as an int - } + if(1 /* TODO: if(calling external or varadic function)*/ ) { + ValToConvert = Val; // additionally pass this FP value as an int + } } break; } @@ -384,7 +384,7 @@ } if(ValToConvert.Val) { - Converts.push_back(DAG.getNode(IA64ISD::GETFD, MVT::i64, ValToConvert)); + Converts.push_back(DAG.getNode(IA64ISD::GETFD, MVT::i64, ValToConvert)); } } @@ -492,7 +492,7 @@ Chain = boolInR8.getValue(1); SDOperand zeroReg = DAG.getCopyFromReg(Chain, IA64::r0, MVT::i64, InFlag); InFlag = zeroReg.getValue(2); - Chain = zeroReg.getValue(1); + Chain = zeroReg.getValue(1); RetVal = DAG.getSetCC(MVT::i1, boolInR8, zeroReg, ISD::SETNE); break; From asl at math.spbu.ru Mon Apr 16 13:11:43 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp Message-ID: <200704161811.l3GIBhDi011511@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: PassManager.cpp updated: 1.146 -> 1.147 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+3 -3) PassManager.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/VMCore/PassManager.cpp diff -u llvm/lib/VMCore/PassManager.cpp:1.146 llvm/lib/VMCore/PassManager.cpp:1.147 --- llvm/lib/VMCore/PassManager.cpp:1.146 Thu Mar 8 13:05:01 2007 +++ llvm/lib/VMCore/PassManager.cpp Mon Apr 16 13:10:23 2007 @@ -1293,7 +1293,7 @@ /// Find appropriate Module Pass Manager in the PM Stack and /// add self into that manager. void ModulePass::assignPassManager(PMStack &PMS, - PassManagerType PreferredType) { + PassManagerType PreferredType) { // Find Module Pass Manager while(!PMS.empty()) { @@ -1312,7 +1312,7 @@ /// Find appropriate Function Pass Manager or Call Graph Pass Manager /// in the PM Stack and add self into that manager. void FunctionPass::assignPassManager(PMStack &PMS, - PassManagerType PreferredType) { + PassManagerType PreferredType) { // Find Module Pass Manager (TODO : Or Call Graph Pass Manager) while(!PMS.empty()) { @@ -1357,7 +1357,7 @@ /// Find appropriate Basic Pass Manager or Call Graph Pass Manager /// in the PM Stack and add self into that manager. void BasicBlockPass::assignPassManager(PMStack &PMS, - PassManagerType PreferredType) { + PassManagerType PreferredType) { BBPassManager *BBP = NULL; From asl at math.spbu.ru Mon Apr 16 13:11:43 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:43 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/BitVector.h hash_set.in Message-ID: <200704161811.l3GIBhc9011518@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: BitVector.h updated: 1.20 -> 1.21 hash_set.in updated: 1.8 -> 1.9 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+16 -16) BitVector.h | 30 +++++++++++++++--------------- hash_set.in | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) Index: llvm/include/llvm/ADT/BitVector.h diff -u llvm/include/llvm/ADT/BitVector.h:1.20 llvm/include/llvm/ADT/BitVector.h:1.21 --- llvm/include/llvm/ADT/BitVector.h:1.20 Wed Apr 4 17:13:39 2007 +++ llvm/include/llvm/ADT/BitVector.h Mon Apr 16 13:10:22 2007 @@ -128,12 +128,12 @@ int find_first() const { for (unsigned i = 0; i < NumBitWords(size()); ++i) if (Bits[i] != 0) { - if (sizeof(BitWord) == 4) - return i * BITS_PER_WORD + CountTrailingZeros_32(Bits[i]); - else if (sizeof(BitWord) == 8) - return i * BITS_PER_WORD + CountTrailingZeros_64(Bits[i]); - else - assert(0 && "Unsupported!"); + if (sizeof(BitWord) == 4) + return i * BITS_PER_WORD + CountTrailingZeros_32(Bits[i]); + else if (sizeof(BitWord) == 8) + return i * BITS_PER_WORD + CountTrailingZeros_64(Bits[i]); + else + assert(0 && "Unsupported!"); } return -1; } @@ -153,22 +153,22 @@ if (Copy != 0) { if (sizeof(BitWord) == 4) - return WordPos * BITS_PER_WORD + CountTrailingZeros_32(Copy); + return WordPos * BITS_PER_WORD + CountTrailingZeros_32(Copy); else if (sizeof(BitWord) == 8) - return WordPos * BITS_PER_WORD + CountTrailingZeros_64(Copy); + return WordPos * BITS_PER_WORD + CountTrailingZeros_64(Copy); else - assert(0 && "Unsupported!"); + assert(0 && "Unsupported!"); } // Check subsequent words. for (unsigned i = WordPos+1; i < NumBitWords(size()); ++i) if (Bits[i] != 0) { - if (sizeof(BitWord) == 4) - return i * BITS_PER_WORD + CountTrailingZeros_32(Bits[i]); - else if (sizeof(BitWord) == 8) - return i * BITS_PER_WORD + CountTrailingZeros_64(Bits[i]); - else - assert(0 && "Unsupported!"); + if (sizeof(BitWord) == 4) + return i * BITS_PER_WORD + CountTrailingZeros_32(Bits[i]); + else if (sizeof(BitWord) == 8) + return i * BITS_PER_WORD + CountTrailingZeros_64(Bits[i]); + else + assert(0 && "Unsupported!"); } return -1; } Index: llvm/include/llvm/ADT/hash_set.in diff -u llvm/include/llvm/ADT/hash_set.in:1.8 llvm/include/llvm/ADT/hash_set.in:1.9 --- llvm/include/llvm/ADT/hash_set.in:1.8 Wed Oct 26 10:02:21 2005 +++ llvm/include/llvm/ADT/hash_set.in Mon Apr 16 13:10:22 2007 @@ -84,7 +84,7 @@ /* template struct hash { unsigned int operator()(const unsigned int& x) const { - return x; + return x; } }; */ From asl at math.spbu.ru Mon Apr 16 13:11:40 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:40 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp AlphaISelDAGToDAG.cpp AlphaISelLowering.cpp AlphaLLRP.cpp AlphaRegisterInfo.cpp Message-ID: <200704161811.l3GIBetv011502@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaAsmPrinter.cpp updated: 1.63 -> 1.64 AlphaISelDAGToDAG.cpp updated: 1.68 -> 1.69 AlphaISelLowering.cpp updated: 1.85 -> 1.86 AlphaLLRP.cpp updated: 1.7 -> 1.8 AlphaRegisterInfo.cpp updated: 1.64 -> 1.65 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+207 -205) AlphaAsmPrinter.cpp | 16 ++-- AlphaISelDAGToDAG.cpp | 108 ++++++++++++++-------------- AlphaISelLowering.cpp | 79 ++++++++++---------- AlphaLLRP.cpp | 189 +++++++++++++++++++++++++------------------------- AlphaRegisterInfo.cpp | 20 ++--- 5 files changed, 207 insertions(+), 205 deletions(-) Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.63 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.64 --- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.63 Tue Feb 13 17:41:16 2007 +++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp Mon Apr 16 13:10:22 2007 @@ -53,9 +53,9 @@ bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode); bool PrintAsmMemoryOperand(const MachineInstr *MI, - unsigned OpNo, - unsigned AsmVariant, - const char *ExtraCode); + unsigned OpNo, + unsigned AsmVariant, + const char *ExtraCode); }; } // end of anonymous namespace @@ -278,16 +278,16 @@ /// PrintAsmOperand - Print out an operand for an inline asm expression. /// bool AlphaAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, - const char *ExtraCode) { + unsigned AsmVariant, + const char *ExtraCode) { printOperand(MI, OpNo); return false; } bool AlphaAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, - unsigned OpNo, - unsigned AsmVariant, - const char *ExtraCode) { + unsigned OpNo, + unsigned AsmVariant, + const char *ExtraCode) { if (ExtraCode && ExtraCode[0]) return true; // Unknown modifier. O << "0("; Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.68 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.69 --- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.68 Wed Jan 24 15:09:16 2007 +++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Mon Apr 16 13:10:22 2007 @@ -50,7 +50,7 @@ static int64_t get_ldah16(int64_t x) { int64_t y = x / IMM_MULT; if (x % IMM_MULT > IMM_HIGH) - ++y; + ++y; return y; } @@ -145,7 +145,7 @@ public: AlphaDAGToDAGISel(TargetMachine &TM) : SelectionDAGISel(AlphaLowering), - AlphaLowering(*(AlphaTargetLowering*)(TM.getTargetLowering())) + AlphaLowering(*(AlphaTargetLowering*)(TM.getTargetLowering())) {} /// getI64Imm - Return a target constant with the specified value, of type @@ -177,7 +177,7 @@ default: return true; case 'm': // memory Op0 = Op; - AddToISelQueue(Op0); + AddToISelQueue(Op0); break; } @@ -203,7 +203,7 @@ MachineFunction* MF = BB->getParent(); unsigned GP = 0; for(MachineFunction::livein_iterator ii = MF->livein_begin(), - ee = MF->livein_end(); ii != ee; ++ii) + ee = MF->livein_end(); ii != ee; ++ii) if (ii->first == Alpha::R29) { GP = ii->second; break; @@ -219,7 +219,7 @@ MachineFunction* MF = BB->getParent(); unsigned RA = 0; for(MachineFunction::livein_iterator ii = MF->livein_begin(), - ee = MF->livein_end(); ii != ee; ++ii) + ee = MF->livein_end(); ii != ee; ++ii) if (ii->first == Alpha::R26) { RA = ii->second; break; @@ -283,16 +283,16 @@ AddToISelQueue(N1); AddToISelQueue(N2); Chain = CurDAG->getCopyToReg(Chain, Alpha::R24, N1, - SDOperand(0,0)); + SDOperand(0,0)); Chain = CurDAG->getCopyToReg(Chain, Alpha::R25, N2, - Chain.getValue(1)); + Chain.getValue(1)); Chain = CurDAG->getCopyToReg(Chain, Alpha::R27, N0, - Chain.getValue(1)); + Chain.getValue(1)); SDNode *CNode = CurDAG->getTargetNode(Alpha::JSRs, MVT::Other, MVT::Flag, Chain, Chain.getValue(1)); Chain = CurDAG->getCopyFromReg(Chain, Alpha::R27, MVT::i64, - SDOperand(CNode, 1)); + SDOperand(CNode, 1)); return CurDAG->SelectNodeTo(N, Alpha::BISr, MVT::i64, Chain, Chain); } @@ -316,11 +316,11 @@ int64_t val = (int64_t)uval; int32_t val32 = (int32_t)val; if (val <= IMM_HIGH + IMM_HIGH * IMM_MULT && - val >= IMM_LOW + IMM_LOW * IMM_MULT) + val >= IMM_LOW + IMM_LOW * IMM_MULT) break; //(LDAH (LDA)) if ((uval >> 32) == 0 && //empty upper bits - val32 <= IMM_HIGH + IMM_HIGH * IMM_MULT) - // val32 >= IMM_LOW + IMM_LOW * IMM_MULT) //always true + val32 <= IMM_HIGH + IMM_HIGH * IMM_MULT) + // val32 >= IMM_LOW + IMM_LOW * IMM_MULT) //always true break; //(zext (LDAH (LDA))) //Else use the constant pool ConstantInt *C = ConstantInt::get(Type::Int64Ty, uval); @@ -328,7 +328,7 @@ SDNode *Tmp = CurDAG->getTargetNode(Alpha::LDAHr, MVT::i64, CPI, getGlobalBaseReg()); return CurDAG->SelectNodeTo(N, Alpha::LDQr, MVT::i64, MVT::Other, - CPI, SDOperand(Tmp, 0), CurDAG->getEntryNode()); + CPI, SDOperand(Tmp, 0), CurDAG->getEntryNode()); } case ISD::TargetConstantFP: { ConstantFPSDNode *CN = cast(N); @@ -358,21 +358,21 @@ switch(CC) { default: DEBUG(N->dump()); assert(0 && "Unknown FP comparison!"); case ISD::SETEQ: case ISD::SETOEQ: case ISD::SETUEQ: - Opc = Alpha::CMPTEQ; break; + Opc = Alpha::CMPTEQ; break; case ISD::SETLT: case ISD::SETOLT: case ISD::SETULT: - Opc = Alpha::CMPTLT; break; + Opc = Alpha::CMPTLT; break; case ISD::SETLE: case ISD::SETOLE: case ISD::SETULE: - Opc = Alpha::CMPTLE; break; + Opc = Alpha::CMPTLE; break; case ISD::SETGT: case ISD::SETOGT: case ISD::SETUGT: - Opc = Alpha::CMPTLT; rev = true; break; + Opc = Alpha::CMPTLT; rev = true; break; case ISD::SETGE: case ISD::SETOGE: case ISD::SETUGE: - Opc = Alpha::CMPTLE; rev = true; break; + Opc = Alpha::CMPTLE; rev = true; break; case ISD::SETNE: case ISD::SETONE: case ISD::SETUNE: - Opc = Alpha::CMPTEQ; inv = true; break; + Opc = Alpha::CMPTEQ; inv = true; break; case ISD::SETO: - Opc = Alpha::CMPTUN; inv = true; break; + Opc = Alpha::CMPTUN; inv = true; break; case ISD::SETUO: - Opc = Alpha::CMPTUN; break; + Opc = Alpha::CMPTUN; break; }; SDOperand tmp1 = N->getOperand(rev?1:0); SDOperand tmp2 = N->getOperand(rev?0:1); @@ -385,12 +385,13 @@ switch(CC) { case ISD::SETUEQ: case ISD::SETULT: case ISD::SETULE: case ISD::SETUNE: case ISD::SETUGT: case ISD::SETUGE: - { - SDNode* cmp2 = CurDAG->getTargetNode(Alpha::CMPTUN, MVT::f64, tmp1, tmp2); - cmp = CurDAG->getTargetNode(Alpha::ADDT, MVT::f64, - SDOperand(cmp2, 0), SDOperand(cmp, 0)); - break; - } + { + SDNode* cmp2 = CurDAG->getTargetNode(Alpha::CMPTUN, MVT::f64, + tmp1, tmp2); + cmp = CurDAG->getTargetNode(Alpha::ADDT, MVT::f64, + SDOperand(cmp2, 0), SDOperand(cmp, 0)); + break; + } default: break; } @@ -403,8 +404,8 @@ case ISD::SELECT: if (MVT::isFloatingPoint(N->getValueType(0)) && - (N->getOperand(0).getOpcode() != ISD::SETCC || - !MVT::isFloatingPoint(N->getOperand(0).getOperand(1).getValueType()))) { + (N->getOperand(0).getOpcode() != ISD::SETCC || + !MVT::isFloatingPoint(N->getOperand(0).getOperand(1).getValueType()))) { //This should be the condition not covered by the Patterns //FIXME: Don't have SelectCode die, but rather return something testable // so that things like this can be caught in fall though code @@ -427,32 +428,31 @@ ConstantSDNode* SC = NULL; ConstantSDNode* MC = NULL; if (N->getOperand(0).getOpcode() == ISD::SRL && - (MC = dyn_cast(N->getOperand(1))) && - (SC = dyn_cast(N->getOperand(0).getOperand(1)))) - { - uint64_t sval = SC->getValue(); - uint64_t mval = MC->getValue(); - // If the result is a zap, let the autogened stuff handle it. - if (get_zapImm(N->getOperand(0), mval)) - break; - // given mask X, and shift S, we want to see if there is any zap in the - // mask if we play around with the botton S bits - uint64_t dontcare = (~0ULL) >> (64 - sval); - uint64_t mask = mval << sval; - - if (get_zapImm(mask | dontcare)) - mask = mask | dontcare; - - if (get_zapImm(mask)) { - AddToISelQueue(N->getOperand(0).getOperand(0)); - SDOperand Z = - SDOperand(CurDAG->getTargetNode(Alpha::ZAPNOTi, MVT::i64, - N->getOperand(0).getOperand(0), - getI64Imm(get_zapImm(mask))), 0); - return CurDAG->getTargetNode(Alpha::SRLr, MVT::i64, Z, - getI64Imm(sval)); - } + (MC = dyn_cast(N->getOperand(1))) && + (SC = dyn_cast(N->getOperand(0).getOperand(1)))) { + uint64_t sval = SC->getValue(); + uint64_t mval = MC->getValue(); + // If the result is a zap, let the autogened stuff handle it. + if (get_zapImm(N->getOperand(0), mval)) + break; + // given mask X, and shift S, we want to see if there is any zap in the + // mask if we play around with the botton S bits + uint64_t dontcare = (~0ULL) >> (64 - sval); + uint64_t mask = mval << sval; + + if (get_zapImm(mask | dontcare)) + mask = mask | dontcare; + + if (get_zapImm(mask)) { + AddToISelQueue(N->getOperand(0).getOperand(0)); + SDOperand Z = + SDOperand(CurDAG->getTargetNode(Alpha::ZAPNOTi, MVT::i64, + N->getOperand(0).getOperand(0), + getI64Imm(get_zapImm(mask))), 0); + return CurDAG->getTargetNode(Alpha::SRLr, MVT::i64, Z, + getI64Imm(sval)); } + } break; } Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.85 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.86 --- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.85 Sat Mar 24 21:14:49 2007 +++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Mon Apr 16 13:10:22 2007 @@ -172,7 +172,7 @@ SDOperand Zero = DAG.getConstant(0, PtrVT); SDOperand Hi = DAG.getNode(AlphaISD::GPRelHi, MVT::i64, JTI, - DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); + DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); SDOperand Lo = DAG.getNode(AlphaISD::GPRelLo, MVT::i64, JTI, Hi); return Lo; } @@ -197,8 +197,8 @@ // //#define SP $30 static SDOperand LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG, - int &VarArgsBase, - int &VarArgsOffset) { + int &VarArgsBase, + int &VarArgsOffset) { MachineFunction &MF = DAG.getMachineFunction(); MachineFrameInfo *MFI = MF.getFrameInfo(); std::vector ArgValues; @@ -224,17 +224,17 @@ abort(); case MVT::f64: args_float[ArgNo] = AddLiveIn(MF, args_float[ArgNo], - &Alpha::F8RCRegClass); + &Alpha::F8RCRegClass); ArgVal = DAG.getCopyFromReg(Root, args_float[ArgNo], ObjectVT); break; case MVT::f32: args_float[ArgNo] = AddLiveIn(MF, args_float[ArgNo], - &Alpha::F4RCRegClass); + &Alpha::F4RCRegClass); ArgVal = DAG.getCopyFromReg(Root, args_float[ArgNo], ObjectVT); break; case MVT::i64: args_int[ArgNo] = AddLiveIn(MF, args_int[ArgNo], - &Alpha::GPRCRegClass); + &Alpha::GPRCRegClass); ArgVal = DAG.getCopyFromReg(Root, args_int[ArgNo], MVT::i64); break; } @@ -286,9 +286,9 @@ static SDOperand LowerRET(SDOperand Op, SelectionDAG &DAG) { SDOperand Copy = DAG.getCopyToReg(Op.getOperand(0), Alpha::R26, - DAG.getNode(AlphaISD::GlobalRetAddr, - MVT::i64), - SDOperand()); + DAG.getNode(AlphaISD::GlobalRetAddr, + MVT::i64), + SDOperand()); switch (Op.getNumOperands()) { default: assert(0 && "Do not know how to return this many arguments!"); @@ -306,7 +306,7 @@ ArgReg = Alpha::F0; } Copy = DAG.getCopyToReg(Copy, ArgReg, Op.getOperand(1), Copy.getValue(1)); - if(DAG.getMachineFunction().liveout_empty()) + if (DAG.getMachineFunction().liveout_empty()) DAG.getMachineFunction().addLiveOut(ArgReg); break; } @@ -387,8 +387,8 @@ switch (Op.getOpcode()) { default: assert(0 && "Wasn't expecting to be able to lower this!"); case ISD::FORMAL_ARGUMENTS: return LowerFORMAL_ARGUMENTS(Op, DAG, - VarArgsBase, - VarArgsOffset); + VarArgsBase, + VarArgsOffset); case ISD::RET: return LowerRET(Op,DAG); case ISD::JumpTable: return LowerJumpTable(Op, DAG); @@ -420,7 +420,7 @@ SDOperand CPI = DAG.getTargetConstantPool(C, MVT::i64, CP->getAlignment()); SDOperand Hi = DAG.getNode(AlphaISD::GPRelHi, MVT::i64, CPI, - DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); + DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); SDOperand Lo = DAG.getNode(AlphaISD::GPRelLo, MVT::i64, CPI, Hi); return Lo; } @@ -432,18 +432,18 @@ // if (!GV->hasWeakLinkage() && !GV->isDeclaration() && !GV->hasLinkOnceLinkage()) { if (GV->hasInternalLinkage()) { SDOperand Hi = DAG.getNode(AlphaISD::GPRelHi, MVT::i64, GA, - DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); + DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); SDOperand Lo = DAG.getNode(AlphaISD::GPRelLo, MVT::i64, GA, Hi); return Lo; } else return DAG.getNode(AlphaISD::RelLit, MVT::i64, GA, - DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); + DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); } case ISD::ExternalSymbol: { return DAG.getNode(AlphaISD::RelLit, MVT::i64, - DAG.getTargetExternalSymbol(cast(Op) - ->getSymbol(), MVT::i64), - DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); + DAG.getTargetExternalSymbol(cast(Op) + ->getSymbol(), MVT::i64), + DAG.getNode(ISD::GLOBAL_OFFSET_TABLE, MVT::i64)); } case ISD::UREM: @@ -452,8 +452,8 @@ if (Op.getOperand(1).getOpcode() == ISD::Constant) { MVT::ValueType VT = Op.Val->getValueType(0); SDOperand Tmp1 = Op.Val->getOpcode() == ISD::UREM ? - BuildUDIV(Op.Val, DAG, NULL) : - BuildSDIV(Op.Val, DAG, NULL); + BuildUDIV(Op.Val, DAG, NULL) : + BuildSDIV(Op.Val, DAG, NULL); Tmp1 = DAG.getNode(ISD::MUL, VT, Tmp1, Op.getOperand(1)); Tmp1 = DAG.getNode(ISD::SUB, VT, Op.getOperand(0), Tmp1); return Tmp1; @@ -463,10 +463,10 @@ case ISD::UDIV: if (MVT::isInteger(Op.getValueType())) { if (Op.getOperand(1).getOpcode() == ISD::Constant) - return Op.getOpcode() == ISD::SDIV ? BuildSDIV(Op.Val, DAG, NULL) - : BuildUDIV(Op.Val, DAG, NULL); + return Op.getOpcode() == ISD::SDIV ? BuildSDIV(Op.Val, DAG, NULL) + : BuildUDIV(Op.Val, DAG, NULL); const char* opstr = 0; - switch(Op.getOpcode()) { + switch (Op.getOpcode()) { case ISD::UREM: opstr = "__remqu"; break; case ISD::SREM: opstr = "__remq"; break; case ISD::UDIV: opstr = "__divqu"; break; @@ -591,29 +591,28 @@ default: break; // Unknown constriant letter case 'f': return make_vector(Alpha::F0 , Alpha::F1 , Alpha::F2 , - Alpha::F3 , Alpha::F4 , Alpha::F5 , - Alpha::F6 , Alpha::F7 , Alpha::F8 , - Alpha::F9 , Alpha::F10, Alpha::F11, + Alpha::F3 , Alpha::F4 , Alpha::F5 , + Alpha::F6 , Alpha::F7 , Alpha::F8 , + Alpha::F9 , Alpha::F10, Alpha::F11, Alpha::F12, Alpha::F13, Alpha::F14, - Alpha::F15, Alpha::F16, Alpha::F17, - Alpha::F18, Alpha::F19, Alpha::F20, - Alpha::F21, Alpha::F22, Alpha::F23, + Alpha::F15, Alpha::F16, Alpha::F17, + Alpha::F18, Alpha::F19, Alpha::F20, + Alpha::F21, Alpha::F22, Alpha::F23, Alpha::F24, Alpha::F25, Alpha::F26, - Alpha::F27, Alpha::F28, Alpha::F29, - Alpha::F30, Alpha::F31, 0); + Alpha::F27, Alpha::F28, Alpha::F29, + Alpha::F30, Alpha::F31, 0); case 'r': return make_vector(Alpha::R0 , Alpha::R1 , Alpha::R2 , - Alpha::R3 , Alpha::R4 , Alpha::R5 , - Alpha::R6 , Alpha::R7 , Alpha::R8 , - Alpha::R9 , Alpha::R10, Alpha::R11, + Alpha::R3 , Alpha::R4 , Alpha::R5 , + Alpha::R6 , Alpha::R7 , Alpha::R8 , + Alpha::R9 , Alpha::R10, Alpha::R11, Alpha::R12, Alpha::R13, Alpha::R14, - Alpha::R15, Alpha::R16, Alpha::R17, - Alpha::R18, Alpha::R19, Alpha::R20, - Alpha::R21, Alpha::R22, Alpha::R23, + Alpha::R15, Alpha::R16, Alpha::R17, + Alpha::R18, Alpha::R19, Alpha::R20, + Alpha::R21, Alpha::R22, Alpha::R23, Alpha::R24, Alpha::R25, Alpha::R26, - Alpha::R27, Alpha::R28, Alpha::R29, - Alpha::R30, Alpha::R31, 0); - + Alpha::R27, Alpha::R28, Alpha::R29, + Alpha::R30, Alpha::R31, 0); } } Index: llvm/lib/Target/Alpha/AlphaLLRP.cpp diff -u llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.7 llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.8 --- llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.7 Tue Dec 19 16:59:25 2006 +++ llvm/lib/Target/Alpha/AlphaLLRP.cpp Mon Apr 16 13:10:22 2007 @@ -50,101 +50,104 @@ unsigned count = 0; for (MachineFunction::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI) { - MachineBasicBlock& MBB = *FI; - bool ub = false; - for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ) { - if (count%4 == 0) - prev[0] = prev[1] = prev[2] = 0; //Slots cleared at fetch boundary - ++count; - MachineInstr *MI = I++; - switch (MI->getOpcode()) { - case Alpha::LDQ: case Alpha::LDL: - case Alpha::LDWU: case Alpha::LDBU: - case Alpha::LDT: case Alpha::LDS: - case Alpha::STQ: case Alpha::STL: - case Alpha::STW: case Alpha::STB: - case Alpha::STT: case Alpha::STS: - if (MI->getOperand(2).getReg() == Alpha::R30) { - if (prev[0] - && prev[0]->getOperand(2).getReg() == - MI->getOperand(2).getReg() - && prev[0]->getOperand(1).getImmedValue() == - MI->getOperand(1).getImmedValue()) { - prev[0] = prev[1]; - prev[1] = prev[2]; - prev[2] = 0; - BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31).addReg(Alpha::R31) - .addReg(Alpha::R31); - Changed = true; nopintro += 1; - count += 1; - } else if (prev[1] - && prev[1]->getOperand(2).getReg() == - MI->getOperand(2).getReg() - && prev[1]->getOperand(1).getImmedValue() == - MI->getOperand(1).getImmedValue()) { - prev[0] = prev[2]; - prev[1] = prev[2] = 0; - BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31).addReg(Alpha::R31) - .addReg(Alpha::R31); - BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31).addReg(Alpha::R31) - .addReg(Alpha::R31); - Changed = true; nopintro += 2; - count += 2; - } else if (prev[2] - && prev[2]->getOperand(2).getReg() == - MI->getOperand(2).getReg() - && prev[2]->getOperand(1).getImmedValue() == - MI->getOperand(1).getImmedValue()) { - prev[0] = prev[1] = prev[2] = 0; - BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31).addReg(Alpha::R31) - .addReg(Alpha::R31); - BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31).addReg(Alpha::R31) - .addReg(Alpha::R31); - BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31).addReg(Alpha::R31) - .addReg(Alpha::R31); - Changed = true; nopintro += 3; - count += 3; - } - prev[0] = prev[1]; - prev[1] = prev[2]; - prev[2] = MI; - break; - } - prev[0] = prev[1]; - prev[1] = prev[2]; - prev[2] = 0; - break; - case Alpha::ALTENT: - case Alpha::MEMLABEL: - case Alpha::PCLABEL: - case Alpha::IDEF_I: - case Alpha::IDEF_F32: - case Alpha::IDEF_F64: - --count; - break; - case Alpha::BR: - case Alpha::JMP: - ub = true; - //fall through - default: - prev[0] = prev[1]; - prev[1] = prev[2]; - prev[2] = 0; - break; - } + MachineBasicBlock& MBB = *FI; + bool ub = false; + for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ) { + if (count%4 == 0) + prev[0] = prev[1] = prev[2] = 0; //Slots cleared at fetch boundary + ++count; + MachineInstr *MI = I++; + switch (MI->getOpcode()) { + case Alpha::LDQ: case Alpha::LDL: + case Alpha::LDWU: case Alpha::LDBU: + case Alpha::LDT: case Alpha::LDS: + case Alpha::STQ: case Alpha::STL: + case Alpha::STW: case Alpha::STB: + case Alpha::STT: case Alpha::STS: + if (MI->getOperand(2).getReg() == Alpha::R30) { + if (prev[0] + && prev[0]->getOperand(2).getReg() == + MI->getOperand(2).getReg() + && prev[0]->getOperand(1).getImmedValue() == + MI->getOperand(1).getImmedValue()) { + prev[0] = prev[1]; + prev[1] = prev[2]; + prev[2] = 0; + BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31) + .addReg(Alpha::R31) + .addReg(Alpha::R31); + Changed = true; nopintro += 1; + count += 1; + } else if (prev[1] + && prev[1]->getOperand(2).getReg() == + MI->getOperand(2).getReg() + && prev[1]->getOperand(1).getImmedValue() == + MI->getOperand(1).getImmedValue()) { + prev[0] = prev[2]; + prev[1] = prev[2] = 0; + BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31) + .addReg(Alpha::R31) + .addReg(Alpha::R31); + BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31) + .addReg(Alpha::R31) + .addReg(Alpha::R31); + Changed = true; nopintro += 2; + count += 2; + } else if (prev[2] + && prev[2]->getOperand(2).getReg() == + MI->getOperand(2).getReg() + && prev[2]->getOperand(1).getImmedValue() == + MI->getOperand(1).getImmedValue()) { + prev[0] = prev[1] = prev[2] = 0; + BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31).addReg(Alpha::R31) + .addReg(Alpha::R31); + BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31).addReg(Alpha::R31) + .addReg(Alpha::R31); + BuildMI(MBB, MI, TII->get(Alpha::BISr), Alpha::R31).addReg(Alpha::R31) + .addReg(Alpha::R31); + Changed = true; nopintro += 3; + count += 3; + } + prev[0] = prev[1]; + prev[1] = prev[2]; + prev[2] = MI; + break; + } + prev[0] = prev[1]; + prev[1] = prev[2]; + prev[2] = 0; + break; + case Alpha::ALTENT: + case Alpha::MEMLABEL: + case Alpha::PCLABEL: + case Alpha::IDEF_I: + case Alpha::IDEF_F32: + case Alpha::IDEF_F64: + --count; + break; + case Alpha::BR: + case Alpha::JMP: + ub = true; + //fall through + default: + prev[0] = prev[1]; + prev[1] = prev[2]; + prev[2] = 0; + break; } - if (ub || AlignAll) { - //we can align stuff for free at this point - while (count % 4) { - BuildMI(MBB, MBB.end(), TII->get(Alpha::BISr), Alpha::R31) - .addReg(Alpha::R31).addReg(Alpha::R31); - ++count; - ++nopalign; - prev[0] = prev[1]; - prev[1] = prev[2]; - prev[2] = 0; - } + } + if (ub || AlignAll) { + //we can align stuff for free at this point + while (count % 4) { + BuildMI(MBB, MBB.end(), TII->get(Alpha::BISr), Alpha::R31) + .addReg(Alpha::R31).addReg(Alpha::R31); + ++count; + ++nopalign; + prev[0] = prev[1]; + prev[1] = prev[2]; + prev[2] = 0; } + } } return Changed; } Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.64 llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.65 --- llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.64 Tue Mar 20 03:07:46 2007 +++ llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp Mon Apr 16 13:10:22 2007 @@ -117,17 +117,17 @@ case Alpha::CPYST: if (MI->getOperand(1).getReg() == MI->getOperand(2).getReg()) { if (OpNum == 0) { // move -> store - unsigned InReg = MI->getOperand(1).getReg(); - Opc = (Opc == Alpha::BISr) ? Alpha::STQ : - ((Opc == Alpha::CPYSS) ? Alpha::STS : Alpha::STT); - NewMI = BuildMI(TII.get(Opc)).addReg(InReg).addFrameIndex(FrameIndex) - .addReg(Alpha::F31); + unsigned InReg = MI->getOperand(1).getReg(); + Opc = (Opc == Alpha::BISr) ? Alpha::STQ : + ((Opc == Alpha::CPYSS) ? Alpha::STS : Alpha::STT); + NewMI = BuildMI(TII.get(Opc)).addReg(InReg).addFrameIndex(FrameIndex) + .addReg(Alpha::F31); } else { // load -> move - unsigned OutReg = MI->getOperand(0).getReg(); - Opc = (Opc == Alpha::BISr) ? Alpha::LDQ : - ((Opc == Alpha::CPYSS) ? Alpha::LDS : Alpha::LDT); - NewMI = BuildMI(TII.get(Opc), OutReg).addFrameIndex(FrameIndex) - .addReg(Alpha::F31); + unsigned OutReg = MI->getOperand(0).getReg(); + Opc = (Opc == Alpha::BISr) ? Alpha::LDQ : + ((Opc == Alpha::CPYSS) ? Alpha::LDS : Alpha::LDT); + NewMI = BuildMI(TII.get(Opc), OutReg).addFrameIndex(FrameIndex) + .addReg(Alpha::F31); } } break; From asl at math.spbu.ru Mon Apr 16 13:11:44 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/IndMemRemoval.cpp Internalize.cpp Message-ID: <200704161811.l3GIBiuJ011542@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: IndMemRemoval.cpp updated: 1.14 -> 1.15 Internalize.cpp updated: 1.44 -> 1.45 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+5 -5) IndMemRemoval.cpp | 8 ++++---- Internalize.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/lib/Transforms/IPO/IndMemRemoval.cpp diff -u llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.14 llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.15 --- llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.14 Mon Feb 5 17:32:05 2007 +++ llvm/lib/Transforms/IPO/IndMemRemoval.cpp Mon Apr 16 13:10:23 2007 @@ -49,8 +49,8 @@ assert(F->isDeclaration() && "free not external?"); if (!F->use_empty()) { Function* FN = new Function(F->getFunctionType(), - GlobalValue::LinkOnceLinkage, - "free_llvm_bounce", &M); + GlobalValue::LinkOnceLinkage, + "free_llvm_bounce", &M); BasicBlock* bb = new BasicBlock("entry",FN); Instruction* R = new ReturnInst(bb); new FreeInst(FN->arg_begin(), R); @@ -64,8 +64,8 @@ assert(F->isDeclaration() && "malloc not external?"); if (!F->use_empty()) { Function* FN = new Function(F->getFunctionType(), - GlobalValue::LinkOnceLinkage, - "malloc_llvm_bounce", &M); + GlobalValue::LinkOnceLinkage, + "malloc_llvm_bounce", &M); BasicBlock* bb = new BasicBlock("entry",FN); Instruction* c = CastInst::createIntegerCast( FN->arg_begin(), Type::Int32Ty, false, "c", bb); Index: llvm/lib/Transforms/IPO/Internalize.cpp diff -u llvm/lib/Transforms/IPO/Internalize.cpp:1.44 llvm/lib/Transforms/IPO/Internalize.cpp:1.45 --- llvm/lib/Transforms/IPO/Internalize.cpp:1.44 Mon Feb 5 17:32:05 2007 +++ llvm/lib/Transforms/IPO/Internalize.cpp Mon Apr 16 13:10:23 2007 @@ -68,7 +68,7 @@ InternalizePass::InternalizePass(const std::vector&exportList) : DontInternalize(false){ for(std::vector::const_iterator itr = exportList.begin(); - itr != exportList.end(); itr++) { + itr != exportList.end(); itr++) { ExternalNames.insert(*itr); } } From asl at math.spbu.ru Mon Apr 16 13:11:44 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp Message-ID: <200704161811.l3GIBiJk011568@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: RSProfiling.cpp updated: 1.20 -> 1.21 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+19 -18) RSProfiling.cpp | 37 +++++++++++++++++++------------------ 1 files changed, 19 insertions(+), 18 deletions(-) Index: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.20 llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.21 --- llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.20 Mon Feb 19 01:34:47 2007 +++ llvm/lib/Transforms/Instrumentation/RSProfiling.cpp Mon Apr 16 13:10:23 2007 @@ -60,7 +60,7 @@ cl::values( clEnumValN(GBV, "global", "global counter"), clEnumValN(GBVO, "ra_global", - "register allocated global counter"), + "register allocated global counter"), clEnumValN(HOSTCC, "rdcc", "cycle counter"), clEnumValEnd)); @@ -82,7 +82,7 @@ static RegisterAnalysisGroup A("Profiling passes"); static RegisterPass NP("insert-null-profiling-rs", - "Measure profiling framework overhead"); + "Measure profiling framework overhead"); static RegisterAnalysisGroup NPT(NP); /// Chooser - Something that chooses when to make a sample of the profiled code @@ -155,7 +155,7 @@ }; RegisterPass X("insert-rs-profiling-framework", - "Insert random sampling instrumentation framework"); + "Insert random sampling instrumentation framework"); } //Local utilities @@ -202,14 +202,14 @@ "countercc", t); Value* nv = BinaryOperator::createSub(l, ConstantInt::get(T, 1), - "counternew", t); + "counternew", t); new StoreInst(nv, Counter, t); t->setCondition(s); //reset counter BasicBlock* oldnext = t->getSuccessor(0); BasicBlock* resetblock = new BasicBlock("reset", oldnext->getParent(), - oldnext); + oldnext); TerminatorInst* t2 = new BranchInst(oldnext, resetblock); t->setSuccessor(0, resetblock); new StoreInst(ResetValue, Counter, t2); @@ -275,14 +275,14 @@ "countercc", t); Value* nv = BinaryOperator::createSub(l, ConstantInt::get(T, 1), - "counternew", t); + "counternew", t); new StoreInst(nv, AI, t); t->setCondition(s); //reset counter BasicBlock* oldnext = t->getSuccessor(0); BasicBlock* resetblock = new BasicBlock("reset", oldnext->getParent(), - oldnext); + oldnext); TerminatorInst* t2 = new BranchInst(oldnext, resetblock); t->setSuccessor(0, resetblock); new StoreInst(ResetValue, AI, t2); @@ -304,7 +304,7 @@ CallInst* c = new CallInst(F, "rdcc", t); BinaryOperator* b = BinaryOperator::createAnd(c, ConstantInt::get(Type::Int64Ty, rm), - "mrdcc", t); + "mrdcc", t); ICmpInst *s = new ICmpInst(ICmpInst::ICMP_EQ, b, ConstantInt::get(Type::Int64Ty, 0), @@ -342,8 +342,8 @@ Value *OldVal = new LoadInst(ElementPtr, "OldCounter", InsertPos); profcode.insert(OldVal); Value *NewVal = BinaryOperator::createAdd(OldVal, - ConstantInt::get(Type::Int32Ty, 1), - "NewCounter", InsertPos); + ConstantInt::get(Type::Int32Ty, 1), + "NewCounter", InsertPos); profcode.insert(NewVal); profcode.insert(new StoreInst(NewVal, ElementPtr, InsertPos)); } @@ -366,7 +366,7 @@ TransCache[bb] = bb; //don't translate entry block else TransCache[bb] = new BasicBlock("dup_" + bb->getName(), bb->getParent(), - NULL); + NULL); return TransCache[bb]; } else if (Instruction* i = dyn_cast(v)) { //we have already translated this @@ -462,7 +462,7 @@ //b: new BranchInst(cast(Translate(dst)), bbC); new BranchInst(dst, cast(Translate(dst)), - ConstantInt::get(Type::Int1Ty, true), bbCp); + ConstantInt::get(Type::Int1Ty, true), bbCp); //c: { TerminatorInst* iB = src->getTerminator(); @@ -484,7 +484,7 @@ CollapsePhi(dst, bbC); //f: ReplacePhiPred(cast(Translate(dst)), - cast(Translate(src)),bbCp); + cast(Translate(src)),bbCp); CollapsePhi(cast(Translate(dst)), bbCp); //g: for(BasicBlock::iterator ib = dst->begin(), ie = dst->end(); ib != ie; @@ -494,7 +494,7 @@ if(bbC == phi->getIncomingBlock(x)) { phi->addIncoming(Translate(phi->getIncomingValue(x)), bbCp); cast(Translate(phi))->addIncoming(phi->getIncomingValue(x), - bbC); + bbC); } phi->removeIncomingValue(bbC); } @@ -510,15 +510,16 @@ //assume that stuff worked. now connect the duplicated basic blocks //with the originals in such a way as to preserve ssa. yuk! for (std::set >::iterator - ib = BackEdges.begin(), ie = BackEdges.end(); ib != ie; ++ib) + ib = BackEdges.begin(), ie = BackEdges.end(); ib != ie; ++ib) ProcessBackEdge(ib->first, ib->second, F); //oh, and add the edge from the reg2mem created entry node to the //duplicated second node TerminatorInst* T = F.getEntryBlock().getTerminator(); ReplaceInstWithInst(T, new BranchInst(T->getSuccessor(0), - cast(Translate(T->getSuccessor(0))), - ConstantInt::get(Type::Int1Ty, true))); + cast( + Translate(T->getSuccessor(0))), + ConstantInt::get(Type::Int1Ty, true))); //do whatever is needed now that the function is duplicated c->PrepFunction(&F); @@ -527,7 +528,7 @@ ChoicePoints.insert(&F.getEntryBlock()); for (std::set::iterator - ii = ChoicePoints.begin(), ie = ChoicePoints.end(); ii != ie; ++ii) + ii = ChoicePoints.begin(), ie = ChoicePoints.end(); ii != ie; ++ii) c->ProcessChoicePoint(*ii); ChoicePoints.clear(); From asl at math.spbu.ru Mon Apr 16 13:11:43 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp Message-ID: <200704161811.l3GIBhI2011523@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: CallGraphSCCPass.cpp updated: 1.20 -> 1.21 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+11 -12) CallGraphSCCPass.cpp | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) Index: llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp diff -u llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.20 llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.21 --- llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.20 Mon Mar 5 14:01:30 2007 +++ llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp Mon Apr 16 13:10:22 2007 @@ -82,8 +82,7 @@ I != E; ++I) { // Run all passes on current SCC - for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { - + for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { Pass *P = getContainedPass(Index); AnalysisUsage AnUsage; P->getAnalysisUsage(AnUsage); @@ -95,20 +94,20 @@ StartPassTimer(P); if (CallGraphSCCPass *CGSP = dynamic_cast(P)) - Changed |= CGSP->runOnSCC(*I); // TODO : What if CG is changed ? + Changed |= CGSP->runOnSCC(*I); // TODO : What if CG is changed ? else { - FPPassManager *FPP = dynamic_cast(P); - assert (FPP && "Invalid CGPassManager member"); + FPPassManager *FPP = dynamic_cast(P); + assert (FPP && "Invalid CGPassManager member"); - // Run pass P on all functions current SCC - std::vector &SCC = *I; - for (unsigned i = 0, e = SCC.size(); i != e; ++i) { - Function *F = SCC[i]->getFunction(); - if (F) { + // Run pass P on all functions current SCC + std::vector &SCC = *I; + for (unsigned i = 0, e = SCC.size(); i != e; ++i) { + Function *F = SCC[i]->getFunction(); + if (F) { dumpPassInfo(P, EXECUTION_MSG, ON_FUNCTION_MSG, F->getName()); Changed |= FPP->runOnFunction(*F); } - } + } } StopPassTimer(P); @@ -149,7 +148,7 @@ /// Assign pass manager to manage this pass. void CallGraphSCCPass::assignPassManager(PMStack &PMS, - PassManagerType PreferredType) { + PassManagerType PreferredType) { // Find CGPassManager while (!PMS.empty()) { if (PMS.top()->getPassManagerType() > PMT_CallGraphPassManager) From asl at math.spbu.ru Mon Apr 16 13:11:43 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:43 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200704161811.l3GIBhV1011528@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.431 -> 1.432 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+3 -1) Makefile.rules | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.431 llvm/Makefile.rules:1.432 --- llvm/Makefile.rules:1.431 Sat Apr 14 18:35:45 2007 +++ llvm/Makefile.rules Mon Apr 16 13:10:22 2007 @@ -1726,8 +1726,10 @@ endif check-line-length: - @egrep '.{81}' $(Sources) + @egrep -n '.{81}' $(Sources) +check-for-tabs: + @egrep -n ' ' $(Sources) #------------------------------------------------------------------------ # Print out the directories used for building #------------------------------------------------------------------------ From asl at math.spbu.ru Mon Apr 16 13:11:44 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp X86ISelLowering.cpp Message-ID: <200704161811.l3GIBixU011535@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86CodeEmitter.cpp updated: 1.132 -> 1.133 X86ISelLowering.cpp updated: 1.389 -> 1.390 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+9 -9) X86CodeEmitter.cpp | 14 +++++++------- X86ISelLowering.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) Index: llvm/lib/Target/X86/X86CodeEmitter.cpp diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.132 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.133 --- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.132 Tue Apr 10 17:10:25 2007 +++ llvm/lib/Target/X86/X86CodeEmitter.cpp Mon Apr 16 13:10:23 2007 @@ -487,13 +487,13 @@ for (unsigned e = NumOps; i != e; ++i) { const MachineOperand& MO = MI.getOperand(i); if (MO.isRegister()) { - unsigned Reg = MO.getReg(); - // Trunc to byte are actually movb. The real source operand is the low - // byte of the register. - if (isTrunc8 && i == 1) - Reg = getX86SubSuperRegister(Reg, MVT::i8); - if (isX86_64NonExtLowByteReg(Reg)) - REX |= 0x40; + unsigned Reg = MO.getReg(); + // Trunc to byte are actually movb. The real source operand is the low + // byte of the register. + if (isTrunc8 && i == 1) + Reg = getX86SubSuperRegister(Reg, MVT::i8); + if (isX86_64NonExtLowByteReg(Reg)) + REX |= 0x40; } } Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.389 llvm/lib/Target/X86/X86ISelLowering.cpp:1.390 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.389 Wed Apr 11 23:14:49 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Apr 16 13:10:23 2007 @@ -1345,8 +1345,8 @@ // We should use extra load for direct calls to dllimported functions in // non-JIT mode. if (getTargetMachine().getCodeModel() != CodeModel::Large - && !Subtarget->GVRequiresExtraLoad(G->getGlobal(), - getTargetMachine(), true)) + && !Subtarget->GVRequiresExtraLoad(G->getGlobal(), + getTargetMachine(), true)) Callee = DAG.getTargetGlobalAddress(G->getGlobal(), getPointerTy()); } else if (ExternalSymbolSDNode *S = dyn_cast(Callee)) if (getTargetMachine().getCodeModel() != CodeModel::Large) From asl at math.spbu.ru Mon Apr 16 13:11:44 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:44 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/Dwarf.h MathExtras.h Message-ID: <200704161811.l3GIBi23011557@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: Dwarf.h updated: 1.11 -> 1.12 MathExtras.h updated: 1.44 -> 1.45 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+3 -3) Dwarf.h | 2 +- MathExtras.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/include/llvm/Support/Dwarf.h diff -u llvm/include/llvm/Support/Dwarf.h:1.11 llvm/include/llvm/Support/Dwarf.h:1.12 --- llvm/include/llvm/Support/Dwarf.h:1.11 Thu Feb 1 10:31:34 2007 +++ llvm/include/llvm/Support/Dwarf.h Mon Apr 16 13:10:22 2007 @@ -44,7 +44,7 @@ DW_TAG_user_base = 0x1000, // Recommended base for user tags. DW_CIE_VERSION = 1, // Common frame information version. - DW_CIE_ID = 0xffffffff // Common frame information mark. + DW_CIE_ID = 0xffffffff // Common frame information mark. }; enum dwarf_constants { Index: llvm/include/llvm/Support/MathExtras.h diff -u llvm/include/llvm/Support/MathExtras.h:1.44 llvm/include/llvm/Support/MathExtras.h:1.45 --- llvm/include/llvm/Support/MathExtras.h:1.44 Thu Mar 22 14:11:57 2007 +++ llvm/include/llvm/Support/MathExtras.h Mon Apr 16 13:10:22 2007 @@ -109,7 +109,7 @@ /// 32-bit argument, Value. inline uint32_t ByteSwap_32(uint32_t Value) { #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) - return __builtin_bswap32(Value); + return __builtin_bswap32(Value); #elif defined(_MSC_VER) && !defined(_DEBUG) return _byteswap_ulong(Value); #else @@ -125,7 +125,7 @@ /// 64-bit argument, Value. inline uint64_t ByteSwap_64(uint64_t Value) { #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) - return __builtin_bswap64(Value); + return __builtin_bswap64(Value); #elif defined(_MSC_VER) && !defined(_DEBUG) return _byteswap_uint64(Value); #else From asl at math.spbu.ru Mon Apr 16 13:11:44 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp TargetLowering.cpp Message-ID: <200704161811.l3GIBiSc011547@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAGSimple.cpp updated: 1.25 -> 1.26 TargetLowering.cpp updated: 1.108 -> 1.109 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+23 -23) ScheduleDAGSimple.cpp | 42 +++++++++++++++++++++--------------------- TargetLowering.cpp | 4 ++-- 2 files changed, 23 insertions(+), 23 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp:1.25 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp:1.26 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp:1.25 Sun Feb 4 02:47:20 2007 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp Mon Apr 16 13:10:22 2007 @@ -288,9 +288,9 @@ // Tally iterator /// SlotsAvailable - Returns true if all units are available. - /// + /// bool SlotsAvailable(Iter Begin, unsigned N, unsigned ResourceSet, - unsigned &Resource) { + unsigned &Resource) { assert(N && "Must check availability with N != 0"); // Determine end of interval Iter End = Begin + N; @@ -318,23 +318,23 @@ Resource = 0; return false; } - - /// RetrySlot - Finds a good candidate slot to retry search. + + /// RetrySlot - Finds a good candidate slot to retry search. Iter RetrySlot(Iter Begin, unsigned N, unsigned ResourceSet) { assert(N && "Must check availability with N != 0"); // Determine end of interval Iter End = Begin + N; assert(End <= Tally.end() && "Tally is not large enough for schedule"); - - while (Begin != End--) { - // Clear units in use - ResourceSet &= ~*End; - // If no units left then we should go no further - if (!ResourceSet) return End + 1; - } - // Made it all the way through - return Begin; - } + + while (Begin != End--) { + // Clear units in use + ResourceSet &= ~*End; + // If no units left then we should go no further + if (!ResourceSet) return End + 1; + } + // Made it all the way through + return Begin; + } /// FindAndReserveStages - Return true if the stages can be completed. If /// so mark as busy. @@ -391,13 +391,13 @@ // FindAndReserve - Locate an ideal slot for the specified stages and mark // as busy. unsigned FindAndReserve(unsigned Slot, InstrStage *StageBegin, - InstrStage *StageEnd) { - // Where to begin - Iter Begin = Tally.begin() + Slot; - // Find a free slot - Iter Where = FindSlots(Begin, StageBegin, StageEnd); - // Distance is slot number - unsigned Final = Where - Tally.begin(); + InstrStage *StageEnd) { + // Where to begin + Iter Begin = Tally.begin() + Slot; + // Find a free slot + Iter Where = FindSlots(Begin, StageBegin, StageEnd); + // Distance is slot number + unsigned Final = Where - Tally.begin(); return Final; } Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.108 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.109 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.108 Wed Apr 11 23:44:28 2007 +++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Apr 16 13:10:22 2007 @@ -2150,7 +2150,7 @@ /// multiplying by a magic number. See: /// SDOperand TargetLowering::BuildSDIV(SDNode *N, SelectionDAG &DAG, - std::vector* Created) const { + std::vector* Created) const { MVT::ValueType VT = N->getValueType(0); // Check to see if we can do this. @@ -2198,7 +2198,7 @@ /// multiplying by a magic number. See: /// SDOperand TargetLowering::BuildUDIV(SDNode *N, SelectionDAG &DAG, - std::vector* Created) const { + std::vector* Created) const { MVT::ValueType VT = N->getValueType(0); // Check to see if we can do this. From asl at math.spbu.ru Mon Apr 16 13:11:44 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 13:11:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.cpp ARMRegisterInfo.cpp Message-ID: <200704161811.l3GIBiYr011560@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.cpp updated: 1.19 -> 1.20 ARMRegisterInfo.cpp updated: 1.85 -> 1.86 --- Log message: Removed tabs everywhere except autogenerated & external files. Add make target for tabs checking. --- Diffs of the changes: (+3 -3) ARMInstrInfo.cpp | 4 ++-- ARMRegisterInfo.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.cpp diff -u llvm/lib/Target/ARM/ARMInstrInfo.cpp:1.19 llvm/lib/Target/ARM/ARMInstrInfo.cpp:1.20 --- llvm/lib/Target/ARM/ARMInstrInfo.cpp:1.19 Tue Apr 3 01:44:25 2007 +++ llvm/lib/Target/ARM/ARMInstrInfo.cpp Mon Apr 16 13:10:22 2007 @@ -53,8 +53,8 @@ case ARM::MOVr: case ARM::tMOVr: assert(MI.getNumOperands() == 2 && MI.getOperand(0).isRegister() && - MI.getOperand(1).isRegister() && - "Invalid ARM MOV instruction"); + MI.getOperand(1).isRegister() && + "Invalid ARM MOV instruction"); SrcReg = MI.getOperand(1).getReg(); DstReg = MI.getOperand(0).getReg(); return true; Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.85 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.86 --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.85 Tue Apr 3 16:31:21 2007 +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Mon Apr 16 13:10:22 2007 @@ -1372,7 +1372,7 @@ } void ARMRegisterInfo::emitEpilogue(MachineFunction &MF, - MachineBasicBlock &MBB) const { + MachineBasicBlock &MBB) const { MachineBasicBlock::iterator MBBI = prior(MBB.end()); assert((MBBI->getOpcode() == ARM::BX_RET || MBBI->getOpcode() == ARM::tBX_RET || From dpatel at apple.com Mon Apr 16 13:11:24 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Mon, 16 Apr 2007 11:11:24 -0700 (PDT) Subject: [llvm-commits] [126202] Fix assertion that was off by one. Message-ID: <20070416181124.0EB5CEF60D15@src> Revision: 126202 Author: dpatel Date: 2007-04-16 11:11:23 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Fix assertion that was off by one. Update comments. Patch by Duncan Sands. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/llvm-types.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-16 18:10:57 UTC (rev 126201) +++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-16 18:11:23 UTC (rev 126202) @@ -1256,14 +1256,12 @@ unsigned StartOffsetInBits = getFieldOffsetInBits(Field); unsigned EndBitOffset = FieldSizeInBits+StartOffsetInBits; - // If the last inserted LLVM field completely contains this bitfield, just + // If the last inserted LLVM field completely contains this bitfield, just // ignore this field. if (!Info.Elements.empty()) { - // If the last field does not completely contain *this* bitfield, extend - // it. unsigned LastFieldBitOffset = Info.ElementOffsetInBytes.back()*8; unsigned LastFieldBitSize = Info.ElementSizeInBytes.back()*8; - assert(LastFieldBitOffset < StartOffsetInBits && + assert(LastFieldBitOffset <= StartOffsetInBits && "This bitfield isn't part of the last field!"); if (EndBitOffset <= LastFieldBitOffset+LastFieldBitSize && LastFieldBitOffset+LastFieldBitSize >= StartOffsetInBits) { From dpatel at apple.com Mon Apr 16 13:13:49 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Mon, 16 Apr 2007 11:13:49 -0700 (PDT) Subject: [llvm-commits] [126204] Do not emit debug info for fields at variable offset, for now. Message-ID: <20070416181349.C1FE5EF61604@src> Revision: 126204 Author: dpatel Date: 2007-04-16 11:13:49 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Do not emit debug info for fields at variable offset, for now. Patch by Duncan Sands. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-debug.cpp Modified: apple-local/branches/llvm/gcc/llvm-debug.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-debug.cpp 2007-04-16 18:12:08 UTC (rev 126203) +++ apple-local/branches/llvm/gcc/llvm-debug.cpp 2007-04-16 18:13:49 UTC (rev 126204) @@ -676,6 +676,10 @@ NULL; if (TREE_CODE(Member) == FIELD_DECL) { + if (TREE_CODE(DECL_FIELD_OFFSET(Member)) != INTEGER_CST) + // FIXME: field with variable position, skip it for now. + continue; + DerivedTypeDesc *MemberDesc = new DerivedTypeDesc(DW_TAG_member); // Field type is the declared type of the field. tree FieldNodeType = FieldType(Member); From baldrick at free.fr Mon Apr 16 13:49:42 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 16 Apr 2007 13:49:42 -0500 Subject: [llvm-commits] CVS: llvm/test/FrontendAda/debug_var_size.ads Message-ID: <200704161849.l3GIngtN012574@zion.cs.uiuc.edu> Changes in directory llvm/test/FrontendAda: debug_var_size.ads added (r1.1) --- Log message: Testcase for debug info emission for structure fields at variable offsets. --- Diffs of the changes: (+8 -0) debug_var_size.ads | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/test/FrontendAda/debug_var_size.ads diff -c /dev/null llvm/test/FrontendAda/debug_var_size.ads:1.1 *** /dev/null Mon Apr 16 13:49:31 2007 --- llvm/test/FrontendAda/debug_var_size.ads Mon Apr 16 13:49:21 2007 *************** *** 0 **** --- 1,8 ---- + -- RUN: %llvmgcc -c -g %s -o /dev/null + package Debug_Var_Size is + subtype Length_Type is Positive range 1 .. 64; + type T (Length : Length_Type := 1) is record + Varying_Length : String (1 .. Length); + Fixed_Length : Boolean; + end record; + end; From baldrick at free.fr Mon Apr 16 13:51:34 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 16 Apr 2007 13:51:34 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2007-03-26-BitfieldAfterZeroWidth.c Message-ID: <200704161851.l3GIpYRO012648@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2007-03-26-BitfieldAfterZeroWidth.c added (r1.1) --- Log message: Testcase for C front-end crash. --- Diffs of the changes: (+6 -0) 2007-03-26-BitfieldAfterZeroWidth.c | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/test/CFrontend/2007-03-26-BitfieldAfterZeroWidth.c diff -c /dev/null llvm/test/CFrontend/2007-03-26-BitfieldAfterZeroWidth.c:1.1 *** /dev/null Mon Apr 16 13:51:23 2007 --- llvm/test/CFrontend/2007-03-26-BitfieldAfterZeroWidth.c Mon Apr 16 13:51:13 2007 *************** *** 0 **** --- 1,6 ---- + // RUN: %llvmgcc %s -S -o - + struct W {}; + struct Y { + struct W w; + int i:1; + } __attribute__ ((packed)) y; From dpatel at apple.com Mon Apr 16 13:51:47 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 13:51:47 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Pass.h CallGraphSCCPass.h Message-ID: <200704161851.l3GIplWI012663@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Pass.h updated: 1.82 -> 1.83 CallGraphSCCPass.h updated: 1.11 -> 1.12 --- Log message: Add getPotentialPassManagerType(). No functionality change, yet. --- Diffs of the changes: (+27 -1) CallGraphSCCPass.h | 5 +++++ Pass.h | 23 ++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) Index: llvm/include/llvm/Pass.h diff -u llvm/include/llvm/Pass.h:1.82 llvm/include/llvm/Pass.h:1.83 --- llvm/include/llvm/Pass.h:1.82 Mon Apr 16 13:10:22 2007 +++ llvm/include/llvm/Pass.h Mon Apr 16 13:51:25 2007 @@ -126,6 +126,11 @@ PassManagerType T = PMT_Unknown) {} /// Check if available pass managers are suitable for this pass or not. virtual void preparePassManager(PMStack &PMS) {} + + /// Return what kind of Pass Manager can manage this pass. + virtual PassManagerType getPotentialPassManagerType() const { + return PMT_Unknown; + } // Access AnalysisResolver inline void setResolver(AnalysisResolver *AR) { Resolver = AR; } @@ -193,7 +198,7 @@ template AnalysisType &getAnalysisID(const PassInfo *PI) const; - + }; inline std::ostream &operator<<(std::ostream &OS, const Pass &P) { @@ -216,6 +221,12 @@ virtual void assignPassManager(PMStack &PMS, PassManagerType T = PMT_ModulePassManager); + + /// Return what kind of Pass Manager can manage this pass. + virtual PassManagerType getPotentialPassManagerType() const { + return PMT_ModulePassManager; + } + // Force out-of-line virtual method. virtual ~ModulePass(); }; @@ -283,6 +294,11 @@ virtual void assignPassManager(PMStack &PMS, PassManagerType T = PMT_FunctionPassManager); + + /// Return what kind of Pass Manager can manage this pass. + virtual PassManagerType getPotentialPassManagerType() const { + return PMT_FunctionPassManager; + } }; @@ -338,6 +354,11 @@ virtual void assignPassManager(PMStack &PMS, PassManagerType T = PMT_BasicBlockPassManager); + + /// Return what kind of Pass Manager can manage this pass. + virtual PassManagerType getPotentialPassManagerType() const { + return PMT_BasicBlockPassManager; + } }; /// PMStack Index: llvm/include/llvm/CallGraphSCCPass.h diff -u llvm/include/llvm/CallGraphSCCPass.h:1.11 llvm/include/llvm/CallGraphSCCPass.h:1.12 --- llvm/include/llvm/CallGraphSCCPass.h:1.11 Mon Apr 16 13:10:22 2007 +++ llvm/include/llvm/CallGraphSCCPass.h Mon Apr 16 13:51:25 2007 @@ -54,6 +54,11 @@ virtual void assignPassManager(PMStack &PMS, PassManagerType PMT = PMT_CallGraphPassManager); + /// Return what kind of Pass Manager can manage this pass. + virtual PassManagerType getPotentialPassManagerType() const { + return PMT_CallGraphPassManager; + } + /// getAnalysisUsage - For this class, we declare that we require and preserve /// the call graph. If the derived class implements this method, it should /// always explicitly call the implementation here. From dpatel at apple.com Mon Apr 16 13:51:53 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 13:51:53 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/LoopPass.h Message-ID: <200704161851.l3GIprpi012671@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: LoopPass.h updated: 1.14 -> 1.15 --- Log message: Add getPotentialPassManagerType(). No functionality change, yet. --- Diffs of the changes: (+4 -0) LoopPass.h | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/include/llvm/Analysis/LoopPass.h diff -u llvm/include/llvm/Analysis/LoopPass.h:1.14 llvm/include/llvm/Analysis/LoopPass.h:1.15 --- llvm/include/llvm/Analysis/LoopPass.h:1.14 Mon Apr 16 13:10:22 2007 +++ llvm/include/llvm/Analysis/LoopPass.h Mon Apr 16 13:51:25 2007 @@ -57,6 +57,10 @@ virtual void assignPassManager(PMStack &PMS, PassManagerType PMT = PMT_LoopPassManager); + /// Return what kind of Pass Manager can manage this pass. + virtual PassManagerType getPotentialPassManagerType() const { + return PMT_LoopPassManager; + } }; class LPPassManager : public FunctionPass, public PMDataManager { From evan.cheng at apple.com Mon Apr 16 13:56:07 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Apr 2007 13:56:07 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/long.ll Message-ID: <200704161856.l3GIu7Ze012751@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: long.ll updated: 1.15 -> 1.16 --- Log message: Fix test. --- Diffs of the changes: (+1 -1) long.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CodeGen/ARM/long.ll diff -u llvm/test/CodeGen/ARM/long.ll:1.15 llvm/test/CodeGen/ARM/long.ll:1.16 --- llvm/test/CodeGen/ARM/long.ll:1.15 Sun Apr 15 15:47:22 2007 +++ llvm/test/CodeGen/ARM/long.ll Mon Apr 16 13:55:46 2007 @@ -3,7 +3,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mvn | wc -l | grep 3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep adds | wc -l | grep 1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep adc | wc -l | grep 1 -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep subs | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep {subs } | wc -l | grep 1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep sbc | wc -l | grep 1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ ; RUN: grep smull | wc -l | grep 1 From evan.cheng at apple.com Mon Apr 16 13:59:46 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Apr 2007 13:59:46 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll Message-ID: <200704161859.l3GIxkRd012812@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: 2007-03-15-GEP-Idx-Sink.ll updated: 1.4 -> 1.5 --- Log message: One more callee-saved register used. --- Diffs of the changes: (+1 -1) 2007-03-15-GEP-Idx-Sink.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll diff -u llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll:1.4 llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll:1.5 --- llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll:1.4 Sun Apr 15 17:16:46 2007 +++ llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll Mon Apr 16 13:59:25 2007 @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-darwin | \ -; RUN: grep {addl \$12, %esp} +; RUN: grep {addl \$16, %esp} define void @foo(i8** %buf, i32 %size, i32 %col, i8* %p) { entry: From dpatel at apple.com Mon Apr 16 15:01:42 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Mon, 16 Apr 2007 13:01:42 -0700 (PDT) Subject: [llvm-commits] [126210] Fix handling of arrays with var-sized elements Message-ID: <20070416200142.3459BEFC20B5@src> Revision: 126210 Author: dpatel Date: 2007-04-16 13:01:41 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Fix handling of arrays with var-sized elements Patch by Duncan Sands. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-abi.h apple-local/branches/llvm/gcc/llvm-convert.cpp apple-local/branches/llvm/gcc/llvm-debug.cpp apple-local/branches/llvm/gcc/llvm-internal.h apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/llvm-abi.h =================================================================== --- apple-local/branches/llvm/gcc/llvm-abi.h 2007-04-16 18:55:33 UTC (rev 126209) +++ apple-local/branches/llvm/gcc/llvm-abi.h 2007-04-16 20:01:41 UTC (rev 126210) @@ -110,7 +110,7 @@ } return FoundField ? isSingleElementStructOrArray(FoundField) : 0; case ARRAY_TYPE: - if (TREE_CODE(TYPE_SIZE(type)) != INTEGER_CST) + if (!isArrayCompatible(type)) return 0; tree length = arrayLength(type); if (!length || !integer_onep(length)) Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-16 18:55:33 UTC (rev 126209) +++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-16 20:01:41 UTC (rev 126210) @@ -253,6 +253,35 @@ } } +/// isInt64 - Return true if t is an INTEGER_CST that fits in a 64 bit integer. +/// If Unsigned is false, returns whether it fits in a int64_t. If Unsigned is +/// true, returns whether the value is non-negative and fits in a uint64_t. +/// Always returns false for overflowed constants. +bool isInt64(tree_node *t, bool Unsigned) { + if (HOST_BITS_PER_WIDE_INT == 64) + return host_integerp(t, Unsigned); + else { + assert(HOST_BITS_PER_WIDE_INT == 32 && + "Only 32- and 64-bit hosts supported!"); + return + (TREE_CODE (t) == INTEGER_CST && !TREE_OVERFLOW (t)) + && ((TYPE_UNSIGNED(TREE_TYPE(t)) == Unsigned) || + // If the constant is signed and we want an unsigned result, check + // that the value is non-negative. If the constant is unsigned and + // we want a signed result, check it fits in 63 bits. + (HOST_WIDE_INT)TREE_INT_CST_HIGH(t) >= 0); + } +} + +/// getInt64 - Extract the value of an INTEGER_CST as a 64 bit integer. If +/// Unsigned is false, the value must fit in a int64_t. If Unsigned is true, +/// the value must be non-negative and fit in a uint64_t. Must not be used on +/// overflowed constants. These conditions can be checked by calling isInt64. +uint64_t getInt64(tree_node *t, bool Unsigned) { + assert(isInt64(t, Unsigned) && "invalid constant!"); + return getINTEGER_CSTVal(t); +} + //===----------------------------------------------------------------------===// // ... High-Level Methods ... //===----------------------------------------------------------------------===// @@ -1374,16 +1403,18 @@ tree length; // Dynamic-size object: must push space on the stack. - if (TREE_CODE(type) == ARRAY_TYPE && (length = arrayLength(type))) { + if (TREE_CODE(type) == ARRAY_TYPE && + isSequentialCompatible(type) && + (length = arrayLength(type))) { Ty = ConvertType(TREE_TYPE(type)); // Get array element type. // Compute the number of elements in the array. Size = Emit(length, 0); - Size = CastToUIntType(Size, Size->getType()); } else { // Compute the variable's size in bytes. - Size = CastToUIntType(Emit(DECL_SIZE_UNIT(decl), 0), Type::Int32Ty); + Size = Emit(DECL_SIZE_UNIT(decl), 0); Ty = Type::Int8Ty; } + Size = CastToUIntType(Size, Type::Int32Ty); } const char *Name; // Name of variable @@ -4645,94 +4676,71 @@ } LValue TreeToLLVM::EmitLV_ARRAY_REF(tree exp) { + // The result type is an ElementTy* in the case of an ARRAY_REF, an array + // of ElementTy in the case of ARRAY_RANGE_REF. + tree Array = TREE_OPERAND(exp, 0); + tree ArrayType = TREE_TYPE(Array); tree Index = TREE_OPERAND(exp, 1); - assert((TREE_CODE (TREE_TYPE(Array)) == ARRAY_TYPE || - TREE_CODE (TREE_TYPE(Array)) == POINTER_TYPE || - TREE_CODE (TREE_TYPE(Array)) == REFERENCE_TYPE) && + tree IndexType = TREE_TYPE(Index); + tree ElementType = TREE_TYPE(ArrayType); + + assert((TREE_CODE (ArrayType) == ARRAY_TYPE || + TREE_CODE (ArrayType) == POINTER_TYPE || + TREE_CODE (ArrayType) == REFERENCE_TYPE) && "Unknown ARRAY_REF!"); - + // As an LLVM extension, we allow ARRAY_REF with a pointer as the first // operand. This construct maps directly to a getelementptr instruction. Value *ArrayAddr; - - if (TREE_CODE(TREE_TYPE(Array)) == ARRAY_TYPE) { + + if (TREE_CODE(ArrayType) == ARRAY_TYPE) { // First subtract the lower bound, if any, in the type of the index. tree LowerBound = array_ref_low_bound(exp); if (!integer_zerop(LowerBound)) - Index = fold(build2(MINUS_EXPR, TREE_TYPE(Index), Index, LowerBound)); - + Index = fold(build2(MINUS_EXPR, IndexType, Index, LowerBound)); + LValue ArrayAddrLV = EmitLV(Array); assert(!ArrayAddrLV.isBitfield() && "Arrays cannot be bitfields!"); ArrayAddr = ArrayAddrLV.Ptr; } else { ArrayAddr = Emit(Array, 0); } - + Value *IndexVal = Emit(Index, 0); - // FIXME: If UnitSize is a variable, or if it disagrees with the LLVM array - // element type, insert explicit pointer arithmetic here. - //tree ElementSizeInBytes = array_ref_element_size(exp); - const Type *IntPtrTy = getTargetData().getIntPtrType(); - if (IndexVal->getType() != IntPtrTy) { - if (TYPE_UNSIGNED(TREE_TYPE(Index))) // if the index is unsigned - // ZExt it to retain its value in the larger type - IndexVal = CastToUIntType(IndexVal, IntPtrTy); - else - // SExt it to retain its value in the larger type - IndexVal = CastToSIntType(IndexVal, IntPtrTy); - } + if (TYPE_UNSIGNED(IndexType)) // if the index is unsigned + // ZExt it to retain its value in the larger type + IndexVal = CastToUIntType(IndexVal, IntPtrTy); + else + // SExt it to retain its value in the larger type + IndexVal = CastToSIntType(IndexVal, IntPtrTy); - // If this is an index into an array, codegen as a GEP. - if (TREE_CODE(TREE_TYPE(Array)) == ARRAY_TYPE) { - Value *Ptr; - - // Check for variable sized array reference. - tree length = arrayLength(TREE_TYPE(Array)); - if (length && !host_integerp(length, 1)) { - // Make sure that ArrayAddr is of type ElementTy*, then do a 2-index gep. - ArrayAddr = BitCastToType(ArrayAddr, PointerType::get(Type::Int8Ty)); - Value *Scale = Emit(array_ref_element_size(exp), 0); - if (Scale->getType() != IntPtrTy) - Scale = CastToUIntType(Scale, IntPtrTy); - - IndexVal = BinaryOperator::createMul(IndexVal, Scale, "tmp", CurBB); - Ptr = new GetElementPtrInst(ArrayAddr, IndexVal, "tmp", CurBB); - } else { - // Otherwise, this is not a variable-sized array, use a GEP to index. - Ptr = new GetElementPtrInst(ArrayAddr, ConstantInt::get(Type::Int32Ty, 0), - IndexVal, "tmp", CurBB); - } - - // The result type is an ElementTy* in the case of an ARRAY_REF, an array - // of ElementTy in the case of ARRAY_RANGE_REF. Return the correct type. + // If this is an index into an LLVM array, codegen as a GEP. + if (isArrayCompatible(ArrayType)) { + Value *Ptr = new GetElementPtrInst(ArrayAddr, + ConstantInt::get(Type::Int32Ty, 0), + IndexVal, "tmp", CurBB); return BitCastToType(Ptr, PointerType::get(ConvertType(TREE_TYPE(exp)))); } - // Otherwise, this is an index off a pointer, codegen as a 2-idx GEP. - assert(TREE_CODE(TREE_TYPE(Array)) == POINTER_TYPE || - TREE_CODE(TREE_TYPE(Array)) == REFERENCE_TYPE); - tree IndexedType = TREE_TYPE(TREE_TYPE(Array)); - // If we are indexing over a fixed-size type, just use a GEP. - if (TREE_CODE(TYPE_SIZE(IndexedType)) == INTEGER_CST) { - const Type *PtrIndexedTy = PointerType::get(ConvertType(IndexedType)); - ArrayAddr = BitCastToType(ArrayAddr, PtrIndexedTy); - return new GetElementPtrInst(ArrayAddr, IndexVal, "tmp", CurBB); + if (isSequentialCompatible(ArrayType)) { + const Type *PtrElementTy = PointerType::get(ConvertType(ElementType)); + ArrayAddr = BitCastToType(ArrayAddr, PtrElementTy); + Value *Ptr = new GetElementPtrInst(ArrayAddr, IndexVal, "tmp", CurBB); + return BitCastToType(Ptr, PointerType::get(ConvertType(TREE_TYPE(exp)))); } - + // Otherwise, just do raw, low-level pointer arithmetic. FIXME: this could be // much nicer in cases like: // float foo(int w, float A[][w], int g) { return A[g][0]; } - + ArrayAddr = BitCastToType(ArrayAddr, PointerType::get(Type::Int8Ty)); Value *TypeSize = Emit(array_ref_element_size(exp), 0); + TypeSize = CastToUIntType(TypeSize, IntPtrTy); - if (TypeSize->getType() != IntPtrTy) - TypeSize = CastToUIntType(TypeSize, IntPtrTy); - IndexVal = BinaryOperator::createMul(IndexVal, TypeSize, "tmp", CurBB); Value *Ptr = new GetElementPtrInst(ArrayAddr, IndexVal, "tmp", CurBB); @@ -5790,44 +5798,41 @@ Constant *TreeConstantToLLVM::EmitLV_ARRAY_REF(tree exp) { tree Array = TREE_OPERAND(exp, 0); + tree ArrayType = TREE_TYPE(Array); tree Index = TREE_OPERAND(exp, 1); - assert((TREE_CODE (TREE_TYPE(Array)) == ARRAY_TYPE || - TREE_CODE (TREE_TYPE(Array)) == POINTER_TYPE || - TREE_CODE (TREE_TYPE(Array)) == REFERENCE_TYPE) && + tree IndexType = TREE_TYPE(Index); + assert((TREE_CODE (ArrayType) == ARRAY_TYPE || + TREE_CODE (ArrayType) == POINTER_TYPE || + TREE_CODE (ArrayType) == REFERENCE_TYPE) && "Unknown ARRAY_REF!"); - + + // Check for variable sized reference. + // FIXME: add support for array types where the size doesn't fit into 64 bits + assert(isArrayCompatible(ArrayType) || isSequentialCompatible(ArrayType) + && "Cannot have globals with variable size!"); + // As an LLVM extension, we allow ARRAY_REF with a pointer as the first // operand. This construct maps directly to a getelementptr instruction. Constant *ArrayAddr; - if (TREE_CODE (TREE_TYPE(Array)) == ARRAY_TYPE) { + if (TREE_CODE (ArrayType) == ARRAY_TYPE) { // First subtract the lower bound, if any, in the type of the index. tree LowerBound = array_ref_low_bound(exp); if (!integer_zerop(LowerBound)) - Index = fold(build2(MINUS_EXPR, TREE_TYPE(Index), Index, LowerBound)); + Index = fold(build2(MINUS_EXPR, IndexType, Index, LowerBound)); ArrayAddr = EmitLV(Array); } else { ArrayAddr = Convert(Array); } Constant *IndexVal = Convert(Index); - - // FIXME: If UnitSize is a variable, or if it disagrees with the LLVM array - // element type, insert explicit pointer arithmetic here. - //tree ElementSizeInBytes = array_ref_element_size(exp); - - if (IndexVal->getType() != Type::Int32Ty && - IndexVal->getType() != Type::Int64Ty) - IndexVal = ConstantExpr::getSExtOrBitCast(IndexVal, Type::Int64Ty); - - // Check for variable sized array reference. - if (TREE_CODE(TREE_TYPE(Array)) == ARRAY_TYPE) { - tree length = arrayLength(TREE_TYPE(Array)); - assert(!length || host_integerp(length, 1) && - "Cannot have globals with variable size!"); - } + const Type *IntPtrTy = getTargetData().getIntPtrType(); + if (IndexVal->getType() != IntPtrTy) + IndexVal = ConstantExpr::getIntegerCast(IndexVal, IntPtrTy, + !TYPE_UNSIGNED(IndexType)); + std::vector Idx; - if (TREE_CODE (TREE_TYPE(Array)) == ARRAY_TYPE) + if (isArrayCompatible(ArrayType)) Idx.push_back(ConstantInt::get(Type::Int32Ty, 0)); Idx.push_back(IndexVal); return ConstantExpr::getGetElementPtr(ArrayAddr, &Idx[0], Idx.size()); Modified: apple-local/branches/llvm/gcc/llvm-debug.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-debug.cpp 2007-04-16 18:55:33 UTC (rev 126209) +++ apple-local/branches/llvm/gcc/llvm-debug.cpp 2007-04-16 20:01:41 UTC (rev 126210) @@ -582,8 +582,6 @@ tree MinValue = TYPE_MIN_VALUE(Domain); tree MaxValue = TYPE_MAX_VALUE(Domain); if (MinValue && MaxValue && - TREE_CODE(MinValue) == INTEGER_CST && - TREE_CODE(MaxValue) == INTEGER_CST && host_integerp(MinValue, 0) && host_integerp(MaxValue, 0)) { Subrange->setLo(tree_low_cst(MinValue, 0)); Modified: apple-local/branches/llvm/gcc/llvm-internal.h =================================================================== --- apple-local/branches/llvm/gcc/llvm-internal.h 2007-04-16 18:55:33 UTC (rev 126209) +++ apple-local/branches/llvm/gcc/llvm-internal.h 2007-04-16 20:01:41 UTC (rev 126210) @@ -144,11 +144,32 @@ return TheTypeConverter->ConvertType(type); } +/// isInt64 - Return true if t is an INTEGER_CST that fits in a 64 bit integer. +/// If Unsigned is false, returns whether it fits in a int64_t. If Unsigned is +/// true, returns whether the value is non-negative and fits in a uint64_t. +/// Always returns false for overflowed constants. +bool isInt64(tree_node *t, bool Unsigned); + +/// getInt64 - Extract the value of an INTEGER_CST as a 64 bit integer. If +/// Unsigned is false, the value must fit in a int64_t. If Unsigned is true, +/// the value must be non-negative and fit in a uint64_t. Must not be used on +/// overflowed constants. These conditions can be checked by calling isInt64. +uint64_t getInt64(tree_node *t, bool Unsigned); + /// isPassedByInvisibleReference - Return true if the specified type should be /// passed by 'invisible reference'. In other words, instead of passing the /// thing by value, pass the address of a temporary. bool isPassedByInvisibleReference(tree_node *type); +/// isSequentialCompatible - Return true if the specified gcc array or pointer +/// type and the corresponding LLVM SequentialType lay out their components +/// identically in memory. +bool isSequentialCompatible(tree_node *type); + +/// isArrayCompatible - Return true if the specified gcc array or pointer type +/// corresponds to an LLVM array type. +bool isArrayCompatible(tree_node *type); + /// arrayLength - Return a tree expressing the number of elements in an array /// of the specified type, or NULL if the type does not specify the length. tree_node *arrayLength(tree_node *type); Modified: apple-local/branches/llvm/gcc/llvm-types.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-16 18:55:33 UTC (rev 126209) +++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-16 20:01:41 UTC (rev 126210) @@ -73,6 +73,10 @@ // Note down LLVM type for GCC tree node. static const Type * llvm_set_type(tree Tr, const Type *Ty) { + assert(!TYPE_SIZE(Tr) || !Ty->isSized() || !isInt64(TYPE_SIZE(Tr), true) || + getInt64(TYPE_SIZE(Tr), true) == getTargetData().getTypeSizeInBits(Ty) + && "LLVM type size doesn't match GCC type size!"); + unsigned &TypeSlot = LTypesMap[Ty]; if (TypeSlot) { // Already in map. @@ -273,6 +277,39 @@ return Prefix + ContextStr + Name; } +/// isSequentialCompatible - Return true if the specified gcc array or pointer +/// type and the corresponding LLVM SequentialType lay out their components +/// identically in memory. +bool isSequentialCompatible(tree_node *type) { + assert((TREE_CODE (type) == ARRAY_TYPE || + TREE_CODE (type) == POINTER_TYPE || + TREE_CODE (type) == REFERENCE_TYPE) && "not a sequential type!"); + // This relies on gcc types with constant size mapping to LLVM types with the + // same size. + return isInt64(TYPE_SIZE(TREE_TYPE(type)), true); +} + +/// isArrayCompatible - Return true if the specified gcc array or pointer type +/// corresponds to an LLVM array type. +bool isArrayCompatible(tree_node *type) { + assert((TREE_CODE (type) == ARRAY_TYPE || + TREE_CODE (type) == POINTER_TYPE || + TREE_CODE (type) == REFERENCE_TYPE) && "not a sequential type!"); + return + (TREE_CODE (type) == ARRAY_TYPE) && ( + // Arrays with no size are fine as long as their components are layed out + // the same way in memory by LLVM. For example "int X[]" -> "[0 x int]". + (!TYPE_SIZE(type) && isSequentialCompatible(type)) || + + // Arrays with constant size map to LLVM arrays. If the array has zero + // size then there can be two exotic cases: (1) the array might have zero + // length and a component type of variable size; or (2) the array could + // have variable length and a component type with zero size. In both + // cases we convert to a zero length LLVM array. + (TYPE_SIZE(type) && isInt64(TYPE_SIZE(type), true)) + ); +} + /// arrayLength - Return a tree expressing the number of elements in an array /// of the specified type, or NULL if the type does not specify the length. tree_node *arrayLength(tree_node *type) { @@ -582,30 +619,37 @@ if (const Type *Ty = GET_TYPE_LLVM(type)) return Ty; - unsigned NumElements; - tree length = arrayLength(type); - if (length) { - if (host_integerp(length, 1)) { + if (isArrayCompatible(type)) { + uint64_t NumElements; + tree length = arrayLength(type); + + if (!length) { + // We get here if we have something that is globally declared as an + // array with no dimension, this becomes just a zero size array of the + // element type so that: int X[] becomes *'%X = external global [0 x int]' + // + // Note that this also affects new expressions, which return a pointer to + // an unsized array of elements. + NumElements = 0; + } else if (!isInt64(length, true)) { + // A variable length array where the element type has size zero. Turn + // it into a zero length array of the element type. + assert(integer_zerop(TYPE_SIZE(TREE_TYPE(type))) + && "variable length array has constant size!"); + NumElements = 0; + } else { // Normal array. - NumElements = tree_low_cst(length, 1); - } else { - // This handles cases like "int A[n]" which have a runtime constant - // number of elements, but is a compile-time variable. Since these are - // variable sized, we just represent them as the element themself. - return TypeDB.setType(type, ConvertType(TREE_TYPE(type))); + NumElements = getInt64(length, true); } - } else { - // We get here is if they have something that is globally declared as an - // array with no dimension, this becomes just a zero size array of the - // element type so that: int X[] becomes *'%X = external global [0 x int]' - // - // Note that this also affects new expressions, which return a pointer to - // an unsized array of elements. - NumElements = 0; + + return TypeDB.setType(type, ArrayType::get(ConvertType(TREE_TYPE(type)), + NumElements)); } - - return TypeDB.setType(type, ArrayType::get(ConvertType(TREE_TYPE(type)), - NumElements)); + + // This handles cases like "int A[n]" which have a runtime constant + // number of elements, but is a compile-time variable. Since these are + // variable sized, we just represent them as the element themself. + return TypeDB.setType(type, ConvertType(TREE_TYPE(type))); } case OFFSET_TYPE: // Handle OFFSET_TYPE specially. This is used for pointers to members, From evan.cheng at apple.com Mon Apr 16 15:04:32 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Apr 2007 15:04:32 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/sse-load-ret.ll Message-ID: <200704162004.l3GK4WUn014031@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: sse-load-ret.ll updated: 1.3 -> 1.4 --- Log message: Fixes tests and remove xfail. --- Diffs of the changes: (+2 -3) sse-load-ret.ll | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/test/CodeGen/X86/sse-load-ret.ll diff -u llvm/test/CodeGen/X86/sse-load-ret.ll:1.3 llvm/test/CodeGen/X86/sse-load-ret.ll:1.4 --- llvm/test/CodeGen/X86/sse-load-ret.ll:1.3 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/X86/sse-load-ret.ll Mon Apr 16 15:04:11 2007 @@ -1,8 +1,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | \ -; RUN: llc -march=x86 -mcpu=yonah -enable-x86-sse | not grep movss +; RUN: llc -march=x86 -mcpu=yonah | not grep movss ; RUN: llvm-upgrade < %s | llvm-as | \ -; RUN: llc -march=x86 -mcpu=yonah -enable-x86-sse | not grep xmm -; XFAIL: * +; RUN: llc -march=x86 -mcpu=yonah | not grep xmm double %test1(double *%P) { %X = load double* %P From clattner at apple.com Mon Apr 16 15:07:19 2007 From: clattner at apple.com (clattner at apple.com) Date: Mon, 16 Apr 2007 13:07:19 -0700 (PDT) Subject: [llvm-commits] [126211] Fix the -Werror build. Message-ID: <20070416200719.1B036EFC2D8E@src> Revision: 126211 Author: clattner Date: 2007-04-16 13:07:18 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Fix the -Werror build. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-convert.cpp Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-16 20:01:41 UTC (rev 126210) +++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-16 20:07:18 UTC (rev 126211) @@ -3244,7 +3244,7 @@ const Type *Ty = ConvertType(TREE_TYPE(exp)); Constant *Zero = ConstantInt::get(Ty, 0); Constant *One = ConstantInt::get(Ty, 1); - Constant *MinusOne = ConstantInt::get(Ty, -1); + Constant *MinusOne = ConstantInt::get(Ty, -1U); Value *LHS = Emit(TREE_OPERAND(exp, 0), 0); Value *RHS = Emit(TREE_OPERAND(exp, 1), 0); From dpatel at apple.com Mon Apr 16 15:13:20 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 15:13:20 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/PassManagers.h Message-ID: <200704162013.l3GKDKw8014227@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: PassManagers.h updated: 1.15 -> 1.16 --- Log message: Give each pass manager chance to manage lower level analysis pass, which is pass required by one of pass managed by the manager. --- Diffs of the changes: (+20 -5) PassManagers.h | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) Index: llvm/include/llvm/PassManagers.h diff -u llvm/include/llvm/PassManagers.h:1.15 llvm/include/llvm/PassManagers.h:1.16 --- llvm/include/llvm/PassManagers.h:1.15 Fri Mar 23 13:44:11 2007 +++ llvm/include/llvm/PassManagers.h Mon Apr 16 15:12:57 2007 @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/PassManager.h" - +#include "llvm/ADT/SmallVector.h" using namespace llvm; class llvm::PMDataManager; class llvm::PMStack; @@ -221,6 +221,19 @@ /// AvailableAnalysis appropriately if ProcessAnalysis is true. void add(Pass *P, bool ProcessAnalysis = true); + /// Add RequiredPass into list of lower level passes required by pass P. + /// RequiredPass is run on the fly by Pass Manager when P requests it + /// through getAnalysis interface. + virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) { + assert (0 && + "Unable to handle Pass that requires lower level Analysis pass"); + } + + virtual Pass * getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F) { + assert (0 && "Unable to find on the fly pass"); + return NULL; + } + /// Initialize available analysis information. void initializeAnalysisInfo() { AvailableAnalysis.clear(); @@ -233,10 +246,12 @@ bool preserveHigherLevelAnalysis(Pass *P); - /// Populate RequiredPasses with the analysis pass that are required by - /// pass P. - void collectRequiredAnalysisPasses(std::vector &RequiredPasses, - Pass *P); + /// Populate RequiredPasses with analysis pass that are required by + /// pass P and are available. Populate ReqPassNotAvailable with analysis + /// pass that are required by pass P but are not available. + void collectRequiredAnalysis(SmallVector &RequiredPasses, + SmallVector &ReqPassNotAvailable, + Pass *P); /// All Required analyses should be available to the pass as it runs! Here /// we fill in the AnalysisImpls member of the pass so that it can From dpatel at apple.com Mon Apr 16 15:13:25 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 15:13:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp Message-ID: <200704162013.l3GKDPkj014234@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: PassManager.cpp updated: 1.147 -> 1.148 --- Log message: Give each pass manager chance to manage lower level analysis pass, which is pass required by one of pass managed by the manager. --- Diffs of the changes: (+60 -20) PassManager.cpp | 80 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 60 insertions(+), 20 deletions(-) Index: llvm/lib/VMCore/PassManager.cpp diff -u llvm/lib/VMCore/PassManager.cpp:1.147 llvm/lib/VMCore/PassManager.cpp:1.148 --- llvm/lib/VMCore/PassManager.cpp:1.147 Mon Apr 16 13:10:23 2007 +++ llvm/lib/VMCore/PassManager.cpp Mon Apr 16 15:12:57 2007 @@ -190,6 +190,11 @@ Info.setPreservesAll(); } + /// Add RequiredPass into list of lower level passes required by pass P. + /// RequiredPass is run on the fly by Pass Manager when P requests it + /// through getAnalysis interface. + virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass); + virtual const char *getPassName() const { return "Module Pass Manager"; } @@ -400,9 +405,14 @@ Pass *AnalysisPass = findAnalysisPass(*I); if (!AnalysisPass) { - // Schedule this analysis run first. AnalysisPass = (*I)->createPass(); - schedulePass(AnalysisPass); + // Schedule this analysis run first only if it is not a lower level + // analysis pass. Lower level analsyis passes are run on the fly. + if (P->getPotentialPassManagerType () >= + AnalysisPass->getPotentialPassManagerType()) + schedulePass(AnalysisPass); + else + delete AnalysisPass; } } @@ -642,11 +652,14 @@ // At the moment, this pass is the last user of all required passes. std::vector LastUses; - std::vector RequiredPasses; + SmallVector RequiredPasses; + SmallVector ReqAnalysisNotAvailable; + unsigned PDepth = this->getDepth(); - collectRequiredAnalysisPasses(RequiredPasses, P); - for (std::vector::iterator I = RequiredPasses.begin(), + collectRequiredAnalysis(RequiredPasses, + ReqAnalysisNotAvailable, P); + for (SmallVector::iterator I = RequiredPasses.begin(), E = RequiredPasses.end(); I != E; ++I) { Pass *PRequired = *I; unsigned RDepth = 0; @@ -661,11 +674,16 @@ TransferLastUses.push_back(PRequired); // Keep track of higher level analysis used by this manager. HigherLevelAnalysis.push_back(PRequired); - } else { - // Note : This feature is not yet implemented - assert (0 && - "Unable to handle Pass that requires lower level Analysis pass"); - } + } else + assert (0 && "Unable to accomodate Required Pass"); + } + + // Now, take care of required analysises that are not available. + for (SmallVector::iterator + I = ReqAnalysisNotAvailable.begin(), + E = ReqAnalysisNotAvailable.end() ;I != E; ++I) { + Pass *AnalysisPass = (*I)->createPass(); + this->addLowerLevelRequiredPass(P, AnalysisPass); } // Set P as P's last user until someone starts using P. @@ -691,27 +709,34 @@ PassVector.push_back(P); } -/// Populate RequiredPasses with the analysis pass that are required by -/// pass P. -void PMDataManager::collectRequiredAnalysisPasses(std::vector &RP, - Pass *P) { + +/// Populate RP with analysis pass that are required by +/// pass P and are available. Populate RP_NotAvail with analysis +/// pass that are required by pass P but are not available. +void PMDataManager::collectRequiredAnalysis(SmallVector&RP, + SmallVector &RP_NotAvail, + Pass *P) { AnalysisUsage AnUsage; P->getAnalysisUsage(AnUsage); const std::vector &RequiredSet = AnUsage.getRequiredSet(); for (std::vector::const_iterator I = RequiredSet.begin(), E = RequiredSet.end(); I != E; ++I) { - Pass *AnalysisPass = findAnalysisPass(*I, true); - assert (AnalysisPass && "Analysis pass is not available"); - RP.push_back(AnalysisPass); + AnalysisID AID = *I; + if (Pass *AnalysisPass = findAnalysisPass(*I, true)) + RP.push_back(AnalysisPass); + else + RP_NotAvail.push_back(AID); } const std::vector &IDs = AnUsage.getRequiredTransitiveSet(); for (std::vector::const_iterator I = IDs.begin(), E = IDs.end(); I != E; ++I) { - Pass *AnalysisPass = findAnalysisPass(*I, true); - assert (AnalysisPass && "Analysis pass is not available"); - RP.push_back(AnalysisPass); + AnalysisID AID = *I; + if (Pass *AnalysisPass = findAnalysisPass(*I, true)) + RP.push_back(AnalysisPass); + else + RP_NotAvail.push_back(AID); } } @@ -1154,6 +1179,21 @@ return Changed; } +/// Add RequiredPass into list of lower level passes required by pass P. +/// RequiredPass is run on the fly by Pass Manager when P requests it +/// through getAnalysis interface. +void MPPassManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) { + + assert (P->getPotentialPassManagerType() == PMT_ModulePassManager + && "Unable to handle Pass that requires lower level Analysis pass"); + assert ((P->getPotentialPassManagerType() < + RequiredPass->getPotentialPassManagerType()) + && "Unable to handle Pass that requires lower level Analysis pass"); + + assert (0 && + "Unable to handle Pass that requires lower level Analysis pass"); +} + //===----------------------------------------------------------------------===// // PassManagerImpl implementation // From clattner at apple.com Mon Apr 16 15:17:27 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 16 Apr 2007 13:17:27 -0700 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y In-Reply-To: <200704161746.l3GHkBHv010871@zion.cs.uiuc.edu> References: <200704161746.l3GHkBHv010871@zion.cs.uiuc.edu> Message-ID: > Use a more optimal way to get the name of a function. Thanks, Chris. Cool, please check that the name is >= 5 chars long too :) -Chris > > --- > Diffs of the changes: (+2 -1) > > llvmAsmParser.y | 3 ++- > 1 files changed, 2 insertions(+), 1 deletion(-) > > > Index: llvm/lib/AsmParser/llvmAsmParser.y > diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.340 llvm/lib/AsmParser/ > llvmAsmParser.y:1.341 > --- llvm/lib/AsmParser/llvmAsmParser.y:1.340 Mon Apr 16 01:55:42 2007 > +++ llvm/lib/AsmParser/llvmAsmParser.y Mon Apr 16 12:45:50 2007 > @@ -2823,7 +2823,8 @@ > > // Check for call to invalid intrinsic to avoid crashing later. > if (Function *theF = dyn_cast(V)) { > - if (theF->hasName() && 0 == strncmp(theF->getName().c_str(), > "llvm.", 5)&& > + if (theF->hasName() && > + 0 == strncmp(theF->getValueName()->getKeyData(), > "llvm.", 5) && > !theF->getIntrinsicID(true)) > GEN_ERROR("Call to invalid LLVM intrinsic function '" + > theF->getName() + "'"); > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dpatel at apple.com Mon Apr 16 15:27:26 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 15:27:26 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp Message-ID: <200704162027.l3GKRQP0014560@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: PassManager.cpp updated: 1.148 -> 1.149 --- Log message: Update module pass manager to support module passes that require function passes. --- Diffs of the changes: (+44 -11) PassManager.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 44 insertions(+), 11 deletions(-) Index: llvm/lib/VMCore/PassManager.cpp diff -u llvm/lib/VMCore/PassManager.cpp:1.148 llvm/lib/VMCore/PassManager.cpp:1.149 --- llvm/lib/VMCore/PassManager.cpp:1.148 Mon Apr 16 15:12:57 2007 +++ llvm/lib/VMCore/PassManager.cpp Mon Apr 16 15:27:05 2007 @@ -195,6 +195,11 @@ /// through getAnalysis interface. virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass); + /// Return function pass corresponding to PassInfo PI, that is + /// required by module pass MP. Instantiate analysis pass, by using + /// its runOnFunction() for function F. + virtual Pass* getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F); + virtual const char *getPassName() const { return "Module Pass Manager"; } @@ -218,6 +223,11 @@ virtual PassManagerType getPassManagerType() const { return PMT_ModulePassManager; } + + private: + /// Collection of on the fly FPPassManagers. These managers manage + /// function passes that are required by module passes. + std::map OnTheFlyManagers; }; //===----------------------------------------------------------------------===// @@ -614,6 +624,10 @@ enum PassDebuggingString DBG_STR) { std::vector DeadPasses; + + if (!TPM) + return; + TPM->collectLastUses(DeadPasses, P); for (std::vector::iterator I = DeadPasses.begin(), @@ -678,14 +692,6 @@ assert (0 && "Unable to accomodate Required Pass"); } - // Now, take care of required analysises that are not available. - for (SmallVector::iterator - I = ReqAnalysisNotAvailable.begin(), - E = ReqAnalysisNotAvailable.end() ;I != E; ++I) { - Pass *AnalysisPass = (*I)->createPass(); - this->addLowerLevelRequiredPass(P, AnalysisPass); - } - // Set P as P's last user until someone starts using P. // However, if P is a Pass Manager then it does not need // to record its last user. @@ -699,6 +705,14 @@ TransferLastUses.clear(); } + // Now, take care of required analysises that are not available. + for (SmallVector::iterator + I = ReqAnalysisNotAvailable.begin(), + E = ReqAnalysisNotAvailable.end() ;I != E; ++I) { + Pass *AnalysisPass = (*I)->createPass(); + this->addLowerLevelRequiredPass(P, AnalysisPass); + } + // Take a note of analysis required and made available by this pass. // Remove the analysis not preserved by this pass removeNotPreservedAnalysis(P); @@ -1190,10 +1204,29 @@ RequiredPass->getPotentialPassManagerType()) && "Unable to handle Pass that requires lower level Analysis pass"); - assert (0 && - "Unable to handle Pass that requires lower level Analysis pass"); + FPPassManager *FPP = OnTheFlyManagers[P]; + if (!FPP) { + FPP = new FPPassManager(getDepth() + 1); + OnTheFlyManagers[P] = FPP; + } + + FPP->add(RequiredPass, false); } - + +/// Return function pass corresponding to PassInfo PI, that is +/// required by module pass MP. Instantiate analysis pass, by using +/// its runOnFunction() for function F. +Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const PassInfo *PI, + Function &F) { + AnalysisID AID = PI; + FPPassManager *FPP =OnTheFlyManagers[MP]; + assert (FPP && "Unable to find on the fly pass"); + + FPP->runOnFunction(F); + return FPP->findAnalysisPass(AID, false); +} + + //===----------------------------------------------------------------------===// // PassManagerImpl implementation // From reid at x10sys.com Mon Apr 16 15:31:27 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 15:31:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Message-ID: <200704162031.l3GKVREk014695@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.y updated: 1.341 -> 1.342 --- Log message: Check length of string before we walk off the end of it. Thanks, Chris. --- Diffs of the changes: (+3 -3) llvmAsmParser.y | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.341 llvm/lib/AsmParser/llvmAsmParser.y:1.342 --- llvm/lib/AsmParser/llvmAsmParser.y:1.341 Mon Apr 16 12:45:50 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y Mon Apr 16 15:31:06 2007 @@ -2823,9 +2823,9 @@ // Check for call to invalid intrinsic to avoid crashing later. if (Function *theF = dyn_cast(V)) { - if (theF->hasName() && - 0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5) && - !theF->getIntrinsicID(true)) + if (theF->hasName() && (strlen(theF->getValueName()->getKeyData()) >= 5)&& + (0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5)) && + !theF->getIntrinsicID(true)) GEN_ERROR("Call to invalid LLVM intrinsic function '" + theF->getName() + "'"); } From reid at x10sys.com Mon Apr 16 15:36:00 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 15:36:00 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs llvmAsmParser.y.cvs Message-ID: <200704162036.l3GKa0NE014781@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.cpp.cvs updated: 1.86 -> 1.87 llvmAsmParser.y.cvs updated: 1.87 -> 1.88 --- Log message: Regenerate. --- Diffs of the changes: (+6 -6) llvmAsmParser.cpp.cvs | 6 +++--- llvmAsmParser.y.cvs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.86 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.87 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.86 Mon Apr 16 12:47:06 2007 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Mon Apr 16 15:35:38 2007 @@ -5488,9 +5488,9 @@ // Check for call to invalid intrinsic to avoid crashing later. if (Function *theF = dyn_cast(V)) { - if (theF->hasName() && - 0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5) && - !theF->getIntrinsicID(true)) + if (theF->hasName() && (strlen(theF->getValueName()->getKeyData()) >= 5)&& + (0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5)) && + !theF->getIntrinsicID(true)) GEN_ERROR("Call to invalid LLVM intrinsic function '" + theF->getName() + "'"); } Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.87 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.88 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.87 Mon Apr 16 12:47:06 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Mon Apr 16 15:35:38 2007 @@ -2823,9 +2823,9 @@ // Check for call to invalid intrinsic to avoid crashing later. if (Function *theF = dyn_cast(V)) { - if (theF->hasName() && - 0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5) && - !theF->getIntrinsicID(true)) + if (theF->hasName() && (strlen(theF->getValueName()->getKeyData()) >= 5)&& + (0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5)) && + !theF->getIntrinsicID(true)) GEN_ERROR("Call to invalid LLVM intrinsic function '" + theF->getName() + "'"); } From dpatel at apple.com Mon Apr 16 15:40:20 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 15:40:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp Message-ID: <200704162040.l3GKeKwE014898@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: PassManager.cpp updated: 1.149 -> 1.150 --- Log message: Print and delete on the fly pass managers. --- Diffs of the changes: (+19 -3) PassManager.cpp | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) Index: llvm/lib/VMCore/PassManager.cpp diff -u llvm/lib/VMCore/PassManager.cpp:1.149 llvm/lib/VMCore/PassManager.cpp:1.150 --- llvm/lib/VMCore/PassManager.cpp:1.149 Mon Apr 16 15:27:05 2007 +++ llvm/lib/VMCore/PassManager.cpp Mon Apr 16 15:39:59 2007 @@ -180,7 +180,17 @@ public: MPPassManager(int Depth) : PMDataManager(Depth) { } - + + // Delete on the fly managers. + virtual ~MPPassManager() { + for (std::map::iterator + I = OnTheFlyManagers.begin(), E = OnTheFlyManagers.end(); + I != E; ++I) { + FPPassManager *FPP = I->second; + delete FPP; + } + } + /// run - Execute all of the passes scheduled for execution. Keep track of /// whether any of the passes modifies the module, and if so, return true. bool runOnModule(Module &M); @@ -210,6 +220,8 @@ for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { ModulePass *MP = getContainedPass(Index); MP->dumpPassStructure(Offset + 1); + if (FPPassManager *FPP = OnTheFlyManagers[MP]) + FPP->dumpPassStructure(Offset + 2); dumpLastUses(MP, Offset+1); } } @@ -625,6 +637,7 @@ std::vector DeadPasses; + // If this is a on the fly manager then it does not have TPM. if (!TPM) return; @@ -795,8 +808,11 @@ void PMDataManager::dumpLastUses(Pass *P, unsigned Offset) const{ std::vector LUses; - - assert (TPM && "Top Level Manager is missing"); + + // If this is a on the fly manager then it does not have TPM. + if (!TPM) + return; + TPM->collectLastUses(LUses, P); for (std::vector::iterator I = LUses.begin(), From dpatel at apple.com Mon Apr 16 15:44:37 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 15:44:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp Message-ID: <200704162044.l3GKibwO014990@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: PassManager.cpp updated: 1.150 -> 1.151 --- Log message: Do not assert during analysis implementation initialization. --- Diffs of the changes: (+3 -1) PassManager.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/VMCore/PassManager.cpp diff -u llvm/lib/VMCore/PassManager.cpp:1.150 llvm/lib/VMCore/PassManager.cpp:1.151 --- llvm/lib/VMCore/PassManager.cpp:1.150 Mon Apr 16 15:39:59 2007 +++ llvm/lib/VMCore/PassManager.cpp Mon Apr 16 15:44:16 2007 @@ -781,7 +781,9 @@ E = AnUsage.getRequiredSet().end(); I != E; ++I) { Pass *Impl = findAnalysisPass(*I, true); if (Impl == 0) - assert(0 && "Analysis used but not available!"); + // This may be analysis pass that is initialized on the fly. + // If that is not the case then it will raise an assert when it is used. + continue; AnalysisResolver *AR = P->getResolver(); AR->addAnalysisImplsPair(*I, Impl); } From dpatel at apple.com Mon Apr 16 15:56:56 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 15:56:56 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Pass.h PassAnalysisSupport.h Message-ID: <200704162056.l3GKuuuf015234@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Pass.h updated: 1.83 -> 1.84 PassAnalysisSupport.h updated: 1.29 -> 1.30 --- Log message: Proivde getAnalysis(Func) support. --- Diffs of the changes: (+41 -0) Pass.h | 5 +++++ PassAnalysisSupport.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) Index: llvm/include/llvm/Pass.h diff -u llvm/include/llvm/Pass.h:1.83 llvm/include/llvm/Pass.h:1.84 --- llvm/include/llvm/Pass.h:1.83 Mon Apr 16 13:51:25 2007 +++ llvm/include/llvm/Pass.h Mon Apr 16 15:56:24 2007 @@ -197,8 +197,13 @@ AnalysisType &getAnalysis() const; // Defined in PassAnalysisSupport.h template + AnalysisType &getAnalysis(Function &F); // Defined in PassanalysisSupport.h + + template AnalysisType &getAnalysisID(const PassInfo *PI) const; + template + AnalysisType &getAnalysisID(const PassInfo *PI, Function &F); }; inline std::ostream &operator<<(std::ostream &OS, const Pass &P) { Index: llvm/include/llvm/PassAnalysisSupport.h diff -u llvm/include/llvm/PassAnalysisSupport.h:1.29 llvm/include/llvm/PassAnalysisSupport.h:1.30 --- llvm/include/llvm/PassAnalysisSupport.h:1.29 Fri Mar 23 13:44:11 2007 +++ llvm/include/llvm/PassAnalysisSupport.h Mon Apr 16 15:56:24 2007 @@ -127,6 +127,9 @@ return ResultPass; } + // Find pass that is implementing PI. Initialize pass for Function F. + Pass *findImplPass(Pass *P, const PassInfo *PI, Function &F); + void addAnalysisImplsPair(const PassInfo *PI, Pass *P) { std::pair pir = std::make_pair(PI,P); AnalysisImpls.push_back(pir); @@ -197,6 +200,39 @@ return *Result; } +/// getAnalysis() - This function is used by subclasses to get +/// to the analysis information that they claim to use by overriding the +/// getAnalysisUsage function. +/// +template +AnalysisType &Pass::getAnalysis(Function &F) { + assert(Resolver &&"Pass has not been inserted into a PassManager object!"); + + return getAnalysisID(getClassPassInfo(), F); +} + +template +AnalysisType &Pass::getAnalysisID(const PassInfo *PI, Function &F) { + assert(PI && "getAnalysis for unregistered pass!"); + assert(Resolver&&"Pass has not been inserted into a PassManager object!"); + // PI *must* appear in AnalysisImpls. Because the number of passes used + // should be a small number, we just do a linear search over a (dense) + // vector. + Pass *ResultPass = Resolver->findImplPass(this, PI, F); + assert (ResultPass && + "getAnalysis*() called on an analysis that was not " + "'required' by pass!"); + + // Because the AnalysisType may not be a subclass of pass (for + // AnalysisGroups), we must use dynamic_cast here to potentially adjust the + // return pointer (because the class may multiply inherit, once from pass, + // once from AnalysisType). + // + AnalysisType *Result = dynamic_cast(ResultPass); + assert(Result && "Pass does not implement interface required!"); + return *Result; +} + } // End llvm namespace #endif From dpatel at apple.com Mon Apr 16 15:56:56 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 15:56:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp Message-ID: <200704162056.l3GKuuG2015227@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: PassManager.cpp updated: 1.151 -> 1.152 --- Log message: Proivde getAnalysis(Func) support. --- Diffs of the changes: (+5 -0) PassManager.cpp | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/lib/VMCore/PassManager.cpp diff -u llvm/lib/VMCore/PassManager.cpp:1.151 llvm/lib/VMCore/PassManager.cpp:1.152 --- llvm/lib/VMCore/PassManager.cpp:1.151 Mon Apr 16 15:44:16 2007 +++ llvm/lib/VMCore/PassManager.cpp Mon Apr 16 15:56:24 2007 @@ -906,6 +906,11 @@ return PM.findAnalysisPass(ID, dir); } +Pass *AnalysisResolver::findImplPass(Pass *P, const PassInfo *AnalysisPI, + Function &F) { + return PM.getOnTheFlyPass(P, AnalysisPI, F); +} + //===----------------------------------------------------------------------===// // BBPassManager implementation From sabre at nondot.org Mon Apr 16 16:05:58 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 16:05:58 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/vec_call.ll Message-ID: <200704162105.l3GL5w4I015733@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: vec_call.ll updated: 1.4 -> 1.5 --- Log message: fix this test --- Diffs of the changes: (+2 -3) vec_call.ll | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/test/CodeGen/X86/vec_call.ll diff -u llvm/test/CodeGen/X86/vec_call.ll:1.4 llvm/test/CodeGen/X86/vec_call.ll:1.5 --- llvm/test/CodeGen/X86/vec_call.ll:1.4 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/X86/vec_call.ll Mon Apr 16 16:05:37 2007 @@ -1,8 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -mtriple=powerpc-apple-darwin8 | \ ; RUN: grep {subl.*60} -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -mtriple=powerpc-apple-darwin8 | \ ; RUN: grep {movdqa.*32} -; XFAIL: * void %test() { tail call void %xx( int 1, int 2, int 3, int 4, int 5, int 6, int 7, <2 x long> cast (<4 x int> < int 4, int 3, int 2, int 1 > to <2 x long>), <2 x long> cast (<4 x int> < int 8, int 7, int 6, int 5 > to <2 x long>), <2 x long> cast (<4 x int> < int 6, int 4, int 2, int 0 > to <2 x long>), <2 x long> cast (<4 x int> < int 8, int 4, int 2, int 1 > to <2 x long>), <2 x long> cast (<4 x int> < int 0, int 1, int 3, int 9 > to <2 x long>) ) From asl at math.spbu.ru Mon Apr 16 16:07:21 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 16 Apr 2007 16:07:21 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr Message-ID: <200704162107.l3GL7L79015768@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2006-09-25-DebugFilename.c.tr updated: 1.2 -> 1.3 --- Log message: Heal this test --- Diffs of the changes: (+2 -2) 2006-09-25-DebugFilename.c.tr | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr diff -u llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr:1.2 llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr:1.3 --- llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr:1.2 Mon Apr 16 10:15:51 2007 +++ llvm/test/CFrontend/2006-09-25-DebugFilename.c.tr Mon Apr 16 16:07:00 2007 @@ -1,6 +1,6 @@ -// RUN: %llvmgcc -xc %s -S -o /dev/null |& \ +// RUN: ignore %llvmgcc -xc %s -S -o /dev/null |& \ // RUN: grep fluffy | grep 2006-09-25-DebugFilename.c.tr #include "2006-09-25-DebugFilename.h" int func1() { return hfunc1(); } -int func2() { int fluffy; return hfunc1(); } +int func2() { fluffy; return hfunc1(); } From baldrick at free.fr Mon Apr 16 16:12:24 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 16 Apr 2007 16:12:24 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2007-03-27-ArrayCompatible.c Message-ID: <200704162112.l3GLCOv9015925@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2007-03-27-ArrayCompatible.c added (r1.1) --- Log message: Check handling of arrays of variable sized components. --- Diffs of the changes: (+10 -0) 2007-03-27-ArrayCompatible.c | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/test/CFrontend/2007-03-27-ArrayCompatible.c diff -c /dev/null llvm/test/CFrontend/2007-03-27-ArrayCompatible.c:1.1 *** /dev/null Mon Apr 16 16:12:13 2007 --- llvm/test/CFrontend/2007-03-27-ArrayCompatible.c Mon Apr 16 16:12:03 2007 *************** *** 0 **** --- 1,10 ---- + // RUN: %llvmgcc -S %s -O2 -o - | grep {ret i8 0} + static char c(int n) { + char x[2][n]; + x[1][0]=0; + return *(n+(char *)x); + } + + char d(void) { + return c(2); + } From baldrick at free.fr Mon Apr 16 16:14:18 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 16 Apr 2007 16:14:18 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2007-03-27-VarLengthArray.c Message-ID: <200704162114.l3GLEIex015968@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2007-03-27-VarLengthArray.c added (r1.1) --- Log message: Test code quality for variable length array references. --- Diffs of the changes: (+7 -0) 2007-03-27-VarLengthArray.c | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/test/CFrontend/2007-03-27-VarLengthArray.c diff -c /dev/null llvm/test/CFrontend/2007-03-27-VarLengthArray.c:1.1 *** /dev/null Mon Apr 16 16:14:07 2007 --- llvm/test/CFrontend/2007-03-27-VarLengthArray.c Mon Apr 16 16:13:57 2007 *************** *** 0 **** --- 1,7 ---- + // RUN: %llvmgcc -S %s -o - | grep {getelementptr i32} + extern void f(int *); + int e(int m, int n) { + int x[n]; + f(x); + return x[m]; + } From sabre at nondot.org Mon Apr 16 16:19:17 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 16:19:17 -0500 Subject: [llvm-commits] CVS: llvm/test/C++Frontend/2003-08-28-ForwardType.cpp Message-ID: <200704162119.l3GLJHlk016101@zion.cs.uiuc.edu> Changes in directory llvm/test/C++Frontend: 2003-08-28-ForwardType.cpp updated: 1.5 -> 1.6 --- Log message: MAke this test portable. --- Diffs of the changes: (+3 -1) 2003-08-28-ForwardType.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/test/C++Frontend/2003-08-28-ForwardType.cpp diff -u llvm/test/C++Frontend/2003-08-28-ForwardType.cpp:1.5 llvm/test/C++Frontend/2003-08-28-ForwardType.cpp:1.6 --- llvm/test/C++Frontend/2003-08-28-ForwardType.cpp:1.5 Thu Apr 21 18:48:37 2005 +++ llvm/test/C++Frontend/2003-08-28-ForwardType.cpp Mon Apr 16 16:18:56 2007 @@ -1,7 +1,9 @@ // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null // Default placement versions of operator new. -inline void* operator new(unsigned, void* __p) throw(); +#include + +void* operator new(size_t, void* __p) throw(); template From baldrick at free.fr Mon Apr 16 16:20:07 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 16 Apr 2007 16:20:07 -0500 Subject: [llvm-commits] CVS: llvm/test/lib/llvm.exp Message-ID: <200704162120.l3GLK7bO016137@zion.cs.uiuc.edu> Changes in directory llvm/test/lib: llvm.exp updated: 1.14 -> 1.15 --- Log message: Spelling fix. --- Diffs of the changes: (+1 -1) llvm.exp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/lib/llvm.exp diff -u llvm/test/lib/llvm.exp:1.14 llvm/test/lib/llvm.exp:1.15 --- llvm/test/lib/llvm.exp:1.14 Mon Apr 16 10:37:00 2007 +++ llvm/test/lib/llvm.exp Mon Apr 16 16:19:45 2007 @@ -112,7 +112,7 @@ if {[regexp {END.[ *]$} $line match endofscript]} { break - # if the line is continued, concatente and continue the loop + # if the line is continued, concatenate and continue the loop } elseif {[regexp {RUN: *(.+)(\\)$} $line match oneline suffix]} { set runline "$runline$oneline " From lattner at cs.uiuc.edu Mon Apr 16 16:20:48 2007 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 16 Apr 2007 16:20:48 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/cast-to-bool.c Message-ID: <200704162120.l3GLKmHd016202@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: cast-to-bool.c (r1.4) removed --- Log message: remove bogus test --- Diffs of the changes: (+0 -0) 0 files changed From lattner at cs.uiuc.edu Mon Apr 16 16:23:19 2007 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 16 Apr 2007 16:23:19 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/bit-accurate-int.c Message-ID: <200704162123.l3GLNJdk016344@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: bit-accurate-int.c (r1.3) removed --- Log message: We shouldn't have tests for features we don't have yet. --- Diffs of the changes: (+0 -0) 0 files changed From djg at cray.com Mon Apr 16 16:24:08 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 16 Apr 2007 16:24:08 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/vec_call.ll In-Reply-To: <200704162105.l3GL5w4I015733@zion.cs.uiuc.edu> Message-ID: <20070416212408.GN15678@village.us.cray.com> > -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ > +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 > -mtriple=powerpc-apple-darwin8 | \ Did you really mean to use a powerpc triple with -march=x86? Dan -- Dan Gohman, Cray Inc. From reid at x10sys.com Mon Apr 16 16:24:35 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 16:24:35 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CallingConv.h Message-ID: <200704162124.l3GLOZTx016435@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: CallingConv.h updated: 1.6 -> 1.7 --- Log message: Fix 80 col violations. --- Diffs of the changes: (+4 -4) CallingConv.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/include/llvm/CallingConv.h diff -u llvm/include/llvm/CallingConv.h:1.6 llvm/include/llvm/CallingConv.h:1.7 --- llvm/include/llvm/CallingConv.h:1.6 Sun Jan 28 07:31:35 2007 +++ llvm/include/llvm/CallingConv.h Mon Apr 16 16:24:12 2007 @@ -26,16 +26,16 @@ enum ID { /// C - The default llvm calling convention, compatible with C. This /// convention is the only calling convention that supports varargs calls. - /// As with typical C calling conventions, the callee/caller have to tolerate - /// certain amounts of prototype mismatch. + /// As with typical C calling conventions, the callee/caller have to + /// tolerate certain amounts of prototype mismatch. C = 0, // Generic LLVM calling conventions. None of these calling conventions // support varargs calls, and all assume that the caller and callee // prototype exactly match. - /// Fast - This calling convention attempts to make calls as fast as possible - /// (e.g. by passing things in registers). + /// Fast - This calling convention attempts to make calls as fast as + /// possible /// (e.g. by passing things in registers). Fast = 8, // Cold - This calling convention attempts to make code in the caller as From sabre at nondot.org Mon Apr 16 16:24:41 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 16:24:41 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll Message-ID: <200704162124.l3GLOfQf016444@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/PredicateSimplifier: 2006-10-22-IntOr.ll updated: 1.5 -> 1.6 --- Log message: fix incorrectly upgraded test --- Diffs of the changes: (+1 -1) 2006-10-22-IntOr.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll diff -u llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll:1.5 llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll:1.6 --- llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll:1.5 Mon Apr 16 12:36:08 2007 +++ llvm/test/Transforms/PredicateSimplifier/2006-10-22-IntOr.ll Mon Apr 16 16:24:14 2007 @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | \ -; RUN: opt -predsimplify -instcombine -simplifycfg -o %t -f +; RUN: opt -predsimplify -instcombine -simplifycfg | llvm-dis > %t ; RUN: grep -v declare %t | not grep fail ; RUN: grep -v declare %t | grep -c pass | grep 3 From sabre at nondot.org Mon Apr 16 16:36:25 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 14:36:25 -0700 (PDT) Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/vec_call.ll In-Reply-To: <20070416212408.GN15678@village.us.cray.com> References: <20070416212408.GN15678@village.us.cray.com> Message-ID: On Mon, 16 Apr 2007, Dan Gohman wrote: >> -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ >> +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 >> -mtriple=powerpc-apple-darwin8 | \ > > Did you really mean to use a powerpc triple with -march=x86? Heh, no. But it works (determines you really want x86 darwin). I'll fix though, good eyes :) -Chris -- http://nondot.org/sabre/ http://llvm.org/ From sabre at nondot.org Mon Apr 16 16:26:58 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 16:26:58 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/vec_call.ll Message-ID: <200704162126.l3GLQwEk016545@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: vec_call.ll updated: 1.5 -> 1.6 --- Log message: use an x86 t-t for an x86 test. Thanks to Dan for noticing this! --- Diffs of the changes: (+2 -2) vec_call.ll | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/CodeGen/X86/vec_call.ll diff -u llvm/test/CodeGen/X86/vec_call.ll:1.5 llvm/test/CodeGen/X86/vec_call.ll:1.6 --- llvm/test/CodeGen/X86/vec_call.ll:1.5 Mon Apr 16 16:05:37 2007 +++ llvm/test/CodeGen/X86/vec_call.ll Mon Apr 16 16:26:37 2007 @@ -1,6 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -mtriple=powerpc-apple-darwin8 | \ +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -mtriple=i686-apple-darwin8 | \ ; RUN: grep {subl.*60} -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -mtriple=powerpc-apple-darwin8 | \ +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -mtriple=i686-apple-darwin8 | \ ; RUN: grep {movdqa.*32} void %test() { From dpatel at apple.com Mon Apr 16 16:28:35 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 16:28:35 -0500 Subject: [llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html Message-ID: <200704162128.l3GLSZwn016651@zion.cs.uiuc.edu> Changes in directory llvm/docs: WritingAnLLVMPass.html updated: 1.54 -> 1.55 --- Log message: Document how, module pass can require function pass. --- Diffs of the changes: (+19 -3) WritingAnLLVMPass.html | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) Index: llvm/docs/WritingAnLLVMPass.html diff -u llvm/docs/WritingAnLLVMPass.html:1.54 llvm/docs/WritingAnLLVMPass.html:1.55 --- llvm/docs/WritingAnLLVMPass.html:1.54 Mon Mar 19 17:21:25 2007 +++ llvm/docs/WritingAnLLVMPass.html Mon Apr 16 16:28:14 2007 @@ -466,7 +466,9 @@ ModulePass indicates that your pass uses the entire program as a unit, refering to function bodies in no predictable order, or adding and removing functions. Because nothing is known about the behavior of ModulePass -subclasses, no optimization can be done for their execution.

+subclasses, no optimization can be done for their execution. A module pass +can use function level passes (e.g. dominators) using getAnalysis interface + getAnalysis(Function).

To write a correct ModulePass subclass, derive from ModulePass and overload the runOnModule method with the @@ -1127,7 +1129,21 @@ declare as required in your getAnalysisUsage implementation. This method can be called by your run* method implementation, or by any -other local method invoked by your run* method.

+other local method invoked by your run* method. + +A module level pass can use function level analysis info using this interface. +For example:

+ +
+   bool ModuleLevelPass::runOnModule(Module &M) {
+     ...
+     DominatorTree &DT = getAnalysis<DominatorTree>(Function &F);
+     ...
+   }
+
+ +In above example, runOnFunction for DominatorTree is called by pass manager +before returning a reference to the desired pass.

If your pass is capable of updating analyses if they exist (e.g., @@ -1799,7 +1815,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007/03/19 22:21:25 $ + Last modified: $Date: 2007/04/16 21:28:14 $ From sabre at nondot.org Mon Apr 16 16:30:42 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 16:30:42 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll Message-ID: <200704162130.l3GLUggh016750@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: 2007-03-15-GEP-Idx-Sink.ll updated: 1.5 -> 1.6 --- Log message: refix this --- Diffs of the changes: (+1 -1) 2007-03-15-GEP-Idx-Sink.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll diff -u llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll:1.5 llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll:1.6 --- llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll:1.5 Mon Apr 16 13:59:25 2007 +++ llvm/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll Mon Apr 16 16:30:21 2007 @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-darwin | \ -; RUN: grep {addl \$16, %esp} +; RUN: grep {addl \$12, %esp} define void @foo(i8** %buf, i32 %size, i32 %col, i8* %p) { entry: From clattner at apple.com Mon Apr 16 16:33:53 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 16 Apr 2007 14:33:53 -0700 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y In-Reply-To: <200704162031.l3GKVREk014695@zion.cs.uiuc.edu> References: <200704162031.l3GKVREk014695@zion.cs.uiuc.edu> Message-ID: > Check length of string before we walk off the end of it. > Thanks, Chris. but I want to support nul characters in my names! -Chris > > --- > Diffs of the changes: (+3 -3) > > llvmAsmParser.y | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > > Index: llvm/lib/AsmParser/llvmAsmParser.y > diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.341 llvm/lib/AsmParser/ > llvmAsmParser.y:1.342 > --- llvm/lib/AsmParser/llvmAsmParser.y:1.341 Mon Apr 16 12:45:50 2007 > +++ llvm/lib/AsmParser/llvmAsmParser.y Mon Apr 16 15:31:06 2007 > @@ -2823,9 +2823,9 @@ > > // Check for call to invalid intrinsic to avoid crashing later. > if (Function *theF = dyn_cast(V)) { > - if (theF->hasName() && > - 0 == strncmp(theF->getValueName()->getKeyData(), > "llvm.", 5) && > - !theF->getIntrinsicID(true)) > + if (theF->hasName() && (strlen(theF->getValueName()- > >getKeyData()) >= 5)&& > + (0 == strncmp(theF->getValueName()->getKeyData(), > "llvm.", 5)) && > + !theF->getIntrinsicID(true)) > GEN_ERROR("Call to invalid LLVM intrinsic function '" + > theF->getName() + "'"); > } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From rspencer at reidspencer.com Mon Apr 16 16:46:27 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 16 Apr 2007 14:46:27 -0700 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y In-Reply-To: References: <200704162031.l3GKVREk014695@zion.cs.uiuc.edu> Message-ID: <1176759987.23191.365.camel@bashful.x10sys.com> On Mon, 2007-04-16 at 14:33 -0700, Chris Lattner wrote: > > Check length of string before we walk off the end of it. > > Thanks, Chris. > > but I want to support nul characters in my names! Okay, so this whole "ValueName" and "StringMap" thing I don't understand. How do you get the length of a name now? Reid. > > -Chris > > > > > --- > > Diffs of the changes: (+3 -3) > > > > llvmAsmParser.y | 6 +++--- > > 1 files changed, 3 insertions(+), 3 deletions(-) > > > > > > Index: llvm/lib/AsmParser/llvmAsmParser.y > > diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.341 llvm/lib/AsmParser/ > > llvmAsmParser.y:1.342 > > --- llvm/lib/AsmParser/llvmAsmParser.y:1.341 Mon Apr 16 12:45:50 2007 > > +++ llvm/lib/AsmParser/llvmAsmParser.y Mon Apr 16 15:31:06 2007 > > @@ -2823,9 +2823,9 @@ > > > > // Check for call to invalid intrinsic to avoid crashing later. > > if (Function *theF = dyn_cast(V)) { > > - if (theF->hasName() && > > - 0 == strncmp(theF->getValueName()->getKeyData(), > > "llvm.", 5) && > > - !theF->getIntrinsicID(true)) > > + if (theF->hasName() && (strlen(theF->getValueName()- > > >getKeyData()) >= 5)&& > > + (0 == strncmp(theF->getValueName()->getKeyData(), > > "llvm.", 5)) && > > + !theF->getIntrinsicID(true)) > > GEN_ERROR("Call to invalid LLVM intrinsic function '" + > > theF->getName() + "'"); > > } > > > > > > > > _______________________________________________ > > llvm-commits mailing list > > llvm-commits at cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From jeffc at jolt-lang.org Mon Apr 16 16:49:19 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 16 Apr 2007 16:49:19 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp Message-ID: <200704162149.l3GLnJx5017211@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86Subtarget.cpp updated: 1.54 -> 1.55 --- Log message: Before assuming that the original code didn't work for Athlon64, the person who replaced it with a FIXME should have determined what did work. Then he would have realized that the code was in fact correct, and would have avoided breaking it. --- Diffs of the changes: (+2 -6) X86Subtarget.cpp | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) Index: llvm/lib/Target/X86/X86Subtarget.cpp diff -u llvm/lib/Target/X86/X86Subtarget.cpp:1.54 llvm/lib/Target/X86/X86Subtarget.cpp:1.55 --- llvm/lib/Target/X86/X86Subtarget.cpp:1.54 Tue Apr 10 17:10:25 2007 +++ llvm/lib/Target/X86/X86Subtarget.cpp Mon Apr 16 16:48:58 2007 @@ -115,12 +115,8 @@ if (ECX & 0x1) X86SSELevel = SSE3; if ((ECX >> 9) & 0x1) X86SSELevel = SSSE3; - if (memcmp(text.c, "GenuineIntel", 12) == 0) { - X86::GetCpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX); - HasX86_64 = (EDX >> 29) & 0x1; - } else if (memcmp(text.c, "AuthenticAMD", 12) == 0) { - // FIXME: Correctly check for 64-bit stuff - } + X86::GetCpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX); + HasX86_64 = (EDX >> 29) & 0x1; } static const char *GetCurrentX86CPU() { From clattner at apple.com Mon Apr 16 16:49:22 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 16 Apr 2007 14:49:22 -0700 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y In-Reply-To: <1176759987.23191.365.camel@bashful.x10sys.com> References: <200704162031.l3GKVREk014695@zion.cs.uiuc.edu> <1176759987.23191.365.camel@bashful.x10sys.com> Message-ID: <5BEE5D32-ED57-427E-B936-E4F887FA28A5@apple.com> On Apr 16, 2007, at 2:46 PM, Reid Spencer wrote: > On Mon, 2007-04-16 at 14:33 -0700, Chris Lattner wrote: >>> Check length of string before we walk off the end of it. >>> Thanks, Chris. >> >> but I want to support nul characters in my names! > > Okay, so this whole "ValueName" and "StringMap" thing I don't > understand. How do you get the length of a name now? getKeyLength() method on the ValueName. -Chris From reid at x10sys.com Mon Apr 16 16:51:01 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 16:51:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Message-ID: <200704162151.l3GLp19K017282@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.177 -> 1.178 --- Log message: Implement @sext and @zext parameter attribute handling properly instead of forcing every small argument of every function regardless of attributes or calling convention to be expanded. --- Diffs of the changes: (+20 -11) Execution.cpp | 31 ++++++++++++++++++++----------- 1 files changed, 20 insertions(+), 11 deletions(-) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.177 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.178 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.177 Thu Mar 8 17:37:24 2007 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Mon Apr 16 16:50:40 2007 @@ -16,6 +16,7 @@ #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Instructions.h" +#include "llvm/ParameterAttributes.h" #include "llvm/CodeGen/IntrinsicLowering.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/ADT/APInt.h" @@ -844,8 +845,8 @@ ExecutionContext &SF = ECStack.back(); // Check to see if this is an intrinsic function call... - if (Function *F = CS.getCalledFunction()) - if (F->isDeclaration ()) + Function *F = CS.getCalledFunction(); + if (F && F->isDeclaration ()) switch (F->getIntrinsicID()) { case Intrinsic::not_intrinsic: break; @@ -880,21 +881,28 @@ return; } + SF.Caller = CS; std::vector ArgVals; const unsigned NumArgs = SF.Caller.arg_size(); ArgVals.reserve(NumArgs); + uint16_t pNum = 1; for (CallSite::arg_iterator i = SF.Caller.arg_begin(), - e = SF.Caller.arg_end(); i != e; ++i) { + e = SF.Caller.arg_end(); i != e; ++i, ++pNum) { Value *V = *i; ArgVals.push_back(getOperandValue(V, SF)); - // Promote all integral types whose size is < sizeof(int) into ints. We do - // this by zero or sign extending the value as appropriate according to the - // source type. - const Type *Ty = V->getType(); - if (Ty->isInteger()) - if (ArgVals.back().IntVal.getBitWidth() < 32) - ArgVals.back().IntVal = ArgVals.back().IntVal.sext(32); + if (F) { + // Promote all integral types whose size is < sizeof(i32) into i32. + // We do this by zero or sign extending the value as appropriate + // according to the parameter attributes + const Type *Ty = V->getType(); + if (Ty->isInteger() && (ArgVals.back().IntVal.getBitWidth() < 32)) + if (const ParamAttrsList *PA = F->getParamAttrs()) + if (PA->paramHasAttr(pNum, ParamAttr::ZExt)) + ArgVals.back().IntVal = ArgVals.back().IntVal.zext(32); + else if (PA->paramHasAttr(pNum, ParamAttr::SExt)) + ArgVals.back().IntVal = ArgVals.back().IntVal.sext(32); + } } // To handle indirect calls, we must get the pointer value from the argument @@ -1317,7 +1325,8 @@ // Handle non-varargs arguments... unsigned i = 0; - for (Function::arg_iterator AI = F->arg_begin(), E = F->arg_end(); AI != E; ++AI, ++i) + for (Function::arg_iterator AI = F->arg_begin(), E = F->arg_end(); + AI != E; ++AI, ++i) SetValue(AI, ArgVals[i], StackFrame); // Handle varargs arguments... From reid at x10sys.com Mon Apr 16 16:53:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 16:53:17 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/bit-intrinsics.ll Message-ID: <200704162153.l3GLrH6n017328@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: bit-intrinsics.ll updated: 1.2 -> 1.3 --- Log message: Also validate that the code generation of IntrinsicLowering for LLI works. --- Diffs of the changes: (+25 -6) bit-intrinsics.ll | 31 +++++++++++++++++++++++++------ 1 files changed, 25 insertions(+), 6 deletions(-) Index: llvm/test/CodeGen/Generic/bit-intrinsics.ll diff -u llvm/test/CodeGen/Generic/bit-intrinsics.ll:1.2 llvm/test/CodeGen/Generic/bit-intrinsics.ll:1.3 --- llvm/test/CodeGen/Generic/bit-intrinsics.ll:1.2 Thu Apr 5 17:57:45 2007 +++ llvm/test/CodeGen/Generic/bit-intrinsics.ll Mon Apr 16 16:52:56 2007 @@ -1,15 +1,34 @@ ; Make sure this testcase is supported by all code generators. Either the ; intrinsic is supported natively or IntrinsicLowering provides it. -; RUN: llvm-as < %s | llc +; RUN: llvm-as < %s > %t.bc +; RUN: lli --force-interpreter=true %t.bc +; RUN: llc %t.bc -o /dev/null -f ; XFAIL: * +declare i32 @llvm.part.set.i32.i32.i32(i32 %x, i32 %rep, i32 %hi, i32 %lo) +declare i16 @llvm.part.set.i16.i16.i16(i16 %x, i16 %rep, i32 %hi, i32 %lo) +define i32 @test_part_set(i32 %A, i16 %B) { + %a = call i32 @llvm.part.set.i32.i32.i32(i32 %A, i32 27, i32 8, i32 0) + %b = call i16 @llvm.part.set.i16.i16.i16(i16 %B, i16 27, i32 8, i32 0) + %c = zext i16 %b to i32 + %d = add i32 %a, %c + ret i32 %d +} -declare i32 @llvm.bit.part.select.i32.i32(i32 %x, i32 %hi, i32 %lo) -declare i16 @llvm.bit.part.select.i16.i16(i16 %x, i32 %hi, i32 %lo) -define i32 @bit_part_select(i32 %A, i16 %B) { - %a = call i32 @llvm.bit.part.select.i32.i32(i32 %A, i32 8, i32 0) - %b = call i16 @llvm.bit.part.select.i16.i16(i16 %B, i32 8, i32 0) +declare i32 @llvm.part.select.i32.i32(i32 %x, i32 %hi, i32 %lo) +declare i16 @llvm.part.select.i16.i16(i16 %x, i32 %hi, i32 %lo) +define i32 @test_part_select(i32 %A, i16 %B) { + %a = call i32 @llvm.part.select.i32.i32(i32 %A, i32 8, i32 0) + %b = call i16 @llvm.part.select.i16.i16(i16 %B, i32 8, i32 0) %c = zext i16 %b to i32 %d = add i32 %a, %c ret i32 %d } + +define i32 @main(i32 %argc, i8** %argv) { + %a = call i32 @test_part_set(i32 23, i16 57) + %b = call i32 @test_part_select(i32 23, i16 57) + %c = add i32 %a, %b + %d = urem i32 %c, 1 + ret i32 %d +} From reid at x10sys.com Mon Apr 16 16:57:35 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 16:57:35 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LICM/scalar_promote.ll Message-ID: <200704162157.l3GLvZQg017456@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LICM: scalar_promote.ll updated: 1.5 -> 1.6 --- Log message: Fix this test from Duncan's experiment. --- Diffs of the changes: (+1 -1) scalar_promote.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Transforms/LICM/scalar_promote.ll diff -u llvm/test/Transforms/LICM/scalar_promote.ll:1.5 llvm/test/Transforms/LICM/scalar_promote.ll:1.6 --- llvm/test/Transforms/LICM/scalar_promote.ll:1.5 Mon Apr 16 10:15:52 2007 +++ llvm/test/Transforms/LICM/scalar_promote.ll Mon Apr 16 16:57:14 2007 @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -licm -stats |& \ -; RUN: grep {memory locations promoted to register} +; RUN: grep {memory locations promoted to register} %X = global int 7 From jeffc at jolt-lang.org Mon Apr 16 17:00:06 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 16 Apr 2007 17:00:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp Message-ID: <200704162200.l3GM06wk017567@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86Subtarget.cpp updated: 1.55 -> 1.56 --- Log message: In the event that some really old non-Intel or -AMD CPU is encountered... --- Diffs of the changes: (+5 -2) X86Subtarget.cpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/lib/Target/X86/X86Subtarget.cpp diff -u llvm/lib/Target/X86/X86Subtarget.cpp:1.55 llvm/lib/Target/X86/X86Subtarget.cpp:1.56 --- llvm/lib/Target/X86/X86Subtarget.cpp:1.55 Mon Apr 16 16:48:58 2007 +++ llvm/lib/Target/X86/X86Subtarget.cpp Mon Apr 16 16:59:44 2007 @@ -115,8 +115,11 @@ if (ECX & 0x1) X86SSELevel = SSE3; if ((ECX >> 9) & 0x1) X86SSELevel = SSSE3; - X86::GetCpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX); - HasX86_64 = (EDX >> 29) & 0x1; + if (memcmp(text.c, "GenuineIntel", 12) == 0 || + memcmp(text.c, "AuthenticAMD", 12) == 0) { + X86::GetCpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX); + HasX86_64 = (EDX >> 29) & 0x1; + } } static const char *GetCurrentX86CPU() { From reid at x10sys.com Mon Apr 16 17:02:18 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 17:02:18 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Message-ID: <200704162202.l3GM2Itu017651@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.y updated: 1.342 -> 1.343 --- Log message: Okay, yes there *is* a getKeyLength method on ValueName. And, it should be used because we *do* want to allow nulls in names. --- Diffs of the changes: (+1 -1) llvmAsmParser.y | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.342 llvm/lib/AsmParser/llvmAsmParser.y:1.343 --- llvm/lib/AsmParser/llvmAsmParser.y:1.342 Mon Apr 16 15:31:06 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y Mon Apr 16 17:01:57 2007 @@ -2823,7 +2823,7 @@ // Check for call to invalid intrinsic to avoid crashing later. if (Function *theF = dyn_cast(V)) { - if (theF->hasName() && (strlen(theF->getValueName()->getKeyData()) >= 5)&& + if (theF->hasName() && (theF->getValueName()->getKeyLength() >= 5) && (0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5)) && !theF->getIntrinsicID(true)) GEN_ERROR("Call to invalid LLVM intrinsic function '" + From reid at x10sys.com Mon Apr 16 17:02:44 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 17:02:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs llvmAsmParser.y.cvs Message-ID: <200704162202.l3GM2iPF017690@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.cpp.cvs updated: 1.87 -> 1.88 llvmAsmParser.y.cvs updated: 1.88 -> 1.89 --- Log message: Regenerate --- Diffs of the changes: (+2 -2) llvmAsmParser.cpp.cvs | 2 +- llvmAsmParser.y.cvs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.87 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.88 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.87 Mon Apr 16 15:35:38 2007 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Mon Apr 16 17:02:22 2007 @@ -5488,7 +5488,7 @@ // Check for call to invalid intrinsic to avoid crashing later. if (Function *theF = dyn_cast(V)) { - if (theF->hasName() && (strlen(theF->getValueName()->getKeyData()) >= 5)&& + if (theF->hasName() && (theF->getValueName()->getKeyLength() >= 5) && (0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5)) && !theF->getIntrinsicID(true)) GEN_ERROR("Call to invalid LLVM intrinsic function '" + Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.88 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.89 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.88 Mon Apr 16 15:35:38 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Mon Apr 16 17:02:23 2007 @@ -2823,7 +2823,7 @@ // Check for call to invalid intrinsic to avoid crashing later. if (Function *theF = dyn_cast(V)) { - if (theF->hasName() && (strlen(theF->getValueName()->getKeyData()) >= 5)&& + if (theF->hasName() && (theF->getValueName()->getKeyLength() >= 5) && (0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5)) && !theF->getIntrinsicID(true)) GEN_ERROR("Call to invalid LLVM intrinsic function '" + From asl at math.spbu.ru Mon Apr 16 17:06:34 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 17 Apr 2007 02:06:34 +0400 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp In-Reply-To: <200704162149.l3GLnJx5017211.SS1422SS@zion.cs.uiuc.edu> References: <200704162149.l3GLnJx5017211.SS1422SS@zion.cs.uiuc.edu> Message-ID: <1176761194.13159.65.camel@asl.dorms.spbu.ru> Jeff, > Before assuming that the original code didn't work for Athlon64, the person who > replaced it with a FIXME should have determined what did work. Then he would have > realized that the code was in fact correct, and would have avoided breaking it. The prev. code didn't know about AMD processors at all. It was one big "FIXME: support AMD processors". You can just look into diff for 1.53 to verify it. I wasn't be able to verify 64-bit stuff that's why I put another FIXME there. So, I don't see any breakage here. -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University. From reid at x10sys.com Mon Apr 16 17:21:40 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 17:21:40 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp Message-ID: <200704162221.l3GMLevm018356@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: IntrinsicLowering.cpp updated: 1.80 -> 1.81 --- Log message: Fix problems in the PartSet lowering having to do with incorrect bit width. --- Diffs of the changes: (+5 -3) IntrinsicLowering.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/IntrinsicLowering.cpp diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.80 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.81 --- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.80 Thu Apr 12 16:53:38 2007 +++ llvm/lib/CodeGen/IntrinsicLowering.cpp Mon Apr 16 17:21:14 2007 @@ -538,8 +538,10 @@ new BranchInst(large, small, is_large, entry); // Block "large" - BinaryOperator* MaskBits = + Instruction* MaskBits = BinaryOperator::createSub(RepBitWidth, NumBits, "", large); + MaskBits = CastInst::createIntegerCast(MaskBits, RepMask->getType(), + false, "", large); BinaryOperator* Mask1 = BinaryOperator::createLShr(RepMask, MaskBits, "", large); BinaryOperator* Rep2 = BinaryOperator::createAnd(Mask1, Rep, "", large); @@ -575,10 +577,10 @@ Value* t8 = BinaryOperator::createXor(t7, ValMask, "", reverse); Value* t9 = BinaryOperator::createAnd(t8, Val, "", reverse); Value* t10 = BinaryOperator::createShl(Rep4, Lo, "", reverse); - if (RepBits < ValBits) + if (32 < ValBits) RepBitWidth = cast(ConstantExpr::getZExt(RepBitWidth, ValTy)); - else if (RepBits > ValBits) + else if (32 > ValBits) RepBitWidth = cast(ConstantExpr::getTrunc(RepBitWidth, ValTy)); Value* t11 = BinaryOperator::createSub(RepBitWidth, Hi, "", reverse); From dpatel at apple.com Mon Apr 16 18:02:43 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 18:02:43 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll Message-ID: <200704162302.l3GN2hYh019433@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LoopUnroll: 2007-04-16-PhiUpdate.ll added (r1.1) --- Log message: New test case. --- Diffs of the changes: (+17 -0) 2007-04-16-PhiUpdate.ll | 17 +++++++++++++++++ 1 files changed, 17 insertions(+) Index: llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll diff -c /dev/null llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll:1.1 *** /dev/null Mon Apr 16 18:02:32 2007 --- llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll Mon Apr 16 18:02:22 2007 *************** *** 0 **** --- 1,17 ---- + ; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unroll -disable-output + + void @sal__math_float_manipulator_7__math__joint_array_dcv_ops__Omultiply__3([6 x float]* %agg.result) { + entry: + %tmp282911 = zext i8 0 to i32 ; [#uses=1] + br label %cond_next + + cond_next: ; preds = %cond_next, %entry + %indvar = phi i8 [ 0, %entry ], [ %indvar.next, %cond_next ] ; [#uses=1] + %indvar.next = add i8 %indvar, 1 ; [#uses=2] + %exitcond = icmp eq i8 %indvar.next, 7 ; [#uses=1] + br i1 %exitcond, label %bb27, label %cond_next + + bb27: ; preds = %cond_next + %tmp282911.lcssa = phi i32 [ %tmp282911, %cond_next ] ; [#uses=0] + ret void + } From dpatel at apple.com Mon Apr 16 18:04:07 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 18:04:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnroll.cpp Message-ID: <200704162304.l3GN47iQ019496@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopUnroll.cpp updated: 1.38 -> 1.39 --- Log message: Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047888.html --- Diffs of the changes: (+6 -0) LoopUnroll.cpp | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/lib/Transforms/Scalar/LoopUnroll.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.38 llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.39 --- llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.38 Tue Mar 6 19:38:05 2007 +++ llvm/lib/Transforms/Scalar/LoopUnroll.cpp Mon Apr 16 18:03:45 2007 @@ -304,6 +304,12 @@ (*SI)->removeIncomingValue(LatchBlock, false); if (InVal) (*SI)->addIncoming(InVal, cast(LastValueMap[LatchBlock])); + if ((*SI)->getNumIncomingValues() == 0) { + // Remove this phi node. + // If anyone is using this PHI, make them use a dummy value instead... + (*SI)->replaceAllUsesWith(UndefValue::get((*SI)->getType())); + (*SI)->eraseFromParent(); + } } } From reid at x10sys.com Mon Apr 16 18:27:19 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 18:27:19 -0500 Subject: [llvm-commits] CVS: llvm-www/Name.html Message-ID: <200704162327.l3GNRJtX020188@zion.cs.uiuc.edu> Changes in directory llvm-www: Name.html updated: 1.14 -> 1.15 --- Log message: Path by Gordon Henricksen --- Diffs of the changes: (+12 -2) Name.html | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) Index: llvm-www/Name.html diff -u llvm-www/Name.html:1.14 llvm-www/Name.html:1.15 --- llvm-www/Name.html:1.14 Sat Apr 14 11:50:07 2007 +++ llvm-www/Name.html Mon Apr 16 18:26:58 2007 @@ -151,7 +151,7 @@ Jeff Cohen Oscar Oscar = Open Source Compiler And Runtime - Reid Spencer + Reid Spencer Alluvium The layers of sediment deposited by a river. Also retains the LLVM letters but is a word and connotes "bed rock" and fluidity @@ -161,6 +161,8 @@ Average Compiler" (BooBoo!). An acronym that you can pronounce. Unfortunately, the New York Athletic Club wouldn't like us stealing their domain. :) + OscctrPronouncable acronym for Open Source Compiler + Components and Runtime. Bill WendlingZemblaIt's a fictional northern European country in "Pale Fire" by Nabokov. PalaThe island utopia in Aldos Huxley's "Island". @@ -264,6 +266,14 @@ -ski ending sounds good. For both this and the Dragomni above a "BSD daemon"-like logo of a dragon named, e.g. Dragonski, could be used. + Gordon Henriksen + Advanced Compiler KitACK! With an ill-deserved nod to NeXT. + (It's the wrong language, after all.) + + Core CompilerLikely to give certain influential marketing + departments fits. + VelicicodeDerived from the Italian for fast. + Nucleo VeloceItalian for fast core. @@ -274,6 +284,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
Last modified: $Date: 2007/04/14 16:50:07 $ +
Last modified: $Date: 2007/04/16 23:26:58 $ From reid at x10sys.com Mon Apr 16 18:32:49 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 18:32:49 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200704162332.l3GNWnTX020320@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.172 -> 1.173 --- Log message: Make long line fit in 80 cols. --- Diffs of the changes: (+1 -1) Writer.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.172 llvm/lib/Bytecode/Writer/Writer.cpp:1.173 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.172 Thu Apr 12 13:32:50 2007 +++ llvm/lib/Bytecode/Writer/Writer.cpp Mon Apr 16 18:32:28 2007 @@ -1000,7 +1000,7 @@ unsigned CC = I->getCallingConv()+1; unsigned ID = (Slot << 5) | (CC & 15); - if (I->isDeclaration()) // If external, we don't have an FunctionInfo block. + if (I->isDeclaration()) // If external, we don't have an FunctionInfo block. ID |= 1 << 4; if (I->getAlignment() || I->hasSection() || (CC & ~15) != 0 || From dpatel at apple.com Mon Apr 16 18:52:58 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 18:52:58 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll Message-ID: <200704162352.l3GNqwO8020622@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LoopUnroll: 2007-04-16-PhiUpdate.ll updated: 1.1 -> 1.2 --- Log message: Add PR number for reference. --- Diffs of the changes: (+1 -0) 2007-04-16-PhiUpdate.ll | 1 + 1 files changed, 1 insertion(+) Index: llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll diff -u llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll:1.1 llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll:1.2 --- llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll:1.1 Mon Apr 16 18:02:22 2007 +++ llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll Mon Apr 16 18:52:37 2007 @@ -1,3 +1,4 @@ +; PR 1334 ; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unroll -disable-output void @sal__math_float_manipulator_7__math__joint_array_dcv_ops__Omultiply__3([6 x float]* %agg.result) { From sabre at nondot.org Mon Apr 16 19:02:59 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 19:02:59 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/README.txt Message-ID: <200704170002.l3H02xt4020801@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: README.txt updated: 1.165 -> 1.166 --- Log message: SSE4 is apparently public now. --- Diffs of the changes: (+2 -0) README.txt | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Target/X86/README.txt diff -u llvm/lib/Target/X86/README.txt:1.165 llvm/lib/Target/X86/README.txt:1.166 --- llvm/lib/Target/X86/README.txt:1.165 Sat Apr 14 18:06:09 2007 +++ llvm/lib/Target/X86/README.txt Mon Apr 16 19:02:37 2007 @@ -3,6 +3,8 @@ //===---------------------------------------------------------------------===// Missing features: + - Support for SSE4: http://www.intel.com/software/penryn +http://softwarecommunity.intel.com/isn/Downloads/Intel%20SSE4%20Programming%20Reference.pdf - support for 3DNow! - weird abis? From rspencer at reidspencer.com Mon Apr 16 19:06:17 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 16 Apr 2007 17:06:17 -0700 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll In-Reply-To: <200704162352.l3GNqwO8020622@zion.cs.uiuc.edu> References: <200704162352.l3GNqwO8020622@zion.cs.uiuc.edu> Message-ID: <1176768377.23191.377.camel@bashful.x10sys.com> On Mon, 2007-04-16 at 18:52 -0500, Devang Patel wrote: > > Changes in directory llvm/test/Transforms/LoopUnroll: > > 2007-04-16-PhiUpdate.ll updated: 1.1 -> 1.2 > --- > Log message: > > Add PR number for reference. Yeah! Its actually handy to do so now :) Reid. > > > --- > Diffs of the changes: (+1 -0) > > 2007-04-16-PhiUpdate.ll | 1 + > 1 files changed, 1 insertion(+) > > > Index: llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll > diff -u llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll:1.1 llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll:1.2 > --- llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll:1.1 Mon Apr 16 18:02:22 2007 > +++ llvm/test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll Mon Apr 16 18:52:37 2007 > @@ -1,3 +1,4 @@ > +; PR 1334 > ; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unroll -disable-output > > void @sal__math_float_manipulator_7__math__joint_array_dcv_ops__Omultiply__3([6 x float]* %agg.result) { > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dpatel at apple.com Mon Apr 16 19:17:32 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 16 Apr 2007 19:17:32 -0500 Subject: [llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html Message-ID: <200704170017.l3H0HWnQ021120@zion.cs.uiuc.edu> Changes in directory llvm/docs: WritingAnLLVMPass.html updated: 1.55 -> 1.56 --- Log message: Remove "ModulePasses requiring FunctionPasses" from the list of future extensions. --- Diffs of the changes: (+2 -29) WritingAnLLVMPass.html | 31 ++----------------------------- 1 files changed, 2 insertions(+), 29 deletions(-) Index: llvm/docs/WritingAnLLVMPass.html diff -u llvm/docs/WritingAnLLVMPass.html:1.55 llvm/docs/WritingAnLLVMPass.html:1.56 --- llvm/docs/WritingAnLLVMPass.html:1.55 Mon Apr 16 16:28:14 2007 +++ llvm/docs/WritingAnLLVMPass.html Mon Apr 16 19:17:11 2007 @@ -103,8 +103,6 @@

  • Future extensions planned
  • @@ -1137,7 +1135,7 @@
        bool ModuleLevelPass::runOnModule(Module &M) {
          ...
    -     DominatorTree &DT = getAnalysis<DominatorTree>(Function &F);
    +     DominatorTree &DT = getAnalysis<DominatorTree>(Func);
          ...
        }
     
    @@ -1780,31 +1778,6 @@ haven't had time (or multiprocessor machines, thus a reason) to implement this. Despite that, we have kept the LLVM passes SMP ready, and you should too.

    - - - - - -
    - -

    Currently it is illegal for a ModulePass -to require a FunctionPass. This is because -there is only one instance of the FunctionPass object ever created, thus nowhere -to store information for all of the functions in the program at the same time. -Although this has come up a couple of times before, this has always been worked -around by factoring one big complicated pass into a global and an -interprocedural part, both of which are distinct. In the future, it would be -nice to have this though.

    - -

    Note that it is no problem for a FunctionPass to require the results of a ModulePass, only the other way around.

    - -
    -
    @@ -1815,7 +1788,7 @@ Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2007/04/16 21:28:14 $ + Last modified: $Date: 2007/04/17 00:17:11 $
    From jeffc at jolt-lang.org Mon Apr 16 20:30:26 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 16 Apr 2007 18:30:26 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp In-Reply-To: <1176761194.13159.65.camel@asl.dorms.spbu.ru> References: <200704162149.l3GLnJx5017211.SS1422SS@zion.cs.uiuc.edu> <1176761194.13159.65.camel@asl.dorms.spbu.ru> Message-ID: <46242332.6020308@jolt-lang.org> Yes, it worked for AMD. I have AMD, and I wrote the code to support AMD. I left the code the way it was because it was correct for AMD. I actually tested it on an AMD system. Anton Korobeynikov wrote: > Jeff, > > >> Before assuming that the original code didn't work for Athlon64, the person who >> replaced it with a FIXME should have determined what did work. Then he would have >> realized that the code was in fact correct, and would have avoided breaking it. >> > The prev. code didn't know about AMD processors at all. It was one big > "FIXME: support AMD processors". You can just look into diff for 1.53 to > verify it. I wasn't be able to verify 64-bit stuff that's why I put > another FIXME there. > > So, I don't see any breakage here. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070416/1c44ea2f/attachment.html From jeffc at jolt-lang.org Mon Apr 16 20:40:53 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 16 Apr 2007 18:40:53 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp In-Reply-To: <46242332.6020308@jolt-lang.org> References: <200704162149.l3GLnJx5017211.SS1422SS@zion.cs.uiuc.edu> <1176761194.13159.65.camel@asl.dorms.spbu.ru> <46242332.6020308@jolt-lang.org> Message-ID: <462425A5.5020209@jolt-lang.org> Looks like Evan broke it last October. Jeff Cohen wrote: > Yes, it worked for AMD. I have AMD, and I wrote the code to support > AMD. I left the code the way it was because it was correct for AMD. > I actually tested it on an AMD system. > > Anton Korobeynikov wrote: >> Jeff, >> >> >>> Before assuming that the original code didn't work for Athlon64, the person who >>> replaced it with a FIXME should have determined what did work. Then he would have >>> realized that the code was in fact correct, and would have avoided breaking it. >>> >> The prev. code didn't know about AMD processors at all. It was one big >> "FIXME: support AMD processors". You can just look into diff for 1.53 to >> verify it. I wasn't be able to verify 64-bit stuff that's why I put >> another FIXME there. >> >> So, I don't see any breakage here. >> >> > ------------------------------------------------------------------------ > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070416/822ac666/attachment.html From reid at x10sys.com Mon Apr 16 20:57:16 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Apr 2007 20:57:16 -0500 Subject: [llvm-commits] CVS: llvm-www/Name.html Message-ID: <200704170157.l3H1vGHG022991@zion.cs.uiuc.edu> Changes in directory llvm-www: Name.html updated: 1.15 -> 1.16 --- Log message: Add my and Nicolas entries. --- Diffs of the changes: (+10 -2) Name.html | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) Index: llvm-www/Name.html diff -u llvm-www/Name.html:1.15 llvm-www/Name.html:1.16 --- llvm-www/Name.html:1.15 Mon Apr 16 18:26:58 2007 +++ llvm-www/Name.html Mon Apr 16 20:56:54 2007 @@ -151,7 +151,7 @@ Jeff Cohen Oscar Oscar = Open Source Compiler And Runtime - Reid Spencer + Reid Spencer Alluvium The layers of sediment deposited by a river. Also retains the LLVM letters but is a word and connotes "bed rock" and fluidity @@ -163,6 +163,8 @@ their domain. :) OscctrPronouncable acronym for Open Source Compiler Components and Runtime. + ToscarToolkit for Open Source Compiler and Runtime, + prounced as "Teh Oscar!" Bill WendlingZemblaIt's a fictional northern European country in "Pale Fire" by Nabokov. PalaThe island utopia in Aldos Huxley's "Island". @@ -274,6 +276,12 @@ departments fits. VelicicodeDerived from the Italian for fast. Nucleo VeloceItalian for fast core. + Nicolas PouillonSsabir + A sabir is an hybrid language formerly used around Mediterranean Sea. + English equivalent is pidgin + (on WP page, the three points about Pidgin creation are quite relevant + for LLVM :-) ). Spelling it ("Ssabir") not only makes the name unique, + but recalls LLVM is all about SSA. @@ -284,6 +292,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/04/16 23:26:58 $ +
    Last modified: $Date: 2007/04/17 01:56:54 $ From sabre at nondot.org Mon Apr 16 21:05:00 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 21:05:00 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ValueSymbolTable.h Message-ID: <200704170205.l3H250qN023160@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: ValueSymbolTable.h updated: 1.10 -> 1.11 --- Log message: urr, yeah. --- Diffs of the changes: (+2 -4) ValueSymbolTable.h | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) Index: llvm/include/llvm/ValueSymbolTable.h diff -u llvm/include/llvm/ValueSymbolTable.h:1.10 llvm/include/llvm/ValueSymbolTable.h:1.11 --- llvm/include/llvm/ValueSymbolTable.h:1.10 Tue Apr 3 19:30:49 2007 +++ llvm/include/llvm/ValueSymbolTable.h Mon Apr 16 21:04:39 2007 @@ -2,10 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by Reid Spencer based on the original SymbolTable.h -// written by the LLVM research group and re-written by Reid Spencer. -// It is distributed under the University of Illinois Open Source License. -// See LICENSE.TXT for details. +// This file was developed by Reid Spencer and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // From sabre at nondot.org Mon Apr 16 22:27:13 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 22:27:13 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Argument.h BasicBlock.h Function.h GlobalVariable.h Instruction.h Module.h SymbolTableListTraits.h ValueSymbolTable.h Message-ID: <200704170327.l3H3RDhn024568@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Argument.h updated: 1.15 -> 1.16 BasicBlock.h updated: 1.64 -> 1.65 Function.h updated: 1.75 -> 1.76 GlobalVariable.h updated: 1.41 -> 1.42 Instruction.h updated: 1.83 -> 1.84 Module.h updated: 1.85 -> 1.86 SymbolTableListTraits.h updated: 1.5 -> 1.6 ValueSymbolTable.h updated: 1.11 -> 1.12 --- Log message: Refactor SymbolTableListTraits to only have a single pointer in it, instead of two. This shrinkifies Function by 8 bytes (104->96) and Module by 8 bytes (68->60). On a testcase of mine, this reduces the memory used to read a module header from 565680b to 561024, a little over 4K. --- Diffs of the changes: (+61 -54) Argument.h | 8 +++----- BasicBlock.h | 10 ++++++---- Function.h | 18 +++++++++++++++--- GlobalVariable.h | 8 +++----- Instruction.h | 8 +++----- Module.h | 17 +++++++++++++++-- SymbolTableListTraits.h | 27 ++++++++++----------------- ValueSymbolTable.h | 19 ++++++------------- 8 files changed, 61 insertions(+), 54 deletions(-) Index: llvm/include/llvm/Argument.h diff -u llvm/include/llvm/Argument.h:1.15 llvm/include/llvm/Argument.h:1.16 --- llvm/include/llvm/Argument.h:1.15 Fri Apr 13 13:12:09 2007 +++ llvm/include/llvm/Argument.h Mon Apr 16 22:26:42 2007 @@ -18,9 +18,8 @@ namespace llvm { -template struct ilist_traits; -template class SymbolTableListTraits; +template + class SymbolTableListTraits; /// A class to represent an incoming formal argument to a Function. An argument /// is a very simple Value. It is essentially a named (optional) type. When used @@ -33,8 +32,7 @@ Argument *Prev, *Next; // Next and Prev links for our intrusive linked list void setNext(Argument *N) { Next = N; } void setPrev(Argument *N) { Prev = N; } - friend class SymbolTableListTraits >; + friend class SymbolTableListTraits; void setParent(Function *parent); public: Index: llvm/include/llvm/BasicBlock.h diff -u llvm/include/llvm/BasicBlock.h:1.64 llvm/include/llvm/BasicBlock.h:1.65 --- llvm/include/llvm/BasicBlock.h:1.64 Fri Apr 13 13:12:09 2007 +++ llvm/include/llvm/BasicBlock.h Mon Apr 16 22:26:42 2007 @@ -25,11 +25,12 @@ template class PredIterator; template<> struct ilist_traits - : public SymbolTableListTraits { + : public SymbolTableListTraits { // createSentinel is used to create a node that marks the end of the list... static Instruction *createSentinel(); static void destroySentinel(Instruction *I) { delete I; } static iplist &getList(BasicBlock *BB); + static ValueSymbolTable *getSymTab(BasicBlock *ItemParent); }; /// This represents a single basic block in LLVM. A basic block is simply a @@ -52,11 +53,12 @@ private : InstListType InstList; BasicBlock *Prev, *Next; // Next and Prev links for our intrusive linked list + Function *Parent; void setParent(Function *parent); void setNext(BasicBlock *N) { Next = N; } void setPrev(BasicBlock *N) { Prev = N; } - friend class SymbolTableListTraits; + friend class SymbolTableListTraits; BasicBlock(const BasicBlock &); // Do not implement void operator=(const BasicBlock &); // Do not implement @@ -76,8 +78,8 @@ /// getParent - Return the enclosing method, or null if none /// - const Function *getParent() const { return InstList.getParent(); } - Function *getParent() { return InstList.getParent(); } + const Function *getParent() const { return Parent; } + Function *getParent() { return Parent; } // getNext/Prev - Return the next or previous basic block in the list. BasicBlock *getNext() { return Next; } Index: llvm/include/llvm/Function.h diff -u llvm/include/llvm/Function.h:1.75 llvm/include/llvm/Function.h:1.76 --- llvm/include/llvm/Function.h:1.75 Mon Apr 16 01:54:34 2007 +++ llvm/include/llvm/Function.h Mon Apr 16 22:26:42 2007 @@ -30,21 +30,23 @@ // Traits for intrusive list of instructions... template<> struct ilist_traits - : public SymbolTableListTraits { + : public SymbolTableListTraits { // createSentinel is used to create a node that marks the end of the list... static BasicBlock *createSentinel(); static void destroySentinel(BasicBlock *BB) { delete BB; } static iplist &getList(Function *F); + static ValueSymbolTable *getSymTab(Function *ItemParent); }; template<> struct ilist_traits - : public SymbolTableListTraits { + : public SymbolTableListTraits { // createSentinel is used to create a node that marks the end of the list... static Argument *createSentinel(); static void destroySentinel(Argument *A) { delete A; } static iplist &getList(Function *F); + static ValueSymbolTable *getSymTab(Function *ItemParent); }; class Function : public GlobalValue, public Annotable { @@ -67,7 +69,7 @@ ParamAttrsList *ParamAttrs; ///< Parameter attributes unsigned CallingConvention; ///< Calling convention to use - friend class SymbolTableListTraits; + friend class SymbolTableListTraits; void setParent(Module *parent); Function *Prev, *Next; @@ -238,6 +240,16 @@ void dropAllReferences(); }; +inline ValueSymbolTable * +ilist_traits::getSymTab(Function *F) { + return F ? &F->getValueSymbolTable() : 0; +} + +inline ValueSymbolTable * +ilist_traits::getSymTab(Function *F) { + return F ? &F->getValueSymbolTable() : 0; +} + } // End llvm namespace #endif Index: llvm/include/llvm/GlobalVariable.h diff -u llvm/include/llvm/GlobalVariable.h:1.41 llvm/include/llvm/GlobalVariable.h:1.42 --- llvm/include/llvm/GlobalVariable.h:1.41 Fri Apr 13 13:12:09 2007 +++ llvm/include/llvm/GlobalVariable.h Mon Apr 16 22:26:42 2007 @@ -27,13 +27,11 @@ class Module; class Constant; class PointerType; -template struct ilist_traits; -template class SymbolTableListTraits; +template + class SymbolTableListTraits; class GlobalVariable : public GlobalValue { - friend class SymbolTableListTraits >; + friend class SymbolTableListTraits; void operator=(const GlobalVariable &); // Do not implement GlobalVariable(const GlobalVariable &); // Do not implement Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.83 llvm/include/llvm/Instruction.h:1.84 --- llvm/include/llvm/Instruction.h:1.83 Fri Apr 13 13:12:09 2007 +++ llvm/include/llvm/Instruction.h Mon Apr 16 22:26:42 2007 @@ -22,9 +22,8 @@ struct AssemblyAnnotationWriter; class BinaryOperator; -template struct ilist_traits; -template class SymbolTableListTraits; +template + class SymbolTableListTraits; class Instruction : public User { void operator=(const Instruction &); // Do not implement @@ -36,8 +35,7 @@ void setNext(Instruction *N) { Next = N; } void setPrev(Instruction *N) { Prev = N; } - friend class SymbolTableListTraits >; + friend class SymbolTableListTraits; void setParent(BasicBlock *P); protected: Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, Index: llvm/include/llvm/Module.h diff -u llvm/include/llvm/Module.h:1.85 llvm/include/llvm/Module.h:1.86 --- llvm/include/llvm/Module.h:1.85 Fri Mar 23 13:44:11 2007 +++ llvm/include/llvm/Module.h Mon Apr 16 22:26:42 2007 @@ -26,18 +26,20 @@ class FunctionType; template<> struct ilist_traits - : public SymbolTableListTraits { + : public SymbolTableListTraits { // createSentinel is used to create a node that marks the end of the list. static Function *createSentinel(); static void destroySentinel(Function *F) { delete F; } static iplist &getList(Module *M); + static inline ValueSymbolTable *getSymTab(Module *M); }; template<> struct ilist_traits - : public SymbolTableListTraits { + : public SymbolTableListTraits { // createSentinel is used to create a node that marks the end of the list. static GlobalVariable *createSentinel(); static void destroySentinel(GlobalVariable *GV) { delete GV; } static iplist &getList(Module *M); + static inline ValueSymbolTable *getSymTab(Module *M); }; /// A Module instance is used to store all the information related to an @@ -319,6 +321,17 @@ return O; } +inline ValueSymbolTable * +ilist_traits::getSymTab(Module *M) { + return M ? &M->getValueSymbolTable() : 0; +} + +inline ValueSymbolTable * +ilist_traits::getSymTab(Module *M) { + return M ? &M->getValueSymbolTable() : 0; +} + + } // End llvm namespace #endif Index: llvm/include/llvm/SymbolTableListTraits.h diff -u llvm/include/llvm/SymbolTableListTraits.h:1.5 llvm/include/llvm/SymbolTableListTraits.h:1.6 --- llvm/include/llvm/SymbolTableListTraits.h:1.5 Thu Apr 21 15:11:51 2005 +++ llvm/include/llvm/SymbolTableListTraits.h Mon Apr 16 22:26:42 2007 @@ -31,24 +31,17 @@ template class iplist; template struct ilist_traits; -// ValueSubClass - The type of objects that I hold -// ItemParentType - I call setParent() on all of my "ValueSubclass" items, and -// this is the value that I pass in. -// SymTabType - This is the class type, whose symtab I insert my -// ValueSubClass items into. Most of the time it is -// ItemParentType, but Instructions have item parents of BB's -// but symtabtype's of a Function +// ValueSubClass - The type of objects that I hold, e.g. Instruction. +// ItemParentType - The type of object that owns the list, e.g. BasicBlock. +// TraitBaseClass - The class this trait should inherit from, it should +// inherit from ilist_traits // -template > +template class SymbolTableListTraits { - SymTabClass *SymTabObject; + typedef ilist_traits TraitsClass; ItemParentClass *ItemParent; public: - SymbolTableListTraits() : SymTabObject(0), ItemParent(0) {} - - SymTabClass *getParent() { return SymTabObject; } - const SymTabClass *getParent() const { return SymTabObject; } + SymbolTableListTraits() : ItemParent(0) {} static ValueSubClass *getPrev(ValueSubClass *V) { return V->getPrev(); } static ValueSubClass *getNext(ValueSubClass *V) { return V->getNext(); } @@ -68,10 +61,10 @@ ilist_traits > &L2, ilist_iterator first, ilist_iterator last); - //private: - void setItemParent(ItemParentClass *IP) { ItemParent = IP; }//This is private! - void setParent(SymTabClass *Parent); // This is private! + void setItemParent(ItemParentClass *IP) { ItemParent = IP; } + template + void setSymTabObject(TPtr *, TPtr); }; } // End llvm namespace Index: llvm/include/llvm/ValueSymbolTable.h diff -u llvm/include/llvm/ValueSymbolTable.h:1.11 llvm/include/llvm/ValueSymbolTable.h:1.12 --- llvm/include/llvm/ValueSymbolTable.h:1.11 Mon Apr 16 21:04:39 2007 +++ llvm/include/llvm/ValueSymbolTable.h Mon Apr 16 22:26:42 2007 @@ -18,10 +18,8 @@ #include "llvm/ADT/StringMap.h" namespace llvm { - template + template class SymbolTableListTraits; - template struct ilist_traits; class BasicBlock; class Function; class Module; @@ -32,16 +30,11 @@ /// class ValueSymbolTable { friend class Value; - friend class SymbolTableListTraits >; - friend class SymbolTableListTraits >; - friend class SymbolTableListTraits >; - friend class SymbolTableListTraits >; - friend class SymbolTableListTraits >; + friend class SymbolTableListTraits; + friend class SymbolTableListTraits; + friend class SymbolTableListTraits; + friend class SymbolTableListTraits; + friend class SymbolTableListTraits; /// @name Types /// @{ public: From sabre at nondot.org Mon Apr 16 22:27:13 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 22:27:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp Function.cpp Module.cpp SymbolTableListTraitsImpl.h Type.cpp Message-ID: <200704170327.l3H3RDYF024581@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: BasicBlock.cpp updated: 1.75 -> 1.76 Function.cpp updated: 1.121 -> 1.122 Module.cpp updated: 1.78 -> 1.79 SymbolTableListTraitsImpl.h updated: 1.10 -> 1.11 Type.cpp updated: 1.182 -> 1.183 --- Log message: Refactor SymbolTableListTraits to only have a single pointer in it, instead of two. This shrinkifies Function by 8 bytes (104->96) and Module by 8 bytes (68->60). On a testcase of mine, this reduces the memory used to read a module header from 565680b to 561024, a little over 4K. --- Diffs of the changes: (+78 -60) BasicBlock.cpp | 28 ++++++++----- Function.cpp | 7 --- Module.cpp | 8 --- SymbolTableListTraitsImpl.h | 94 +++++++++++++++++++++++++------------------- Type.cpp | 1 5 files changed, 78 insertions(+), 60 deletions(-) Index: llvm/lib/VMCore/BasicBlock.cpp diff -u llvm/lib/VMCore/BasicBlock.cpp:1.75 llvm/lib/VMCore/BasicBlock.cpp:1.76 --- llvm/lib/VMCore/BasicBlock.cpp:1.75 Sun Feb 11 23:18:08 2007 +++ llvm/lib/VMCore/BasicBlock.cpp Mon Apr 16 22:26:42 2007 @@ -22,6 +22,15 @@ #include using namespace llvm; +inline ValueSymbolTable * +ilist_traits::getSymTab(BasicBlock *BB) { + if (BB) + if (Function *F = BB->getParent()) + return &F->getValueSymbolTable(); + return 0; +} + + namespace { /// DummyInst - An instance of this class is used to mark the end of the /// instruction list. This is not a real instruction. @@ -57,24 +66,24 @@ // Explicit instantiation of SymbolTableListTraits since some of the methods // are not in the public header file... -template class SymbolTableListTraits; +template class SymbolTableListTraits; -BasicBlock::BasicBlock(const std::string &Name, Function *Parent, +BasicBlock::BasicBlock(const std::string &Name, Function *NewParent, BasicBlock *InsertBefore) - : Value(Type::LabelTy, Value::BasicBlockVal) { - // Initialize the instlist... + : Value(Type::LabelTy, Value::BasicBlockVal), Parent(0) { + // Initialize the instlist. InstList.setItemParent(this); // Make sure that we get added to a function LeakDetector::addGarbageObject(this); if (InsertBefore) { - assert(Parent && + assert(NewParent && "Cannot insert block before another block with no function!"); - Parent->getBasicBlockList().insert(InsertBefore, this); - } else if (Parent) { - Parent->getBasicBlockList().push_back(this); + NewParent->getBasicBlockList().insert(InsertBefore, this); + } else if (NewParent) { + NewParent->getBasicBlockList().push_back(this); } setName(Name); @@ -91,7 +100,8 @@ if (getParent()) LeakDetector::addGarbageObject(this); - InstList.setParent(parent); + // Set Parent=parent, updating instruction symtab entries as appropriate. + InstList.setSymTabObject(&Parent, parent); if (getParent()) LeakDetector::removeGarbageObject(this); Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.121 llvm/lib/VMCore/Function.cpp:1.122 --- llvm/lib/VMCore/Function.cpp:1.121 Mon Apr 16 11:56:54 2007 +++ llvm/lib/VMCore/Function.cpp Mon Apr 16 22:26:42 2007 @@ -44,8 +44,8 @@ // Explicit instantiations of SymbolTableListTraits since some of the methods // are not in the public header file... -template class SymbolTableListTraits; -template class SymbolTableListTraits; +template class SymbolTableListTraits; +template class SymbolTableListTraits; //===----------------------------------------------------------------------===// // Argument Implementation @@ -144,9 +144,7 @@ ParamAttrs = 0; CallingConvention = 0; BasicBlocks.setItemParent(this); - BasicBlocks.setParent(this); ArgumentList.setItemParent(this); - ArgumentList.setParent(this); SymTab = new ValueSymbolTable(); assert((getReturnType()->isFirstClassType() ||getReturnType() == Type::VoidTy) @@ -171,7 +169,6 @@ // Delete all of the method arguments and unlink from symbol table... ArgumentList.clear(); - ArgumentList.setParent(0); delete SymTab; } Index: llvm/lib/VMCore/Module.cpp diff -u llvm/lib/VMCore/Module.cpp:1.78 llvm/lib/VMCore/Module.cpp:1.79 --- llvm/lib/VMCore/Module.cpp:1.78 Mon Apr 9 01:12:07 2007 +++ llvm/lib/VMCore/Module.cpp Mon Apr 16 22:26:42 2007 @@ -55,8 +55,8 @@ // Explicit instantiations of SymbolTableListTraits since some of the methods // are not in the public header file. -template class SymbolTableListTraits; -template class SymbolTableListTraits; +template class SymbolTableListTraits; +template class SymbolTableListTraits; //===----------------------------------------------------------------------===// // Primitive Module methods. @@ -65,9 +65,7 @@ Module::Module(const std::string &MID) : ModuleID(MID), DataLayout("") { FunctionList.setItemParent(this); - FunctionList.setParent(this); GlobalList.setItemParent(this); - GlobalList.setParent(this); ValSymTab = new ValueSymbolTable(); TypeSymTab = new TypeSymbolTable(); } @@ -75,9 +73,7 @@ Module::~Module() { dropAllReferences(); GlobalList.clear(); - GlobalList.setParent(0); FunctionList.clear(); - FunctionList.setParent(0); LibraryList.clear(); delete ValSymTab; delete TypeSymTab; Index: llvm/lib/VMCore/SymbolTableListTraitsImpl.h diff -u llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.10 llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.11 --- llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.10 Sun Feb 11 23:18:08 2007 +++ llvm/lib/VMCore/SymbolTableListTraitsImpl.h Mon Apr 16 22:26:42 2007 @@ -21,53 +21,68 @@ namespace llvm { -template -void SymbolTableListTraits -::setParent(SymTabClass *STO) { - iplist &List = SubClass::getList(ItemParent); - - // Remove all of the items from the old symtab.. - if (SymTabObject && !List.empty()) { - ValueSymbolTable &SymTab = SymTabObject->getValueSymbolTable(); - for (typename iplist::iterator I = List.begin(); - I != List.end(); ++I) - if (I->hasName()) SymTab.removeValueName(I->getValueName()); +/// setSymTabObject - This is called when (f.e.) the parent of a basic block +/// changes. This requires us to remove all the instruction symtab entries from +/// the current function and reinsert them into the new function. +template +template +void SymbolTableListTraits +::setSymTabObject(TPtr *Dest, TPtr Src) { + // Get the old symtab and value list before doing the assignment. + ValueSymbolTable *OldST = TraitsClass::getSymTab(ItemParent); + + // Do it. + *Dest = Src; + + // Get the new SymTab object. + ValueSymbolTable *NewST = TraitsClass::getSymTab(ItemParent); + + // If there is nothing to do, quick exit. + if (OldST == NewST) return; + + // Move all the elements from the old symtab to the new one. + iplist &ItemList = TraitsClass::getList(ItemParent); + if (ItemList.empty()) return; + + if (OldST) { + // Remove all entries from the previous symtab. + for (typename iplist::iterator I = ItemList.begin(); + I != ItemList.end(); ++I) + if (I->hasName()) + OldST->removeValueName(I->getValueName()); } - SymTabObject = STO; - - // Add all of the items to the new symtab... - if (SymTabObject && !List.empty()) { - ValueSymbolTable &SymTab = SymTabObject->getValueSymbolTable(); - for (typename iplist::iterator I = List.begin(); - I != List.end(); ++I) - if (I->hasName()) SymTab.reinsertValue(I); + if (NewST) { + // Add all of the items to the new symtab. + for (typename iplist::iterator I = ItemList.begin(); + I != ItemList.end(); ++I) + if (I->hasName()) + NewST->reinsertValue(I); } + } -template -void SymbolTableListTraits +template +void SymbolTableListTraits ::addNodeToList(ValueSubClass *V) { assert(V->getParent() == 0 && "Value already in a container!!"); V->setParent(ItemParent); - if (V->hasName() && SymTabObject) - SymTabObject->getValueSymbolTable().reinsertValue(V); + if (V->hasName()) + if (ValueSymbolTable *ST = TraitsClass::getSymTab(ItemParent)) + ST->reinsertValue(V); } -template -void SymbolTableListTraits +template +void SymbolTableListTraits ::removeNodeFromList(ValueSubClass *V) { V->setParent(0); - if (V->hasName() && SymTabObject) - SymTabObject->getValueSymbolTable().removeValueName(V->getValueName()); + if (V->hasName()) + if (ValueSymbolTable *ST = TraitsClass::getSymTab(ItemParent)) + ST->removeValueName(V->getValueName()); } -template -void SymbolTableListTraits +template +void SymbolTableListTraits ::transferNodesFromList(iplist > &L2, ilist_iterator first, ilist_iterator last) { @@ -77,16 +92,17 @@ // We only have to update symbol table entries if we are transferring the // instructions to a different symtab object... - SymTabClass *NewSTO = SymTabObject, *OldSTO = L2.SymTabObject; - if (NewSTO != OldSTO) { + ValueSymbolTable *NewST = TraitsClass::getSymTab(ItemParent); + ValueSymbolTable *OldST = TraitsClass::getSymTab(OldIP); + if (NewST != OldST) { for (; first != last; ++first) { ValueSubClass &V = *first; bool HasName = V.hasName(); - if (OldSTO && HasName) - OldSTO->getValueSymbolTable().removeValueName(V.getValueName()); + if (OldST && HasName) + OldST->removeValueName(V.getValueName()); V.setParent(NewIP); - if (NewSTO && HasName) - NewSTO->getValueSymbolTable().reinsertValue(&V); + if (NewST && HasName) + NewST->reinsertValue(&V); } } else { // Just transferring between blocks in the same function, simply update the Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.182 llvm/lib/VMCore/Type.cpp:1.183 --- llvm/lib/VMCore/Type.cpp:1.182 Tue Apr 10 21:44:19 2007 +++ llvm/lib/VMCore/Type.cpp Mon Apr 16 22:26:42 2007 @@ -433,7 +433,6 @@ // Calculate whether or not this type is abstract setAbstract(isAbstract); - } StructType::StructType(const std::vector &Types, bool isPacked) From sabre at nondot.org Mon Apr 16 23:04:41 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 23:04:41 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/BasicBlock.h Function.h Module.h SymbolTableListTraits.h Message-ID: <200704170404.l3H44fPB025342@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: BasicBlock.h updated: 1.65 -> 1.66 Function.h updated: 1.76 -> 1.77 Module.h updated: 1.86 -> 1.87 SymbolTableListTraits.h updated: 1.6 -> 1.7 --- Log message: The (negative) offset from a SymbolTableListTraits-using ilist to its container object is always constant. As such, evaluate it at compile time instead of storing it as an ivar in SymbolTableListTraits. This shrinks every SymbolTableListTraits ilist by a word, shrinking BasicBlock from 44->40 bytes, Function from 96->88 bytes, and Module from 60->52 bytes. --- Diffs of the changes: (+61 -3) BasicBlock.h | 12 ++++++++++++ Function.h | 22 ++++++++++++++++++++++ Module.h | 20 ++++++++++++++++++++ SymbolTableListTraits.h | 10 +++++++--- 4 files changed, 61 insertions(+), 3 deletions(-) Index: llvm/include/llvm/BasicBlock.h diff -u llvm/include/llvm/BasicBlock.h:1.65 llvm/include/llvm/BasicBlock.h:1.66 --- llvm/include/llvm/BasicBlock.h:1.65 Mon Apr 16 22:26:42 2007 +++ llvm/include/llvm/BasicBlock.h Mon Apr 16 23:04:14 2007 @@ -31,6 +31,7 @@ static void destroySentinel(Instruction *I) { delete I; } static iplist &getList(BasicBlock *BB); static ValueSymbolTable *getSymTab(BasicBlock *ItemParent); + static int getListOffset(); }; /// This represents a single basic block in LLVM. A basic block is simply a @@ -194,8 +195,19 @@ /// the basic block). /// BasicBlock *splitBasicBlock(iterator I, const std::string &BBName = ""); + + + static unsigned getInstListOffset() { + BasicBlock *Obj = 0; + return reinterpret_cast(&Obj->InstList); + } }; +inline int +ilist_traits::getListOffset() { + return BasicBlock::getInstListOffset(); +} + } // End llvm namespace #endif Index: llvm/include/llvm/Function.h diff -u llvm/include/llvm/Function.h:1.76 llvm/include/llvm/Function.h:1.77 --- llvm/include/llvm/Function.h:1.76 Mon Apr 16 22:26:42 2007 +++ llvm/include/llvm/Function.h Mon Apr 16 23:04:14 2007 @@ -37,6 +37,7 @@ static void destroySentinel(BasicBlock *BB) { delete BB; } static iplist &getList(Function *F); static ValueSymbolTable *getSymTab(Function *ItemParent); + static int getListOffset(); }; template<> struct ilist_traits @@ -47,6 +48,7 @@ static void destroySentinel(Argument *A) { delete A; } static iplist &getList(Function *F); static ValueSymbolTable *getSymTab(Function *ItemParent); + static int getListOffset(); }; class Function : public GlobalValue, public Annotable { @@ -238,6 +240,15 @@ /// including any contained basic blocks. /// void dropAllReferences(); + + static unsigned getBasicBlockListOffset() { + Function *Obj = 0; + return reinterpret_cast(&Obj->BasicBlocks); + } + static unsigned getArgumentListOffset() { + Function *Obj = 0; + return reinterpret_cast(&Obj->ArgumentList); + } }; inline ValueSymbolTable * @@ -250,6 +261,17 @@ return F ? &F->getValueSymbolTable() : 0; } +inline int +ilist_traits::getListOffset() { + return Function::getBasicBlockListOffset(); +} + +inline int +ilist_traits::getListOffset() { + return Function::getArgumentListOffset(); +} + + } // End llvm namespace #endif Index: llvm/include/llvm/Module.h diff -u llvm/include/llvm/Module.h:1.86 llvm/include/llvm/Module.h:1.87 --- llvm/include/llvm/Module.h:1.86 Mon Apr 16 22:26:42 2007 +++ llvm/include/llvm/Module.h Mon Apr 16 23:04:14 2007 @@ -32,6 +32,7 @@ static void destroySentinel(Function *F) { delete F; } static iplist &getList(Module *M); static inline ValueSymbolTable *getSymTab(Module *M); + static int getListOffset(); }; template<> struct ilist_traits : public SymbolTableListTraits { @@ -40,6 +41,7 @@ static void destroySentinel(GlobalVariable *GV) { delete GV; } static iplist &getList(Module *M); static inline ValueSymbolTable *getSymTab(Module *M); + static int getListOffset(); }; /// A Module instance is used to store all the information related to an @@ -313,6 +315,15 @@ /// that has "dropped all references", except operator delete. void dropAllReferences(); /// @} + + static unsigned getFunctionListOffset() { + Module *Obj = 0; + return reinterpret_cast(&Obj->FunctionList); + } + static unsigned getGlobalVariableListOffset() { + Module *Obj = 0; + return reinterpret_cast(&Obj->GlobalList); + } }; /// An iostream inserter for modules. @@ -331,6 +342,15 @@ return M ? &M->getValueSymbolTable() : 0; } +inline int +ilist_traits::getListOffset() { + return Module::getFunctionListOffset(); +} + +inline int +ilist_traits::getListOffset() { + return Module::getGlobalVariableListOffset(); +} } // End llvm namespace Index: llvm/include/llvm/SymbolTableListTraits.h diff -u llvm/include/llvm/SymbolTableListTraits.h:1.6 llvm/include/llvm/SymbolTableListTraits.h:1.7 --- llvm/include/llvm/SymbolTableListTraits.h:1.6 Mon Apr 16 22:26:42 2007 +++ llvm/include/llvm/SymbolTableListTraits.h Mon Apr 16 23:04:14 2007 @@ -39,10 +39,15 @@ template class SymbolTableListTraits { typedef ilist_traits TraitsClass; - ItemParentClass *ItemParent; public: - SymbolTableListTraits() : ItemParent(0) {} + SymbolTableListTraits() {} + /// getListOwner - Return the object that owns this list. If this is a list + /// of instructions, it returns the BasicBlock that owns them. + ItemParentClass *getListOwner() { + return reinterpret_cast((char*)this- + TraitsClass::getListOffset()); + } static ValueSubClass *getPrev(ValueSubClass *V) { return V->getPrev(); } static ValueSubClass *getNext(ValueSubClass *V) { return V->getNext(); } static const ValueSubClass *getPrev(const ValueSubClass *V) { @@ -62,7 +67,6 @@ ilist_iterator first, ilist_iterator last); //private: - void setItemParent(ItemParentClass *IP) { ItemParent = IP; } template void setSymTabObject(TPtr *, TPtr); }; From sabre at nondot.org Mon Apr 16 23:04:50 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 23:04:50 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp Function.cpp Module.cpp SymbolTableListTraitsImpl.h Message-ID: <200704170404.l3H44okE025355@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: BasicBlock.cpp updated: 1.76 -> 1.77 Function.cpp updated: 1.122 -> 1.123 Module.cpp updated: 1.79 -> 1.80 SymbolTableListTraitsImpl.h updated: 1.11 -> 1.12 --- Log message: The (negative) offset from a SymbolTableListTraits-using ilist to its container object is always constant. As such, evaluate it at compile time instead of storing it as an ivar in SymbolTableListTraits. This shrinks every SymbolTableListTraits ilist by a word, shrinking BasicBlock from 44->40 bytes, Function from 96->88 bytes, and Module from 60->52 bytes. --- Diffs of the changes: (+9 -14) BasicBlock.cpp | 2 -- Function.cpp | 2 -- Module.cpp | 2 -- SymbolTableListTraitsImpl.h | 17 +++++++++-------- 4 files changed, 9 insertions(+), 14 deletions(-) Index: llvm/lib/VMCore/BasicBlock.cpp diff -u llvm/lib/VMCore/BasicBlock.cpp:1.76 llvm/lib/VMCore/BasicBlock.cpp:1.77 --- llvm/lib/VMCore/BasicBlock.cpp:1.76 Mon Apr 16 22:26:42 2007 +++ llvm/lib/VMCore/BasicBlock.cpp Mon Apr 16 23:04:14 2007 @@ -72,8 +72,6 @@ BasicBlock::BasicBlock(const std::string &Name, Function *NewParent, BasicBlock *InsertBefore) : Value(Type::LabelTy, Value::BasicBlockVal), Parent(0) { - // Initialize the instlist. - InstList.setItemParent(this); // Make sure that we get added to a function LeakDetector::addGarbageObject(this); Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.122 llvm/lib/VMCore/Function.cpp:1.123 --- llvm/lib/VMCore/Function.cpp:1.122 Mon Apr 16 22:26:42 2007 +++ llvm/lib/VMCore/Function.cpp Mon Apr 16 23:04:14 2007 @@ -143,8 +143,6 @@ : GlobalValue(PointerType::get(Ty), Value::FunctionVal, 0, 0, Linkage, name) { ParamAttrs = 0; CallingConvention = 0; - BasicBlocks.setItemParent(this); - ArgumentList.setItemParent(this); SymTab = new ValueSymbolTable(); assert((getReturnType()->isFirstClassType() ||getReturnType() == Type::VoidTy) Index: llvm/lib/VMCore/Module.cpp diff -u llvm/lib/VMCore/Module.cpp:1.79 llvm/lib/VMCore/Module.cpp:1.80 --- llvm/lib/VMCore/Module.cpp:1.79 Mon Apr 16 22:26:42 2007 +++ llvm/lib/VMCore/Module.cpp Mon Apr 16 23:04:14 2007 @@ -64,8 +64,6 @@ Module::Module(const std::string &MID) : ModuleID(MID), DataLayout("") { - FunctionList.setItemParent(this); - GlobalList.setItemParent(this); ValSymTab = new ValueSymbolTable(); TypeSymTab = new TypeSymbolTable(); } Index: llvm/lib/VMCore/SymbolTableListTraitsImpl.h diff -u llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.11 llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.12 --- llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.11 Mon Apr 16 22:26:42 2007 +++ llvm/lib/VMCore/SymbolTableListTraitsImpl.h Mon Apr 16 23:04:14 2007 @@ -29,19 +29,19 @@ void SymbolTableListTraits ::setSymTabObject(TPtr *Dest, TPtr Src) { // Get the old symtab and value list before doing the assignment. - ValueSymbolTable *OldST = TraitsClass::getSymTab(ItemParent); + ValueSymbolTable *OldST = TraitsClass::getSymTab(getListOwner()); // Do it. *Dest = Src; // Get the new SymTab object. - ValueSymbolTable *NewST = TraitsClass::getSymTab(ItemParent); + ValueSymbolTable *NewST = TraitsClass::getSymTab(getListOwner()); // If there is nothing to do, quick exit. if (OldST == NewST) return; // Move all the elements from the old symtab to the new one. - iplist &ItemList = TraitsClass::getList(ItemParent); + iplist &ItemList = TraitsClass::getList(getListOwner()); if (ItemList.empty()) return; if (OldST) { @@ -66,9 +66,10 @@ void SymbolTableListTraits ::addNodeToList(ValueSubClass *V) { assert(V->getParent() == 0 && "Value already in a container!!"); - V->setParent(ItemParent); + ItemParentClass *Owner = getListOwner(); + V->setParent(Owner); if (V->hasName()) - if (ValueSymbolTable *ST = TraitsClass::getSymTab(ItemParent)) + if (ValueSymbolTable *ST = TraitsClass::getSymTab(Owner)) ST->reinsertValue(V); } @@ -77,7 +78,7 @@ ::removeNodeFromList(ValueSubClass *V) { V->setParent(0); if (V->hasName()) - if (ValueSymbolTable *ST = TraitsClass::getSymTab(ItemParent)) + if (ValueSymbolTable *ST = TraitsClass::getSymTab(getListOwner())) ST->removeValueName(V->getValueName()); } @@ -87,12 +88,12 @@ ilist_iterator first, ilist_iterator last) { // We only have to do work here if transferring instructions between BBs - ItemParentClass *NewIP = ItemParent, *OldIP = L2.ItemParent; + ItemParentClass *NewIP = getListOwner(), *OldIP = L2.getListOwner(); if (NewIP == OldIP) return; // No work to do at all... // We only have to update symbol table entries if we are transferring the // instructions to a different symtab object... - ValueSymbolTable *NewST = TraitsClass::getSymTab(ItemParent); + ValueSymbolTable *NewST = TraitsClass::getSymTab(NewIP); ValueSymbolTable *OldST = TraitsClass::getSymTab(OldIP); if (NewST != OldST) { for (; first != last; ++first) { From alenhar2 at cs.uiuc.edu Mon Apr 16 23:07:48 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Mon, 16 Apr 2007 23:07:48 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Alpha/cmov.ll Message-ID: <200704170407.l3H47mKw025448@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Alpha: cmov.ll updated: 1.4 -> 1.5 --- Log message: this is fixed --- Diffs of the changes: (+1 -1) cmov.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CodeGen/Alpha/cmov.ll diff -u llvm/test/CodeGen/Alpha/cmov.ll:1.4 llvm/test/CodeGen/Alpha/cmov.ll:1.5 --- llvm/test/CodeGen/Alpha/cmov.ll:1.4 Sun Apr 15 18:00:46 2007 +++ llvm/test/CodeGen/Alpha/cmov.ll Mon Apr 16 23:07:27 2007 @@ -1,6 +1,6 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | not grep cmovlt ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmoveq -; XFAIL: * + long %cmov_lt(long %a, long %c) { entry: From alenhar2 at cs.uiuc.edu Mon Apr 16 23:08:20 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Mon, 16 Apr 2007 23:08:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaInstrFormats.td AlphaInstrInfo.td Message-ID: <200704170408.l3H48KLi025477@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaInstrFormats.td updated: 1.29 -> 1.30 AlphaInstrInfo.td updated: 1.137 -> 1.138 --- Log message: Use this nifty Constraints thing and fix the inverted conditional moves --- Diffs of the changes: (+21 -17) AlphaInstrFormats.td | 18 +++++++++++------- AlphaInstrInfo.td | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 17 deletions(-) Index: llvm/lib/Target/Alpha/AlphaInstrFormats.td diff -u llvm/lib/Target/Alpha/AlphaInstrFormats.td:1.29 llvm/lib/Target/Alpha/AlphaInstrFormats.td:1.30 --- llvm/lib/Target/Alpha/AlphaInstrFormats.td:1.29 Tue Oct 31 10:49:55 2006 +++ llvm/lib/Target/Alpha/AlphaInstrFormats.td Mon Apr 16 23:07:59 2007 @@ -158,14 +158,16 @@ class OForm4 opcode, bits<7> fun, string asmstr, list pattern, InstrItinClass itin> : InstAlpha { let Pattern = pattern; - let OperandList = (ops GPRC:$RDEST, GPRC:$RFALSE, GPRC:$RTRUE, GPRC:$RCOND); + let OperandList = (ops GPRC:$RDEST, GPRC:$RCOND, GPRC:$RTRUE, GPRC:$RFALSE); + let Constraints = "$RFALSE = $RDEST"; + let DisableEncoding = "$RFALSE"; bits<5> Rc; - bits<5> Rb; bits<5> Ra; + bits<5> Rb; bits<7> Function = fun; - let isTwoAddress = 1; +// let isTwoAddress = 1; let Inst{25-21} = Ra; let Inst{20-16} = Rb; let Inst{15-13} = 0; @@ -195,14 +197,16 @@ class OForm4L opcode, bits<7> fun, string asmstr, list pattern, InstrItinClass itin> : InstAlpha { let Pattern = pattern; - let OperandList = (ops GPRC:$RDEST, GPRC:$RFALSE, s64imm:$RTRUE, GPRC:$RCOND); - + let OperandList = (ops GPRC:$RDEST, GPRC:$RCOND, s64imm:$RTRUE, GPRC:$RFALSE); + let Constraints = "$RFALSE = $RDEST"; + let DisableEncoding = "$RFALSE"; + bits<5> Rc; - bits<8> LIT; bits<5> Ra; + bits<8> LIT; bits<7> Function = fun; - let isTwoAddress = 1; +// let isTwoAddress = 1; let Inst{25-21} = Ra; let Inst{20-13} = LIT; let Inst{12} = 1; Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.137 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.138 --- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.137 Wed Jan 24 15:09:16 2007 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Mon Apr 16 23:07:59 2007 @@ -190,16 +190,16 @@ (CMOVEQi GPRC:$src1, immUExt8:$src2, GPRC:$which)>; //Invert sense when we can for constants: -//def : Pat<(select (setne GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), -// (CMOVNEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; -//def : Pat<(select (setgt GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), -// (CMOVGTi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; -//def : Pat<(select (setge GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), -// (CMOVGEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; -//def : Pat<(select (setlt GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), -// (CMOVLTi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; -//def : Pat<(select (setle GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), -// (CMOVLEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +def : Pat<(select (setne GPRC:$RCOND, 0), GPRC:$RTRUE, immUExt8:$RFALSE), + (CMOVEQi GPRC:$RCOND, immUExt8:$RFALSE, GPRC:$RTRUE)>; +def : Pat<(select (setgt GPRC:$RCOND, 0), GPRC:$RTRUE, immUExt8:$RFALSE), + (CMOVLEi GPRC:$RCOND, immUExt8:$RFALSE, GPRC:$RTRUE)>; +def : Pat<(select (setge GPRC:$RCOND, 0), GPRC:$RTRUE, immUExt8:$RFALSE), + (CMOVLTi GPRC:$RCOND, immUExt8:$RFALSE, GPRC:$RTRUE)>; +def : Pat<(select (setlt GPRC:$RCOND, 0), GPRC:$RTRUE, immUExt8:$RFALSE), + (CMOVGEi GPRC:$RCOND, immUExt8:$RFALSE, GPRC:$RTRUE)>; +def : Pat<(select (setle GPRC:$RCOND, 0), GPRC:$RTRUE, immUExt8:$RFALSE), + (CMOVGTi GPRC:$RCOND, immUExt8:$RFALSE, GPRC:$RTRUE)>; multiclass all_inst opc, bits<7> funl, bits<7> funq, string asmstr, PatFrag OpNode, InstrItinClass itin> { From sabre at nondot.org Mon Apr 16 23:32:01 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 23:32:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Message-ID: <200704170432.l3H4W1mr025906@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Function.cpp updated: 1.123 -> 1.124 --- Log message: merge several fields in GlobalValue to use the same word, move CallingConv field into SubclassData in Value. This shrinks GlobalVAlue from 48->40 bytes, Function from 88->76, and GlobalVariable from 76->68. This trims 4640 bytes off my testcase, reading a bc file without materializing any functions. --- Diffs of the changes: (+0 -1) Function.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.123 llvm/lib/VMCore/Function.cpp:1.124 --- llvm/lib/VMCore/Function.cpp:1.123 Mon Apr 16 23:04:14 2007 +++ llvm/lib/VMCore/Function.cpp Mon Apr 16 23:31:29 2007 @@ -142,7 +142,6 @@ const std::string &name, Module *ParentModule) : GlobalValue(PointerType::get(Ty), Value::FunctionVal, 0, 0, Linkage, name) { ParamAttrs = 0; - CallingConvention = 0; SymTab = new ValueSymbolTable(); assert((getReturnType()->isFirstClassType() ||getReturnType() == Type::VoidTy) From sabre at nondot.org Mon Apr 16 23:32:01 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Apr 2007 23:32:01 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Function.h GlobalValue.h Message-ID: <200704170432.l3H4W1WO025913@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Function.h updated: 1.77 -> 1.78 GlobalValue.h updated: 1.35 -> 1.36 --- Log message: merge several fields in GlobalValue to use the same word, move CallingConv field into SubclassData in Value. This shrinks GlobalVAlue from 48->40 bytes, Function from 88->76, and GlobalVariable from 76->68. This trims 4640 bytes off my testcase, reading a bc file without materializing any functions. --- Diffs of the changes: (+13 -10) Function.h | 9 ++++++--- GlobalValue.h | 14 +++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) Index: llvm/include/llvm/Function.h diff -u llvm/include/llvm/Function.h:1.77 llvm/include/llvm/Function.h:1.78 --- llvm/include/llvm/Function.h:1.77 Mon Apr 16 23:04:14 2007 +++ llvm/include/llvm/Function.h Mon Apr 16 23:31:29 2007 @@ -69,7 +69,10 @@ ArgumentListType ArgumentList; ///< The formal arguments ValueSymbolTable *SymTab; ///< Symbol table of args/instructions ParamAttrsList *ParamAttrs; ///< Parameter attributes - unsigned CallingConvention; ///< Calling convention to use + + + // The Calling Convention is stored in Value::SubclassData. + /*unsigned CallingConvention;*/ friend class SymbolTableListTraits; @@ -113,8 +116,8 @@ /// getCallingConv()/setCallingConv(uint) - These method get and set the /// calling convention of this function. The enum values for the known /// calling conventions are defined in CallingConv.h. - unsigned getCallingConv() const { return CallingConvention; } - void setCallingConv(unsigned CC) { CallingConvention = CC; } + unsigned getCallingConv() const { return SubclassData; } + void setCallingConv(unsigned CC) { SubclassData = CC; } /// Obtains a constant pointer to the ParamAttrsList object which holds the /// parameter attributes information, if any. Index: llvm/include/llvm/GlobalValue.h diff -u llvm/include/llvm/GlobalValue.h:1.35 llvm/include/llvm/GlobalValue.h:1.36 --- llvm/include/llvm/GlobalValue.h:1.35 Fri Apr 13 13:12:09 2007 +++ llvm/include/llvm/GlobalValue.h Mon Apr 16 23:31:29 2007 @@ -29,7 +29,7 @@ public: /// @brief An enumeration for the kinds of linkage for global values. enum LinkageTypes { - ExternalLinkage, ///< Externally visible function + ExternalLinkage = 0,///< Externally visible function LinkOnceLinkage, ///< Keep one copy of function when linking (inline) WeakLinkage, ///< Keep one copy of named function when linking (weak) AppendingLinkage, ///< Special purpose, only applies to global arrays @@ -42,8 +42,8 @@ /// @brief An enumeration for the kinds of visibility of global values. enum VisibilityTypes { - DefaultVisibility, ///< The GV is visible - HiddenVisibility ///< The GV is hidden + DefaultVisibility = 0, ///< The GV is visible + HiddenVisibility ///< The GV is hidden }; protected: @@ -55,10 +55,10 @@ } Module *Parent; - LinkageTypes Linkage; // The linkage of this global - VisibilityTypes Visibility; // The visibility style of this global - unsigned Alignment; // Alignment of this symbol, must be power of two - std::string Section; // Section to emit this into, empty mean default + LinkageTypes Linkage : 4; // The linkage of this global + VisibilityTypes Visibility : 1; // The visibility style of this global + unsigned Alignment : 16; // Alignment of this symbol, must be power of two + std::string Section; // Section to emit this into, empty mean default public: ~GlobalValue() { removeDeadConstantUsers(); // remove any dead constants using this. From jeffc at jolt-lang.org Tue Apr 17 00:33:25 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Tue, 17 Apr 2007 00:33:25 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/BasicBlock.h Function.h Module.h Message-ID: <200704170533.l3H5XPrW026989@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: BasicBlock.h updated: 1.66 -> 1.67 Function.h updated: 1.78 -> 1.79 Module.h updated: 1.87 -> 1.88 --- Log message: Fix build breakage on 64-bit systems. --- Diffs of the changes: (+5 -5) BasicBlock.h | 2 +- Function.h | 4 ++-- Module.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/include/llvm/BasicBlock.h diff -u llvm/include/llvm/BasicBlock.h:1.66 llvm/include/llvm/BasicBlock.h:1.67 --- llvm/include/llvm/BasicBlock.h:1.66 Mon Apr 16 23:04:14 2007 +++ llvm/include/llvm/BasicBlock.h Tue Apr 17 00:33:04 2007 @@ -199,7 +199,7 @@ static unsigned getInstListOffset() { BasicBlock *Obj = 0; - return reinterpret_cast(&Obj->InstList); + return unsigned(reinterpret_cast(&Obj->InstList)); } }; Index: llvm/include/llvm/Function.h diff -u llvm/include/llvm/Function.h:1.78 llvm/include/llvm/Function.h:1.79 --- llvm/include/llvm/Function.h:1.78 Mon Apr 16 23:31:29 2007 +++ llvm/include/llvm/Function.h Tue Apr 17 00:33:04 2007 @@ -246,11 +246,11 @@ static unsigned getBasicBlockListOffset() { Function *Obj = 0; - return reinterpret_cast(&Obj->BasicBlocks); + return unsigned(reinterpret_cast(&Obj->BasicBlocks)); } static unsigned getArgumentListOffset() { Function *Obj = 0; - return reinterpret_cast(&Obj->ArgumentList); + return unsigned(reinterpret_cast(&Obj->ArgumentList)); } }; Index: llvm/include/llvm/Module.h diff -u llvm/include/llvm/Module.h:1.87 llvm/include/llvm/Module.h:1.88 --- llvm/include/llvm/Module.h:1.87 Mon Apr 16 23:04:14 2007 +++ llvm/include/llvm/Module.h Tue Apr 17 00:33:04 2007 @@ -318,11 +318,11 @@ static unsigned getFunctionListOffset() { Module *Obj = 0; - return reinterpret_cast(&Obj->FunctionList); + return unsigned(reinterpret_cast(&Obj->FunctionList)); } static unsigned getGlobalVariableListOffset() { Module *Obj = 0; - return reinterpret_cast(&Obj->GlobalList); + return unsigned(reinterpret_cast(&Obj->GlobalList)); } }; From jeffc at jolt-lang.org Tue Apr 17 00:48:56 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Tue, 17 Apr 2007 00:48:56 -0500 Subject: [llvm-commits] CVS: llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp Message-ID: <200704170548.l3H5mupC027300@zion.cs.uiuc.edu> Changes in directory llvm/test/C++Frontend: 2005-01-03-StaticInitializers.cpp updated: 1.3 -> 1.4 --- Log message: Make it work on 64-bit systems. --- Diffs of the changes: (+1 -1) 2005-01-03-StaticInitializers.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp diff -u llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp:1.3 llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp:1.4 --- llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp:1.3 Mon Apr 16 10:31:48 2007 +++ llvm/test/C++Frontend/2005-01-03-StaticInitializers.cpp Tue Apr 17 00:48:35 2007 @@ -4,5 +4,5 @@ int A[2]; }; -int XX = (int)&(((struct S*)0)->A[1]); +int XX = (int)(long)&(((struct S*)0)->A[1]); From asl at math.spbu.ru Tue Apr 17 04:20:32 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 17 Apr 2007 04:20:32 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/mingw-alloca.ll Message-ID: <200704170920.l3H9KWHW007935@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: mingw-alloca.ll added (r1.1) --- Log message: Implemented correct stack probing on mingw/cygwin for dynamic alloca's. Also, fixed static case in presence of eax livin. This fixes PR331: http://llvm.org/PR331 PS: Why don't we still have push/pop instructions? :) --- Diffs of the changes: (+27 -0) mingw-alloca.ll | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+) Index: llvm/test/CodeGen/X86/mingw-alloca.ll diff -c /dev/null llvm/test/CodeGen/X86/mingw-alloca.ll:1.1 *** /dev/null Tue Apr 17 04:20:10 2007 --- llvm/test/CodeGen/X86/mingw-alloca.ll Tue Apr 17 04:20:00 2007 *************** *** 0 **** --- 1,27 ---- + ; RUN: llvm-as < %s | llc -o %t -f + ; RUN: grep __alloca %t | wc -l | grep 2 + ; RUN: grep 8028 %t + ; RUN: grep {pushl %eax} %t + ; RUN: grep 8024 %t | wc -l | grep 2 + + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" + target triple = "i386-mingw32" + + define void @foo1(i32 %N) { + entry: + %tmp14 = alloca i32, i32 %N ; [#uses=1] + call void @bar1( i32* %tmp14 ) + ret void + } + + declare void @bar1(i32*) + + define void @foo2(i32 inreg %N) { + entry: + %A2 = alloca [2000 x i32], align 16 ; <[2000 x i32]*> [#uses=1] + %A2.sub = getelementptr [2000 x i32]* %A2, i32 0, i32 0 ; [#uses=1] + call void @bar2( i32* %A2.sub, i32 %N ) + ret void + } + + declare void @bar2(i32*, i32) From asl at math.spbu.ru Tue Apr 17 04:20:33 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 17 Apr 2007 04:20:33 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h Message-ID: <200704170920.l3H9KX3v007940@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.183 -> 1.184 --- Log message: Implemented correct stack probing on mingw/cygwin for dynamic alloca's. Also, fixed static case in presence of eax livin. This fixes PR331: http://llvm.org/PR331 PS: Why don't we still have push/pop instructions? :) --- Diffs of the changes: (+5 -4) SelectionDAGNodes.h | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.183 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.184 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.183 Sun Apr 1 02:28:37 2007 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Tue Apr 17 04:20:00 2007 @@ -430,10 +430,11 @@ TRUNCSTORE, // DYNAMIC_STACKALLOC - Allocate some number of bytes on the stack aligned - // to a specified boundary. The first operand is the token chain, the - // second is the number of bytes to allocate, and the third is the alignment - // boundary. The size is guaranteed to be a multiple of the stack - // alignment, and the alignment is guaranteed to be bigger than the stack + // to a specified boundary. This node always has two return values: a new + // stack pointer value and a chain. The first operand is the token chain, + // the second is the number of bytes to allocate, and the third is the + // alignment boundary. The size is guaranteed to be a multiple of the stack + // alignment, and the alignment is guaranteed to be bigger than the stack // alignment (if required) or 0 to get standard stack alignment. DYNAMIC_STACKALLOC, From asl at math.spbu.ru Tue Apr 17 04:20:33 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 17 Apr 2007 04:20:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/CBackend.cpp Message-ID: <200704170920.l3H9KXEO007945@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: CBackend.cpp updated: 1.337 -> 1.338 --- Log message: Implemented correct stack probing on mingw/cygwin for dynamic alloca's. Also, fixed static case in presence of eax livin. This fixes PR331: http://llvm.org/PR331 PS: Why don't we still have push/pop instructions? :) --- Diffs of the changes: (+2 -2) CBackend.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/CBackend/CBackend.cpp diff -u llvm/lib/Target/CBackend/CBackend.cpp:1.337 llvm/lib/Target/CBackend/CBackend.cpp:1.338 --- llvm/lib/Target/CBackend/CBackend.cpp:1.337 Fri Apr 13 17:52:03 2007 +++ llvm/lib/Target/CBackend/CBackend.cpp Tue Apr 17 04:20:00 2007 @@ -1281,8 +1281,8 @@ // Alloca is hard to get, and we don't want to include stdlib.h here. Out << "/* get a declaration for alloca */\n" << "#if defined(__CYGWIN__) || defined(__MINGW32__)\n" - << "extern void *_alloca(unsigned long);\n" - << "#define alloca(x) _alloca(x)\n" + << "#define alloca(x) __builtin_alloca((x))\n" + << "#define _alloca(x) __builtin_alloca((x))\n" << "#elif defined(__APPLE__)\n" << "extern void *__builtin_alloca(unsigned long);\n" << "#define alloca(x) __builtin_alloca(x)\n" From asl at math.spbu.ru Tue Apr 17 04:20:35 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 17 Apr 2007 04:20:35 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86ISelLowering.h X86InstrInfo.td X86RegisterInfo.cpp Message-ID: <200704170920.l3H9KZxW007956@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.390 -> 1.391 X86ISelLowering.h updated: 1.97 -> 1.98 X86InstrInfo.td updated: 1.301 -> 1.302 X86RegisterInfo.cpp updated: 1.209 -> 1.210 --- Log message: Implemented correct stack probing on mingw/cygwin for dynamic alloca's. Also, fixed static case in presence of eax livin. This fixes PR331: http://llvm.org/PR331 PS: Why don't we still have push/pop instructions? :) --- Diffs of the changes: (+68 -5) X86ISelLowering.cpp | 36 +++++++++++++++++++++++++++++++++++- X86ISelLowering.h | 1 + X86InstrInfo.td | 3 +++ X86RegisterInfo.cpp | 33 +++++++++++++++++++++++++++++---- 4 files changed, 68 insertions(+), 5 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.390 llvm/lib/Target/X86/X86ISelLowering.cpp:1.391 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.390 Mon Apr 16 13:10:23 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Apr 17 04:20:00 2007 @@ -237,7 +237,10 @@ setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand); if (Subtarget->is64Bit()) setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i64, Expand); - setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32 , Expand); + if (Subtarget->isTargetCygMing()) + setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Custom); + else + setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand); if (X86ScalarSSE) { // Set up the FP register classes. @@ -3401,6 +3404,36 @@ } } +SDOperand X86TargetLowering::LowerDYNAMIC_STACKALLOC(SDOperand Op, + SelectionDAG &DAG) { + // Get the inputs. + SDOperand Chain = Op.getOperand(0); + SDOperand Size = Op.getOperand(1); + // FIXME: Ensure alignment here + + TargetLowering::ArgListTy Args; + TargetLowering::ArgListEntry Entry; + MVT::ValueType IntPtr = getPointerTy(); + MVT::ValueType SPTy = (Subtarget->is64Bit() ? MVT::i64 : MVT::i32); + const Type *IntPtrTy = getTargetData()->getIntPtrType(); + + Entry.Node = Size; + Entry.Ty = IntPtrTy; + Entry.isInReg = true; // Should pass in EAX + Args.push_back(Entry); + std::pair CallResult = + LowerCallTo(Chain, IntPtrTy, false, false, CallingConv::C, false, + DAG.getExternalSymbol("_alloca", IntPtr), Args, DAG); + + SDOperand SP = DAG.getCopyFromReg(CallResult.second, X86StackPtr, SPTy); + + std::vector Tys; + Tys.push_back(SPTy); + Tys.push_back(MVT::Other); + SDOperand Ops[2] = { SP, CallResult.second }; + return DAG.getNode(ISD::MERGE_VALUES, Tys, Ops, 2); +} + SDOperand X86TargetLowering::LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG) { MachineFunction &MF = DAG.getMachineFunction(); @@ -4002,6 +4035,7 @@ case ISD::INTRINSIC_WO_CHAIN: return LowerINTRINSIC_WO_CHAIN(Op, DAG); case ISD::RETURNADDR: return LowerRETURNADDR(Op, DAG); case ISD::FRAMEADDR: return LowerFRAMEADDR(Op, DAG); + case ISD::DYNAMIC_STACKALLOC: return LowerDYNAMIC_STACKALLOC(Op, DAG); } return SDOperand(); } Index: llvm/lib/Target/X86/X86ISelLowering.h diff -u llvm/lib/Target/X86/X86ISelLowering.h:1.97 llvm/lib/Target/X86/X86ISelLowering.h:1.98 --- llvm/lib/Target/X86/X86ISelLowering.h:1.97 Mon Apr 9 18:31:19 2007 +++ llvm/lib/Target/X86/X86ISelLowering.h Tue Apr 17 04:20:00 2007 @@ -401,6 +401,7 @@ SDOperand LowerJumpTable(SDOperand Op, SelectionDAG &DAG); SDOperand LowerCALL(SDOperand Op, SelectionDAG &DAG); SDOperand LowerRET(SDOperand Op, SelectionDAG &DAG); + SDOperand LowerDYNAMIC_STACKALLOC(SDOperand Op, SelectionDAG &DAG); SDOperand LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG); SDOperand LowerREADCYCLCECOUNTER(SDOperand Op, SelectionDAG &DAG); SDOperand LowerVASTART(SDOperand Op, SelectionDAG &DAG); Index: llvm/lib/Target/X86/X86InstrInfo.td diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.301 llvm/lib/Target/X86/X86InstrInfo.td:1.302 --- llvm/lib/Target/X86/X86InstrInfo.td:1.301 Tue Apr 10 17:10:25 2007 +++ llvm/lib/Target/X86/X86InstrInfo.td Tue Apr 17 04:20:00 2007 @@ -477,6 +477,9 @@ def POP32r : I<0x58, AddRegFrm, (ops GR32:$reg), "pop{l} $reg", []>, Imp<[ESP],[ESP]>; +def PUSH32r : I<0x50, AddRegFrm, + (ops GR32:$reg), "push{l} $reg", []>, Imp<[ESP],[ESP]>; + def MovePCtoStack : I<0, Pseudo, (ops piclabel:$label), "call $label", []>; Index: llvm/lib/Target/X86/X86RegisterInfo.cpp diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.209 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.210 --- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.209 Tue Apr 3 01:18:31 2007 +++ llvm/lib/Target/X86/X86RegisterInfo.cpp Tue Apr 17 04:20:00 2007 @@ -1039,14 +1039,39 @@ if (NumBytes) { // adjust stack pointer: ESP -= numbytes if (NumBytes >= 4096 && Subtarget->isTargetCygMing()) { + // Check, whether EAX is livein for this function + bool isEAXAlive = false; + for (MachineFunction::livein_iterator II = MF.livein_begin(), + EE = MF.livein_end(); (II != EE) && !isEAXAlive; ++II) { + unsigned Reg = II->first; + isEAXAlive = (Reg == X86::EAX || Reg == X86::AX || + Reg == X86::AH || Reg == X86::AL); + } + // Function prologue calls _alloca to probe the stack when allocating // more than 4k bytes in one go. Touching the stack at 4K increments is // necessary to ensure that the guard pages used by the OS virtual memory // manager are allocated in correct sequence. - MI = BuildMI(TII.get(X86::MOV32ri), X86::EAX).addImm(NumBytes); - MBB.insert(MBBI, MI); - MI = BuildMI(TII.get(X86::CALLpcrel32)).addExternalSymbol("_alloca"); - MBB.insert(MBBI, MI); + if (!isEAXAlive) { + MI = BuildMI(TII.get(X86::MOV32ri), X86::EAX).addImm(NumBytes); + MBB.insert(MBBI, MI); + MI = BuildMI(TII.get(X86::CALLpcrel32)).addExternalSymbol("_alloca"); + MBB.insert(MBBI, MI); + } else { + // Save EAX + MI = BuildMI(TII.get(X86::PUSH32r), X86::EAX); + MBB.insert(MBBI, MI); + // Allocate NumBytes-4 bytes on stack. We'll also use 4 already + // allocated bytes for EAX. + MI = BuildMI(TII.get(X86::MOV32ri), X86::EAX).addImm(NumBytes-4); + MBB.insert(MBBI, MI); + MI = BuildMI(TII.get(X86::CALLpcrel32)).addExternalSymbol("_alloca"); + MBB.insert(MBBI, MI); + // Restore EAX + MI = addRegOffset(BuildMI(TII.get(X86::MOV32rm), X86::EAX), + StackPtr, NumBytes-4); + MBB.insert(MBBI, MI); + } } else { unsigned Opc = (NumBytes < 128) ? (Is64Bit ? X86::SUB64ri8 : X86::SUB32ri8) : From baldrick at free.fr Tue Apr 17 11:08:28 2007 From: baldrick at free.fr (Duncan Sands) Date: Tue, 17 Apr 2007 18:08:28 +0200 Subject: [llvm-commits] llvm-gcc: use ConstantInt::getAllOnesValue to get -1 Message-ID: <200704171808.28788.baldrick@free.fr> Use ConstantInt::getAllOnesValue to get hold of -1 in CEIL_DIV_EXPR. Ciao, Duncan. -------------- next part -------------- A non-text attachment was scrubbed... Name: all_ones.diff Type: text/x-diff Size: 636 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070417/af68863a/attachment.bin From clattner at apple.com Tue Apr 17 11:28:46 2007 From: clattner at apple.com (clattner at apple.com) Date: Tue, 17 Apr 2007 09:28:46 -0700 (PDT) Subject: [llvm-commits] [126244] Use ConstantInt:: getAllOnesValue to get hold of -1 in CEIL_DIV_EXPR. Message-ID: <20070417162846.08A6EF1A0F8F@src> Revision: 126244 Author: clattner Date: 2007-04-17 09:28:45 -0700 (Tue, 17 Apr 2007) Log Message: ----------- Use ConstantInt::getAllOnesValue to get hold of -1 in CEIL_DIV_EXPR. Patch by Duncan Sands Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-convert.cpp Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-17 07:31:45 UTC (rev 126243) +++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-17 16:28:45 UTC (rev 126244) @@ -3244,7 +3244,7 @@ const Type *Ty = ConvertType(TREE_TYPE(exp)); Constant *Zero = ConstantInt::get(Ty, 0); Constant *One = ConstantInt::get(Ty, 1); - Constant *MinusOne = ConstantInt::get(Ty, -1U); + Constant *MinusOne = ConstantInt::getAllOnesValue(Ty); Value *LHS = Emit(TREE_OPERAND(exp, 0), 0); Value *RHS = Emit(TREE_OPERAND(exp, 1), 0); From clattner at apple.com Tue Apr 17 11:31:15 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 17 Apr 2007 09:31:15 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86ISelLowering.h X86InstrInfo.td X86RegisterInfo.cpp In-Reply-To: <200704170920.l3H9KZxW007956@zion.cs.uiuc.edu> References: <200704170920.l3H9KZxW007956@zion.cs.uiuc.edu> Message-ID: > > Implemented correct stack probing on mingw/cygwin for dynamic > alloca's. > Also, fixed static case in presence of eax livin. This fixes PR331: > http://llvm.org/PR331 Cool :) > > +SDOperand X86TargetLowering::LowerDYNAMIC_STACKALLOC(SDOperand Op, > + SelectionDAG > &DAG) { Please add a comment above this that explains why this lowering is needed. Also, please assert that the subtarget isCygMing() on entry, to make it obvious to the reader that this is cygwin-specific lowering code. Thanks Anton! -Chris From sabre at nondot.org Tue Apr 17 12:22:23 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 12:22:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86AsmPrinter.h X86ISelLowering.cpp X86IntelAsmPrinter.cpp X86MachineFunctionInfo.h X86RegisterInfo.cpp Message-ID: <200704171722.l3HHMNEc018294@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.99 -> 1.100 X86AsmPrinter.cpp updated: 1.238 -> 1.239 X86AsmPrinter.h updated: 1.43 -> 1.44 X86ISelLowering.cpp updated: 1.391 -> 1.392 X86IntelAsmPrinter.cpp updated: 1.69 -> 1.70 X86MachineFunctionInfo.h updated: 1.4 -> 1.5 X86RegisterInfo.cpp updated: 1.210 -> 1.211 --- Log message: rename X86FunctionInfo to X86MachineFunctionInfo to match the header file it is defined in. --- Diffs of the changes: (+23 -21) X86ATTAsmPrinter.cpp | 2 +- X86AsmPrinter.cpp | 8 ++++---- X86AsmPrinter.h | 2 +- X86ISelLowering.cpp | 12 +++++++----- X86IntelAsmPrinter.cpp | 2 +- X86MachineFunctionInfo.h | 16 ++++++++-------- X86RegisterInfo.cpp | 2 +- 7 files changed, 23 insertions(+), 21 deletions(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.99 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.100 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.99 Sat Mar 24 21:01:03 2007 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Tue Apr 17 12:21:52 2007 @@ -92,7 +92,7 @@ // Populate function information map. Actually, We don't want to populate // non-stdcall or non-fastcall functions' information right now. if (CC == CallingConv::X86_StdCall || CC == CallingConv::X86_FastCall) - FunctionInfoMap[F] = *MF.getInfo(); + FunctionInfoMap[F] = *MF.getInfo(); X86SharedAsmPrinter::decorateName(CurrentFnName, F); Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.238 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.239 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.238 Sat Mar 31 08:11:52 2007 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Tue Apr 17 12:21:52 2007 @@ -32,9 +32,9 @@ #include "llvm/Target/TargetOptions.h" using namespace llvm; -static X86FunctionInfo calculateFunctionInfo(const Function *F, - const TargetData *TD) { - X86FunctionInfo Info; +static X86MachineFunctionInfo calculateFunctionInfo(const Function *F, + const TargetData *TD) { + X86MachineFunctionInfo Info; uint64_t Size = 0; switch (F->getCallingConv()) { @@ -77,7 +77,7 @@ FMFInfoMap::const_iterator info_item = FunctionInfoMap.find(F); - const X86FunctionInfo *Info; + const X86MachineFunctionInfo *Info; if (info_item == FunctionInfoMap.end()) { // Calculate apropriate function info and populate map FunctionInfoMap[F] = calculateFunctionInfo(F, TM.getTargetData()); Index: llvm/lib/Target/X86/X86AsmPrinter.h diff -u llvm/lib/Target/X86/X86AsmPrinter.h:1.43 llvm/lib/Target/X86/X86AsmPrinter.h:1.44 --- llvm/lib/Target/X86/X86AsmPrinter.h:1.43 Fri Jan 26 15:22:28 2007 +++ llvm/lib/Target/X86/X86AsmPrinter.h Tue Apr 17 12:21:52 2007 @@ -48,7 +48,7 @@ // // This structure is using e.g. for name decoration for stdcall & fastcall'ed // function, since we have to use arguments' size for decoration. - typedef std::map FMFInfoMap; + typedef std::map FMFInfoMap; FMFInfoMap FunctionInfoMap; void decorateName(std::string& Name, const GlobalValue* GV); Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.391 llvm/lib/Target/X86/X86ISelLowering.cpp:1.392 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.391 Tue Apr 17 04:20:00 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Apr 17 12:21:52 2007 @@ -729,7 +729,8 @@ RegSaveFrameIndex = 0xAAAAAAA; // X86-64 only. ReturnAddrIndex = 0; // No return address slot generated yet. - MF.getInfo()->setBytesToPopOnReturn(BytesToPopOnReturn); + MF.getInfo() + ->setBytesToPopOnReturn(BytesToPopOnReturn); // Return the new list of results. return DAG.getNode(ISD::MERGE_VALUES, Op.Val->getVTList(), @@ -973,7 +974,8 @@ BytesToPopOnReturn = StackSize; // Callee pops all stack arguments. BytesCallerReserves = 0; - MF.getInfo()->setBytesToPopOnReturn(BytesToPopOnReturn); + MF.getInfo() + ->setBytesToPopOnReturn(BytesToPopOnReturn); // Return the new list of results. return DAG.getNode(ISD::MERGE_VALUES, Op.Val->getVTList(), @@ -3441,7 +3443,7 @@ if (Fn->hasExternalLinkage() && Subtarget->isTargetCygMing() && Fn->getName() == "main") - MF.getInfo()->setForceFramePointer(true); + MF.getInfo()->setForceFramePointer(true); unsigned CC = cast(Op.getOperand(1))->getValue(); if (Subtarget->is64Bit()) @@ -3457,10 +3459,10 @@ case CallingConv::C: return LowerCCCArguments(Op, DAG); case CallingConv::X86_StdCall: - MF.getInfo()->setDecorationStyle(StdCall); + MF.getInfo()->setDecorationStyle(StdCall); return LowerCCCArguments(Op, DAG, true); case CallingConv::X86_FastCall: - MF.getInfo()->setDecorationStyle(FastCall); + MF.getInfo()->setDecorationStyle(FastCall); return LowerFastCCArguments(Op, DAG); } } Index: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.69 llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.70 --- llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.69 Tue Jan 30 14:08:38 2007 +++ llvm/lib/Target/X86/X86IntelAsmPrinter.cpp Tue Apr 17 12:21:52 2007 @@ -51,7 +51,7 @@ // Populate function information map. Actually, We don't want to populate // non-stdcall or non-fastcall functions' information right now. if (CC == CallingConv::X86_StdCall || CC == CallingConv::X86_FastCall) - FunctionInfoMap[F] = *MF.getInfo(); + FunctionInfoMap[F] = *MF.getInfo(); X86SharedAsmPrinter::decorateName(CurrentFnName, F); Index: llvm/lib/Target/X86/X86MachineFunctionInfo.h diff -u llvm/lib/Target/X86/X86MachineFunctionInfo.h:1.4 llvm/lib/Target/X86/X86MachineFunctionInfo.h:1.5 --- llvm/lib/Target/X86/X86MachineFunctionInfo.h:1.4 Mon Sep 25 22:57:53 2006 +++ llvm/lib/Target/X86/X86MachineFunctionInfo.h Tue Apr 17 12:21:52 2007 @@ -24,9 +24,9 @@ FastCall }; -/// X86FunctionInfo - This class is derived from MachineFunction private +/// X86MachineFunctionInfo - This class is derived from MachineFunction private /// X86 target-specific information for each MachineFunction. -class X86FunctionInfo : public MachineFunctionInfo { +class X86MachineFunctionInfo : public MachineFunctionInfo { /// ForceFramePointer - True if the function is required to use of frame /// pointer for reasons other than it containing dynamic allocation or /// that FP eliminatation is turned off. For example, Cygwin main function @@ -42,13 +42,13 @@ NameDecorationStyle DecorationStyle; public: - X86FunctionInfo() : ForceFramePointer(false), - BytesToPopOnReturn(0), - DecorationStyle(None) {} + X86MachineFunctionInfo() : ForceFramePointer(false), + BytesToPopOnReturn(0), + DecorationStyle(None) {} - X86FunctionInfo(MachineFunction &MF) : ForceFramePointer(false), - BytesToPopOnReturn(0), - DecorationStyle(None) {} + X86MachineFunctionInfo(MachineFunction &MF) : ForceFramePointer(false), + BytesToPopOnReturn(0), + DecorationStyle(None) {} bool getForceFramePointer() const { return ForceFramePointer;} void setForceFramePointer(bool forceFP) { ForceFramePointer = forceFP; } Index: llvm/lib/Target/X86/X86RegisterInfo.cpp diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.210 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.211 --- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.210 Tue Apr 17 04:20:00 2007 +++ llvm/lib/Target/X86/X86RegisterInfo.cpp Tue Apr 17 12:21:52 2007 @@ -927,7 +927,7 @@ bool X86RegisterInfo::hasFP(const MachineFunction &MF) const { return (NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects() || - MF.getInfo()->getForceFramePointer()); + MF.getInfo()->getForceFramePointer()); } void X86RegisterInfo:: From sabre at nondot.org Tue Apr 17 12:36:29 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 12:36:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp Message-ID: <200704171736.l3HHaTeW018762@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Verifier.cpp updated: 1.202 -> 1.203 --- Log message: eliminate a use of Instruction::getPrev(), patch by Gabor Greif in 2005. --- Diffs of the changes: (+2 -1) Verifier.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.202 llvm/lib/VMCore/Verifier.cpp:1.203 --- llvm/lib/VMCore/Verifier.cpp:1.202 Wed Apr 11 21:48:46 2007 +++ llvm/lib/VMCore/Verifier.cpp Tue Apr 17 12:36:12 2007 @@ -640,7 +640,8 @@ // This can be tested by checking whether the instruction before this is // either nonexistent (because this is begin()) or is a PHI node. If not, // then there is some other instruction before a PHI. - Assert2(&PN.getParent()->front() == &PN || isa(PN.getPrev()), + Assert2(&PN == &PN.getParent()->front() || + isa(--BasicBlock::iterator(&PN)), "PHI nodes not grouped at top of basic block!", &PN, PN.getParent()); From sabre at nondot.org Tue Apr 17 12:38:46 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 12:38:46 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Message-ID: <200704171738.l3HHckDJ018851@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.178 -> 1.179 --- Log message: eliminate use of Instruction::getPrev(). Patch by Gabor Greif in 2005. --- Diffs of the changes: (+6 -3) Execution.cpp | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.178 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.179 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.178 Mon Apr 16 16:50:40 2007 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Tue Apr 17 12:38:28 2007 @@ -866,16 +866,19 @@ // If it is an unknown intrinsic function, use the intrinsic lowering // class to transform it into hopefully tasty LLVM code. // - Instruction *Prev = CS.getInstruction()->getPrev(); + BasicBlock::iterator me(CS.getInstruction()); BasicBlock *Parent = CS.getInstruction()->getParent(); + bool atBegin(Parent->begin() == me); + if (!atBegin) + --me; IL->LowerIntrinsicCall(cast(CS.getInstruction())); // Restore the CurInst pointer to the first instruction newly inserted, if // any. - if (!Prev) { + if (atBegin) { SF.CurInst = Parent->begin(); } else { - SF.CurInst = Prev; + SF.CurInst = me; ++SF.CurInst; } return; From sabre at nondot.org Tue Apr 17 12:48:14 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 12:48:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <200704171748.l3HHmEhg019049@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: SimplifyCFG.cpp updated: 1.120 -> 1.121 --- Log message: remove use of Instruction::getNext --- Diffs of the changes: (+5 -3) SimplifyCFG.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.120 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.121 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.120 Sun Apr 1 20:44:59 2007 +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Tue Apr 17 12:47:54 2007 @@ -1447,10 +1447,11 @@ // predecessor and use logical operations to pick the right destination. BasicBlock *TrueDest = BI->getSuccessor(0); BasicBlock *FalseDest = BI->getSuccessor(1); - if (Instruction *Cond = dyn_cast(BI->getCondition())) + if (Instruction *Cond = dyn_cast(BI->getCondition())) { + BasicBlock::iterator CondIt = Cond; if ((isa(Cond) || isa(Cond)) && Cond->getParent() == BB && &BB->front() == Cond && - Cond->getNext() == BI && Cond->hasOneUse() && + &*++CondIt == BI && Cond->hasOneUse() && TrueDest != BB && FalseDest != BB) for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI!=E; ++PI) if (BranchInst *PBI = dyn_cast((*PI)->getTerminator())) @@ -1496,8 +1497,9 @@ return SimplifyCFG(BB) | 1; } } + } - // Scan predessor blocks for conditional branchs. + // Scan predessor blocks for conditional branches. for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) if (BranchInst *PBI = dyn_cast((*PI)->getTerminator())) if (PBI != BI && PBI->isConditional()) { From sabre at nondot.org Tue Apr 17 12:51:20 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 12:51:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp Message-ID: <200704171751.l3HHpKYB019139@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: RSProfiling.cpp updated: 1.21 -> 1.22 --- Log message: eliminate use of Instruction::getNext() --- Diffs of the changes: (+15 -13) RSProfiling.cpp | 28 +++++++++++++++------------- 1 files changed, 15 insertions(+), 13 deletions(-) Index: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.21 llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.22 --- llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.21 Mon Apr 16 13:10:23 2007 +++ llvm/lib/Transforms/Instrumentation/RSProfiling.cpp Tue Apr 17 12:51:03 2007 @@ -230,9 +230,10 @@ void GlobalRandomCounterOpt::PrepFunction(Function* F) { //make a local temporary to cache the global BasicBlock& bb = F->getEntryBlock(); - AI = new AllocaInst(T, 0, "localcounter", bb.begin()); - LoadInst* l = new LoadInst(Counter, "counterload", AI->getNext()); - new StoreInst(l, AI, l->getNext()); + BasicBlock::iterator InsertPt = bb.begin(); + AI = new AllocaInst(T, 0, "localcounter", InsertPt); + LoadInst* l = new LoadInst(Counter, "counterload", InsertPt); + new StoreInst(l, AI, InsertPt); //modify all functions and return values to restore the local variable to/from //the global variable @@ -240,25 +241,26 @@ fib != fie; ++fib) for(BasicBlock::iterator bib = fib->begin(), bie = fib->end(); bib != bie; ++bib) - if (isa(&*bib)) { + if (isa(bib)) { LoadInst* l = new LoadInst(AI, "counter", bib); new StoreInst(l, Counter, bib); - l = new LoadInst(Counter, "counter", bib->getNext()); - new StoreInst(l, AI, l->getNext()); - } else if (isa(&*bib)) { + l = new LoadInst(Counter, "counter", ++bib); + new StoreInst(l, AI, bib--); + } else if (isa(bib)) { LoadInst* l = new LoadInst(AI, "counter", bib); new StoreInst(l, Counter, bib); - BasicBlock* bb = cast(&*bib)->getNormalDest(); - Instruction* i = bb->begin(); - while (isa(i)) i = i->getNext(); + BasicBlock* bb = cast(bib)->getNormalDest(); + BasicBlock::iterator i = bb->begin(); + while (isa(i)) + ++i; l = new LoadInst(Counter, "counter", i); - bb = cast(&*bib)->getUnwindDest(); + bb = cast(bib)->getUnwindDest(); i = bb->begin(); - while (isa(i)) i = i->getNext(); + while (isa(i)) ++i; l = new LoadInst(Counter, "counter", i); - new StoreInst(l, AI, l->getNext()); + new StoreInst(l, AI, i); } else if (isa(&*bib) || isa(&*bib)) { LoadInst* l = new LoadInst(AI, "counter", bib); new StoreInst(l, Counter, bib); From sabre at nondot.org Tue Apr 17 12:53:03 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 12:53:03 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/LoadValueNumbering.cpp Message-ID: <200704171753.l3HHr3un019196@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: LoadValueNumbering.cpp updated: 1.38 -> 1.39 --- Log message: Remove use of Instruction::getNext --- Diffs of the changes: (+12 -9) LoadValueNumbering.cpp | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) Index: llvm/lib/Analysis/LoadValueNumbering.cpp diff -u llvm/lib/Analysis/LoadValueNumbering.cpp:1.38 llvm/lib/Analysis/LoadValueNumbering.cpp:1.39 --- llvm/lib/Analysis/LoadValueNumbering.cpp:1.38 Fri Apr 6 23:43:07 2007 +++ llvm/lib/Analysis/LoadValueNumbering.cpp Tue Apr 17 12:52:45 2007 @@ -336,15 +336,18 @@ // we see any candidate loads, then we know they have the same value # as LI. // bool LoadInvalidatedInBBAfter = false; - for (BasicBlock::iterator I = LI->getNext(); I != LoadBB->end(); ++I) { - // If this instruction is a load, then this instruction returns the same - // value as LI. - if (isa(I) && cast(I)->getOperand(0) == LoadPtr) - RetVals.push_back(I); - - if (AA.getModRefInfo(I, LoadPtr, LoadSize) & AliasAnalysis::Mod) { - LoadInvalidatedInBBAfter = true; - break; + { + BasicBlock::iterator I = LI; + for (++I; I != LoadBB->end(); ++I) { + // If this instruction is a load, then this instruction returns the same + // value as LI. + if (isa(I) && cast(I)->getOperand(0) == LoadPtr) + RetVals.push_back(I); + + if (AA.getModRefInfo(I, LoadPtr, LoadSize) & AliasAnalysis::Mod) { + LoadInvalidatedInBBAfter = true; + break; + } } } From sabre at nondot.org Tue Apr 17 12:54:29 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 12:54:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp Message-ID: <200704171754.l3HHsTej019254@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: RSProfiling.cpp updated: 1.22 -> 1.23 --- Log message: remove use of BasicBlock::getNext --- Diffs of the changes: (+4 -3) RSProfiling.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.22 llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.23 --- llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.22 Tue Apr 17 12:51:03 2007 +++ llvm/lib/Transforms/Instrumentation/RSProfiling.cpp Tue Apr 17 12:54:12 2007 @@ -455,10 +455,11 @@ // add in edge from C using x in A' //a: - BasicBlock* bbC = new BasicBlock("choice", &F, src->getNext() ); + Function::iterator BBN = src; ++BBN; + BasicBlock* bbC = new BasicBlock("choice", &F, BBN); //ChoicePoints.insert(bbC); - BasicBlock* bbCp = - new BasicBlock("choice", &F, cast(Translate(src))->getNext() ); + BBN = cast(Translate(src)); + BasicBlock* bbCp = new BasicBlock("choice", &F, ++BBN); ChoicePoints.insert(bbCp); //b: From sabre at nondot.org Tue Apr 17 13:03:18 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 13:03:18 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/README.txt Message-ID: <200704171803.l3HI3IWO019415@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: README.txt updated: 1.21 -> 1.22 --- Log message: add a note --- Diffs of the changes: (+43 -0) README.txt | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+) Index: llvm/lib/Target/ARM/README.txt diff -u llvm/lib/Target/ARM/README.txt:1.21 llvm/lib/Target/ARM/README.txt:1.22 --- llvm/lib/Target/ARM/README.txt:1.21 Tue Mar 20 17:32:39 2007 +++ llvm/lib/Target/ARM/README.txt Tue Apr 17 13:03:00 2007 @@ -476,3 +476,46 @@ in a load / store. 2. Allow iv reuse even when a type conversion is required. For example, i8 and i32 load / store addressing modes are identical. + + +//===---------------------------------------------------------------------===// + +This: + +int foo(int a, int b, int c, int d) { + long long acc = (long long)a * (long long)b; + acc += (long long)c * (long long)d; + return (int)(acc >> 32); +} + +Should compile to use SMLAL (Signed Multiply Accumulate Long) which multiplies +two signed 32-bit values to produce a 64-bit value, and accumulates this with +a 64-bit value. + +We currently get this with v6: + +_foo: + mul r12, r1, r0 + smmul r1, r1, r0 + smmul r0, r3, r2 + mul r3, r3, r2 + adds r3, r3, r12 + adc r0, r0, r1 + bx lr + +and this with v4: + +_foo: + stmfd sp!, {r7, lr} + mov r7, sp + mul r12, r1, r0 + smull r0, r1, r1, r0 + smull lr, r0, r3, r2 + mul r3, r3, r2 + adds r3, r3, r12 + adc r0, r0, r1 + ldmfd sp!, {r7, pc} + +This apparently occurs in real code. + +//===---------------------------------------------------------------------===// From sabre at nondot.org Tue Apr 17 13:04:12 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 13:04:12 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Instruction.h Message-ID: <200704171804.l3HI4Crd019487@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instruction.h updated: 1.84 -> 1.85 --- Log message: Instruction:: Next/Prev accessors are now private --- Diffs of the changes: (+8 -7) Instruction.h | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.84 llvm/include/llvm/Instruction.h:1.85 --- llvm/include/llvm/Instruction.h:1.84 Mon Apr 16 22:26:42 2007 +++ llvm/include/llvm/Instruction.h Tue Apr 17 13:03:55 2007 @@ -82,13 +82,6 @@ inline const BasicBlock *getParent() const { return Parent; } inline BasicBlock *getParent() { return Parent; } - // getNext/Prev - Return the next or previous instruction in the list. The - // last node in the list is a terminator instruction. - Instruction *getNext() { return Next; } - const Instruction *getNext() const { return Next; } - Instruction *getPrev() { return Prev; } - const Instruction *getPrev() const { return Prev; } - /// removeFromParent - This method unlinks 'this' from the containing basic /// block, but does not delete it. /// @@ -231,6 +224,14 @@ #define LAST_OTHER_INST(N) OtherOpsEnd = N+1 #include "llvm/Instruction.def" }; + +private: + // getNext/Prev - Return the next or previous instruction in the list. The + // last node in the list is a terminator instruction. + Instruction *getNext() { return Next; } + const Instruction *getNext() const { return Next; } + Instruction *getPrev() { return Prev; } + const Instruction *getPrev() const { return Prev; } }; } // End llvm namespace From sabre at nondot.org Tue Apr 17 13:10:05 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 13:10:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp LowerSwitch.cpp Message-ID: <200704171810.l3HIA5Re019667@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: BreakCriticalEdges.cpp updated: 1.43 -> 1.44 LowerSwitch.cpp updated: 1.37 -> 1.38 --- Log message: remove use of BasicBlock::getNext --- Diffs of the changes: (+6 -3) BreakCriticalEdges.cpp | 3 ++- LowerSwitch.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp diff -u llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.43 llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.44 --- llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.43 Sun Apr 15 03:47:27 2007 +++ llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp Tue Apr 17 13:09:47 2007 @@ -129,7 +129,8 @@ // Insert the block into the function... right after the block TI lives in. Function &F = *TIBB->getParent(); - F.getBasicBlockList().insert(TIBB->getNext(), NewBB); + Function::iterator FBBI = TIBB; + F.getBasicBlockList().insert(++FBBI, NewBB); // If there are any PHI nodes in DestBB, we need to update them so that they // merge incoming values from NewBB instead of from TIBB. Index: llvm/lib/Transforms/Utils/LowerSwitch.cpp diff -u llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.37 llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.38 --- llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.37 Mon Apr 16 13:10:23 2007 +++ llvm/lib/Transforms/Utils/LowerSwitch.cpp Tue Apr 17 13:09:47 2007 @@ -155,7 +155,8 @@ // left branch if it is and right branch if not. Function* F = OrigBlock->getParent(); BasicBlock* NewNode = new BasicBlock("NodeBlock"); - F->getBasicBlockList().insert(OrigBlock->getNext(), NewNode); + Function::iterator FI = OrigBlock; + F->getBasicBlockList().insert(++FI, NewNode); ICmpInst* Comp = new ICmpInst(ICmpInst::ICMP_SLT, Val, Pivot.Low, "Pivot"); NewNode->getInstList().push_back(Comp); @@ -175,7 +176,8 @@ { Function* F = OrigBlock->getParent(); BasicBlock* NewLeaf = new BasicBlock("LeafBlock"); - F->getBasicBlockList().insert(OrigBlock->getNext(), NewLeaf); + Function::iterator FI = OrigBlock; + F->getBasicBlockList().insert(++FI, NewLeaf); // Emit comparison ICmpInst* Comp = NULL; From sabre at nondot.org Tue Apr 17 13:15:21 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 13:15:21 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/GlobalVariable.h Message-ID: <200704171815.l3HIFLq5019870@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: GlobalVariable.h updated: 1.42 -> 1.43 --- Log message: bool on darwin/ppc is 4 bytes. --- Diffs of the changes: (+2 -2) GlobalVariable.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/include/llvm/GlobalVariable.h diff -u llvm/include/llvm/GlobalVariable.h:1.42 llvm/include/llvm/GlobalVariable.h:1.43 --- llvm/include/llvm/GlobalVariable.h:1.42 Mon Apr 16 22:26:42 2007 +++ llvm/include/llvm/GlobalVariable.h Tue Apr 17 13:15:04 2007 @@ -41,8 +41,8 @@ void setNext(GlobalVariable *N) { Next = N; } void setPrev(GlobalVariable *N) { Prev = N; } - bool isConstantGlobal; // Is this a global constant? - bool isThreadLocalSymbol; // Is this symbol "Thread Local"? + bool isConstantGlobal : 1; // Is this a global constant? + bool isThreadLocalSymbol : 1; // Is this symbol "Thread Local"? Use Initializer; public: From sabre at nondot.org Tue Apr 17 13:16:57 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 13:16:57 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/BasicBlock.h Message-ID: <200704171816.l3HIGvo6019998@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: BasicBlock.h updated: 1.67 -> 1.68 --- Log message: make next/prev accessors private --- Diffs of the changes: (+8 -6) BasicBlock.h | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) Index: llvm/include/llvm/BasicBlock.h diff -u llvm/include/llvm/BasicBlock.h:1.67 llvm/include/llvm/BasicBlock.h:1.68 --- llvm/include/llvm/BasicBlock.h:1.67 Tue Apr 17 00:33:04 2007 +++ llvm/include/llvm/BasicBlock.h Tue Apr 17 13:16:39 2007 @@ -82,12 +82,6 @@ const Function *getParent() const { return Parent; } Function *getParent() { return Parent; } - // getNext/Prev - Return the next or previous basic block in the list. - BasicBlock *getNext() { return Next; } - const BasicBlock *getNext() const { return Next; } - BasicBlock *getPrev() { return Prev; } - const BasicBlock *getPrev() const { return Prev; } - /// use_back - Specialize the methods defined in Value, as we know that an /// BasicBlock can only be used by Instructions (specifically PHI and terms). Instruction *use_back() { return cast(*use_begin());} @@ -201,6 +195,14 @@ BasicBlock *Obj = 0; return unsigned(reinterpret_cast(&Obj->InstList)); } + +private: + // getNext/Prev - Return the next or previous basic block in the list. Access + // these with Function::iterator. + BasicBlock *getNext() { return Next; } + const BasicBlock *getNext() const { return Next; } + BasicBlock *getPrev() { return Prev; } + const BasicBlock *getPrev() const { return Prev; } }; inline int From djg at cray.com Tue Apr 17 13:21:53 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 17 Apr 2007 13:21:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LICM.cpp Message-ID: <200704171821.l3HILrqo020112@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LICM.cpp updated: 1.90 -> 1.91 --- Log message: Spell doFinalization right, so that it is a proper virtual override and gets called. --- Diffs of the changes: (+1 -1) LICM.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/LICM.cpp diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.90 llvm/lib/Transforms/Scalar/LICM.cpp:1.91 --- llvm/lib/Transforms/Scalar/LICM.cpp:1.90 Sat Apr 14 18:32:02 2007 +++ llvm/lib/Transforms/Scalar/LICM.cpp Tue Apr 17 13:21:36 2007 @@ -77,7 +77,7 @@ AU.addRequired(); } - bool doFinalize() { + bool doFinalization() { LoopToAliasMap.clear(); return false; } From sabre at nondot.org Tue Apr 17 13:30:58 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 13:30:58 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/GlobalVariable.h Function.h Message-ID: <200704171830.l3HIUw20020388@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: GlobalVariable.h updated: 1.43 -> 1.44 Function.h updated: 1.79 -> 1.80 --- Log message: make getnext/getprev accessors private. --- Diffs of the changes: (+15 -15) Function.h | 18 +++++++++--------- GlobalVariable.h | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) Index: llvm/include/llvm/GlobalVariable.h diff -u llvm/include/llvm/GlobalVariable.h:1.43 llvm/include/llvm/GlobalVariable.h:1.44 --- llvm/include/llvm/GlobalVariable.h:1.43 Tue Apr 17 13:15:04 2007 +++ llvm/include/llvm/GlobalVariable.h Tue Apr 17 13:30:41 2007 @@ -93,12 +93,6 @@ } } - // getNext/Prev - Return the next or previous global variable in the list. - GlobalVariable *getNext() { return Next; } - const GlobalVariable *getNext() const { return Next; } - GlobalVariable *getPrev() { return Prev; } - const GlobalVariable *getPrev() const { return Prev; } - /// If the value is a global constant, its value is immutable throughout the /// runtime execution of the program. Assigning a value into the constant /// leads to undefined behavior. @@ -132,6 +126,12 @@ static inline bool classof(const Value *V) { return V->getValueID() == Value::GlobalVariableVal; } +private: + // getNext/Prev - Return the next or previous global variable in the list. + GlobalVariable *getNext() { return Next; } + const GlobalVariable *getNext() const { return Next; } + GlobalVariable *getPrev() { return Prev; } + const GlobalVariable *getPrev() const { return Prev; } }; } // End llvm namespace Index: llvm/include/llvm/Function.h diff -u llvm/include/llvm/Function.h:1.79 llvm/include/llvm/Function.h:1.80 --- llvm/include/llvm/Function.h:1.79 Tue Apr 17 00:33:04 2007 +++ llvm/include/llvm/Function.h Tue Apr 17 13:30:41 2007 @@ -149,15 +149,6 @@ void eraseFromParent(); - // getNext/Prev - Return the next or previous function in the list. These - // methods should never be used directly, and are only used to implement the - // function list as part of the module. - // - Function *getNext() { return Next; } - const Function *getNext() const { return Next; } - Function *getPrev() { return Prev; } - const Function *getPrev() const { return Prev; } - /// Get the underlying elements of the Function... the basic block list is /// empty for external functions. /// @@ -252,6 +243,15 @@ Function *Obj = 0; return unsigned(reinterpret_cast(&Obj->ArgumentList)); } +private: + // getNext/Prev - Return the next or previous function in the list. These + // methods should never be used directly, and are only used to implement the + // function list as part of the module. + // + Function *getNext() { return Next; } + const Function *getNext() const { return Next; } + Function *getPrev() { return Prev; } + const Function *getPrev() const { return Prev; } }; inline ValueSymbolTable * From sabre at nondot.org Tue Apr 17 13:42:00 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 13:42:00 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/ilist Message-ID: <200704171842.l3HIg0h4020862@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: ilist updated: 1.26 -> 1.27 --- Log message: Commit an patch from Gabor Greif in Mar 2005. This eliminates the tail pointer from ilist, storing it in the prev pointer of the first node in the list instead. This shrinks ilist from 8 to 4 bytes, BasicBlock from 40->36 bytes, Function from 76->68 bytes, Module from 52->44 bytes. --- Diffs of the changes: (+37 -18) ilist | 55 +++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 37 insertions(+), 18 deletions(-) Index: llvm/include/llvm/ADT/ilist diff -u llvm/include/llvm/ADT/ilist:1.26 llvm/include/llvm/ADT/ilist:1.27 --- llvm/include/llvm/ADT/ilist:1.26 Wed Jun 15 13:28:44 2005 +++ llvm/include/llvm/ADT/ilist Tue Apr 17 13:41:42 2007 @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // This file defines classes to implement an intrusive doubly linked list class -// (ie each node of the list must contain a next and previous field for the +// (i.e. each node of the list must contain a next and previous field for the // list. // // The ilist_traits trait class is used to gain access to the next and previous @@ -22,7 +22,7 @@ // really want to know if it's empty. // // The ilist class is implemented by allocating a 'tail' node when the list is -// created (using ilist_traits<>::createEndMarker()). This tail node is +// created (using ilist_traits<>::createSentinel()). This tail node is // absolutely required because the user must be able to compute end()-1. Because // of this, users of the direct next/prev links will see an extra link on the // end of the list, which should be ignored. @@ -134,7 +134,7 @@ // Increment and decrement operators... ilist_iterator &operator--() { // predecrement - Back up NodePtr = Traits::getPrev(NodePtr); - assert(NodePtr && "--'d off the beginning of an ilist!"); + assert(Traits::getNext(NodePtr) && "--'d off the beginning of an ilist!"); return *this; } ilist_iterator &operator++() { // preincrement - Advance @@ -213,12 +213,20 @@ //===----------------------------------------------------------------------===// // // iplist - The subset of list functionality that can safely be used on nodes of -// polymorphic types, ie a heterogeneus list with a common base class that holds -// the next/prev pointers... +// polymorphic types, i.e. a heterogenous list with a common base class that +// holds the next/prev pointers... // template > class iplist : public Traits { - NodeTy *Head, *Tail; + NodeTy *Head; + + // Use the prev node pointer of 'head' as the tail pointer. This is really a + // circularly linked list where we snip the 'next' link from the sentinel node + // back to the first node in the list (to preserve assertions about going off + // the end of the list). + NodeTy *getTail() { return getPrev(Head); } + const NodeTy *getTail() const { return getPrev(Head); } + void setTail(NodeTy *N) { setPrev(Head, N); } static bool op_less(NodeTy &L, NodeTy &R) { return L < R; } static bool op_equal(NodeTy &L, NodeTy &R) { return L == R; } @@ -235,28 +243,28 @@ typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; - iplist() : Head(Traits::createSentinel()), Tail(Head) { + iplist() : Head(Traits::createSentinel()) { setNext(Head, 0); - setPrev(Head, 0); + setTail(Head); } - ~iplist() { clear(); Traits::destroySentinel(Tail); } + ~iplist() { clear(); Traits::destroySentinel(getTail()); } // Iterator creation methods. iterator begin() { return iterator(Head); } const_iterator begin() const { return const_iterator(Head); } - iterator end() { return iterator(Tail); } - const_iterator end() const { return const_iterator(Tail); } + iterator end() { return iterator(getTail()); } + const_iterator end() const { return const_iterator(getTail()); } // reverse iterator creation methods. reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const {return const_reverse_iterator(begin());} + const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } // Miscellaneous inspection routines. size_type max_size() const { return size_type(-1); } - bool empty() const { return Head == Tail; } + bool empty() const { return Head == getTail(); } // Front and back accessor functions... reference front() { @@ -269,17 +277,16 @@ } reference back() { assert(!empty() && "Called back() on empty list!"); - return *getPrev(Tail); + return *getPrev(getTail()); } const_reference back() const { assert(!empty() && "Called back() on empty list!"); - return *getPrev(Tail); + return *getPrev(getTail()); } void swap(iplist &RHS) { abort(); // Swap does not use list traits callback correctly yet! std::swap(Head, RHS.Head); - std::swap(Tail, RHS.Tail); } iterator insert(iterator where, NodeTy *New) { @@ -287,7 +294,7 @@ setNext(New, CurNode); setPrev(New, PrevNode); - if (PrevNode) + if (CurNode != Head) // Is PrevNode off the beginning of the list? setNext(PrevNode, New); else Head = New; @@ -303,7 +310,7 @@ NodeTy *NextNode = getNext(Node); NodeTy *PrevNode = getPrev(Node); - if (PrevNode) + if (Node != Head) // Is PrevNode off the beginning of the list? setNext(PrevNode, NextNode); else Head = NextNode; @@ -331,7 +338,15 @@ // void transfer(iterator position, iplist &L2, iterator first, iterator last) { assert(first != last && "Should be checked by callers"); + if (position != last) { + // Note: we have to be careful about the case when we move the first node + // in the list. This node is the list sentinel node and we can't move it. + NodeTy *ThisSentinel = getTail(); + setTail(0); + NodeTy *L2Sentinel = L2.getTail(); + L2.setTail(0); + // Remove [first, last) from its old position. NodeTy *First = &*first, *Prev = getPrev(First); NodeTy *Next = last.getNodePtrUnchecked(), *Last = getPrev(Next); @@ -357,6 +372,10 @@ setPrev(PosNext, Last); transferNodesFromList(L2, First, PosNext); + + // Now that everything is set, restore the pointers to the list sentinals. + L2.setTail(L2Sentinel); + setTail(ThisSentinel); } } From sabre at nondot.org Tue Apr 17 14:03:20 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 14:03:20 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/sign_ext_inreg1.ll Message-ID: <200704171903.l3HJ3Ku5021651@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: sign_ext_inreg1.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+12 -0) sign_ext_inreg1.ll | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/test/CodeGen/PowerPC/sign_ext_inreg1.ll diff -c /dev/null llvm/test/CodeGen/PowerPC/sign_ext_inreg1.ll:1.1 *** /dev/null Tue Apr 17 14:03:12 2007 --- llvm/test/CodeGen/PowerPC/sign_ext_inreg1.ll Tue Apr 17 14:03:02 2007 *************** *** 0 **** --- 1,12 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 | grep srwi + ; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwimi + + define i32 @baz(i64 %a) { + %tmp29 = lshr i64 %a, 24 ; [#uses=1] + %tmp23 = trunc i64 %tmp29 to i32 ; [#uses=1] + %tmp410 = lshr i32 %tmp23, 9 ; [#uses=1] + %tmp45 = trunc i32 %tmp410 to i16 ; [#uses=1] + %tmp456 = sext i16 %tmp45 to i32 ; [#uses=1] + ret i32 %tmp456 + } + From sabre at nondot.org Tue Apr 17 14:03:39 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 14:03:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200704171903.l3HJ3d2p021674@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.290 -> 1.291 --- Log message: SIGN_EXTEND_INREG does not demand its top bits. Give SimplifyDemandedBits a chance to hack on it. This compiles: int baz(long long a) { return (short)(((int)(a >>24)) >> 9); } into: _baz: slwi r2, r3, 8 srwi r2, r2, 9 extsh r3, r2 blr instead of: _baz: srwi r2, r4, 24 rlwimi r2, r3, 8, 0, 23 srwi r2, r2, 9 extsh r3, r2 blr This implements CodeGen/PowerPC/sign_ext_inreg1.ll --- Diffs of the changes: (+6 -1) DAGCombiner.cpp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.290 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.291 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.290 Wed Apr 11 11:51:53 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Apr 17 14:03:21 2007 @@ -2429,10 +2429,15 @@ return DAG.getNode(ISD::SIGN_EXTEND_INREG, VT, N0.getOperand(0), N1); } - // fold (sext_in_reg x) -> (zext_in_reg x) if the sign bit is zero + // fold (sext_in_reg x) -> (zext_in_reg x) if the sign bit is known zero. if (TLI.MaskedValueIsZero(N0, 1ULL << (EVTBits-1))) return DAG.getZeroExtendInReg(N0, EVT); + // fold operands of sext_in_reg based on knowledge that the top bits are not + // demanded. + if (SimplifyDemandedBits(SDOperand(N, 0))) + return SDOperand(N, 0); + // fold (sext_in_reg (load x)) -> (smaller sextload x) // fold (sext_in_reg (srl (load x), c)) -> (smaller sextload (x+c/evtbits)) SDOperand NarrowLoad = ReduceLoadWidth(N); From asl at math.spbu.ru Tue Apr 17 14:34:17 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 17 Apr 2007 14:34:17 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200704171934.l3HJYHHO022401@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.392 -> 1.393 --- Log message: Add comment --- Diffs of the changes: (+9 -0) X86ISelLowering.cpp | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.392 llvm/lib/Target/X86/X86ISelLowering.cpp:1.393 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.392 Tue Apr 17 12:21:52 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Apr 17 14:34:00 2007 @@ -3406,8 +3406,17 @@ } } + +// Lower dynamic stack allocation to _alloca call for Cygwin/Mingw targets. +// Calls to _alloca is needed to probe the stack when allocating more than 4k +// bytes in one go. Touching the stack at 4K increments is necessary to ensure +// that the guard pages used by the OS virtual memory manager are allocated in +// correct sequence. SDOperand X86TargetLowering::LowerDYNAMIC_STACKALLOC(SDOperand Op, SelectionDAG &DAG) { + assert(Subtarget->isTargetCygMing() && + "This should be used only on Cygwin/Mingw targets"); + // Get the inputs. SDOperand Chain = Op.getOperand(0); SDOperand Size = Op.getOperand(1); From clattner at apple.com Tue Apr 17 15:07:30 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 17 Apr 2007 13:07:30 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp In-Reply-To: <200704171934.l3HJYHHO022401@zion.cs.uiuc.edu> References: <200704171934.l3HJYHHO022401@zion.cs.uiuc.edu> Message-ID: Thanks Anton! On Apr 17, 2007, at 12:34 PM, Anton Korobeynikov wrote: > > > Changes in directory llvm/lib/Target/X86: > > X86ISelLowering.cpp updated: 1.392 -> 1.393 > --- > Log message: > > Add comment > > > --- > Diffs of the changes: (+9 -0) > > X86ISelLowering.cpp | 9 +++++++++ > 1 files changed, 9 insertions(+) > > > Index: llvm/lib/Target/X86/X86ISelLowering.cpp > diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.392 llvm/lib/ > Target/X86/X86ISelLowering.cpp:1.393 > --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.392 Tue Apr 17 > 12:21:52 2007 > +++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Apr 17 14:34:00 2007 > @@ -3406,8 +3406,17 @@ > } > } > > + > +// Lower dynamic stack allocation to _alloca call for Cygwin/Mingw > targets. > +// Calls to _alloca is needed to probe the stack when allocating > more than 4k > +// bytes in one go. Touching the stack at 4K increments is > necessary to ensure > +// that the guard pages used by the OS virtual memory manager are > allocated in > +// correct sequence. > SDOperand X86TargetLowering::LowerDYNAMIC_STACKALLOC(SDOperand Op, > SelectionDAG > &DAG) { > + assert(Subtarget->isTargetCygMing() && > + "This should be used only on Cygwin/Mingw targets"); > + > // Get the inputs. > SDOperand Chain = Op.getOperand(0); > SDOperand Size = Op.getOperand(1); > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Tue Apr 17 15:22:29 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 15:22:29 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h Message-ID: <200704172022.l3HKMT1Y023305@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.36 -> 1.37 --- Log message: Keep track of number of uses within the function per virtual register. --- Diffs of the changes: (+5 -1) LiveVariables.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.36 llvm/include/llvm/CodeGen/LiveVariables.h:1.37 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.36 Sat Mar 17 04:29:54 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Tue Apr 17 15:22:11 2007 @@ -83,12 +83,16 @@ /// is a bit set which uses the basic block number as an index. BitVector UsedBlocks; + /// NumUses - Number of uses of this register across the entire function. + /// + unsigned NumUses; + /// Kills - List of MachineInstruction's which are the last use of this /// virtual register (kill it) in their basic block. /// std::vector Kills; - VarInfo() : DefInst(0) {} + VarInfo() : DefInst(0), NumUses(0) {} /// removeKill - Delete a kill corresponding to the specified /// machine instruction. Returns true if there was a kill From evan.cheng at apple.com Tue Apr 17 15:22:31 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 15:22:31 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp Message-ID: <200704172022.l3HKMV1e023312@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveVariables.cpp updated: 1.71 -> 1.72 --- Log message: Keep track of number of uses within the function per virtual register. --- Diffs of the changes: (+1 -0) LiveVariables.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/CodeGen/LiveVariables.cpp diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.71 llvm/lib/CodeGen/LiveVariables.cpp:1.72 --- llvm/lib/CodeGen/LiveVariables.cpp:1.71 Sat Mar 17 04:29:54 2007 +++ llvm/lib/CodeGen/LiveVariables.cpp Tue Apr 17 15:22:11 2007 @@ -141,6 +141,7 @@ unsigned BBNum = MBB->getNumber(); VRInfo.UsedBlocks[BBNum] = true; + VRInfo.NumUses++; // Check to see if this basic block is already a kill block... if (!VRInfo.Kills.empty() && VRInfo.Kills.back()->getParent() == MBB) { From evan.cheng at apple.com Tue Apr 17 15:23:57 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 15:23:57 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h Message-ID: <200704172023.l3HKNvSw023352@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: MRegisterInfo.h updated: 1.102 -> 1.103 --- Log message: Change getAllocatableSet() so it returns allocatable registers for a specific register class. --- Diffs of the changes: (+4 -2) MRegisterInfo.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Target/MRegisterInfo.h diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.102 llvm/include/llvm/Target/MRegisterInfo.h:1.103 --- llvm/include/llvm/Target/MRegisterInfo.h:1.102 Tue Mar 20 03:05:54 2007 +++ llvm/include/llvm/Target/MRegisterInfo.h Tue Apr 17 15:23:34 2007 @@ -241,8 +241,10 @@ } /// getAllocatableSet - Returns a bitset indexed by register number - /// indicating if a register is allocatable or not. - BitVector getAllocatableSet(MachineFunction &MF) const; + /// indicating if a register is allocatable or not. If a register class is + /// specified, returns the subset for the class. + BitVector getAllocatableSet(MachineFunction &MF, + const TargetRegisterClass *RC = NULL) const; const TargetRegisterDesc &operator[](unsigned RegNo) const { assert(RegNo < NumRegs && From evan.cheng at apple.com Tue Apr 17 15:23:57 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 15:23:57 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/MRegisterInfo.cpp Message-ID: <200704172023.l3HKNvGb023357@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: MRegisterInfo.cpp updated: 1.22 -> 1.23 --- Log message: Change getAllocatableSet() so it returns allocatable registers for a specific register class. --- Diffs of the changes: (+7 -4) MRegisterInfo.cpp | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) Index: llvm/lib/Target/MRegisterInfo.cpp diff -u llvm/lib/Target/MRegisterInfo.cpp:1.22 llvm/lib/Target/MRegisterInfo.cpp:1.23 --- llvm/lib/Target/MRegisterInfo.cpp:1.22 Mon Feb 19 15:49:53 2007 +++ llvm/lib/Target/MRegisterInfo.cpp Tue Apr 17 15:23:34 2007 @@ -34,13 +34,16 @@ MRegisterInfo::~MRegisterInfo() {} -BitVector MRegisterInfo::getAllocatableSet(MachineFunction &MF) const { +BitVector MRegisterInfo::getAllocatableSet(MachineFunction &MF, + const TargetRegisterClass *RC) const { BitVector Allocatable(NumRegs); for (MRegisterInfo::regclass_iterator I = regclass_begin(), E = regclass_end(); I != E; ++I) { - const TargetRegisterClass *RC = *I; - for (TargetRegisterClass::iterator I = RC->allocation_order_begin(MF), - E = RC->allocation_order_end(MF); I != E; ++I) + const TargetRegisterClass *TRC = *I; + if (RC && TRC != RC) + continue; + for (TargetRegisterClass::iterator I = TRC->allocation_order_begin(MF), + E = TRC->allocation_order_end(MF); I != E; ++I) Allocatable.set(*I); } return Allocatable; From evan.cheng at apple.com Tue Apr 17 15:25:32 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 15:25:32 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp Message-ID: <200704172025.l3HKPWdR023395@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveInterval.cpp updated: 1.43 -> 1.44 --- Log message: Add a register allocation preference field; add a method to compute size of a live interval. --- Diffs of the changes: (+9 -0) LiveInterval.cpp | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/lib/CodeGen/LiveInterval.cpp diff -u llvm/lib/CodeGen/LiveInterval.cpp:1.43 llvm/lib/CodeGen/LiveInterval.cpp:1.44 --- llvm/lib/CodeGen/LiveInterval.cpp:1.43 Sat Dec 16 23:15:13 2006 +++ llvm/lib/CodeGen/LiveInterval.cpp Tue Apr 17 15:25:11 2007 @@ -349,6 +349,8 @@ ValueNumberInfo.clear(); ValueNumberInfo.append(NewValueNumberInfo.begin(), NewValueNumberInfo.end()); weight += Other.weight; + if (Other.preference && !preference) + preference = Other.preference; } /// MergeRangesInAsValue - Merge all of the intervals in RHS into this live @@ -467,6 +469,13 @@ } } +unsigned LiveInterval::getSize() const { + unsigned Sum = 0; + for (const_iterator I = begin(), E = end(); I != E; ++I) + Sum += I->end - I->start; + return Sum; +} + std::ostream& llvm::operator<<(std::ostream& os, const LiveRange &LR) { return os << '[' << LR.start << ',' << LR.end << ':' << LR.ValId << ")"; } From evan.cheng at apple.com Tue Apr 17 15:25:33 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 15:25:33 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveInterval.h Message-ID: <200704172025.l3HKPXJP023400@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: LiveInterval.h updated: 1.35 -> 1.36 --- Log message: Add a register allocation preference field; add a method to compute size of a live interval. --- Diffs of the changes: (+6 -1) LiveInterval.h | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/LiveInterval.h diff -u llvm/include/llvm/CodeGen/LiveInterval.h:1.35 llvm/include/llvm/CodeGen/LiveInterval.h:1.36 --- llvm/include/llvm/CodeGen/LiveInterval.h:1.35 Tue Mar 20 03:13:50 2007 +++ llvm/include/llvm/CodeGen/LiveInterval.h Tue Apr 17 15:25:11 2007 @@ -81,6 +81,7 @@ struct LiveInterval { typedef SmallVector Ranges; unsigned reg; // the register of this interval + unsigned preference; // preferred register to allocate for this interval float weight; // weight of this interval MachineInstr* remat; // definition if the definition rematerializable Ranges ranges; // the ranges in which this register is live @@ -94,7 +95,7 @@ public: LiveInterval(unsigned Reg, float Weight) - : reg(Reg), weight(Weight), remat(NULL) { + : reg(Reg), preference(0), weight(Weight), remat(NULL) { } typedef Ranges::iterator iterator; @@ -256,6 +257,10 @@ removeRange(LR.start, LR.end); } + /// getSize - Returns the sum of sizes of all the LiveRange's. + /// + unsigned getSize() const; + bool operator<(const LiveInterval& other) const { return beginNumber() < other.beginNumber(); } From baldrick at free.fr Tue Apr 17 15:29:07 2007 From: baldrick at free.fr (Duncan Sands) Date: Tue, 17 Apr 2007 22:29:07 +0200 Subject: [llvm-commits] llvm-gcc: fix for PR1332 Message-ID: <200704172229.07950.baldrick@free.fr> The testcase: struct Z { int :1; int :0; int :1; } z; The zero width field causes the second :1 field to start at bit 32. This requires inserting 24 bits of padding. For some obscure reason the padding logic subtracts the number of bits of padding from the new field size before adding it, meaning that it tries to add -23 new bits rather than +1, causing an assertion failure. With the attached patch struct Z converts to %struct.Z = type { i8, [3 x i8], i8 } Lightly tested. Ciao, Duncan. -------------- next part -------------- A non-text attachment was scrubbed... Name: bitstuff.diff Type: text/x-diff Size: 2495 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070417/ef96a0b3/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-03-26-ZeroWidthBitfieldAfterPadding.c Type: text/x-csrc Size: 78 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070417/ef96a0b3/attachment-0001.bin From dpatel at apple.com Tue Apr 17 15:29:29 2007 From: dpatel at apple.com (Devang Patel) Date: Tue, 17 Apr 2007 15:29:29 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c Message-ID: <200704172029.l3HKTTBj023477@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2007-04-17-ZeroSizeBitFields.c added (r1.1) --- Log message: New test case. --- Diffs of the changes: (+4 -0) 2007-04-17-ZeroSizeBitFields.c | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c diff -c /dev/null llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c:1.1 *** /dev/null Tue Apr 17 15:29:22 2007 --- llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c Tue Apr 17 15:29:12 2007 *************** *** 0 **** --- 1,4 ---- + ; PR 1332 + ; RUN: %llvmgcc %s -S -o /dev/null + + struct Z { int a:1; int :0; int c:1; } z; From dpatel at apple.com Tue Apr 17 15:29:12 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Tue, 17 Apr 2007 13:29:12 -0700 (PDT) Subject: [llvm-commits] [126245] Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/ Week-of-Mon-20070416/047943.html Message-ID: <20070417202912.A40AFF24490E@src> Revision: 126245 Author: dpatel Date: 2007-04-17 13:29:12 -0700 (Tue, 17 Apr 2007) Log Message: ----------- Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047943.html Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/llvm-types.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-17 16:28:45 UTC (rev 126244) +++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-17 20:29:12 UTC (rev 126245) @@ -1382,8 +1382,10 @@ Pad = ArrayType::get(Pad, PadBytes); Info.addElement(Pad, FirstUnallocatedByte, PadBytes); FirstUnallocatedByte = StartOffsetInBits/8; - // This field will use some of the bits from this PadBytes. - FieldSizeInBits = FieldSizeInBits - (PadBytes*8 - PadBits); + // This field will use some of the bits from this PadBytes, if + // starting offset is not at byte boundry. + if (StartOffsetFromByteBoundry != 0) + FieldSizeInBits = FieldSizeInBits - (8 - PadBits); } // Now, Field starts at FirstUnallocatedByte and everything is aligned. From evan.cheng at apple.com Tue Apr 17 15:32:48 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 15:32:48 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h Message-ID: <200704172032.l3HKWmRI023560@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: LiveIntervalAnalysis.h updated: 1.77 -> 1.78 --- Log message: Copy coalescing change to prevent a physical register from being pin to a long live interval that has low usage density. 1. Change order of coalescing to join physical registers with virtual registers first before virtual register intervals become too long. 2. Check size and usage density to determine if it's worthwhile to join. 3. If joining is aborted, assign virtual register live interval allocation preference field to the physical register. 4. Register allocator should try to allocate to the preferred register first (if available) to create identify moves that can be eliminated. --- Diffs of the changes: (+6 -2) LiveIntervalAnalysis.h | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.77 llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.78 --- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.77 Mon Apr 2 13:49:18 2007 +++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h Tue Apr 17 15:32:26 2007 @@ -23,6 +23,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/LiveInterval.h" #include "llvm/ADT/BitVector.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IndexedMap.h" namespace llvm { @@ -30,6 +31,7 @@ class LiveVariables; class MRegisterInfo; class TargetInstrInfo; + class TargetRegisterClass; class VirtRegMap; class LiveIntervals : public MachineFunctionPass { @@ -56,6 +58,7 @@ Reg2RegMap r2rMap_; BitVector allocatableRegs_; + DenseMap allocatableRCRegs_; /// JoinedLIs - Keep track which register intervals have been coalesced /// with other intervals. @@ -202,7 +205,7 @@ /// CopyCoallesceInMBB - Coallsece copies in the specified MBB, putting /// copies that cannot yet be coallesced into the "TryAgain" list. void CopyCoallesceInMBB(MachineBasicBlock *MBB, - std::vector &TryAgain); + std::vector &TryAgain, bool PhysOnly = false); /// JoinCopy - Attempt to join intervals corresponding to SrcReg/DstReg, /// which are the src/dst of the copy instruction CopyMI. This returns true @@ -210,7 +213,8 @@ /// to coallesce these this copy, due to register constraints. It returns /// false if it is not currently possible to coallesce this interval, but /// it may be possible if other things get coallesced. - bool JoinCopy(MachineInstr *CopyMI, unsigned SrcReg, unsigned DstReg); + bool JoinCopy(MachineInstr *CopyMI, unsigned SrcReg, unsigned DstReg, + bool PhysOnly = false); /// JoinIntervals - Attempt to join these two intervals. On failure, this /// returns false. Otherwise, if one of the intervals being joined is a From evan.cheng at apple.com Tue Apr 17 15:32:49 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 15:32:49 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp RegAllocLinearScan.cpp Message-ID: <200704172032.l3HKWn7c023567@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.234 -> 1.235 RegAllocLinearScan.cpp updated: 1.142 -> 1.143 --- Log message: Copy coalescing change to prevent a physical register from being pin to a long live interval that has low usage density. 1. Change order of coalescing to join physical registers with virtual registers first before virtual register intervals become too long. 2. Check size and usage density to determine if it's worthwhile to join. 3. If joining is aborted, assign virtual register live interval allocation preference field to the physical register. 4. Register allocator should try to allocate to the preferred register first (if available) to create identify moves that can be eliminated. --- Diffs of the changes: (+98 -86) LiveIntervalAnalysis.cpp | 153 +++++++++++++++++++++++------------------------ RegAllocLinearScan.cpp | 31 ++++++--- 2 files changed, 98 insertions(+), 86 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.234 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.235 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.234 Wed Apr 4 02:40:01 2007 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Apr 17 15:32:26 2007 @@ -30,6 +30,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include @@ -87,8 +88,11 @@ mri_ = tm_->getRegisterInfo(); tii_ = tm_->getInstrInfo(); lv_ = &getAnalysis(); - allocatableRegs_ = mri_->getAllocatableSet(fn); r2rMap_.grow(mf_->getSSARegMap()->getLastVirtReg()); + allocatableRegs_ = mri_->getAllocatableSet(fn); + for (MRegisterInfo::regclass_iterator I = mri_->regclass_begin(), + E = mri_->regclass_end(); I != E; ++I) + allocatableRCRegs_.insert(std::make_pair(*I,mri_->getAllocatableSet(fn, *I))); // Number MachineInstrs and MachineBasicBlocks. // Initialize MBB indexes to a sentinal. @@ -120,10 +124,16 @@ } // Join (coallesce) intervals if requested. - if (EnableJoining) joinIntervals(); + if (EnableJoining) { + joinIntervals(); + DOUT << "********** INTERVALS POST JOINING **********\n"; + for (iterator I = begin(), E = end(); I != E; ++I) { + I->second.print(DOUT, mri_); + DOUT << "\n"; + } + } numIntervalsAfter += getNumIntervals(); - // perform a final pass over the instructions and compute spill // weights, coalesce virtual registers and remove identity moves. @@ -156,6 +166,7 @@ mii = mbbi->erase(mii); ++numPeep; } else { + SmallSet UniqueUses; for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) { const MachineOperand &mop = mii->getOperand(i); if (mop.isRegister() && mop.getReg() && @@ -164,6 +175,10 @@ unsigned reg = rep(mop.getReg()); mii->getOperand(i).setReg(reg); + // Multiple uses of reg by the same instruction. It should not + // contribute to spill weight again. + if (UniqueUses.count(reg) != 0) + continue; LiveInterval &RegInt = getInterval(reg); float w = (mop.isUse()+mop.isDef()) * powf(10.0F, (float)loopDepth); // If the definition instruction is re-materializable, its spill @@ -173,6 +188,7 @@ if (RegInt.remat && !tii_->isLoadFromStackSlot(RegInt.remat, Dummy)) w /= 2; RegInt.weight += w; + UniqueUses.insert(reg); } } ++mii; @@ -188,15 +204,15 @@ // it and hope it will be easier to allocate for this li. if (isZeroLengthInterval(&LI)) LI.weight = HUGE_VALF; - + + // Slightly prefer live interval that has been assigned a preferred reg. + if (LI.preference) + LI.weight *= 1.01F; + // Divide the weight of the interval by its size. This encourages // spilling of intervals that are large and have few uses, and // discourages spilling of small intervals with many uses. - unsigned Size = 0; - for (LiveInterval::iterator II = LI.begin(), E = LI.end(); II != E;++II) - Size += II->end - II->start; - - LI.weight /= Size; + LI.weight /= LI.getSize(); } } @@ -866,14 +882,15 @@ return true; } + /// JoinCopy - Attempt to join intervals corresponding to SrcReg/DstReg, /// which are the src/dst of the copy instruction CopyMI. This returns true /// if the copy was successfully coallesced away, or if it is never possible -/// to coallesce these this copy, due to register constraints. It returns +/// to coallesce this copy, due to register constraints. It returns /// false if it is not currently possible to coallesce this interval, but /// it may be possible if other things get coallesced. bool LiveIntervals::JoinCopy(MachineInstr *CopyMI, - unsigned SrcReg, unsigned DstReg) { + unsigned SrcReg, unsigned DstReg, bool PhysOnly) { DOUT << getInstructionIndex(CopyMI) << '\t' << *CopyMI; // Get representative registers. @@ -886,21 +903,24 @@ return true; // Not coallescable. } + bool SrcIsPhys = MRegisterInfo::isPhysicalRegister(repSrcReg); + bool DstIsPhys = MRegisterInfo::isPhysicalRegister(repDstReg); + if (PhysOnly && !SrcIsPhys && !DstIsPhys) + // Only joining physical registers with virtual registers in this round. + return true; + // If they are both physical registers, we cannot join them. - if (MRegisterInfo::isPhysicalRegister(repSrcReg) && - MRegisterInfo::isPhysicalRegister(repDstReg)) { + if (SrcIsPhys && DstIsPhys) { DOUT << "\tCan not coallesce physregs.\n"; return true; // Not coallescable. } // We only join virtual registers with allocatable physical registers. - if (MRegisterInfo::isPhysicalRegister(repSrcReg) && - !allocatableRegs_[repSrcReg]) { + if (SrcIsPhys && !allocatableRegs_[repSrcReg]) { DOUT << "\tSrc reg is unallocatable physreg.\n"; return true; // Not coallescable. } - if (MRegisterInfo::isPhysicalRegister(repDstReg) && - !allocatableRegs_[repDstReg]) { + if (DstIsPhys && !allocatableRegs_[repDstReg]) { DOUT << "\tDst reg is unallocatable physreg.\n"; return true; // Not coallescable. } @@ -912,17 +932,16 @@ } LiveInterval &SrcInt = getInterval(repSrcReg); - LiveInterval &DestInt = getInterval(repDstReg); - assert(SrcInt.reg == repSrcReg && DestInt.reg == repDstReg && + LiveInterval &DstInt = getInterval(repDstReg); + assert(SrcInt.reg == repSrcReg && DstInt.reg == repDstReg && "Register mapping is horribly broken!"); - + DOUT << "\t\tInspecting "; SrcInt.print(DOUT, mri_); - DOUT << " and "; DestInt.print(DOUT, mri_); + DOUT << " and "; DstInt.print(DOUT, mri_); DOUT << ": "; // Check if it is necessary to propagate "isDead" property before intervals // are joined. - MachineBasicBlock *CopyBB = CopyMI->getParent(); MachineOperand *mopd = CopyMI->findRegisterDefOperand(DstReg); bool isDead = mopd->isDead(); bool isShorten = false; @@ -965,59 +984,32 @@ // virtual register. Once the coalescing is done, it cannot be broken and // these are not spillable! If the destination interval uses are far away, // think twice about coalescing them! - if (!mopd->isDead() && MRegisterInfo::isPhysicalRegister(repSrcReg)) { - // Small function. No need to worry! - unsigned Threshold = allocatableRegs_.count() * 2; - if (r2iMap_.size() <= Threshold) - goto TryJoin; - - LiveVariables::VarInfo& dvi = lv_->getVarInfo(repDstReg); - // Is the value used in the current BB or any immediate successroe BB? - if (dvi.UsedBlocks[CopyBB->getNumber()]) - goto TryJoin; - for (MachineBasicBlock::succ_iterator SI = CopyBB->succ_begin(), - SE = CopyBB->succ_end(); SI != SE; ++SI) { - MachineBasicBlock *SuccMBB = *SI; - if (dvi.UsedBlocks[SuccMBB->getNumber()]) - goto TryJoin; - } - - // Ok, no use in this BB and no use in immediate successor BB's. Be really - // careful now! - // It's only used in one BB, forget about it! - if (dvi.UsedBlocks.count() < 2) { - ++numAborts; - return false; - } - - // Determine whether to allow coalescing based on how far the closest - // use is. - unsigned CopyIdx = getInstructionIndex(CopyMI); - unsigned MinDist = i2miMap_.size() * InstrSlots::NUM; - int UseBBNum = dvi.UsedBlocks.find_first(); - while (UseBBNum != -1) { - MachineBasicBlock *UseBB = mf_->getBlockNumbered(UseBBNum); - unsigned UseIdx = getMBBStartIdx(UseBB); - if (UseIdx > CopyIdx) { - MinDist = std::min(MinDist, UseIdx - CopyIdx); - if (MinDist <= Threshold) - break; - } - UseBBNum = dvi.UsedBlocks.find_next(UseBBNum); - } - if (MinDist > Threshold) { - // Don't do it! + if (!mopd->isDead() && (SrcIsPhys || DstIsPhys)) { + LiveInterval &JoinVInt = SrcIsPhys ? DstInt : SrcInt; + unsigned JoinVReg = SrcIsPhys ? repDstReg : repSrcReg; + unsigned JoinPReg = SrcIsPhys ? repSrcReg : repDstReg; + const TargetRegisterClass *RC = mf_->getSSARegMap()->getRegClass(JoinVReg); + unsigned Threshold = allocatableRCRegs_[RC].count(); + + // If the virtual register live interval is long has it has low use desity, + // do not join them, instead mark the physical register as its allocation + // preference. + unsigned Length = JoinVInt.getSize() / InstrSlots::NUM; + LiveVariables::VarInfo &vi = lv_->getVarInfo(JoinVReg); + if (Length > Threshold && + (((float)vi.NumUses / Length) < (1.0 / Threshold))) { + JoinVInt.preference = JoinPReg; ++numAborts; + DOUT << "\tMay tie down a physical register, abort!\n"; return false; } } -TryJoin: // Okay, attempt to join these two intervals. On failure, this returns false. // Otherwise, if one of the intervals being joined is a physreg, this method - // always canonicalizes DestInt to be it. The output "SrcInt" will not have + // always canonicalizes DstInt to be it. The output "SrcInt" will not have // been modified, so we can use this information below to update aliases. - if (JoinIntervals(DestInt, SrcInt)) { + if (JoinIntervals(DstInt, SrcInt)) { if (isDead) { // Result of the copy is dead. Propagate this property. if (SrcStart == 0) { @@ -1038,14 +1030,14 @@ if (isShorten || isDead) { // Shorten the live interval. - LiveInterval &LiveInInt = (repSrcReg == DestInt.reg) ? DestInt : SrcInt; + LiveInterval &LiveInInt = (repSrcReg == DstInt.reg) ? DstInt : SrcInt; LiveInInt.removeRange(RemoveStart, RemoveEnd); } } else { // Coallescing failed. // If we can eliminate the copy without merging the live ranges, do so now. - if (AdjustCopiesBackFrom(SrcInt, DestInt, CopyMI)) + if (AdjustCopiesBackFrom(SrcInt, DstInt, CopyMI)) return true; // Otherwise, we are unable to join the intervals. @@ -1053,7 +1045,7 @@ return false; } - bool Swapped = repSrcReg == DestInt.reg; + bool Swapped = repSrcReg == DstInt.reg; if (Swapped) std::swap(repSrcReg, repDstReg); assert(MRegisterInfo::isVirtualRegister(repSrcReg) && @@ -1070,9 +1062,10 @@ LiveVariables::VarInfo& dVI = lv_->getVarInfo(repDstReg); LiveVariables::VarInfo& sVI = lv_->getVarInfo(repSrcReg); dVI.UsedBlocks |= sVI.UsedBlocks; + dVI.NumUses += sVI.NumUses; } - DOUT << "\n\t\tJoined. Result = "; DestInt.print(DOUT, mri_); + DOUT << "\n\t\tJoined. Result = "; DstInt.print(DOUT, mri_); DOUT << "\n"; // Remember these liveintervals have been joined. @@ -1082,7 +1075,7 @@ // If the intervals were swapped by Join, swap them back so that the register // mapping (in the r2i map) is correct. - if (Swapped) SrcInt.swap(DestInt); + if (Swapped) SrcInt.swap(DstInt); removeInterval(repSrcReg); r2rMap_[repSrcReg] = repDstReg; @@ -1270,6 +1263,8 @@ // the LHS. LHS.MergeRangesInAsValue(RHS, LHSValNo); LHS.weight += RHS.weight; + if (RHS.preference && !LHS.preference) + LHS.preference = RHS.preference; return true; } @@ -1478,7 +1473,7 @@ void LiveIntervals::CopyCoallesceInMBB(MachineBasicBlock *MBB, - std::vector &TryAgain) { + std::vector &TryAgain, bool PhysOnly) { DOUT << ((Value*)MBB->getBasicBlock())->getName() << ":\n"; for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end(); @@ -1489,7 +1484,7 @@ unsigned SrcReg, DstReg; if (!tii_->isMoveInstr(*Inst, SrcReg, DstReg)) continue; - if (!JoinCopy(Inst, SrcReg, DstReg)) + if (!JoinCopy(Inst, SrcReg, DstReg, PhysOnly)) TryAgain.push_back(getCopyRec(Inst, SrcReg, DstReg)); } } @@ -1512,9 +1507,11 @@ // Otherwise, join intervals in inner loops before other intervals. // Unfortunately we can't just iterate over loop hierarchy here because // there may be more MBB's than BB's. Collect MBB's for sorting. + + // Join intervals in the function prolog first. We want to join physical + // registers with virtual registers before the intervals got too long. std::vector > MBBs; - for (MachineFunction::iterator I = mf_->begin(), E = mf_->end(); - I != E; ++I) + for (MachineFunction::iterator I = mf_->begin(), E = mf_->end(); I != E;++I) MBBs.push_back(std::make_pair(LI.getLoopDepth(I->getBasicBlock()), I)); // Sort by loop depth. @@ -1522,7 +1519,9 @@ // Finally, join intervals in loop nest order. for (unsigned i = 0, e = MBBs.size(); i != e; ++i) - CopyCoallesceInMBB(MBBs[i].second, TryAgainList); + CopyCoallesceInMBB(MBBs[i].second, TryAgainList, true); + for (unsigned i = 0, e = MBBs.size(); i != e; ++i) + CopyCoallesceInMBB(MBBs[i].second, TryAgainList, false); } // Joining intervals can allow other intervals to be joined. Iteratively join Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.142 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.143 --- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.142 Tue Mar 20 03:13:50 2007 +++ llvm/lib/CodeGen/RegAllocLinearScan.cpp Tue Apr 17 15:32:26 2007 @@ -563,15 +563,17 @@ // Find a register to spill. float minWeight = HUGE_VALF; - unsigned minReg = 0; - for (TargetRegisterClass::iterator i = RC->allocation_order_begin(*mf_), - e = RC->allocation_order_end(*mf_); i != e; ++i) { - unsigned reg = *i; - if (minWeight > SpillWeights[reg]) { - minWeight = SpillWeights[reg]; - minReg = reg; + unsigned minReg = cur->preference; // Try the preferred register first. + + if (!minReg || SpillWeights[minReg] == HUGE_VALF) + for (TargetRegisterClass::iterator i = RC->allocation_order_begin(*mf_), + e = RC->allocation_order_end(*mf_); i != e; ++i) { + unsigned reg = *i; + if (minWeight > SpillWeights[reg]) { + minWeight = SpillWeights[reg]; + minReg = reg; + } } - } // If we didn't find a register that is spillable, try aliases? if (!minReg) { @@ -778,7 +780,18 @@ unsigned FreeReg = 0; unsigned FreeRegInactiveCount = 0; - + + // If copy coalescer has assigned a "preferred" register, check if it's + // available first. + if (cur->preference) + if (prt_->isRegAvail(cur->preference)) { + DOUT << "\t\tassigned the preferred register: " + << mri_->getName(cur->preference) << "\n"; + return cur->preference; + } else + DOUT << "\t\tunable to assign the preferred register: " + << mri_->getName(cur->preference) << "\n"; + // Scan for the first available register. TargetRegisterClass::iterator I = rc->allocation_order_begin(*mf_); TargetRegisterClass::iterator E = rc->allocation_order_end(*mf_); From dpatel at apple.com Tue Apr 17 15:36:06 2007 From: dpatel at apple.com (Devang Patel) Date: Tue, 17 Apr 2007 13:36:06 -0700 Subject: [llvm-commits] llvm-gcc: fix for PR1332 In-Reply-To: <200704172229.07950.baldrick@free.fr> References: <200704172229.07950.baldrick@free.fr> Message-ID: On Apr 17, 2007, at 1:29 PM, Duncan Sands wrote: > The testcase: > > struct Z { int :1; int :0; int :1; } z; > > The zero width field causes the second :1 field > to start at bit 32. This requires inserting 24 bits > of padding. For some obscure reason the padding logic > subtracts the number of bits of padding from the new > field size before adding it, meaning that it tries to > add -23 new bits rather than +1, causing an assertion > failure. I just checked in simpler fix. Need to reduce field size only if start of field is not at byte boundary. - Devang > With the attached patch struct Z converts to > %struct.Z = type { i8, [3 x i8], i8 } > Lightly tested. > > Ciao, > > Duncan. -------------- next part -------------- A non-text attachment was scrubbed... Name: bitstuff.diff Type: text/x-diff Size: 2495 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070417/b0011091/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-03-26-ZeroWidthBitfieldAfterPadding.c Type: text/x-csrc Size: 78 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070417/b0011091/attachment-0001.bin -------------- next part -------------- > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From baldrick at free.fr Tue Apr 17 15:42:06 2007 From: baldrick at free.fr (Duncan Sands) Date: Tue, 17 Apr 2007 22:42:06 +0200 Subject: [llvm-commits] [126245] Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/ Week-of-Mon-20070416/047943.html In-Reply-To: <20070417202912.A40AFF24490E@src> References: <20070417202912.A40AFF24490E@src> Message-ID: <200704172242.06347.baldrick@free.fr> Hi Devang, I just posted a fix which fixes some other issues too. A few lines earlier: if (StartOffsetFromByteBoundry != 0) { // New field does not start at byte boundry. PadBits = StartOffsetInBits - (FirstUnallocatedByte*8); PadBytes = PadBits/8 + 1; } PadBytes += StartOffsetInBits/8-FirstUnallocatedByte; If StartOffsetFromByteBoundry != 0, then PadBytes gets added to twice, setting it to 2*PadBits/8 + 1. > Pad = ArrayType::get(Pad, PadBytes); > Info.addElement(Pad, FirstUnallocatedByte, PadBytes); > FirstUnallocatedByte = StartOffsetInBits/8; > - // This field will use some of the bits from this PadBytes. > - FieldSizeInBits = FieldSizeInBits - (PadBytes*8 - PadBits); > + // This field will use some of the bits from this PadBytes, if > + // starting offset is not at byte boundry. > + if (StartOffsetFromByteBoundry != 0) > + FieldSizeInBits = FieldSizeInBits - (8 - PadBits); Here PadBits can be bigger than 8, which will lead to a bad result :) Even if it is less than 8 this can create a negative FieldSizeInBits. For example, if FieldSizeInBits=1, StartOffsetFromByteBoundry=1, then typically PadBits=1, meaning you are setting FieldSizeInBits to -6 here! > } > > // Now, Field starts at FirstUnallocatedByte and everything is aligned. Best wishes, Duncan. From baldrick at free.fr Tue Apr 17 15:50:51 2007 From: baldrick at free.fr (Duncan Sands) Date: Tue, 17 Apr 2007 15:50:51 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c Message-ID: <200704172050.l3HKopbJ023865@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2007-04-17-ZeroSizeBitFields.c updated: 1.1 -> 1.2 --- Log message: Use // not ; since this is C. --- Diffs of the changes: (+2 -2) 2007-04-17-ZeroSizeBitFields.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c diff -u llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c:1.1 llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c:1.2 --- llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c:1.1 Tue Apr 17 15:29:12 2007 +++ llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c Tue Apr 17 15:50:33 2007 @@ -1,4 +1,4 @@ -; PR 1332 -; RUN: %llvmgcc %s -S -o /dev/null +// PR 1332 +// RUN: %llvmgcc %s -S -o /dev/null struct Z { int a:1; int :0; int c:1; } z; From dpatel at apple.com Tue Apr 17 15:57:32 2007 From: dpatel at apple.com (Devang Patel) Date: Tue, 17 Apr 2007 13:57:32 -0700 Subject: [llvm-commits] [126245] Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/ Week-of-Mon-20070416/047943.html In-Reply-To: <200704172242.06347.baldrick@free.fr> References: <20070417202912.A40AFF24490E@src> <200704172242.06347.baldrick@free.fr> Message-ID: Hi, if (StartOffsetInBits > FirstUnallocatedByte*8) is true then (StartOffsetFromByteBoundry == 0) is always true. If so, we could simply this even further. In other words, if we need pad bytes for a new field then it always starts at byte boundary. Can you think of an example where this is not true ? Thanks, - Devang On Apr 17, 2007, at 1:42 PM, Duncan Sands wrote: > Hi Devang, I just posted a fix which fixes some other issues too. > A few lines earlier: > > if (StartOffsetFromByteBoundry != 0) { > // New field does not start at byte boundry. > PadBits = StartOffsetInBits - (FirstUnallocatedByte*8); > PadBytes = PadBits/8 + 1; > } > > PadBytes += StartOffsetInBits/8-FirstUnallocatedByte; > > If StartOffsetFromByteBoundry != 0, then PadBytes gets added to twice, > setting it to 2*PadBits/8 + 1. > >> Pad = ArrayType::get(Pad, PadBytes); >> Info.addElement(Pad, FirstUnallocatedByte, PadBytes); >> FirstUnallocatedByte = StartOffsetInBits/8; >> - // This field will use some of the bits from this PadBytes. >> - FieldSizeInBits = FieldSizeInBits - (PadBytes*8 - PadBits); >> + // This field will use some of the bits from this PadBytes, if >> + // starting offset is not at byte boundry. >> + if (StartOffsetFromByteBoundry != 0) >> + FieldSizeInBits = FieldSizeInBits - (8 - PadBits); > > Here PadBits can be bigger than 8, which will lead to a bad result :) > Even if it is less than 8 this can create a negative FieldSizeInBits. > For example, if FieldSizeInBits=1, StartOffsetFromByteBoundry=1, then > typically PadBits=1, meaning you are setting FieldSizeInBits to -6 > here! > >> } >> >> // Now, Field starts at FirstUnallocatedByte and everything is >> aligned. > > Best wishes, > > Duncan. From sabre at nondot.org Tue Apr 17 16:12:44 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 16:12:44 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/shl_elim.ll Message-ID: <200704172112.l3HLCibH024340@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: shl_elim.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+11 -0) shl_elim.ll | 11 +++++++++++ 1 files changed, 11 insertions(+) Index: llvm/test/CodeGen/PowerPC/shl_elim.ll diff -c /dev/null llvm/test/CodeGen/PowerPC/shl_elim.ll:1.1 *** /dev/null Tue Apr 17 16:12:36 2007 --- llvm/test/CodeGen/PowerPC/shl_elim.ll Tue Apr 17 16:12:26 2007 *************** *** 0 **** --- 1,11 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 | not grep slwi + + define i32 @test1(i64 %a) { + %tmp29 = lshr i64 %a, 24 ; [#uses=1] + %tmp23 = trunc i64 %tmp29 to i32 ; [#uses=1] + %tmp410 = lshr i32 %tmp23, 9 ; [#uses=1] + %tmp45 = trunc i32 %tmp410 to i16 ; [#uses=1] + %tmp456 = sext i16 %tmp45 to i32 ; [#uses=1] + ret i32 %tmp456 + } + From sabre at nondot.org Tue Apr 17 16:14:33 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 16:14:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Message-ID: <200704172114.l3HLEX4i024408@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: TargetLowering.cpp updated: 1.109 -> 1.110 --- Log message: Fold (x << c1)>> c2 into a single shift if the bits shifted out aren't used. This compiles: int baz(long long a) { return (short)(((int)(a >>24)) >> 9); } into: _baz: srwi r2, r3, 1 extsh r3, r2 blr on PPC, instead of: _baz: slwi r2, r3, 8 srwi r2, r2, 9 extsh r3, r2 blr GCC produces: _baz: srwi r10,r4,24 insrwi r10,r3,24,0 srawi r9,r3,24 srawi r3,r10,9 extsh r3,r3 blr This implements CodeGen/PowerPC/shl_elim.ll --- Diffs of the changes: (+52 -5) TargetLowering.cpp | 57 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 52 insertions(+), 5 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.109 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.110 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.109 Mon Apr 16 13:10:22 2007 +++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Apr 17 16:14:16 2007 @@ -563,7 +563,32 @@ break; case ISD::SHL: if (ConstantSDNode *SA = dyn_cast(Op.getOperand(1))) { - if (SimplifyDemandedBits(Op.getOperand(0), DemandedMask >> SA->getValue(), + unsigned ShAmt = SA->getValue(); + SDOperand InOp = Op.getOperand(0); + + // If this is ((X >>u C1) << ShAmt), see if we can simplify this into a + // single shift. We can do this if the bottom bits (which are shifted + // out) are never demanded. + if (InOp.getOpcode() == ISD::SRL && + isa(InOp.getOperand(1))) { + if (ShAmt && (DemandedMask & ((1ULL << ShAmt)-1)) == 0) { + unsigned C1 = cast(InOp.getOperand(1))->getValue(); + unsigned Opc = ISD::SHL; + int Diff = ShAmt-C1; + if (Diff < 0) { + Diff = -Diff; + Opc = ISD::SRL; + } + + SDOperand NewSA = + TLO.DAG.getConstant(ShAmt-C1, Op.getOperand(0).getValueType()); + MVT::ValueType VT = Op.getValueType(); + return TLO.CombineTo(Op, TLO.DAG.getNode(ISD::SRL, VT, + InOp.getOperand(0), NewSA)); + } + } + + if (SimplifyDemandedBits(Op.getOperand(0), DemandedMask >> ShAmt, KnownZero, KnownOne, TLO, Depth+1)) return true; KnownZero <<= SA->getValue(); @@ -575,11 +600,33 @@ if (ConstantSDNode *SA = dyn_cast(Op.getOperand(1))) { MVT::ValueType VT = Op.getValueType(); unsigned ShAmt = SA->getValue(); + uint64_t TypeMask = MVT::getIntVTBitMask(VT); + unsigned VTSize = MVT::getSizeInBits(VT); + SDOperand InOp = Op.getOperand(0); + + // If this is ((X << C1) >>u ShAmt), see if we can simplify this into a + // single shift. We can do this if the top bits (which are shifted out) + // are never demanded. + if (InOp.getOpcode() == ISD::SHL && + isa(InOp.getOperand(1))) { + if (ShAmt && (DemandedMask & (~0ULL << (VTSize-ShAmt))) == 0) { + unsigned C1 = cast(InOp.getOperand(1))->getValue(); + unsigned Opc = ISD::SRL; + int Diff = ShAmt-C1; + if (Diff < 0) { + Diff = -Diff; + Opc = ISD::SHL; + } + + SDOperand NewSA = + TLO.DAG.getConstant(Diff, Op.getOperand(0).getValueType()); + return TLO.CombineTo(Op, TLO.DAG.getNode(Opc, VT, + InOp.getOperand(0), NewSA)); + } + } // Compute the new bits that are at the top now. - uint64_t TypeMask = MVT::getIntVTBitMask(VT); - if (SimplifyDemandedBits(Op.getOperand(0), - (DemandedMask << ShAmt) & TypeMask, + if (SimplifyDemandedBits(InOp, (DemandedMask << ShAmt) & TypeMask, KnownZero, KnownOne, TLO, Depth+1)) return true; assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); @@ -589,7 +636,7 @@ KnownOne >>= ShAmt; uint64_t HighBits = (1ULL << ShAmt)-1; - HighBits <<= MVT::getSizeInBits(VT) - ShAmt; + HighBits <<= VTSize - ShAmt; KnownZero |= HighBits; // High bits known zero. } break; From reid at x10sys.com Tue Apr 17 16:27:44 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 17 Apr 2007 16:27:44 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704172127.l3HLRilB024729@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.110 -> 1.111 --- Log message: Add Calum Wilkie. --- Diffs of the changes: (+4 -3) DevMtgMay2007.html | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.110 llvm-www/DevMtgMay2007.html:1.111 --- llvm-www/DevMtgMay2007.html:1.110 Mon Apr 16 12:00:32 2007 +++ llvm-www/DevMtgMay2007.html Tue Apr 17 16:27:27 2007 @@ -307,13 +307,13 @@ Andrew LenharthUIUC Julien LerougeApple Inc. Nick LewyckyIndependent + Efrem LipkinCoDesign - @@ -332,11 +332,12 @@ +
    Confirmed Attendees
    NameOrganization
    Efrem LipkinCoDesign
    Gabe McArthurIndependent
    Paul McJonesAdobe Systems Incorporated.
    Scott MichelAerospace
    Sarah ThompsonNASA, Ames Research Center
    Bill WendlingApple Inc.
    Marcel WeiherMetaObject
    Calum Wilkie
    Microchip Technology
    -

    Total confirmed: 37

    +

    Total confirmed: 38

    @@ -354,6 +355,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
    Last modified: $Date: 2007/04/16 17:00:32 $ +
    Last modified: $Date: 2007/04/17 21:27:27 $ From dpatel at apple.com Tue Apr 17 16:59:38 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Tue, 17 Apr 2007 14:59:38 -0700 (PDT) Subject: [llvm-commits] [126246] If all struct bitfields are packed then struct is packed. Message-ID: <20070417215938.26B6FF2DAF40@src> Revision: 126246 Author: dpatel Date: 2007-04-17 14:59:37 -0700 (Tue, 17 Apr 2007) Log Message: ----------- If all struct bitfields are packed then struct is packed. This fixes recent SingleSource 2003-05-21-BitFieldHandling.c regression. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/llvm-types.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-17 20:29:12 UTC (rev 126245) +++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-17 21:59:37 UTC (rev 126246) @@ -945,7 +945,7 @@ /// getLLVMType - Return the LLVM type for the specified object. /// const Type *getLLVMType() const { - return StructType::get(Elements, Packed); + return StructType::get(Elements, Packed || AllBitFields); } /// getSizeAsLLVMStruct - Return the size of this struct if it were converted From clattner at apple.com Tue Apr 17 17:10:19 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 17 Apr 2007 15:10:19 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/MRegisterInfo.cpp In-Reply-To: <200704172023.l3HKNvGb023357@zion.cs.uiuc.edu> References: <200704172023.l3HKNvGb023357@zion.cs.uiuc.edu> Message-ID: > MRegisterInfo::~MRegisterInfo() {} > > -BitVector MRegisterInfo::getAllocatableSet(MachineFunction &MF) > const { > +BitVector MRegisterInfo::getAllocatableSet(MachineFunction &MF, > + const > TargetRegisterClass *RC) const { > BitVector Allocatable(NumRegs); > for (MRegisterInfo::regclass_iterator I = regclass_begin(), > E = regclass_end(); I != E; ++I) { > + const TargetRegisterClass *TRC = *I; > + if (RC && TRC != RC) > + continue; If RC is specified, you should just scan it, instead of walking regclass_begin->end to find it. -Chris > + for (TargetRegisterClass::iterator I = TRC- > >allocation_order_begin(MF), > + E = TRC->allocation_order_end(MF); I != E; ++I) > Allocatable.set(*I); > } > return Allocatable; > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Tue Apr 17 17:40:15 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 17:40:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200704172240.l3HMeFEo026084@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.95 -> 1.96 --- Log message: dag combiner just got better at pruning bits. This fixes CodeGen/ARM/rev.ll --- Diffs of the changes: (+1 -1) ARMInstrInfo.td | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.95 llvm/lib/Target/ARM/ARMInstrInfo.td:1.96 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.95 Sun Apr 1 20:30:03 2007 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Tue Apr 17 17:39:58 2007 @@ -982,7 +982,7 @@ "revsh $dst, $src", [(set GPR:$dst, (sext_inreg - (or (srl (and GPR:$src, 0xFFFF), 8), + (or (srl (and GPR:$src, 0xFF00), 8), (shl GPR:$src, 8)), i16))]>, Requires<[IsARM, HasV6]>; From sabre at nondot.org Tue Apr 17 17:53:20 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 17:53:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Message-ID: <200704172253.l3HMrKUN026323@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: TargetLowering.cpp updated: 1.110 -> 1.111 --- Log message: Fix a bug in my previous patch, grabbing the shift amount width from the wrong operand. --- Diffs of the changes: (+2 -2) TargetLowering.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.110 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.111 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.110 Tue Apr 17 16:14:16 2007 +++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Apr 17 17:53:02 2007 @@ -581,7 +581,7 @@ } SDOperand NewSA = - TLO.DAG.getConstant(ShAmt-C1, Op.getOperand(0).getValueType()); + TLO.DAG.getConstant(ShAmt-C1, Op.getOperand(1).getValueType()); MVT::ValueType VT = Op.getValueType(); return TLO.CombineTo(Op, TLO.DAG.getNode(ISD::SRL, VT, InOp.getOperand(0), NewSA)); @@ -619,7 +619,7 @@ } SDOperand NewSA = - TLO.DAG.getConstant(Diff, Op.getOperand(0).getValueType()); + TLO.DAG.getConstant(Diff, Op.getOperand(1).getValueType()); return TLO.CombineTo(Op, TLO.DAG.getNode(Opc, VT, InOp.getOperand(0), NewSA)); } From reid at x10sys.com Tue Apr 17 18:10:38 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 17 Apr 2007 18:10:38 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/bits.h Message-ID: <200704172310.l3HNAcAu026708@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: bits.h added (r1.1) --- Log message: Add a helper header file for these test cases. --- Diffs of the changes: (+89 -0) bits.h | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 89 insertions(+) Index: llvm-test/SingleSource/UnitTests/Integer/bits.h diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/bits.h:1.1 *** /dev/null Tue Apr 17 18:10:30 2007 --- llvm-test/SingleSource/UnitTests/Integer/bits.h Tue Apr 17 18:10:20 2007 *************** *** 0 **** --- 1,89 ---- + //===--- bits.h --- Test The bit_select builtin ---------------------------===// + // + // This file was developed by Reid Spencer and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This header file contains some type and macro definitiosn useful for working + // with bit accurate types and the bitwise builtins + // + //===----------------------------------------------------------------------===// + + #include + #include + + typedef unsigned int __attribute__((bitwidth(1))) Int1; + typedef unsigned int __attribute__((bitwidth(2))) Int2; + typedef unsigned int __attribute__((bitwidth(3))) Int3; + typedef unsigned int __attribute__((bitwidth(4))) Int4; + typedef unsigned int __attribute__((bitwidth(5))) Int5; + typedef unsigned int __attribute__((bitwidth(6))) Int6; + typedef unsigned int __attribute__((bitwidth(7))) Int7; + typedef unsigned int __attribute__((bitwidth(8))) Int8; + typedef unsigned int __attribute__((bitwidth(16))) Int16; + typedef unsigned int __attribute__((bitwidth(17))) Int17; + typedef unsigned int __attribute__((bitwidth(19))) Int19; + typedef unsigned int __attribute__((bitwidth(17))) Int32; + typedef unsigned int __attribute__((bitwidth(36))) Int36; + typedef unsigned int __attribute__((bitwidth(47))) Int47; + typedef unsigned int __attribute__((bitwidth(48))) Int48; + typedef unsigned int __attribute__((bitwidth(64))) Int64; + typedef unsigned int __attribute__((bitwidth(65))) Int65; + typedef unsigned int __attribute__((bitwidth(128))) Int128; + /*typedef unsigned int __attribute__((bitwidth(256))) Int256; */ + + #define bitwidthof(TORV) (__bitwidthof__(typeof(TORV))) + + #define bit_concat(X, Y) ({ \ + unsigned int __attribute__((bitwidth(__bitwidthof__(X)+__bitwidthof__(Y)))) R; \ + typeof(X) X2 = X; \ + typeof(Y) Y2 = Y; \ + __builtin_bit_concat(&R, &X2, &Y2); \ + R; \ + }) + + #define bit_select(Val, Bit) ({ \ + typeof(Val) Val2 = Val; \ + __builtin_bit_select(&Val2, Bit); \ + }) + + #define bit_set(Val, Repl, Bit) ({ \ + typeof(Val) Result = 0; \ + typeof(Val) Val2 = Val; \ + typeof(Repl) Repl2 = Repl; \ + __builtin_bit_set(&Result, &Val2, &Repl, Bit); \ + Result; \ + }) + + + #define part_select(Val, Lo, Hi) ({ \ + typeof(Val) Result = 0; \ + typeof(Val) Val2 = Val; \ + __builtin_bit_part_select(&Result, &Val2, Lo, Hi); \ + Result; \ + }) + + #define part_set(Val, Repl, Lo, Hi) ({ \ + typeof(Val) Result = 0; \ + typeof(Val) Val2 = Val; \ + typeof(Repl) Repl2 = Repl; \ + __builtin_bit_part_set(&Result, &Val2, &Repl2, Lo, Hi); \ + Result; \ + }) + + #define reduce(how, what) { \ + typeof(what) what2 = what; \ + __bulitin_bit_reduce_ ## how(&what2); \ + } + + #define printBits(val) { \ + int bit = bitwidthof(val); \ + for ( ; bit > 0; --bit) { \ + if (bit_select(val, bit-1)) \ + putchar('1'); \ + else \ + putchar('0'); \ + } \ + } + From reid at x10sys.com Tue Apr 17 18:12:54 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 17 Apr 2007 18:12:54 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/bit_concat.c bit_concat_cpp.cpp bit_concat_cpp.reference_output bit_concat.reference_output Message-ID: <200704172312.l3HNCsPZ026756@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: bit_concat.c updated: 1.2 -> 1.3 bit_concat_cpp.cpp updated: 1.1 -> 1.2 bit_concat_cpp.reference_output updated: 1.1 -> 1.2 bit_concat.reference_output updated: 1.2 -> 1.3 --- Log message: Revise this test to use the new header file and to shift before we add so that we don't alway have the low order bit being 0. Update reference output as a consequence of the formula change. --- Diffs of the changes: (+233 -261) bit_concat.c | 40 ++---- bit_concat.reference_output | 172 ++++++++++++++--------------- bit_concat_cpp.cpp | 46 ++----- bit_concat_cpp.reference_output | 236 ++++++++++++++++++++-------------------- 4 files changed, 233 insertions(+), 261 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/bit_concat.c diff -u llvm-test/SingleSource/UnitTests/Integer/bit_concat.c:1.2 llvm-test/SingleSource/UnitTests/Integer/bit_concat.c:1.3 --- llvm-test/SingleSource/UnitTests/Integer/bit_concat.c:1.2 Mon Feb 12 14:57:48 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bit_concat.c Tue Apr 17 18:12:36 2007 @@ -1,4 +1,4 @@ -//===--- part_select.c --- Test The bit_select builtin --------------------===// +//===--- bit_concat.c --- Test The bit_concat builtin --------------------===// // // This file was developed by Reid Spencer and is distributed under the // University of Illinois Open Source License. See LICENSE.TXT for details. @@ -12,28 +12,14 @@ #include #include +#include "bits.h" -typedef unsigned int __attribute__((bitwidth(17))) BitType1; -typedef unsigned int __attribute__((bitwidth(19))) BitType2; -typedef unsigned long long __attribute__((bitwidth(36))) ConcatType; -int numbits1 = 17; -int numbits2 = 19; - -void printBits(ConcatType val, int numbits ) { - int j; - for (j = numbits; j > 0; --j) { - if (__builtin_bit_select(val, j)) - printf("1"); - else - printf("0"); - } -} int main(int argc, char** argv) { - BitType1 X = 0; - BitType2 Y = 0; - ConcatType Z = 0; + Int17 X = 0; + Int19 Y = 0; + Int36 Z = 0; int i, j; int count = (argc > 1 ? atoi(argv[1]) % 128 : 128); @@ -41,21 +27,21 @@ for (i = 0; i < count; i++) { Y = X = 0; - for (j = 0; j < numbits1; j++) { - X += (rand() % 2 == 0 ? 0 : 1); + for (j = 0; j < bitwidthof(Int17); j++) { X <<= 1; + X += (rand() % 2 == 0 ? 0 : 1); } - for (j = 0; j < numbits2; j++) { - Y += (rand() % 2 == 0 ? 0 : 1); + for (j = 0; j < bitwidthof(Int19); j++) { Y <<= 1; + Y += (rand() % 2 == 0 ? 0 : 1); } - Z = __builtin_bit_concat(X, Y); + Z = bit_concat(X, Y); printf("bit_concat("); - printBits(X, numbits1); + printBits(X); printf(","); - printBits(Y, numbits2); + printBits(Y); printf(") = "); - printBits(Z, numbits1 + numbits2); + printBits(Z); printf("\n"); } return 0; Index: llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp diff -u llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp:1.1 llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp:1.2 --- llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp:1.1 Wed Mar 28 11:31:50 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp Tue Apr 17 18:12:36 2007 @@ -12,50 +12,36 @@ #include #include - -typedef unsigned int __attribute__((bitwidth(17))) BitType1; -typedef unsigned int __attribute__((bitwidth(19))) BitType2; -typedef unsigned long long __attribute__((bitwidth(36))) ConcatType; -int numbits1 = 17; -int numbits2 = 19; - -void printBits(ConcatType val, int numbits ) { - int j; - for (j = numbits; j > 0; --j) { - if (__builtin_bit_select(val, j)) - printf("1"); - else - printf("0"); - } -} +#include "bits.h" int main(int argc, char** argv) { - BitType1 X = 0; - BitType2 Y = 0; - ConcatType Z = 0; - int i, j; int count = (argc > 1 ? atoi(argv[1]) % 128 : 128); + Int17 X = 0; + Int19 Y = 0; + Int36 Z = 0; + srand(count); - for (i = 0; i < count; i++) { + for (int i = 0; i < count; i++) { Y = X = 0; - for (j = 0; j < numbits1; j++) { - X += (rand() % 2 == 0 ? 0 : 1); + for (int j = 0; j < bitwidthof(X); j++) { X <<= 1; + X += (rand() % 2 == 0 ? 0 : 1); } - for (j = 0; j < numbits2; j++) { - Y += (rand() % 2 == 0 ? 0 : 1); + for (int j = 0; j < bitwidthof(Y); j++) { Y <<= 1; + Y += (rand() % 2 == 0 ? 0 : 1); } - Z = __builtin_bit_concat(X, Y); + Z = bit_concat(X, Y); printf("bit_concat("); - printBits(X, numbits1); + printBits(X); + printf("(%d),",int(X)); printf(","); - printBits(Y, numbits2); - printf(") = "); - printBits(Z, numbits1 + numbits2); + printBits(Y); + printf("(%d)) = ",int(Y)); + printBits(Z); printf("\n"); } return 0; Index: llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.reference_output diff -u llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.reference_output:1.1 llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.reference_output:1.2 --- llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.reference_output:1.1 Wed Mar 28 11:31:50 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.reference_output Tue Apr 17 18:12:36 2007 @@ -1,119 +1,119 @@ -bit_concat(00111100000001110,0010011010011011100) = 001111000000011100010011010011011100 -bit_concat(01011110001011010,0000001001101010000) = 010111100010110100000001001101010000 -bit_concat(01001100001011000,0101011010000011010) = 010011000010110000101011010000011010 -bit_concat(00000100110101110,0100100011111011011) = 000001001101011100100100011111011011 -bit_concat(01110100110111110,0100100001100001010) = 011101001101111100100100001100001010 -bit_concat(01000010101001000,0000111111111110111) = 010000101010010000000111111111110111 -bit_concat(01111011100100110,0010101010110011100) = 011110111001001100010101010110011100 -bit_concat(00010000001001001,0010001000110010000) = 000100000010010010010001000110010000 -bit_concat(00100011011111010,0001001100100000101) = 001000110111110100001001100100000101 -bit_concat(01010100111100110,0011011011100011010) = 010101001111001100011011011100011010 -bit_concat(01000110110000101,0111101101000001000) = 010001101100001010111101101000001000 -bit_concat(00011011111011110,0010111101101101100) = 000110111110111100010111101101101100 -bit_concat(01010110001001111,0001111000000001010) = 010101100010011110001111000000001010 -bit_concat(00000111000110001,0010010000101101111) = 000001110001100010010010000101101111 -bit_concat(00010000000100100,0000001111010110001) = 000100000001001000000001111010110001 -bit_concat(01111101011001101,0100101101001100010) = 011111010110011010100101101001100010 -bit_concat(00111101010001000,0001101011111101000) = 001111010100010000001101011111101000 -bit_concat(00001001101011000,0111100010110110111) = 000010011010110000111100010110110111 -bit_concat(01011011111011100,0000011100101110100) = 010110111110111000000011100101110100 -bit_concat(01110011101111110,0011101010111100011) = 011100111011111100011101010111100011 -bit_concat(00000011110111000,0100011100101010110) = 000000111101110000100011100101010110 -bit_concat(00001001101111001,0100110101110101100) = 000010011011110010100110101110101100 -bit_concat(00111110010100101,0100011111000000001) = 001111100101001010100011111000000001 -bit_concat(01010000011010000,0111111100100111101) = 010100000110100000111111100100111101 -bit_concat(00101000000100011,0100110101011111010) = 001010000001000110100110101011111010 -bit_concat(01011100111010011,0100001110001010000) = 010111001110100110100001110001010000 -bit_concat(01000101000101001,0100000101001000000) = 010001010001010010100000101001000000 -bit_concat(01111111011111111,0101000000000101011) = 011111110111111110101000000000101011 -bit_concat(00001001110010000,0001010100001100011) = 000010011100100000001010100001100011 -bit_concat(01010111110100001,0001001100101100110) = 010101111101000010001001100101100110 -bit_concat(00011010010100110,0010010100111001010) = 000110100101001100010010100111001010 -bit_concat(00001001010011011,0111100000100000010) = 000010010100110110111100000100000010 -bit_concat(01110000101011100,0010101101110101110) = 011100001010111000010101101110101110 -bit_concat(01001100000101000,0111100100111101100) = 010011000001010000111100100111101100 -bit_concat(00110100001000111,0110101111001001110) = 001101000010001110110101111001001110 -bit_concat(01011100011111010,0011111000011001000) = 010111000111110100011111000011001000 -bit_concat(00001011100101100,0110110110010010110) = 000010111001011000110110110010010110 -bit_concat(01101111001111010,0110011001110101000) = 011011110011110100110011001110101000 -bit_concat(01000111010100000,0100011101001100100) = 010001110101000000100011101001100100 -bit_concat(01110000000001000,0110011101011000010) = 011100000000010000110011101011000010 -bit_concat(01001000100100010,0000100000001000001) = 010010001001000100000100000001000001 -bit_concat(00111011010010001,0011011110110011010) = 001110110100100010011011110110011010 -bit_concat(00101001011011101,0000010011110110110) = 001010010110111010000010011110110110 -bit_concat(00111010111001001,0010010001111101000) = 001110101110010010010010001111101000 -bit_concat(01010110011101101,0000010100000000010) = 010101100111011010000010100000000010 -bit_concat(00101001111110110,0110010010011111000) = 001010011111101100110010010011111000 -bit_concat(00111000011011111,0111101010110110001) = 001110000110111110111101010110110001 -bit_concat(01110100011101010,0011100101000111111) = 011101000111010100011100101000111111 -bit_concat(01100110010000111,0010110100011010110) = 011001100100001110010110100011010110 -bit_concat(00100110101101001,0101111010000010110) = 001001101011010010101111010000010110 -bit_concat(00001011110001110,0001101100100000001) = 000010111100011100001101100100000001 -bit_concat(01100100010010001,0000000001101011111) = 011001000100100010000000001101011111 -bit_concat(01001000001001011,0100011010111010001) = 010010000010010110100011010111010001 -bit_concat(00011111010100100,0100111000100011000) = 000111110101001000100111000100011000 -bit_concat(01110010001010110,0000011100000001111) = 011100100010101100000011100000001111 -bit_concat(00011100111111001,0101100100001110111) = 000111001111110010101100100001110111 -bit_concat(01100011111010101,0000000001010101001) = 011000111110101010000000001010101001 -bit_concat(01111010100001101,0011111001101100011) = 011110101000011010011111001101100011 -bit_concat(01111001111001001,0110000111110101011) = 011110011110010010110000111110101011 -bit_concat(01010001101010110,0011101111100000000) = 010100011010101100011101111100000000 -bit_concat(00100001001001110,0011101000010010010) = 001000010010011100011101000010010010 -bit_concat(00110010111110101,0010011000000000110) = 001100101111101010010011000000000110 -bit_concat(01010111101111011,0010110110110111101) = 010101111011110110010110110110111101 -bit_concat(01001111110011010,0111000011101001000) = 010011111100110100111000011101001000 -bit_concat(01101010110101011,0111001001100101100) = 011010101101010110111001001100101100 -bit_concat(01100111010010100,0100011011001011111) = 011001110100101000100011011001011111 -bit_concat(00011110100101011,0000100001100100111) = 000111101001010110000100001100100111 -bit_concat(00111111010000011,0100110101000101100) = 001111110100000110100110101000101100 -bit_concat(01110010011011010,0010110110000001011) = 011100100110110100010110110000001011 -bit_concat(00001100000000001,0000010111010011000) = 000011000000000010000010111010011000 -bit_concat(00101101101001001,0101010010110000101) = 001011011010010010101010010110000101 -bit_concat(01011111010011001,0010011010100001111) = 010111110100110010010011010100001111 -bit_concat(00011010110011011,0100110110101011000) = 000110101100110110100110110101011000 -bit_concat(01100111011000001,0000011110000011111) = 011001110110000010000011110000011111 -bit_concat(00111011011101111,0000000011101011111) = 001110110111011110000000011101011111 -bit_concat(00010000101111111,0011101011000100110) = 000100001011111110011101011000100110 -bit_concat(00110001010110100,0000101111110000110) = 001100010101101000000101111110000110 -bit_concat(01111010001011100,0111000000110111100) = 011110100010111000111000000110111100 -bit_concat(01111001111100010,0101010011100011101) = 011110011111000100101010011100011101 -bit_concat(00001110111111101,0110000001011100101) = 000011101111111010110000001011100101 -bit_concat(01110100010101000,0001100111101001011) = 011101000101010000001100111101001011 -bit_concat(01111001100100010,0010100001100110001) = 011110011001000100010100001100110001 -bit_concat(00000011110100001,0000111000011111110) = 000000111101000010000111000011111110 -bit_concat(01110100000101100,0101000110011010101) = 011101000001011000101000110011010101 -bit_concat(00110000100110000,0110111000110000110) = 001100001001100000110111000110000110 -bit_concat(00000001001000101,0101110111100100100) = 000000010010001010101110111100100100 -bit_concat(00100111101111100,0101011011100100111) = 001001111011111000101011011100100111 -bit_concat(00010100010111101,0001110100011111110) = 000101000101111010001110100011111110 -bit_concat(01011000011111110,0101100110001000011) = 010110000111111100101100110001000011 -bit_concat(01010100001000011,0001011110101111101) = 010101000010000110001011110101111101 -bit_concat(00100001010010010,0011011000110010011) = 001000010100100100011011000110010011 -bit_concat(01010010111111100,0100111110111000011) = 010100101111111000100111110111000011 -bit_concat(00101010100101100,0110111011100010110) = 001010101001011000110111011100010110 -bit_concat(00001101010101001,0111101100011001010) = 000011010101010010111101100011001010 -bit_concat(01000010110010001,0101100001110001001) = 010000101100100010101100001110001001 -bit_concat(01011000000101010,0001110110011110111) = 010110000001010100001110110011110111 -bit_concat(01101101001001010,0111011100101100001) = 011011010010010100111011100101100001 -bit_concat(00100011110110010,0011001011000000101) = 001000111101100100011001011000000101 -bit_concat(01001010011001110,0101001001110001000) = 010010100110011100101001001110001000 -bit_concat(01110010010011001,0001110111111111001) = 011100100100110010001110111111111001 -bit_concat(00011010110010000,0110001101001011000) = 000110101100100000110001101001011000 -bit_concat(01010110100111101,0111010011110011000) = 010101101001111010111010011110011000 -bit_concat(00010001011111001,0011011010111111101) = 000100010111110010011011010111111101 -bit_concat(00000011101000010,0000111010100001001) = 000000111010000100000111010100001001 -bit_concat(00010100101110111,0010100101001111101) = 000101001011101110010100101001111101 -bit_concat(00100101110001100,0111001110111001000) = 001001011100011000111001110111001000 -bit_concat(00100000111100010,0010101011111100100) = 001000001111000100010101011111100100 -bit_concat(00001111110100101,0110011101111101000) = 000011111101001010110011101111101000 -bit_concat(01111101011110110,0110010000101000111) = 011111010111101100110010000101000111 -bit_concat(01011100111110101,0010001101000111000) = 010111001111101010010001101000111000 -bit_concat(00010001011111000,0111011010110001011) = 000100010111110000111011010110001011 -bit_concat(00011001111100110,0101110011100000010) = 000110011111001100101110011100000010 -bit_concat(00101011000011001,0111001001101111010) = 001010110000110010111001001101111010 -bit_concat(00101100100011101,0101111000101100001) = 001011001000111010101111000101100001 -bit_concat(00100101110001010,0101111101101001101) = 001001011100010100101111101101001101 -bit_concat(01110101000101111,0101010010100101000) = 011101010001011110101010010100101000 -bit_concat(00110100100011001,0010010100000010101) = 001101001000110010010010100000010101 -bit_concat(01101100000011111,0100110011010101100) = 011011000000111110100110011010101100 +bit_concat(00111100000001110(30734),,1010011010011011100(341212)) = 001111000000011101010011010011011100 +bit_concat(11011110001011010(113754),,1000001001101010000(267088)) = 110111100010110101000001001101010000 +bit_concat(11001100001011000(104536),,1101011010000011010(439322)) = 110011000010110001101011010000011010 +bit_concat(10000100110101110(68014),,0100100011111011011(149467)) = 100001001101011100100100011111011011 +bit_concat(01110100110111110(59838),,1100100001100001010(410378)) = 011101001101111101100100001100001010 +bit_concat(11000010101001000(99656),,0000111111111110111(32759)) = 110000101010010000000111111111110111 +bit_concat(01111011100100110(63270),,0010101010110011100(87452)) = 011110111001001100010101010110011100 +bit_concat(10010000001001001(73801),,0010001000110010000(70032)) = 100100000010010010010001000110010000 +bit_concat(00100011011111010(18170),,1001001100100000101(301317)) = 001000110111110101001001100100000101 +bit_concat(11010100111100110(109030),,1011011011100011010(374554)) = 110101001111001101011011011100011010 +bit_concat(11000110110000101(101765),,0111101101000001000(252424)) = 110001101100001010111101101000001000 +bit_concat(00011011111011110(14302),,0010111101101101100(97132)) = 000110111110111100010111101101101100 +bit_concat(01010110001001111(44111),,1001111000000001010(323594)) = 010101100010011111001111000000001010 +bit_concat(00000111000110001(3633),,1010010000101101111(336239)) = 000001110001100011010010000101101111 +bit_concat(00010000000100100(8228),,0000001111010110001(7857)) = 000100000001001000000001111010110001 +bit_concat(01111101011001101(64205),,1100101101001100010(416354)) = 011111010110011011100101101001100010 +bit_concat(10111101010001000(96904),,1001101011111101000(317416)) = 101111010100010001001101011111101000 +bit_concat(10001001101011000(70488),,0111100010110110111(247223)) = 100010011010110000111100010110110111 +bit_concat(11011011111011100(112604),,1000011100101110100(276852)) = 110110111110111001000011100101110100 +bit_concat(11110011101111110(124798),,0011101010111100011(120291)) = 111100111011111100011101010111100011 +bit_concat(00000011110111000(1976),,1100011100101010110(407894)) = 000000111101110001100011100101010110 +bit_concat(10001001101111001(70521),,1100110101110101100(420780)) = 100010011011110011100110101110101100 +bit_concat(00111110010100101(31909),,0100011111000000001(146945)) = 001111100101001010100011111000000001 +bit_concat(11010000011010000(106704),,0111111100100111101(260413)) = 110100000110100000111111100100111101 +bit_concat(10101000000100011(86051),,0100110101011111010(158458)) = 101010000001000110100110101011111010 +bit_concat(11011100111010011(113107),,1100001110001010000(400464)) = 110111001110100111100001110001010000 +bit_concat(11000101000101001(100905),,0100000101001000000(133696)) = 110001010001010010100000101001000000 +bit_concat(11111111011111111(130815),,1101000000000101011(426027)) = 111111110111111111101000000000101011 +bit_concat(00001001110010000(5008),,1001010100001100011(305251)) = 000010011100100001001010100001100011 +bit_concat(01010111110100001(44961),,1001001100101100110(301414)) = 010101111101000011001001100101100110 +bit_concat(00011010010100110(13478),,0010010100111001010(76234)) = 000110100101001100010010100111001010 +bit_concat(00001001010011011(4763),,1111100000100000010(508162)) = 000010010100110111111100000100000010 +bit_concat(11110000101011100(123228),,0010101101110101110(89006)) = 111100001010111000010101101110101110 +bit_concat(11001100000101000(104488),,0111100100111101100(248300)) = 110011000001010000111100100111101100 +bit_concat(00110100001000111(26695),,0110101111001001110(220750)) = 001101000010001110110101111001001110 +bit_concat(11011100011111010(112890),,0011111000011001000(127176)) = 110111000111110100011111000011001000 +bit_concat(00001011100101100(5932),,0110110110010010110(224406)) = 000010111001011000110110110010010110 +bit_concat(11101111001111010(122490),,1110011001110101000(471976)) = 111011110011110101110011001110101000 +bit_concat(11000111010100000(102048),,0100011101001100100(146020)) = 110001110101000000100011101001100100 +bit_concat(01110000000001000(57352),,0110011101011000010(211650)) = 011100000000010000110011101011000010 +bit_concat(01001000100100010(37154),,0000100000001000001(16449)) = 010010001001000100000100000001000001 +bit_concat(00111011010010001(30353),,0011011110110011010(114074)) = 001110110100100010011011110110011010 +bit_concat(00101001011011101(21213),,1000010011110110110(272310)) = 001010010110111011000010011110110110 +bit_concat(10111010111001001(95689),,1010010001111101000(336872)) = 101110101110010011010010001111101000 +bit_concat(01010110011101101(44269),,0000010100000000010(10242)) = 010101100111011010000010100000000010 +bit_concat(00101001111110110(21494),,0110010010011111000(206072)) = 001010011111101100110010010011111000 +bit_concat(00111000011011111(28895),,0111101010110110001(251313)) = 001110000110111110111101010110110001 +bit_concat(11110100011101010(125162),,0011100101000111111(117311)) = 111101000111010100011100101000111111 +bit_concat(01100110010000111(52359),,0010110100011010110(92374)) = 011001100100001110010110100011010110 +bit_concat(00100110101101001(19817),,1101111010000010110(455702)) = 001001101011010011101111010000010110 +bit_concat(00001011110001110(6030),,0001101100100000001(55553)) = 000010111100011100001101100100000001 +bit_concat(01100100010010001(51345),,0000000001101011111(863)) = 011001000100100010000000001101011111 +bit_concat(01001000001001011(36939),,0100011010111010001(144849)) = 010010000010010110100011010111010001 +bit_concat(00011111010100100(16036),,0100111000100011000(160024)) = 000111110101001000100111000100011000 +bit_concat(11110010001010110(123990),,0000011100000001111(14351)) = 111100100010101100000011100000001111 +bit_concat(10011100111111001(80377),,1101100100001110111(444535)) = 100111001111110011101100100001110111 +bit_concat(01100011111010101(51157),,1000000001010101001(262825)) = 011000111110101011000000001010101001 +bit_concat(01111010100001101(62733),,1011111001101100011(389987)) = 011110101000011011011111001101100011 +bit_concat(01111001111001001(62409),,1110000111110101011(462763)) = 011110011110010011110000111110101011 +bit_concat(01010001101010110(41814),,0011101111100000000(122624)) = 010100011010101100011101111100000000 +bit_concat(00100001001001110(16974),,0011101000010010010(118930)) = 001000010010011100011101000010010010 +bit_concat(00110010111110101(26101),,1010011000000000110(339974)) = 001100101111101011010011000000000110 +bit_concat(01010111101111011(44923),,0010110110110111101(93629)) = 010101111011110110010110110110111101 +bit_concat(01001111110011010(40858),,1111000011101001000(493384)) = 010011111100110101111000011101001000 +bit_concat(11101010110101011(120235),,0111001001100101100(234284)) = 111010101101010110111001001100101100 +bit_concat(11100111010010100(118420),,0100011011001011111(144991)) = 111001110100101000100011011001011111 +bit_concat(00011110100101011(15659),,1000100001100100111(279335)) = 000111101001010111000100001100100111 +bit_concat(00111111010000011(32387),,0100110101000101100(158252)) = 001111110100000110100110101000101100 +bit_concat(01110010011011010(58586),,1010110110000001011(355339)) = 011100100110110101010110110000001011 +bit_concat(00001100000000001(6145),,1000010111010011000(274072)) = 000011000000000011000010111010011000 +bit_concat(10101101101001001(88905),,1101010010110000101(435589)) = 101011011010010011101010010110000101 +bit_concat(01011111010011001(48793),,1010011010100001111(341263)) = 010111110100110011010011010100001111 +bit_concat(00011010110011011(13723),,1100110110101011000(421208)) = 000110101100110111100110110101011000 +bit_concat(11100111011000001(118465),,1000011110000011111(277535)) = 111001110110000011000011110000011111 +bit_concat(10111011011101111(95983),,1000000011101011111(264031)) = 101110110111011111000000011101011111 +bit_concat(10010000101111111(74111),,0011101011000100110(120358)) = 100100001011111110011101011000100110 +bit_concat(10110001010110100(90804),,1000101111110000110(286598)) = 101100010101101001000101111110000110 +bit_concat(11111010001011100(128092),,1111000000110111100(491964)) = 111110100010111001111000000110111100 +bit_concat(11111001111100010(127970),,0101010011100011101(173853)) = 111110011111000100101010011100011101 +bit_concat(10001110111111101(73213),,1110000001011100101(459493)) = 100011101111111011110000001011100101 +bit_concat(01110100010101000(59560),,0001100111101001011(53067)) = 011101000101010000001100111101001011 +bit_concat(11111001100100010(127778),,0010100001100110001(82737)) = 111110011001000100010100001100110001 +bit_concat(00000011110100001(1953),,0000111000011111110(28926)) = 000000111101000010000111000011111110 +bit_concat(01110100000101100(59436),,1101000110011010101(429269)) = 011101000001011001101000110011010101 +bit_concat(10110000100110000(90416),,0110111000110000110(225670)) = 101100001001100000110111000110000110 +bit_concat(10000001001000101(66117),,1101110111100100100(454436)) = 100000010010001011101110111100100100 +bit_concat(00100111101111100(20348),,0101011011100100111(177959)) = 001001111011111000101011011100100111 +bit_concat(00010100010111101(10429),,0001110100011111110(59646)) = 000101000101111010001110100011111110 +bit_concat(01011000011111110(45310),,0101100110001000011(183363)) = 010110000111111100101100110001000011 +bit_concat(11010100001000011(108611),,0001011110101111101(48509)) = 110101000010000110001011110101111101 +bit_concat(00100001010010010(17042),,1011011000110010011(373139)) = 001000010100100101011011000110010011 +bit_concat(01010010111111100(42492),,0100111110111000011(163267)) = 010100101111111000100111110111000011 +bit_concat(10101010100101100(87340),,0110111011100010110(227094)) = 101010101001011000110111011100010110 +bit_concat(10001101010101001(72361),,1111101100011001010(514250)) = 100011010101010011111101100011001010 +bit_concat(11000010110010001(99729),,0101100001110001001(181129)) = 110000101100100010101100001110001001 +bit_concat(01011000000101010(45098),,0001110110011110111(60663)) = 010110000001010100001110110011110111 +bit_concat(01101101001001010(55882),,0111011100101100001(244065)) = 011011010010010100111011100101100001 +bit_concat(00100011110110010(18354),,1011001011000000101(366085)) = 001000111101100101011001011000000101 +bit_concat(11001010011001110(103630),,0101001001110001000(168840)) = 110010100110011100101001001110001000 +bit_concat(01110010010011001(58521),,0001110111111111001(61433)) = 011100100100110010001110111111111001 +bit_concat(10011010110010000(79248),,1110001101001011000(465496)) = 100110101100100001110001101001011000 +bit_concat(01010110100111101(44349),,1111010011110011000(501656)) = 010101101001111011111010011110011000 +bit_concat(10010001011111001(74489),,0011011010111111101(112125)) = 100100010111110010011011010111111101 +bit_concat(00000011101000010(1858),,1000111010100001001(292105)) = 000000111010000101000111010100001001 +bit_concat(00010100101110111(10615),,1010100101001111101(346749)) = 000101001011101111010100101001111101 +bit_concat(10100101110001100(84876),,1111001110111001000(499144)) = 101001011100011001111001110111001000 +bit_concat(10100000111100010(82402),,0010101011111100100(88036)) = 101000001111000100010101011111100100 +bit_concat(10001111110100101(73637),,1110011101111101000(474088)) = 100011111101001011110011101111101000 +bit_concat(11111101011110110(129782),,0110010000101000111(205127)) = 111111010111101100110010000101000111 +bit_concat(11011100111110101(113141),,0010001101000111000(72248)) = 110111001111101010010001101000111000 +bit_concat(10010001011111000(74488),,1111011010110001011(505227)) = 100100010111110001111011010110001011 +bit_concat(00011001111100110(13286),,0101110011100000010(190210)) = 000110011111001100101110011100000010 +bit_concat(00101011000011001(22041),,1111001001101111010(496506)) = 001010110000110011111001001101111010 +bit_concat(00101100100011101(22813),,1101111000101100001(455009)) = 001011001000111011101111000101100001 +bit_concat(10100101110001010(84874),,1101111101101001101(457549)) = 101001011100010101101111101101001101 +bit_concat(01110101000101111(59951),,1101010010100101000(435496)) = 011101010001011111101010010100101000 +bit_concat(10110100100011001(92441),,1010010100000010101(337941)) = 101101001000110011010010100000010101 +bit_concat(11101100000011111(120863),,0100110011010101100(157356)) = 111011000000111110100110011010101100 exit 0 Index: llvm-test/SingleSource/UnitTests/Integer/bit_concat.reference_output diff -u llvm-test/SingleSource/UnitTests/Integer/bit_concat.reference_output:1.2 llvm-test/SingleSource/UnitTests/Integer/bit_concat.reference_output:1.3 --- llvm-test/SingleSource/UnitTests/Integer/bit_concat.reference_output:1.2 Mon Feb 12 13:07:49 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bit_concat.reference_output Tue Apr 17 18:12:36 2007 @@ -1,119 +1,119 @@ -bit_concat(00111100000001110,0010011010011011100) = 001111000000011100010011010011011100 -bit_concat(01011110001011010,0000001001101010000) = 010111100010110100000001001101010000 -bit_concat(01001100001011000,0101011010000011010) = 010011000010110000101011010000011010 -bit_concat(00000100110101110,0100100011111011011) = 000001001101011100100100011111011011 -bit_concat(01110100110111110,0100100001100001010) = 011101001101111100100100001100001010 -bit_concat(01000010101001000,0000111111111110111) = 010000101010010000000111111111110111 +bit_concat(00111100000001110,1010011010011011100) = 001111000000011101010011010011011100 +bit_concat(11011110001011010,1000001001101010000) = 110111100010110101000001001101010000 +bit_concat(11001100001011000,1101011010000011010) = 110011000010110001101011010000011010 +bit_concat(10000100110101110,0100100011111011011) = 100001001101011100100100011111011011 +bit_concat(01110100110111110,1100100001100001010) = 011101001101111101100100001100001010 +bit_concat(11000010101001000,0000111111111110111) = 110000101010010000000111111111110111 bit_concat(01111011100100110,0010101010110011100) = 011110111001001100010101010110011100 -bit_concat(00010000001001001,0010001000110010000) = 000100000010010010010001000110010000 -bit_concat(00100011011111010,0001001100100000101) = 001000110111110100001001100100000101 -bit_concat(01010100111100110,0011011011100011010) = 010101001111001100011011011100011010 -bit_concat(01000110110000101,0111101101000001000) = 010001101100001010111101101000001000 +bit_concat(10010000001001001,0010001000110010000) = 100100000010010010010001000110010000 +bit_concat(00100011011111010,1001001100100000101) = 001000110111110101001001100100000101 +bit_concat(11010100111100110,1011011011100011010) = 110101001111001101011011011100011010 +bit_concat(11000110110000101,0111101101000001000) = 110001101100001010111101101000001000 bit_concat(00011011111011110,0010111101101101100) = 000110111110111100010111101101101100 -bit_concat(01010110001001111,0001111000000001010) = 010101100010011110001111000000001010 -bit_concat(00000111000110001,0010010000101101111) = 000001110001100010010010000101101111 +bit_concat(01010110001001111,1001111000000001010) = 010101100010011111001111000000001010 +bit_concat(00000111000110001,1010010000101101111) = 000001110001100011010010000101101111 bit_concat(00010000000100100,0000001111010110001) = 000100000001001000000001111010110001 -bit_concat(01111101011001101,0100101101001100010) = 011111010110011010100101101001100010 -bit_concat(00111101010001000,0001101011111101000) = 001111010100010000001101011111101000 -bit_concat(00001001101011000,0111100010110110111) = 000010011010110000111100010110110111 -bit_concat(01011011111011100,0000011100101110100) = 010110111110111000000011100101110100 -bit_concat(01110011101111110,0011101010111100011) = 011100111011111100011101010111100011 -bit_concat(00000011110111000,0100011100101010110) = 000000111101110000100011100101010110 -bit_concat(00001001101111001,0100110101110101100) = 000010011011110010100110101110101100 +bit_concat(01111101011001101,1100101101001100010) = 011111010110011011100101101001100010 +bit_concat(10111101010001000,1001101011111101000) = 101111010100010001001101011111101000 +bit_concat(10001001101011000,0111100010110110111) = 100010011010110000111100010110110111 +bit_concat(11011011111011100,1000011100101110100) = 110110111110111001000011100101110100 +bit_concat(11110011101111110,0011101010111100011) = 111100111011111100011101010111100011 +bit_concat(00000011110111000,1100011100101010110) = 000000111101110001100011100101010110 +bit_concat(10001001101111001,1100110101110101100) = 100010011011110011100110101110101100 bit_concat(00111110010100101,0100011111000000001) = 001111100101001010100011111000000001 -bit_concat(01010000011010000,0111111100100111101) = 010100000110100000111111100100111101 -bit_concat(00101000000100011,0100110101011111010) = 001010000001000110100110101011111010 -bit_concat(01011100111010011,0100001110001010000) = 010111001110100110100001110001010000 -bit_concat(01000101000101001,0100000101001000000) = 010001010001010010100000101001000000 -bit_concat(01111111011111111,0101000000000101011) = 011111110111111110101000000000101011 -bit_concat(00001001110010000,0001010100001100011) = 000010011100100000001010100001100011 -bit_concat(01010111110100001,0001001100101100110) = 010101111101000010001001100101100110 +bit_concat(11010000011010000,0111111100100111101) = 110100000110100000111111100100111101 +bit_concat(10101000000100011,0100110101011111010) = 101010000001000110100110101011111010 +bit_concat(11011100111010011,1100001110001010000) = 110111001110100111100001110001010000 +bit_concat(11000101000101001,0100000101001000000) = 110001010001010010100000101001000000 +bit_concat(11111111011111111,1101000000000101011) = 111111110111111111101000000000101011 +bit_concat(00001001110010000,1001010100001100011) = 000010011100100001001010100001100011 +bit_concat(01010111110100001,1001001100101100110) = 010101111101000011001001100101100110 bit_concat(00011010010100110,0010010100111001010) = 000110100101001100010010100111001010 -bit_concat(00001001010011011,0111100000100000010) = 000010010100110110111100000100000010 -bit_concat(01110000101011100,0010101101110101110) = 011100001010111000010101101110101110 -bit_concat(01001100000101000,0111100100111101100) = 010011000001010000111100100111101100 +bit_concat(00001001010011011,1111100000100000010) = 000010010100110111111100000100000010 +bit_concat(11110000101011100,0010101101110101110) = 111100001010111000010101101110101110 +bit_concat(11001100000101000,0111100100111101100) = 110011000001010000111100100111101100 bit_concat(00110100001000111,0110101111001001110) = 001101000010001110110101111001001110 -bit_concat(01011100011111010,0011111000011001000) = 010111000111110100011111000011001000 +bit_concat(11011100011111010,0011111000011001000) = 110111000111110100011111000011001000 bit_concat(00001011100101100,0110110110010010110) = 000010111001011000110110110010010110 -bit_concat(01101111001111010,0110011001110101000) = 011011110011110100110011001110101000 -bit_concat(01000111010100000,0100011101001100100) = 010001110101000000100011101001100100 +bit_concat(11101111001111010,1110011001110101000) = 111011110011110101110011001110101000 +bit_concat(11000111010100000,0100011101001100100) = 110001110101000000100011101001100100 bit_concat(01110000000001000,0110011101011000010) = 011100000000010000110011101011000010 bit_concat(01001000100100010,0000100000001000001) = 010010001001000100000100000001000001 bit_concat(00111011010010001,0011011110110011010) = 001110110100100010011011110110011010 -bit_concat(00101001011011101,0000010011110110110) = 001010010110111010000010011110110110 -bit_concat(00111010111001001,0010010001111101000) = 001110101110010010010010001111101000 +bit_concat(00101001011011101,1000010011110110110) = 001010010110111011000010011110110110 +bit_concat(10111010111001001,1010010001111101000) = 101110101110010011010010001111101000 bit_concat(01010110011101101,0000010100000000010) = 010101100111011010000010100000000010 bit_concat(00101001111110110,0110010010011111000) = 001010011111101100110010010011111000 bit_concat(00111000011011111,0111101010110110001) = 001110000110111110111101010110110001 -bit_concat(01110100011101010,0011100101000111111) = 011101000111010100011100101000111111 +bit_concat(11110100011101010,0011100101000111111) = 111101000111010100011100101000111111 bit_concat(01100110010000111,0010110100011010110) = 011001100100001110010110100011010110 -bit_concat(00100110101101001,0101111010000010110) = 001001101011010010101111010000010110 +bit_concat(00100110101101001,1101111010000010110) = 001001101011010011101111010000010110 bit_concat(00001011110001110,0001101100100000001) = 000010111100011100001101100100000001 bit_concat(01100100010010001,0000000001101011111) = 011001000100100010000000001101011111 bit_concat(01001000001001011,0100011010111010001) = 010010000010010110100011010111010001 bit_concat(00011111010100100,0100111000100011000) = 000111110101001000100111000100011000 -bit_concat(01110010001010110,0000011100000001111) = 011100100010101100000011100000001111 -bit_concat(00011100111111001,0101100100001110111) = 000111001111110010101100100001110111 -bit_concat(01100011111010101,0000000001010101001) = 011000111110101010000000001010101001 -bit_concat(01111010100001101,0011111001101100011) = 011110101000011010011111001101100011 -bit_concat(01111001111001001,0110000111110101011) = 011110011110010010110000111110101011 +bit_concat(11110010001010110,0000011100000001111) = 111100100010101100000011100000001111 +bit_concat(10011100111111001,1101100100001110111) = 100111001111110011101100100001110111 +bit_concat(01100011111010101,1000000001010101001) = 011000111110101011000000001010101001 +bit_concat(01111010100001101,1011111001101100011) = 011110101000011011011111001101100011 +bit_concat(01111001111001001,1110000111110101011) = 011110011110010011110000111110101011 bit_concat(01010001101010110,0011101111100000000) = 010100011010101100011101111100000000 bit_concat(00100001001001110,0011101000010010010) = 001000010010011100011101000010010010 -bit_concat(00110010111110101,0010011000000000110) = 001100101111101010010011000000000110 +bit_concat(00110010111110101,1010011000000000110) = 001100101111101011010011000000000110 bit_concat(01010111101111011,0010110110110111101) = 010101111011110110010110110110111101 -bit_concat(01001111110011010,0111000011101001000) = 010011111100110100111000011101001000 -bit_concat(01101010110101011,0111001001100101100) = 011010101101010110111001001100101100 -bit_concat(01100111010010100,0100011011001011111) = 011001110100101000100011011001011111 -bit_concat(00011110100101011,0000100001100100111) = 000111101001010110000100001100100111 +bit_concat(01001111110011010,1111000011101001000) = 010011111100110101111000011101001000 +bit_concat(11101010110101011,0111001001100101100) = 111010101101010110111001001100101100 +bit_concat(11100111010010100,0100011011001011111) = 111001110100101000100011011001011111 +bit_concat(00011110100101011,1000100001100100111) = 000111101001010111000100001100100111 bit_concat(00111111010000011,0100110101000101100) = 001111110100000110100110101000101100 -bit_concat(01110010011011010,0010110110000001011) = 011100100110110100010110110000001011 -bit_concat(00001100000000001,0000010111010011000) = 000011000000000010000010111010011000 -bit_concat(00101101101001001,0101010010110000101) = 001011011010010010101010010110000101 -bit_concat(01011111010011001,0010011010100001111) = 010111110100110010010011010100001111 -bit_concat(00011010110011011,0100110110101011000) = 000110101100110110100110110101011000 -bit_concat(01100111011000001,0000011110000011111) = 011001110110000010000011110000011111 -bit_concat(00111011011101111,0000000011101011111) = 001110110111011110000000011101011111 -bit_concat(00010000101111111,0011101011000100110) = 000100001011111110011101011000100110 -bit_concat(00110001010110100,0000101111110000110) = 001100010101101000000101111110000110 -bit_concat(01111010001011100,0111000000110111100) = 011110100010111000111000000110111100 -bit_concat(01111001111100010,0101010011100011101) = 011110011111000100101010011100011101 -bit_concat(00001110111111101,0110000001011100101) = 000011101111111010110000001011100101 +bit_concat(01110010011011010,1010110110000001011) = 011100100110110101010110110000001011 +bit_concat(00001100000000001,1000010111010011000) = 000011000000000011000010111010011000 +bit_concat(10101101101001001,1101010010110000101) = 101011011010010011101010010110000101 +bit_concat(01011111010011001,1010011010100001111) = 010111110100110011010011010100001111 +bit_concat(00011010110011011,1100110110101011000) = 000110101100110111100110110101011000 +bit_concat(11100111011000001,1000011110000011111) = 111001110110000011000011110000011111 +bit_concat(10111011011101111,1000000011101011111) = 101110110111011111000000011101011111 +bit_concat(10010000101111111,0011101011000100110) = 100100001011111110011101011000100110 +bit_concat(10110001010110100,1000101111110000110) = 101100010101101001000101111110000110 +bit_concat(11111010001011100,1111000000110111100) = 111110100010111001111000000110111100 +bit_concat(11111001111100010,0101010011100011101) = 111110011111000100101010011100011101 +bit_concat(10001110111111101,1110000001011100101) = 100011101111111011110000001011100101 bit_concat(01110100010101000,0001100111101001011) = 011101000101010000001100111101001011 -bit_concat(01111001100100010,0010100001100110001) = 011110011001000100010100001100110001 +bit_concat(11111001100100010,0010100001100110001) = 111110011001000100010100001100110001 bit_concat(00000011110100001,0000111000011111110) = 000000111101000010000111000011111110 -bit_concat(01110100000101100,0101000110011010101) = 011101000001011000101000110011010101 -bit_concat(00110000100110000,0110111000110000110) = 001100001001100000110111000110000110 -bit_concat(00000001001000101,0101110111100100100) = 000000010010001010101110111100100100 +bit_concat(01110100000101100,1101000110011010101) = 011101000001011001101000110011010101 +bit_concat(10110000100110000,0110111000110000110) = 101100001001100000110111000110000110 +bit_concat(10000001001000101,1101110111100100100) = 100000010010001011101110111100100100 bit_concat(00100111101111100,0101011011100100111) = 001001111011111000101011011100100111 bit_concat(00010100010111101,0001110100011111110) = 000101000101111010001110100011111110 bit_concat(01011000011111110,0101100110001000011) = 010110000111111100101100110001000011 -bit_concat(01010100001000011,0001011110101111101) = 010101000010000110001011110101111101 -bit_concat(00100001010010010,0011011000110010011) = 001000010100100100011011000110010011 +bit_concat(11010100001000011,0001011110101111101) = 110101000010000110001011110101111101 +bit_concat(00100001010010010,1011011000110010011) = 001000010100100101011011000110010011 bit_concat(01010010111111100,0100111110111000011) = 010100101111111000100111110111000011 -bit_concat(00101010100101100,0110111011100010110) = 001010101001011000110111011100010110 -bit_concat(00001101010101001,0111101100011001010) = 000011010101010010111101100011001010 -bit_concat(01000010110010001,0101100001110001001) = 010000101100100010101100001110001001 +bit_concat(10101010100101100,0110111011100010110) = 101010101001011000110111011100010110 +bit_concat(10001101010101001,1111101100011001010) = 100011010101010011111101100011001010 +bit_concat(11000010110010001,0101100001110001001) = 110000101100100010101100001110001001 bit_concat(01011000000101010,0001110110011110111) = 010110000001010100001110110011110111 bit_concat(01101101001001010,0111011100101100001) = 011011010010010100111011100101100001 -bit_concat(00100011110110010,0011001011000000101) = 001000111101100100011001011000000101 -bit_concat(01001010011001110,0101001001110001000) = 010010100110011100101001001110001000 +bit_concat(00100011110110010,1011001011000000101) = 001000111101100101011001011000000101 +bit_concat(11001010011001110,0101001001110001000) = 110010100110011100101001001110001000 bit_concat(01110010010011001,0001110111111111001) = 011100100100110010001110111111111001 -bit_concat(00011010110010000,0110001101001011000) = 000110101100100000110001101001011000 -bit_concat(01010110100111101,0111010011110011000) = 010101101001111010111010011110011000 -bit_concat(00010001011111001,0011011010111111101) = 000100010111110010011011010111111101 -bit_concat(00000011101000010,0000111010100001001) = 000000111010000100000111010100001001 -bit_concat(00010100101110111,0010100101001111101) = 000101001011101110010100101001111101 -bit_concat(00100101110001100,0111001110111001000) = 001001011100011000111001110111001000 -bit_concat(00100000111100010,0010101011111100100) = 001000001111000100010101011111100100 -bit_concat(00001111110100101,0110011101111101000) = 000011111101001010110011101111101000 -bit_concat(01111101011110110,0110010000101000111) = 011111010111101100110010000101000111 -bit_concat(01011100111110101,0010001101000111000) = 010111001111101010010001101000111000 -bit_concat(00010001011111000,0111011010110001011) = 000100010111110000111011010110001011 +bit_concat(10011010110010000,1110001101001011000) = 100110101100100001110001101001011000 +bit_concat(01010110100111101,1111010011110011000) = 010101101001111011111010011110011000 +bit_concat(10010001011111001,0011011010111111101) = 100100010111110010011011010111111101 +bit_concat(00000011101000010,1000111010100001001) = 000000111010000101000111010100001001 +bit_concat(00010100101110111,1010100101001111101) = 000101001011101111010100101001111101 +bit_concat(10100101110001100,1111001110111001000) = 101001011100011001111001110111001000 +bit_concat(10100000111100010,0010101011111100100) = 101000001111000100010101011111100100 +bit_concat(10001111110100101,1110011101111101000) = 100011111101001011110011101111101000 +bit_concat(11111101011110110,0110010000101000111) = 111111010111101100110010000101000111 +bit_concat(11011100111110101,0010001101000111000) = 110111001111101010010001101000111000 +bit_concat(10010001011111000,1111011010110001011) = 100100010111110001111011010110001011 bit_concat(00011001111100110,0101110011100000010) = 000110011111001100101110011100000010 -bit_concat(00101011000011001,0111001001101111010) = 001010110000110010111001001101111010 -bit_concat(00101100100011101,0101111000101100001) = 001011001000111010101111000101100001 -bit_concat(00100101110001010,0101111101101001101) = 001001011100010100101111101101001101 -bit_concat(01110101000101111,0101010010100101000) = 011101010001011110101010010100101000 -bit_concat(00110100100011001,0010010100000010101) = 001101001000110010010010100000010101 -bit_concat(01101100000011111,0100110011010101100) = 011011000000111110100110011010101100 +bit_concat(00101011000011001,1111001001101111010) = 001010110000110011111001001101111010 +bit_concat(00101100100011101,1101111000101100001) = 001011001000111011101111000101100001 +bit_concat(10100101110001010,1101111101101001101) = 101001011100010101101111101101001101 +bit_concat(01110101000101111,1101010010100101000) = 011101010001011111101010010100101000 +bit_concat(10110100100011001,1010010100000010101) = 101101001000110011010010100000010101 +bit_concat(11101100000011111,0100110011010101100) = 111011000000111110100110011010101100 exit 0 From reid at x10sys.com Tue Apr 17 18:18:25 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 17 Apr 2007 18:18:25 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/bit_select.c Message-ID: <200704172318.l3HNIPOc026869@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: bit_select.c updated: 1.2 -> 1.3 --- Log message: Update to use bits.h --- Diffs of the changes: (+5 -6) bit_select.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/bit_select.c diff -u llvm-test/SingleSource/UnitTests/Integer/bit_select.c:1.2 llvm-test/SingleSource/UnitTests/Integer/bit_select.c:1.3 --- llvm-test/SingleSource/UnitTests/Integer/bit_select.c:1.2 Mon Feb 12 11:52:59 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bit_select.c Tue Apr 17 18:18:07 2007 @@ -11,15 +11,14 @@ //===----------------------------------------------------------------------===// #include +#include #ifdef ENABLE_LARGE_INTEGERS -typedef int __attribute__((bitwidth(250))) BitType; +typedef Int250 BitType; const BitType X = 0xAAAAAAAAAAAAAAAAULL; -int numbits = 250; #else -typedef int __attribute__((bitwidth(47))) BitType; +typedef Int47 BitType; const BitType X = 0xAAAAAAAAAAAAULL; -int numbits = 47; #endif int main(int argc, char** argv) @@ -33,8 +32,8 @@ BitType i; - for (i = numbits-1; i >= 0; --i) { - if (__builtin_bit_select(Y, i)) + for (i = bitwidthof(BitType); i > 0; --i) { + if (bit_select(Y, i-1)) printf("1"); else printf("0"); From evan.cheng at apple.com Tue Apr 17 18:33:56 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 18:33:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/MRegisterInfo.cpp Message-ID: <200704172333.l3HNXuQ4027124@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: MRegisterInfo.cpp updated: 1.23 -> 1.24 --- Log message: Oops. Didn't mean to check in a quick hack. --- Diffs of the changes: (+16 -8) MRegisterInfo.cpp | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) Index: llvm/lib/Target/MRegisterInfo.cpp diff -u llvm/lib/Target/MRegisterInfo.cpp:1.23 llvm/lib/Target/MRegisterInfo.cpp:1.24 --- llvm/lib/Target/MRegisterInfo.cpp:1.23 Tue Apr 17 15:23:34 2007 +++ llvm/lib/Target/MRegisterInfo.cpp Tue Apr 17 18:33:39 2007 @@ -34,18 +34,26 @@ MRegisterInfo::~MRegisterInfo() {} +/// getAllocatableSetForRC - Toggle the bits that represent allocatable +/// registers for the specific register class. +static void getAllocatableSetForRC(MachineFunction &MF, + const TargetRegisterClass *RC, BitVector &R){ + for (TargetRegisterClass::iterator I = RC->allocation_order_begin(MF), + E = RC->allocation_order_end(MF); I != E; ++I) + R.set(*I); +} + BitVector MRegisterInfo::getAllocatableSet(MachineFunction &MF, const TargetRegisterClass *RC) const { BitVector Allocatable(NumRegs); - for (MRegisterInfo::regclass_iterator I = regclass_begin(), - E = regclass_end(); I != E; ++I) { - const TargetRegisterClass *TRC = *I; - if (RC && TRC != RC) - continue; - for (TargetRegisterClass::iterator I = TRC->allocation_order_begin(MF), - E = TRC->allocation_order_end(MF); I != E; ++I) - Allocatable.set(*I); + if (RC) { + getAllocatableSetForRC(MF, RC, Allocatable); + return Allocatable; } + + for (MRegisterInfo::regclass_iterator I = regclass_begin(), + E = regclass_end(); I != E; ++I) + getAllocatableSetForRC(MF, *I, Allocatable); return Allocatable; } From alenhar2 at cs.uiuc.edu Tue Apr 17 18:38:22 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 17 Apr 2007 18:38:22 -0500 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Message-ID: <200704172338.l3HNcMY0027223@zion.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: TransformFunctionBody.cpp updated: 1.62 -> 1.63 --- Log message: Fix --- Diffs of the changes: (+1 -1) TransformFunctionBody.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.62 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.63 --- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.62 Wed Apr 11 12:27:53 2007 +++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Tue Apr 17 18:38:04 2007 @@ -654,7 +654,7 @@ Value *Align = ConstantInt::get(Type::Int32Ty,0); Value* Opts[3] = {ArgVal, ElSize, Align}; new CallInst(PAInfo.PoolInit, Opts, 3,"", TheCall); - new CallInst(PAInfo.PoolDestroy, ArgVal, "", TheCall->getNext()); + new CallInst(PAInfo.PoolDestroy, ArgVal, "", TheCall+1); } //probably need to update DSG // std::cerr << "WARNING: NULL POOL ARGUMENTS ARE PASSED IN!\n"; From alenhar2 at cs.uiuc.edu Tue Apr 17 18:41:29 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 17 Apr 2007 18:41:29 -0500 Subject: [llvm-commits] CVS: llvm-poolalloc/include/dsa/DSGraph.h DSNode.h Message-ID: <200704172341.l3HNfTse027308@zion.cs.uiuc.edu> Changes in directory llvm-poolalloc/include/dsa: DSGraph.h updated: 1.114 -> 1.115 DSNode.h updated: 1.61 -> 1.62 --- Log message: Normalize Flag names and functions, also add a couple informative ones --- Diffs of the changes: (+48 -43) DSGraph.h | 8 ++--- DSNode.h | 83 ++++++++++++++++++++++++++++++++------------------------------ 2 files changed, 48 insertions(+), 43 deletions(-) Index: llvm-poolalloc/include/dsa/DSGraph.h diff -u llvm-poolalloc/include/dsa/DSGraph.h:1.114 llvm-poolalloc/include/dsa/DSGraph.h:1.115 --- llvm-poolalloc/include/dsa/DSGraph.h:1.114 Wed Apr 11 12:37:43 2007 +++ llvm-poolalloc/include/dsa/DSGraph.h Tue Apr 17 18:41:06 2007 @@ -415,7 +415,7 @@ for (node_iterator I = node_begin(), E = node_end(); I != E; ++I) I->maskNodeTypes(Mask); } - void maskIncompleteMarkers() { maskNodeTypes(~DSNode::Incomplete); } + void maskIncompleteMarkers() { maskNodeTypes(~DSNode::IncompleteNode); } // markIncompleteNodes - Traverse the graph, identifying nodes that may be // modified by other functions that have not been resolved yet. This marks @@ -564,13 +564,13 @@ ReachabilityCloner(DSGraph &dest, const DSGraph &src, unsigned cloneFlags) : Dest(dest), Src(src), CloneFlags(cloneFlags) { assert(&Dest != &Src && "Cannot clone from graph to same graph!"); - BitsToKeep = ~DSNode::DEAD; + BitsToKeep = ~DSNode::DeadNode; if (CloneFlags & DSGraph::StripAllocaBit) BitsToKeep &= ~DSNode::AllocaNode; if (CloneFlags & DSGraph::StripModRefBits) - BitsToKeep &= ~(DSNode::Modified | DSNode::Read); + BitsToKeep &= ~(DSNode::ModifiedNode | DSNode::ReadNode); if (CloneFlags & DSGraph::StripIncompleteBit) - BitsToKeep &= ~DSNode::Incomplete; + BitsToKeep &= ~DSNode::IncompleteNode; } DSNodeHandle getClonedNH(const DSNodeHandle &SrcNH); Index: llvm-poolalloc/include/dsa/DSNode.h diff -u llvm-poolalloc/include/dsa/DSNode.h:1.61 llvm-poolalloc/include/dsa/DSNode.h:1.62 --- llvm-poolalloc/include/dsa/DSNode.h:1.61 Wed Dec 13 23:51:06 2006 +++ llvm-poolalloc/include/dsa/DSNode.h Tue Apr 17 18:41:06 2007 @@ -80,20 +80,23 @@ DSNode(const DSNode &); // DO NOT IMPLEMENT public: enum NodeTy { - ShadowNode = 0, // Nothing is known about this node... - AllocaNode = 1 << 0, // This node was allocated with alloca - HeapNode = 1 << 1, // This node was allocated with malloc - GlobalNode = 1 << 2, // This node was allocated by a global var decl - UnknownNode = 1 << 3, // This node points to unknown allocated memory - Incomplete = 1 << 4, // This node may not be complete + ShadowNode = 0, // Nothing is known about this node... + AllocaNode = 1 << 0, // This node was allocated with alloca + HeapNode = 1 << 1, // This node was allocated with malloc + GlobalNode = 1 << 2, // This node was allocated by a global var decl + UnknownNode = 1 << 3, // This node points to unknown allocated memory + IncompleteNode = 1 << 4, // This node may not be complete + + ModifiedNode = 1 << 5, // This node is modified in this context + ReadNode = 1 << 6, // This node is read in this context + + ArrayNode = 1 << 7, // This node is treated like an array + ExternalNode = 1 << 8, // This node comes from an external source + IntToPtrNode = 1 << 9, // This node comes from an int cast + PtrToIntNode = 1 << 10, // This node excapes to an int cast - Modified = 1 << 5, // This node is modified in this context - Read = 1 << 6, // This node is read in this context - - Array = 1 << 7, // This node is treated like an array - External = 1 << 8, // This node comes from an external source //#ifndef NDEBUG - DEAD = 1 << 9, // This node is dead and should not be pointed to + DeadNode = 1 << 11, // This node is dead and should not be pointed to //#endif Composition = AllocaNode | HeapNode | GlobalNode | UnknownNode @@ -147,7 +150,7 @@ /// const Type *getType() const { return Ty; } - bool isArray() const { return NodeType & Array; } + bool isArray() const { return NodeType & ArrayNode; } /// hasNoReferrers - Return true if nothing is pointing to this node at all. /// @@ -332,36 +335,38 @@ /// getNodeFlags - Return all of the flags set on the node. If the DEAD flag /// is set, hide it from the caller. /// - unsigned getNodeFlags() const { return NodeType & ~DEAD; } + unsigned getNodeFlags() const { return NodeType & ~DeadNode; } - bool isAllocaNode() const { return NodeType & AllocaNode; } - bool isHeapNode() const { return NodeType & HeapNode; } - bool isGlobalNode() const { return NodeType & GlobalNode; } - bool isUnknownNode() const { return NodeType & UnknownNode; } - - bool isModified() const { return NodeType & Modified; } - bool isRead() const { return NodeType & Read; } - - bool isIncomplete() const { return NodeType & Incomplete; } - bool isComplete() const { return !isIncomplete(); } - bool isDeadNode() const { return NodeType & DEAD; } - bool isExternalNode() const { return NodeType & External; } - - DSNode *setAllocaNodeMarker() { NodeType |= AllocaNode; return this; } - DSNode *setHeapNodeMarker() { NodeType |= HeapNode; return this; } - DSNode *setGlobalNodeMarker() { NodeType |= GlobalNode; return this; } - DSNode *setUnknownNodeMarker() { NodeType |= UnknownNode; return this; } - - DSNode *setExternalMarker() { NodeType |= External; return this; } - DSNode *setIncompleteMarker() { NodeType |= Incomplete; return this; } - DSNode *setModifiedMarker() { NodeType |= Modified; return this; } - DSNode *setReadMarker() { NodeType |= Read; return this; } - DSNode *setArrayMarker() { NodeType |= Array; return this; } + bool isAllocaNode() const { return NodeType & AllocaNode; } + bool isHeapNode() const { return NodeType & HeapNode; } + bool isGlobalNode() const { return NodeType & GlobalNode; } + bool isUnknownNode() const { return NodeType & UnknownNode; } + bool isModifiedNode() const { return NodeType & ModifiedNode; } + bool isReadNode() const { return NodeType & ReadNode; } + bool isArrayNode() const { return NodeType & ArrayNode; } + bool isIncompleteNode() const { return NodeType & IncompleteNode;} + bool isCompleteNode() const { return !isIncompleteNode(); } + bool isDeadNode() const { return NodeType & DeadNode; } + bool isExternalNode() const { return NodeType & ExternalNode; } + bool isIntToPtrNode() const { return NodeType & IntToPtrNode; } + bool isPtrToIntNode() const { return NodeType & PtrToIntNode; } + + DSNode* setAllocaMarker() { NodeType |= AllocaNode; return this; } + DSNode* setHeapMarker() { NodeType |= HeapNode; return this; } + DSNode* setGlobalMarker() { NodeType |= GlobalNode; return this; } + DSNode* setUnknownMarker() { NodeType |= UnknownNode; return this; } + DSNode* setModifiedMarker() { NodeType |= ModifiedNode; return this; } + DSNode* setReadMarker() { NodeType |= ReadNode; return this; } + DSNode* setArrayMarker() { NodeType |= ArrayNode; return this; } + DSNode* setIncompleteMarker() { NodeType |= IncompleteNode; return this; } + DSNode* setExternalMarker() { NodeType |= ExternalNode; return this; } + DSNode* setIntToPtrMarker() { NodeType |= IntToPtrNode; return this; } + DSNode* setPtrToIntMarker() { NodeType |= PtrToIntNode; return this; } void makeNodeDead() { Globals.clear(); assert(hasNoReferrers() && "Dead node shouldn't have refs!"); - NodeType = DEAD; + NodeType = DeadNode; } /// forwardNode - Mark this node as being obsolete, and all references to it @@ -463,7 +468,7 @@ Offset = 0; } } - assert(!N || ((N->NodeType & DSNode::DEAD) == 0)); + assert(!N || ((N->NodeType & DSNode::DeadNode) == 0)); assert((!N || Offset < N->Size || (N->Size == 0 && Offset == 0) || N->isForwarding()) && "Node handle offset out of range!"); } From alenhar2 at cs.uiuc.edu Tue Apr 17 18:41:30 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 17 Apr 2007 18:41:30 -0500 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/DSA/BottomUpClosure.cpp CallTargets.cpp DataStructure.cpp DataStructureAA.cpp DataStructureOpt.cpp DataStructureStats.cpp GraphChecker.cpp Local.cpp Printer.cpp Steensgaard.cpp TopDownClosure.cpp Message-ID: <200704172341.l3HNfUJd027333@zion.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/DSA: BottomUpClosure.cpp updated: 1.131 -> 1.132 CallTargets.cpp updated: 1.11 -> 1.12 DataStructure.cpp updated: 1.260 -> 1.261 DataStructureAA.cpp updated: 1.42 -> 1.43 DataStructureOpt.cpp updated: 1.18 -> 1.19 DataStructureStats.cpp updated: 1.27 -> 1.28 GraphChecker.cpp updated: 1.24 -> 1.25 Local.cpp updated: 1.169 -> 1.170 Printer.cpp updated: 1.93 -> 1.94 Steensgaard.cpp updated: 1.70 -> 1.71 TopDownClosure.cpp updated: 1.99 -> 1.100 --- Log message: Normalize Flag names and functions, also add a couple informative ones --- Diffs of the changes: (+74 -78) BottomUpClosure.cpp | 4 ++-- CallTargets.cpp | 4 ++-- DataStructure.cpp | 38 +++++++++++++++++--------------------- DataStructureAA.cpp | 12 ++++++------ DataStructureOpt.cpp | 6 +++--- DataStructureStats.cpp | 2 +- GraphChecker.cpp | 16 ++++++++-------- Local.cpp | 42 +++++++++++++++++++++--------------------- Printer.cpp | 16 ++++++++-------- Steensgaard.cpp | 10 +++++----- TopDownClosure.cpp | 2 +- 11 files changed, 74 insertions(+), 78 deletions(-) Index: llvm-poolalloc/lib/DSA/BottomUpClosure.cpp diff -u llvm-poolalloc/lib/DSA/BottomUpClosure.cpp:1.131 llvm-poolalloc/lib/DSA/BottomUpClosure.cpp:1.132 --- llvm-poolalloc/lib/DSA/BottomUpClosure.cpp:1.131 Wed Apr 11 12:37:43 2007 +++ llvm-poolalloc/lib/DSA/BottomUpClosure.cpp Tue Apr 17 18:41:06 2007 @@ -133,7 +133,7 @@ if (CS.isDirectCall()) { if (isResolvableFunc(CS.getCalleeFunc())) Callees.push_back(CS.getCalleeFunc()); - } else if (!CS.getCalleeNode()->isIncomplete()) { + } else if (!CS.getCalleeNode()->isIncompleteNode()) { // Get all callees. unsigned OldSize = Callees.size(); CS.getCalleeNode()->addFullFunctionList(Callees); @@ -313,7 +313,7 @@ // Free should take a single pointer argument, mark it as heap memory. DSNodeHandle N(new DSNode(0, DSG)); - N.getNode()->setHeapNodeMarker(); + N.getNode()->setHeapMarker(); DSG->getNodeForValue(F->arg_begin()).mergeWith(N); } else { Index: llvm-poolalloc/lib/DSA/CallTargets.cpp diff -u llvm-poolalloc/lib/DSA/CallTargets.cpp:1.11 llvm-poolalloc/lib/DSA/CallTargets.cpp:1.12 --- llvm-poolalloc/lib/DSA/CallTargets.cpp:1.11 Fri Feb 23 16:49:32 2007 +++ llvm-poolalloc/lib/DSA/CallTargets.cpp Tue Apr 17 18:41:06 2007 @@ -53,11 +53,11 @@ DSNode* N = T->getDSGraph(*cs.getCaller()) .getNodeForValue(cs.getCalledValue()).getNode(); N->addFullFunctionList(IndMap[cs]); - if (N->isComplete() && IndMap[cs].size()) { + if (N->isCompleteNode() && IndMap[cs].size()) { CompleteSites.insert(cs); ++CompleteInd; } - if (N->isComplete() && !IndMap[cs].size()) { + if (N->isCompleteNode() && !IndMap[cs].size()) { ++CompleteEmpty; cerr << "Call site empty: '" << cs.getInstruction()->getName() Index: llvm-poolalloc/lib/DSA/DataStructure.cpp diff -u llvm-poolalloc/lib/DSA/DataStructure.cpp:1.260 llvm-poolalloc/lib/DSA/DataStructure.cpp:1.261 --- llvm-poolalloc/lib/DSA/DataStructure.cpp:1.260 Wed Apr 11 12:37:43 2007 +++ llvm-poolalloc/lib/DSA/DataStructure.cpp Tue Apr 17 18:41:06 2007 @@ -182,7 +182,7 @@ void DSNode::assertOK() const { assert((Ty != Type::VoidTy || Ty == Type::VoidTy && (Size == 0 || - (NodeType & DSNode::Array))) && + (NodeType & DSNode::ArrayNode))) && "Node not OK!"); assert(ParentGraph && "Node has no parent?"); @@ -203,7 +203,7 @@ assert((Offset < To->Size || (Offset == To->Size && Offset == 0)) && "Forwarded offset is wrong!"); ForwardNH.setTo(To, Offset); - NodeType = DEAD; + NodeType = DeadNode; Size = 0; Ty = Type::VoidTy; @@ -252,7 +252,7 @@ // If this node has a size that is <= 1, we don't need to create a forwarding // node. if (getSize() <= 1) { - NodeType |= DSNode::Array; + NodeType |= DSNode::ArrayNode; Ty = Type::VoidTy; Size = 1; assert(Links.size() <= 1 && "Size is 1, but has more links?"); @@ -262,7 +262,7 @@ // some referrers may have an offset that is > 0. By forcing them to // forward, the forwarder has the opportunity to correct the offset. DSNode *DestNode = new DSNode(0, ParentGraph); - DestNode->NodeType = NodeType|DSNode::Array; + DestNode->NodeType = NodeType|DSNode::ArrayNode; DestNode->Ty = Type::VoidTy; DestNode->Size = 1; DestNode->Globals.swap(Globals); @@ -535,8 +535,8 @@ } Ty = NewTy; - NodeType &= ~Array; - if (WillBeArray) NodeType |= Array; + NodeType &= ~ArrayNode; + if (WillBeArray) NodeType |= ArrayNode; Size = NewTySize; // Calculate the number of outgoing links from this node. @@ -632,8 +632,8 @@ const Type *OldTy = Ty; Ty = NewTy; - NodeType &= ~Array; - if (WillBeArray) NodeType |= Array; + NodeType &= ~ArrayNode; + if (WillBeArray) NodeType |= ArrayNode; Size = NewTySize; // Must grow links to be the appropriate size... @@ -1510,9 +1510,9 @@ if (GlobalValue *GV = dyn_cast(Ptr)) { N->addGlobal(GV); } else if (isa(Ptr)) { - N->setHeapNodeMarker(); + N->setHeapMarker(); } else if (isa(Ptr)) { - N->setAllocaNodeMarker(); + N->setAllocaMarker(); } else { assert(0 && "Illegal memory object input!"); } @@ -1535,9 +1535,9 @@ // Remove alloca or mod/ref bits as specified... unsigned BitsToClear = ((CloneFlags & StripAllocaBit)? DSNode::AllocaNode : 0) - | ((CloneFlags & StripModRefBits)? (DSNode::Modified | DSNode::Read) : 0) - | ((CloneFlags & StripIncompleteBit)? DSNode::Incomplete : 0); - BitsToClear |= DSNode::DEAD; // Clear dead flag... + | ((CloneFlags & StripModRefBits)? (DSNode::ModifiedNode | DSNode::ReadNode) : 0) + | ((CloneFlags & StripIncompleteBit)? DSNode::IncompleteNode : 0); + BitsToClear |= DSNode::DeadNode; // Clear dead flag... for (node_const_iterator I = G.node_begin(), E = G.node_end(); I != E; ++I) { assert(!I->isForwarding() && @@ -1545,10 +1545,6 @@ DSNode *New = new DSNode(*I, this); New->maskNodeTypes(~BitsToClear); OldNodeMap[I] = New; -#ifdef LLVA_KERNEL - if (G.getPoolForNode(&*I)) - PoolDescriptors[New] = G.getPoolForNode(&*I); -#endif } #ifndef NDEBUG @@ -1925,7 +1921,7 @@ // static void markIncompleteNode(DSNode *N) { // Stop recursion if no node, or if node already marked... - if (N == 0 || N->isIncomplete()) return; + if (N == 0 || N->isIncompleteNode()) return; // Actually mark the node N->setIncompleteMarker(); @@ -1999,7 +1995,7 @@ if (DSNode *N = Edge.getNode()) // Is there an edge? if (N->getNumReferrers() == 1) // Does it point to a lonely node? // No interesting info? - if ((N->getNodeFlags() & ~DSNode::Incomplete) == 0 && + if ((N->getNodeFlags() & ~DSNode::IncompleteNode) == 0 && N->getType() == Type::VoidTy && !N->isNodeCompletelyFolded()) Edge.setTo(0, 0); // Kill the edge! } @@ -2037,7 +2033,7 @@ // If the Callee is a useless edge, this must be an unreachable call site, // eliminate it. - if (Callee->getNumReferrers() == 1 && Callee->isComplete() && + if (Callee->getNumReferrers() == 1 && Callee->isCompleteNode() && Callee->getGlobalsList().empty()) { // No useful info? DOUT << "WARNING: Useless call site found.\n"; Calls.erase(OldIt); @@ -2213,7 +2209,7 @@ continue; } - if (Node.isComplete() && !Node.isModified() && !Node.isRead()) { + if (Node.isCompleteNode() && !Node.isModifiedNode() && !Node.isReadNode()) { // This is a useless node if it has no mod/ref info (checked above), // outgoing edges (which it cannot, as it is not modified in this // context), and it has no incoming edges. If it is a global node it may Index: llvm-poolalloc/lib/DSA/DataStructureAA.cpp diff -u llvm-poolalloc/lib/DSA/DataStructureAA.cpp:1.42 llvm-poolalloc/lib/DSA/DataStructureAA.cpp:1.43 --- llvm-poolalloc/lib/DSA/DataStructureAA.cpp:1.42 Fri Feb 23 16:49:32 2007 +++ llvm-poolalloc/lib/DSA/DataStructureAA.cpp Tue Apr 17 18:41:06 2007 @@ -143,7 +143,7 @@ return AliasAnalysis::alias(V1, V1Size, V2, V2Size); // We can only make a judgment if one of the nodes is complete. - if (N1->isComplete() || N2->isComplete()) { + if (N1->isCompleteNode() || N2->isCompleteNode()) { if (N1 != N2) return NoAlias; // Completely different nodes. @@ -197,9 +197,9 @@ // track of aggregate mod/ref info. bool NeverReads = true, NeverWrites = true; for (; Range.first != Range.second; ++Range.first) { - if (Range.first->second->isModified()) + if (Range.first->second->isModifiedNode()) NeverWrites = false; - if (Range.first->second->isRead()) + if (Range.first->second->isReadNode()) NeverReads = false; if (NeverReads == false && NeverWrites == false) return AliasAnalysis::getModRefInfo(CS, P, Size); @@ -240,7 +240,7 @@ // If we found a node and it's complete, it cannot be passed out to the // called function. - if (NI->second.getNode()->isComplete()) + if (NI->second.getNode()->isCompleteNode()) return NoModRef; return AliasAnalysis::getModRefInfo(CS, P, Size); } @@ -270,9 +270,9 @@ // Otherwise, if the node is only M or R, return this. This can be // useful for globals that should be marked const but are not. DSNode *N = NI->second.getNode(); - if (!N->isModified()) + if (!N->isModifiedNode()) Result = (ModRefResult)(Result & ~Mod); - if (!N->isRead()) + if (!N->isReadNode()) Result = (ModRefResult)(Result & ~Ref); } } Index: llvm-poolalloc/lib/DSA/DataStructureOpt.cpp diff -u llvm-poolalloc/lib/DSA/DataStructureOpt.cpp:1.18 llvm-poolalloc/lib/DSA/DataStructureOpt.cpp:1.19 --- llvm-poolalloc/lib/DSA/DataStructureOpt.cpp:1.18 Fri Feb 23 16:49:32 2007 +++ llvm-poolalloc/lib/DSA/DataStructureOpt.cpp Tue Apr 17 18:41:06 2007 @@ -76,11 +76,11 @@ I->replaceAllUsesWith(Constant::getNullValue((Type*)I->getType())); ++NumGlobalsIsolated; } - } else if (GNode && GNode->isComplete()) { + } else if (GNode && GNode->isCompleteNode()) { // If the node has not been read or written, and it is not externally // visible, kill any references to it so it can be DCE'd. - if (!GNode->isModified() && !GNode->isRead() &&I->hasInternalLinkage()){ + if (!GNode->isModifiedNode() && !GNode->isReadNode() &&I->hasInternalLinkage()){ if (!I->use_empty()) { I->replaceAllUsesWith(Constant::getNullValue((Type*)I->getType())); ++NumGlobalsIsolated; @@ -90,7 +90,7 @@ // We expect that there will almost always be a node for this global. // If there is, and the node doesn't have the M bit set, we can set the // 'constant' bit on the global. - if (!GNode->isModified() && !I->isConstant()) { + if (!GNode->isModifiedNode() && !I->isConstant()) { I->setConstant(true); ++NumGlobalsConstanted; Changed = true; Index: llvm-poolalloc/lib/DSA/DataStructureStats.cpp diff -u llvm-poolalloc/lib/DSA/DataStructureStats.cpp:1.27 llvm-poolalloc/lib/DSA/DataStructureStats.cpp:1.28 --- llvm-poolalloc/lib/DSA/DataStructureStats.cpp:1.27 Wed Jan 10 13:59:52 2007 +++ llvm-poolalloc/lib/DSA/DataStructureStats.cpp Tue Apr 17 18:41:06 2007 @@ -118,7 +118,7 @@ bool DSGraphStats::isNodeForValueCollapsed(Value *V) { if (DSNode *N = getNodeForValue(V)) - return N->isNodeCompletelyFolded() || N->isIncomplete(); + return N->isNodeCompletelyFolded() || N->isIncompleteNode(); return false; } Index: llvm-poolalloc/lib/DSA/GraphChecker.cpp diff -u llvm-poolalloc/lib/DSA/GraphChecker.cpp:1.24 llvm-poolalloc/lib/DSA/GraphChecker.cpp:1.25 --- llvm-poolalloc/lib/DSA/GraphChecker.cpp:1.24 Wed Dec 13 23:51:06 2006 +++ llvm-poolalloc/lib/DSA/GraphChecker.cpp Tue Apr 17 18:41:06 2007 @@ -150,14 +150,14 @@ unsigned Flags = 0; for (unsigned C = ColonPos+1; C != I->size(); ++C) switch ((*I)[C]) { - case 'S': Flags |= DSNode::AllocaNode; break; - case 'H': Flags |= DSNode::HeapNode; break; - case 'G': Flags |= DSNode::GlobalNode; break; - case 'U': Flags |= DSNode::UnknownNode; break; - case 'I': Flags |= DSNode::Incomplete; break; - case 'M': Flags |= DSNode::Modified; break; - case 'R': Flags |= DSNode::Read; break; - case 'A': Flags |= DSNode::Array; break; + case 'S': Flags |= DSNode::AllocaNode; break; + case 'H': Flags |= DSNode::HeapNode; break; + case 'G': Flags |= DSNode::GlobalNode; break; + case 'U': Flags |= DSNode::UnknownNode; break; + case 'I': Flags |= DSNode::IncompleteNode; break; + case 'M': Flags |= DSNode::ModifiedNode; break; + case 'R': Flags |= DSNode::ReadNode; break; + case 'A': Flags |= DSNode::ArrayNode; break; default: cerr << "Invalid DSNode flag!\n"; abort(); } CheckFlagsM[std::string(I->begin(), I->begin()+ColonPos)] = Flags; Index: llvm-poolalloc/lib/DSA/Local.cpp diff -u llvm-poolalloc/lib/DSA/Local.cpp:1.169 llvm-poolalloc/lib/DSA/Local.cpp:1.170 --- llvm-poolalloc/lib/DSA/Local.cpp:1.169 Wed Apr 11 12:37:43 2007 +++ llvm-poolalloc/lib/DSA/Local.cpp Tue Apr 17 18:41:06 2007 @@ -101,14 +101,14 @@ friend class InstVisitor; void visitMallocInst(MallocInst &MI) - { setDestTo(MI, createNode()->setHeapNodeMarker()); } + { setDestTo(MI, createNode()->setHeapMarker()); } void visitAllocaInst(AllocaInst &AI) - { setDestTo(AI, createNode()->setAllocaNodeMarker()); } + { setDestTo(AI, createNode()->setAllocaMarker()); } void visitFreeInst(FreeInst &FI) { if (DSNode *N = getValueDest(*FI.getOperand(0)).getNode()) - N->setHeapNodeMarker(); + N->setHeapMarker(); } //the simple ones @@ -208,14 +208,14 @@ if (isa(CE->getOperand(0)->getType())) NH = getValueDest(*CE->getOperand(0)); else - NH = createNode()->setUnknownNodeMarker(); + NH = createNode()->setUnknownMarker(); } else if (CE->getOpcode() == Instruction::GetElementPtr) { visitGetElementPtrInst(*CE); assert(G.hasNodeForValue(CE) && "GEP didn't get processed right?"); NH = G.getNodeForValue(CE); } else { // This returns a conservative unknown node for any unhandled ConstExpr - return NH = createNode()->setUnknownNodeMarker(); + return NH = createNode()->setUnknownMarker(); } if (NH.isNull()) { // (getelementptr null, X) returns null G.eraseNodeForValue(V); @@ -339,12 +339,12 @@ } void GraphBuilder::visitIntToPtrInst(IntToPtrInst &I) { - setDestTo(I, createNode()->setUnknownNodeMarker()); //->setIntToPtrMarker()); + setDestTo(I, createNode()->setUnknownMarker()->setIntToPtrMarker()); } void GraphBuilder::visitPtrToIntInst(PtrToIntInst& I) { -// if (DSNode* N = getValueDest(*I.getOperand(0)).getNode()) -// N->setPtrToIntMarker(); + if (DSNode* N = getValueDest(*I.getOperand(0)).getNode()) + N->setPtrToIntMarker(); } @@ -519,7 +519,7 @@ bool GraphBuilder::visitIntrinsic(CallSite CS, Function *F) { switch (F->getIntrinsicID()) { case Intrinsic::vastart: - getValueDest(*CS.getInstruction()).getNode()->setAllocaNodeMarker(); + getValueDest(*CS.getInstruction()).getNode()->setAllocaMarker(); return true; case Intrinsic::vacopy: getValueDest(*CS.getInstruction()). @@ -561,14 +561,14 @@ || F->getName() == "posix_memalign" || F->getName() == "memalign" || F->getName() == "valloc") { setDestTo(*CS.getInstruction(), - createNode()->setHeapNodeMarker()->setModifiedMarker()); + createNode()->setHeapMarker()->setModifiedMarker()); return true; } else if (F->getName() == "realloc") { DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); if (CS.arg_begin() != CS.arg_end()) RetNH.mergeWith(getValueDest(**CS.arg_begin())); if (DSNode *N = RetNH.getNode()) - N->setHeapNodeMarker()->setModifiedMarker()->setReadMarker(); + N->setHeapMarker()->setModifiedMarker()->setReadMarker(); return true; } else if (F->getName() == "memmove") { // Merge the first & second arguments, and mark the memory read and @@ -581,7 +581,7 @@ } else if (F->getName() == "free") { // Mark that the node is written to... if (DSNode *N = getValueDest(**CS.arg_begin()).getNode()) - N->setModifiedMarker()->setHeapNodeMarker(); + N->setModifiedMarker()->setHeapMarker(); } else if (F->getName() == "atoi" || F->getName() == "atof" || F->getName() == "atol" || F->getName() == "atoll" || F->getName() == "remove" || F->getName() == "unlink" || @@ -669,7 +669,7 @@ // descriptor. Also, merge the allocated type into the node. DSNodeHandle Result = getValueDest(*CS.getInstruction()); if (DSNode *N = Result.getNode()) { - N->setModifiedMarker()->setUnknownNodeMarker(); + N->setModifiedMarker()->setUnknownMarker(); const Type *RetTy = F->getFunctionType()->getReturnType(); if (const PointerType *PTy = dyn_cast(RetTy)) N->mergeTypeInfo(PTy->getElementType(), Result.getOffset()); @@ -689,7 +689,7 @@ // file descriptor. It merges the FILE type into the descriptor. DSNodeHandle H = getValueDest(**CS.arg_begin()); if (DSNode *N = H.getNode()) { - N->setReadMarker()->setUnknownNodeMarker(); + N->setReadMarker()->setUnknownMarker(); const Type *ArgTy = F->getFunctionType()->getParamType(0); if (const PointerType *PTy = dyn_cast(ArgTy)) N->mergeTypeInfo(PTy->getElementType(), H.getOffset()); @@ -965,7 +965,7 @@ DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); RetNH.mergeWith(getValueDest(**CS.arg_begin())); if (DSNode *N = RetNH.getNode()) - N->setHeapNodeMarker()->setModifiedMarker()->setReadMarker(); + N->setHeapMarker()->setModifiedMarker()->setReadMarker(); //and read second pointer if (DSNode *N = getValueDest(**(CS.arg_begin() + 1)).getNode()) N->setReadMarker(); @@ -976,7 +976,7 @@ DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); RetNH.mergeWith(getValueDest(**CS.arg_begin())); if (DSNode *N = RetNH.getNode()) - N->setHeapNodeMarker()->setModifiedMarker(); + N->setHeapMarker()->setModifiedMarker(); //and read second pointer if (DSNode *N = getValueDest(**(CS.arg_begin() + 1)).getNode()) N->setReadMarker(); @@ -989,7 +989,7 @@ // Create a new DSNode for this memory allocation DSNode *N = createNode(); - N->setHeapNodeMarker(); + N->setHeapMarker(); setDestTo(*CS.getInstruction(), N); // Get the pool handle @@ -1051,7 +1051,7 @@ // Create a DSNode for the memory allocated by this function call DSNode *N = createNode(); - N->setHeapNodeMarker(); + N->setHeapMarker(); setDestTo(*CS.getInstruction(), N); // Get the pool handle, if possible @@ -1146,7 +1146,7 @@ // allocation functions if (AllocList.end() != std::find(AllocList.begin(), AllocList.end(), F->getName())) { setDestTo(*CS.getInstruction(), - createNode()->setHeapNodeMarker()->setModifiedMarker()); + createNode()->setHeapMarker()->setModifiedMarker()); return; } @@ -1156,7 +1156,7 @@ F->getName())) { // Mark that the node is written to... if (DSNode *N = getValueDest(*(CS.getArgument(0))).getNode()) - N->setModifiedMarker()->setHeapNodeMarker(); + N->setModifiedMarker()->setHeapMarker(); return; } @@ -1222,7 +1222,7 @@ CurNode.mergeWith(getValueDest(**I)); if (DSNode *N = CurNode.getNode()) - N->setUnknownNodeMarker(); + N->setUnknownMarker(); } Index: llvm-poolalloc/lib/DSA/Printer.cpp diff -u llvm-poolalloc/lib/DSA/Printer.cpp:1.93 llvm-poolalloc/lib/DSA/Printer.cpp:1.94 --- llvm-poolalloc/lib/DSA/Printer.cpp:1.93 Wed Jan 10 12:10:32 2007 +++ llvm-poolalloc/lib/DSA/Printer.cpp Tue Apr 17 18:41:06 2007 @@ -64,15 +64,15 @@ } if (unsigned NodeType = N->getNodeFlags()) { OS << ": "; - if (NodeType & DSNode::AllocaNode ) OS << "S"; - if (NodeType & DSNode::HeapNode ) OS << "H"; - if (NodeType & DSNode::GlobalNode ) OS << "G"; - if (NodeType & DSNode::UnknownNode) OS << "U"; - if (NodeType & DSNode::Incomplete ) OS << "I"; - if (NodeType & DSNode::Modified ) OS << "M"; - if (NodeType & DSNode::Read ) OS << "R"; + if (NodeType & DSNode::AllocaNode ) OS << "S"; + if (NodeType & DSNode::HeapNode ) OS << "H"; + if (NodeType & DSNode::GlobalNode ) OS << "G"; + if (NodeType & DSNode::UnknownNode ) OS << "U"; + if (NodeType & DSNode::IncompleteNode ) OS << "I"; + if (NodeType & DSNode::ModifiedNode ) OS << "M"; + if (NodeType & DSNode::ReadNode ) OS << "R"; #ifndef NDEBUG - if (NodeType & DSNode::DEAD ) OS << ""; + if (NodeType & DSNode::DeadNode ) OS << ""; #endif OS << "\n"; } Index: llvm-poolalloc/lib/DSA/Steensgaard.cpp diff -u llvm-poolalloc/lib/DSA/Steensgaard.cpp:1.70 llvm-poolalloc/lib/DSA/Steensgaard.cpp:1.71 --- llvm-poolalloc/lib/DSA/Steensgaard.cpp:1.70 Wed Apr 11 12:37:43 2007 +++ llvm-poolalloc/lib/DSA/Steensgaard.cpp Tue Apr 17 18:41:06 2007 @@ -212,8 +212,8 @@ // this. If one is complete and the other isn't, then they are obviously // different nodes. If they are both complete, we can't say anything // useful. - if (I->second.getNode()->isComplete() || - J->second.getNode()->isComplete()) { + if (I->second.getNode()->isCompleteNode() || + J->second.getNode()->isCompleteNode()) { // If the two pointers point to different data structure graph nodes, they // cannot alias! if (V1H.getNode() != V2H.getNode()) @@ -251,7 +251,7 @@ if (I != GSM.end() && !I->second.isNull()) { DSNode *N = I->second.getNode(); - if (N->isComplete()) { + if (N->isCompleteNode()) { // If this is a direct call to an external function, and if the pointer // points to a complete node, the external function cannot modify or read // the value (we know it's not passed out of the program!). @@ -261,9 +261,9 @@ // Otherwise, if the node is complete, but it is only M or R, return this. // This can be useful for globals that should be marked const but are not. - if (!N->isModified()) + if (!N->isModifiedNode()) Result = (ModRefResult)(Result & ~Mod); - if (!N->isRead()) + if (!N->isReadNode()) Result = (ModRefResult)(Result & ~Ref); } } Index: llvm-poolalloc/lib/DSA/TopDownClosure.cpp diff -u llvm-poolalloc/lib/DSA/TopDownClosure.cpp:1.99 llvm-poolalloc/lib/DSA/TopDownClosure.cpp:1.100 --- llvm-poolalloc/lib/DSA/TopDownClosure.cpp:1.99 Wed Apr 11 12:37:43 2007 +++ llvm-poolalloc/lib/DSA/TopDownClosure.cpp Tue Apr 17 18:41:06 2007 @@ -73,7 +73,7 @@ for (DSScalarMap::global_iterator I=GGSM.global_begin(), E=GGSM.global_end(); I != E; ++I) { DSNode *N = GGSM.find(*I)->second.getNode(); - if (N->isIncomplete()) + if (N->isIncompleteNode()) markReachableFunctionsExternallyAccessible(N, Visited); } From sabre at nondot.org Tue Apr 17 18:43:49 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 18:43:49 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/2007-04-17-lsr-crash.ll Message-ID: <200704172343.l3HNhnId027467@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: 2007-04-17-lsr-crash.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+35 -0) 2007-04-17-lsr-crash.ll | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+) Index: llvm/test/CodeGen/Generic/2007-04-17-lsr-crash.ll diff -c /dev/null llvm/test/CodeGen/Generic/2007-04-17-lsr-crash.ll:1.1 *** /dev/null Tue Apr 17 18:43:41 2007 --- llvm/test/CodeGen/Generic/2007-04-17-lsr-crash.ll Tue Apr 17 18:43:31 2007 *************** *** 0 **** --- 1,35 ---- + ; RUN: llvm-as < %s | llc + + define void @foo(i32 %inTextSize) { + entry: + br label %bb236.outer + + cond_next193: ; preds = %bb236 + %tmp211 = add i32 %inTextSize_addr.1.ph17, -2 ; [#uses=1] + br i1 false, label %cond_next232, label %cond_true227 + + cond_true227: ; preds = %cond_next193 + ret void + + cond_next232: ; preds = %cond_next193 + %indvar.next49 = add i32 %indvar48, 1 ; [#uses=1] + br label %bb236.outer + + bb236.outer: ; preds = %cond_next232, %entry + %indvar48 = phi i32 [ %indvar.next49, %cond_next232 ], [ 0, %entry ] ; [#uses=2] + %inTextSize_addr.1.ph17 = phi i32 [ %tmp211, %cond_next232 ], [ %inTextSize, %entry ] ; [#uses=3] + %tmp.50 = sub i32 0, %indvar48 ; [#uses=1] + %tmp219 = icmp eq i32 %tmp.50, 0 ; [#uses=1] + br i1 %tmp219, label %bb236.us, label %bb236 + + bb236.us: ; preds = %bb236.outer + %inTextSize_addr.1.us = add i32 0, %inTextSize_addr.1.ph17 ; [#uses=0] + ret void + + bb236: ; preds = %bb236.outer + %tmp238 = icmp eq i32 %inTextSize_addr.1.ph17, 0 ; [#uses=1] + br i1 %tmp238, label %exit, label %cond_next193 + + exit: ; preds = %bb236 + ret void + } From sabre at nondot.org Tue Apr 17 18:44:08 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 18:44:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolutionExpander.cpp Message-ID: <200704172344.l3HNi8HC027483@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ScalarEvolutionExpander.cpp updated: 1.16 -> 1.17 --- Log message: Be more careful when inserting reused instructions. This fixes CodeGen/Generic/2007-04-17-lsr-crash.ll --- Diffs of the changes: (+7 -2) ScalarEvolutionExpander.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) Index: llvm/lib/Analysis/ScalarEvolutionExpander.cpp diff -u llvm/lib/Analysis/ScalarEvolutionExpander.cpp:1.16 llvm/lib/Analysis/ScalarEvolutionExpander.cpp:1.17 --- llvm/lib/Analysis/ScalarEvolutionExpander.cpp:1.16 Fri Apr 13 00:04:18 2007 +++ llvm/lib/Analysis/ScalarEvolutionExpander.cpp Tue Apr 17 18:43:50 2007 @@ -71,15 +71,20 @@ /// InsertBinop - Insert the specified binary operator, doing a small amount /// of work to avoid inserting an obviously redundant operation. Value *SCEVExpander::InsertBinop(Instruction::BinaryOps Opcode, Value *LHS, - Value *RHS, Instruction *InsertPt) { + Value *RHS, Instruction *&InsertPt) { // Do a quick scan to see if we have this binop nearby. If so, reuse it. unsigned ScanLimit = 6; for (BasicBlock::iterator IP = InsertPt, E = InsertPt->getParent()->begin(); ScanLimit; --IP, --ScanLimit) { if (BinaryOperator *BinOp = dyn_cast(IP)) if (BinOp->getOpcode() == Opcode && BinOp->getOperand(0) == LHS && - BinOp->getOperand(1) == RHS) + BinOp->getOperand(1) == RHS) { + // If we found the instruction *at* the insert point, insert later + // instructions after it. + if (BinOp == InsertPt) + InsertPt = ++IP; return BinOp; + } if (IP == E) break; } From clattner at apple.com Tue Apr 17 18:55:56 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 17 Apr 2007 16:55:56 -0700 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp In-Reply-To: <200704172338.l3HNcMY0027223@zion.cs.uiuc.edu> References: <200704172338.l3HNcMY0027223@zion.cs.uiuc.edu> Message-ID: > @@ -654,7 +654,7 @@ > Value *Align = ConstantInt::get(Type::Int32Ty,0); > Value* Opts[3] = {ArgVal, ElSize, Align}; > new CallInst(PAInfo.PoolInit, Opts, 3,"", TheCall); > - new CallInst(PAInfo.PoolDestroy, ArgVal, "", TheCall->getNext > ()); > + new CallInst(PAInfo.PoolDestroy, ArgVal, "", TheCall+1); > } FWIW, this isn't right: you are passing in a pointer past the call instruction :) -Chris From alenhar2 at cs.uiuc.edu Tue Apr 17 19:29:19 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 17 Apr 2007 19:29:19 -0500 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Message-ID: <200704180029.l3I0TJ8G028283@zion.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: TransformFunctionBody.cpp updated: 1.63 -> 1.64 --- Log message: This is really really ugly --- Diffs of the changes: (+2 -1) TransformFunctionBody.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.63 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.64 --- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.63 Tue Apr 17 18:38:04 2007 +++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Tue Apr 17 19:29:02 2007 @@ -654,7 +654,8 @@ Value *Align = ConstantInt::get(Type::Int32Ty,0); Value* Opts[3] = {ArgVal, ElSize, Align}; new CallInst(PAInfo.PoolInit, Opts, 3,"", TheCall); - new CallInst(PAInfo.PoolDestroy, ArgVal, "", TheCall+1); + BasicBlock::iterator BBI = TheCall; + new CallInst(PAInfo.PoolDestroy, ArgVal, "", ++BBI); } //probably need to update DSG // std::cerr << "WARNING: NULL POOL ARGUMENTS ARE PASSED IN!\n"; From evan.cheng at apple.com Tue Apr 17 19:36:28 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 19:36:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/PHIElimination.cpp Message-ID: <200704180036.l3I0aSwX028400@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: PHIElimination.cpp updated: 1.55 -> 1.56 --- Log message: Increment use count of new virtuals created during PHI elimination. --- Diffs of the changes: (+3 -0) PHIElimination.cpp | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/lib/CodeGen/PHIElimination.cpp diff -u llvm/lib/CodeGen/PHIElimination.cpp:1.55 llvm/lib/CodeGen/PHIElimination.cpp:1.56 --- llvm/lib/CodeGen/PHIElimination.cpp:1.55 Sun Mar 18 04:02:31 2007 +++ llvm/lib/CodeGen/PHIElimination.cpp Tue Apr 17 19:36:11 2007 @@ -138,6 +138,9 @@ if (LV) { MachineInstr *PHICopy = prior(AfterPHIsIt); + // Increment use count of the newly created virtual register. + LV->getVarInfo(IncomingReg).NumUses++; + // Add information to LiveVariables to know that the incoming value is // killed. Note that because the value is defined in several places (once // each for each incoming block), the "def" block and instruction fields From sabre at nondot.org Tue Apr 17 19:43:22 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 19:43:22 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/ScalarEvolutionExpander.h Message-ID: <200704180043.l3I0hM3X028571@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: ScalarEvolutionExpander.h updated: 1.14 -> 1.15 --- Log message: what's an & between friends? --- Diffs of the changes: (+1 -1) ScalarEvolutionExpander.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/Analysis/ScalarEvolutionExpander.h diff -u llvm/include/llvm/Analysis/ScalarEvolutionExpander.h:1.14 llvm/include/llvm/Analysis/ScalarEvolutionExpander.h:1.15 --- llvm/include/llvm/Analysis/ScalarEvolutionExpander.h:1.14 Fri Apr 13 00:04:18 2007 +++ llvm/include/llvm/Analysis/ScalarEvolutionExpander.h Tue Apr 17 19:43:05 2007 @@ -92,7 +92,7 @@ /// InsertBinop - Insert the specified binary operator, doing a small amount /// of work to avoid inserting an obviously redundant operation. static Value *InsertBinop(Instruction::BinaryOps Opcode, Value *LHS, - Value *RHS, Instruction *InsertPt); + Value *RHS, Instruction *&InsertPt); protected: Value *expand(SCEV *S) { // Check to see if we already expanded this. From dpatel at apple.com Tue Apr 17 19:52:00 2007 From: dpatel at apple.com (Devang Patel) Date: Tue, 17 Apr 2007 19:52:00 -0500 Subject: [llvm-commits] CVS: llvm/test/Analysis/Dominators/2007-04-17-PostDominanceFrontier.ll Message-ID: <200704180052.l3I0q0WR028748@zion.cs.uiuc.edu> Changes in directory llvm/test/Analysis/Dominators: 2007-04-17-PostDominanceFrontier.ll added (r1.1) --- Log message: New test. --- Diffs of the changes: (+692 -0) 2007-04-17-PostDominanceFrontier.ll | 692 ++++++++++++++++++++++++++++++++++++ 1 files changed, 692 insertions(+) Index: llvm/test/Analysis/Dominators/2007-04-17-PostDominanceFrontier.ll diff -c /dev/null llvm/test/Analysis/Dominators/2007-04-17-PostDominanceFrontier.ll:1.1 *** /dev/null Tue Apr 17 19:51:53 2007 --- llvm/test/Analysis/Dominators/2007-04-17-PostDominanceFrontier.ll Tue Apr 17 19:51:43 2007 *************** *** 0 **** --- 1,692 ---- + ; RUN: llvm-upgrade < %s | llvm-as | opt -postdomfrontier -disable-output + + void @SManager() { + entry: + br label %bb.outer + + bb.outer: ; preds = %bb193, %entry + br label %bb.outer156 + + bb.loopexit: ; preds = %bb442 + br label %bb.outer156 + + bb.outer156: ; preds = %bb.loopexit, %bb.outer + br label %bb + + bb: ; preds = %bb.backedge, %bb.outer156 + br i1 false, label %cond_true, label %bb.cond_next_crit_edge + + bb.cond_next_crit_edge: ; preds = %bb + br label %cond_next + + cond_true: ; preds = %bb + br label %cond_next + + cond_next: ; preds = %cond_true, %bb.cond_next_crit_edge + br i1 false, label %cond_next.bb.backedge_crit_edge, label %cond_next107 + + cond_next.bb.backedge_crit_edge: ; preds = %cond_next + br label %bb.backedge + + bb.backedge: ; preds = %cond_true112.bb.backedge_crit_edge, %cond_next.bb.backedge_crit_edge + br label %bb + + cond_next107: ; preds = %cond_next + br i1 false, label %cond_true112, label %cond_next197 + + cond_true112: ; preds = %cond_next107 + br i1 false, label %cond_true118, label %cond_true112.bb.backedge_crit_edge + + cond_true112.bb.backedge_crit_edge: ; preds = %cond_true112 + br label %bb.backedge + + cond_true118: ; preds = %cond_true112 + br i1 false, label %bb123.preheader, label %cond_true118.bb148_crit_edge + + cond_true118.bb148_crit_edge: ; preds = %cond_true118 + br label %bb148 + + bb123.preheader: ; preds = %cond_true118 + br label %bb123 + + bb123: ; preds = %bb142.bb123_crit_edge, %bb123.preheader + br i1 false, label %bb123.bb142_crit_edge, label %cond_next.i57 + + bb123.bb142_crit_edge: ; preds = %bb123 + br label %bb142 + + cond_next.i57: ; preds = %bb123 + br i1 false, label %cond_true135, label %cond_next.i57.bb142_crit_edge + + cond_next.i57.bb142_crit_edge: ; preds = %cond_next.i57 + br label %bb142 + + cond_true135: ; preds = %cond_next.i57 + br label %bb142 + + bb142: ; preds = %cond_true135, %cond_next.i57.bb142_crit_edge, %bb123.bb142_crit_edge + br i1 false, label %bb148.loopexit, label %bb142.bb123_crit_edge + + bb142.bb123_crit_edge: ; preds = %bb142 + br label %bb123 + + bb148.loopexit: ; preds = %bb142 + br label %bb148 + + bb148: ; preds = %bb148.loopexit, %cond_true118.bb148_crit_edge + br i1 false, label %bb151.preheader, label %bb148.bb177_crit_edge + + bb148.bb177_crit_edge: ; preds = %bb148 + br label %bb177 + + bb151.preheader: ; preds = %bb148 + br label %bb151 + + bb151: ; preds = %bb171.bb151_crit_edge, %bb151.preheader + br i1 false, label %bb151.bb171_crit_edge, label %cond_next.i49 + + bb151.bb171_crit_edge: ; preds = %bb151 + br label %bb171 + + cond_next.i49: ; preds = %bb151 + br i1 false, label %cond_true164, label %cond_next.i49.bb171_crit_edge + + cond_next.i49.bb171_crit_edge: ; preds = %cond_next.i49 + br label %bb171 + + cond_true164: ; preds = %cond_next.i49 + br label %bb171 + + bb171: ; preds = %cond_true164, %cond_next.i49.bb171_crit_edge, %bb151.bb171_crit_edge + br i1 false, label %bb177.loopexit, label %bb171.bb151_crit_edge + + bb171.bb151_crit_edge: ; preds = %bb171 + br label %bb151 + + bb177.loopexit: ; preds = %bb171 + br label %bb177 + + bb177: ; preds = %bb177.loopexit, %bb148.bb177_crit_edge + br i1 false, label %bb180.preheader, label %bb177.bb193_crit_edge + + bb177.bb193_crit_edge: ; preds = %bb177 + br label %bb193 + + bb180.preheader: ; preds = %bb177 + br label %bb180 + + bb180: ; preds = %bb180.bb180_crit_edge, %bb180.preheader + br i1 false, label %bb193.loopexit, label %bb180.bb180_crit_edge + + bb180.bb180_crit_edge: ; preds = %bb180 + br label %bb180 + + bb193.loopexit: ; preds = %bb180 + br label %bb193 + + bb193: ; preds = %bb193.loopexit, %bb177.bb193_crit_edge + br label %bb.outer + + cond_next197: ; preds = %cond_next107 + br i1 false, label %cond_next210, label %cond_true205 + + cond_true205: ; preds = %cond_next197 + br i1 false, label %cond_true205.bb213_crit_edge, label %cond_true205.bb299_crit_edge + + cond_true205.bb299_crit_edge: ; preds = %cond_true205 + br label %bb299 + + cond_true205.bb213_crit_edge: ; preds = %cond_true205 + br label %bb213 + + cond_next210: ; preds = %cond_next197 + br label %bb293 + + bb213: ; preds = %bb293.bb213_crit_edge, %cond_true205.bb213_crit_edge + br i1 false, label %bb213.cond_next290_crit_edge, label %cond_true248 + + bb213.cond_next290_crit_edge: ; preds = %bb213 + br label %cond_next290 + + cond_true248: ; preds = %bb213 + br i1 false, label %cond_true248.cond_next290_crit_edge, label %cond_true255 + + cond_true248.cond_next290_crit_edge: ; preds = %cond_true248 + br label %cond_next290 + + cond_true255: ; preds = %cond_true248 + br i1 false, label %cond_true266, label %cond_true255.cond_next271_crit_edge + + cond_true255.cond_next271_crit_edge: ; preds = %cond_true255 + br label %cond_next271 + + cond_true266: ; preds = %cond_true255 + br label %cond_next271 + + cond_next271: ; preds = %cond_true266, %cond_true255.cond_next271_crit_edge + br label %cond_next290 + + cond_next290: ; preds = %cond_next271, %cond_true248.cond_next290_crit_edge, %bb213.cond_next290_crit_edge + br label %bb293 + + bb293: ; preds = %cond_next290, %cond_next210 + br i1 false, label %bb293.bb213_crit_edge, label %bb293.bb299_crit_edge + + bb293.bb299_crit_edge: ; preds = %bb293 + br label %bb299 + + bb293.bb213_crit_edge: ; preds = %bb293 + br label %bb213 + + bb299: ; preds = %bb293.bb299_crit_edge, %cond_true205.bb299_crit_edge + br i1 false, label %bb302.preheader, label %bb299.bb390_crit_edge + + bb299.bb390_crit_edge: ; preds = %bb299 + br label %bb390 + + bb302.preheader: ; preds = %bb299 + br label %bb302 + + bb302: ; preds = %bb384.bb302_crit_edge, %bb302.preheader + br i1 false, label %bb302.bb384_crit_edge, label %cond_true339 + + bb302.bb384_crit_edge: ; preds = %bb302 + br label %bb384 + + cond_true339: ; preds = %bb302 + br i1 false, label %cond_true339.bb384_crit_edge, label %cond_true346 + + cond_true339.bb384_crit_edge: ; preds = %cond_true339 + br label %bb384 + + cond_true346: ; preds = %cond_true339 + br i1 false, label %cond_true357, label %cond_true346.cond_next361_crit_edge + + cond_true346.cond_next361_crit_edge: ; preds = %cond_true346 + br label %cond_next361 + + cond_true357: ; preds = %cond_true346 + br label %cond_next361 + + cond_next361: ; preds = %cond_true357, %cond_true346.cond_next361_crit_edge + br label %bb384 + + bb384: ; preds = %cond_next361, %cond_true339.bb384_crit_edge, %bb302.bb384_crit_edge + br i1 false, label %bb390.loopexit, label %bb384.bb302_crit_edge + + bb384.bb302_crit_edge: ; preds = %bb384 + br label %bb302 + + bb390.loopexit: ; preds = %bb384 + br label %bb390 + + bb390: ; preds = %bb390.loopexit, %bb299.bb390_crit_edge + br i1 false, label %bb391.preheader, label %bb390.bb442.preheader_crit_edge + + bb390.bb442.preheader_crit_edge: ; preds = %bb390 + br label %bb442.preheader + + bb391.preheader: ; preds = %bb390 + br label %bb391 + + bb391: ; preds = %bb413.bb391_crit_edge, %bb391.preheader + br i1 false, label %bb391.bb413_crit_edge, label %cond_next404 + + bb391.bb413_crit_edge: ; preds = %bb391 + br label %bb413 + + cond_next404: ; preds = %bb391 + br i1 false, label %cond_next404.HWrite.exit_crit_edge, label %cond_next.i13 + + cond_next404.HWrite.exit_crit_edge: ; preds = %cond_next404 + br label %HWrite.exit + + cond_next.i13: ; preds = %cond_next404 + br i1 false, label %cond_next.i13.cond_next13.i_crit_edge, label %cond_true12.i + + cond_next.i13.cond_next13.i_crit_edge: ; preds = %cond_next.i13 + br label %cond_next13.i + + cond_true12.i: ; preds = %cond_next.i13 + br label %cond_next13.i + + cond_next13.i: ; preds = %cond_true12.i, %cond_next.i13.cond_next13.i_crit_edge + br i1 false, label %cond_next13.i.bb.i22_crit_edge, label %cond_next43.i + + cond_next13.i.bb.i22_crit_edge: ; preds = %cond_next13.i + br label %bb.i22 + + cond_next43.i: ; preds = %cond_next13.i + br i1 false, label %cond_next43.i.bb.i22_crit_edge, label %bb60.i + + cond_next43.i.bb.i22_crit_edge: ; preds = %cond_next43.i + br label %bb.i22 + + bb.i22: ; preds = %cond_next43.i.bb.i22_crit_edge, %cond_next13.i.bb.i22_crit_edge + br label %bb413 + + bb60.i: ; preds = %cond_next43.i + br i1 false, label %bb60.i.HWrite.exit_crit_edge, label %cond_true81.i + + bb60.i.HWrite.exit_crit_edge: ; preds = %bb60.i + br label %HWrite.exit + + cond_true81.i: ; preds = %bb60.i + br label %bb413 + + HWrite.exit: ; preds = %bb60.i.HWrite.exit_crit_edge, %cond_next404.HWrite.exit_crit_edge + br label %bb413 + + bb413: ; preds = %HWrite.exit, %cond_true81.i, %bb.i22, %bb391.bb413_crit_edge + br i1 false, label %bb442.preheader.loopexit, label %bb413.bb391_crit_edge + + bb413.bb391_crit_edge: ; preds = %bb413 + br label %bb391 + + bb442.preheader.loopexit: ; preds = %bb413 + br label %bb442.preheader + + bb442.preheader: ; preds = %bb442.preheader.loopexit, %bb390.bb442.preheader_crit_edge + br label %bb442.outer + + bb420: ; preds = %bb442 + br i1 false, label %bb439.loopexit, label %cond_next433 + + cond_next433: ; preds = %bb420 + br i1 false, label %cond_next433.HRead.exit.loopexit_crit_edge, label %cond_next.i + + cond_next433.HRead.exit.loopexit_crit_edge: ; preds = %cond_next433 + br label %HRead.exit.loopexit + + cond_next.i: ; preds = %cond_next433 + br i1 false, label %cond_true9.i, label %cond_false223.i + + cond_true9.i: ; preds = %cond_next.i + switch i32 0, label %cond_false.i [ + i32 1, label %cond_true9.i.cond_true15.i_crit_edge + i32 5, label %cond_true9.i.cond_true15.i_crit_edge9 + ] + + cond_true9.i.cond_true15.i_crit_edge9: ; preds = %cond_true9.i + br label %cond_true15.i + + cond_true9.i.cond_true15.i_crit_edge: ; preds = %cond_true9.i + br label %cond_true15.i + + cond_true15.i: ; preds = %cond_true9.i.cond_true15.i_crit_edge, %cond_true9.i.cond_true15.i_crit_edge9 + br i1 false, label %cond_true15.i.cond_true44.i_crit_edge, label %cond_true15.i.cond_false49.i_crit_edge + + cond_true15.i.cond_false49.i_crit_edge: ; preds = %cond_true15.i + br label %cond_false49.i + + cond_true15.i.cond_true44.i_crit_edge: ; preds = %cond_true15.i + br label %cond_true44.i + + cond_false.i: ; preds = %cond_true9.i + br i1 false, label %cond_false.i.cond_next39.i_crit_edge, label %cond_true30.i + + cond_false.i.cond_next39.i_crit_edge: ; preds = %cond_false.i + br label %cond_next39.i + + cond_true30.i: ; preds = %cond_false.i + br label %cond_next39.i + + cond_next39.i: ; preds = %cond_true30.i, %cond_false.i.cond_next39.i_crit_edge + br i1 false, label %cond_next39.i.cond_true44.i_crit_edge, label %cond_next39.i.cond_false49.i_crit_edge + + cond_next39.i.cond_false49.i_crit_edge: ; preds = %cond_next39.i + br label %cond_false49.i + + cond_next39.i.cond_true44.i_crit_edge: ; preds = %cond_next39.i + br label %cond_true44.i + + cond_true44.i: ; preds = %cond_next39.i.cond_true44.i_crit_edge, %cond_true15.i.cond_true44.i_crit_edge + br i1 false, label %cond_true44.i.cond_next70.i_crit_edge, label %cond_true44.i.cond_true61.i_crit_edge + + cond_true44.i.cond_true61.i_crit_edge: ; preds = %cond_true44.i + br label %cond_true61.i + + cond_true44.i.cond_next70.i_crit_edge: ; preds = %cond_true44.i + br label %cond_next70.i + + cond_false49.i: ; preds = %cond_next39.i.cond_false49.i_crit_edge, %cond_true15.i.cond_false49.i_crit_edge + br i1 false, label %cond_false49.i.cond_next70.i_crit_edge, label %cond_false49.i.cond_true61.i_crit_edge + + cond_false49.i.cond_true61.i_crit_edge: ; preds = %cond_false49.i + br label %cond_true61.i + + cond_false49.i.cond_next70.i_crit_edge: ; preds = %cond_false49.i + br label %cond_next70.i + + cond_true61.i: ; preds = %cond_false49.i.cond_true61.i_crit_edge, %cond_true44.i.cond_true61.i_crit_edge + br i1 false, label %cond_true61.i.cond_next70.i_crit_edge, label %cond_true67.i + + cond_true61.i.cond_next70.i_crit_edge: ; preds = %cond_true61.i + br label %cond_next70.i + + cond_true67.i: ; preds = %cond_true61.i + br label %cond_next70.i + + cond_next70.i: ; preds = %cond_true67.i, %cond_true61.i.cond_next70.i_crit_edge, %cond_false49.i.cond_next70.i_crit_edge, %cond_true44.i.cond_next70.i_crit_edge + br i1 false, label %cond_true77.i, label %cond_next81.i + + cond_true77.i: ; preds = %cond_next70.i + br label %bb442.outer.backedge + + cond_next81.i: ; preds = %cond_next70.i + br i1 false, label %cond_true87.i, label %cond_false94.i + + cond_true87.i: ; preds = %cond_next81.i + br i1 false, label %cond_true87.i.cond_true130.i_crit_edge, label %cond_true87.i.cond_next135.i_crit_edge + + cond_true87.i.cond_next135.i_crit_edge: ; preds = %cond_true87.i + br label %cond_next135.i + + cond_true87.i.cond_true130.i_crit_edge: ; preds = %cond_true87.i + br label %cond_true130.i + + cond_false94.i: ; preds = %cond_next81.i + switch i32 0, label %cond_false94.i.cond_next125.i_crit_edge [ + i32 1, label %cond_false94.i.cond_true100.i_crit_edge + i32 5, label %cond_false94.i.cond_true100.i_crit_edge10 + ] + + cond_false94.i.cond_true100.i_crit_edge10: ; preds = %cond_false94.i + br label %cond_true100.i + + cond_false94.i.cond_true100.i_crit_edge: ; preds = %cond_false94.i + br label %cond_true100.i + + cond_false94.i.cond_next125.i_crit_edge: ; preds = %cond_false94.i + br label %cond_next125.i + + cond_true100.i: ; preds = %cond_false94.i.cond_true100.i_crit_edge, %cond_false94.i.cond_true100.i_crit_edge10 + br i1 false, label %cond_true107.i, label %cond_true100.i.cond_next109.i_crit_edge + + cond_true100.i.cond_next109.i_crit_edge: ; preds = %cond_true100.i + br label %cond_next109.i + + cond_true107.i: ; preds = %cond_true100.i + br label %cond_next109.i + + cond_next109.i: ; preds = %cond_true107.i, %cond_true100.i.cond_next109.i_crit_edge + br i1 false, label %cond_next109.i.cond_next125.i_crit_edge, label %cond_true116.i + + cond_next109.i.cond_next125.i_crit_edge: ; preds = %cond_next109.i + br label %cond_next125.i + + cond_true116.i: ; preds = %cond_next109.i + br label %cond_next125.i + + cond_next125.i: ; preds = %cond_true116.i, %cond_next109.i.cond_next125.i_crit_edge, %cond_false94.i.cond_next125.i_crit_edge + br i1 false, label %cond_next125.i.cond_true130.i_crit_edge, label %cond_next125.i.cond_next135.i_crit_edge + + cond_next125.i.cond_next135.i_crit_edge: ; preds = %cond_next125.i + br label %cond_next135.i + + cond_next125.i.cond_true130.i_crit_edge: ; preds = %cond_next125.i + br label %cond_true130.i + + cond_true130.i: ; preds = %cond_next125.i.cond_true130.i_crit_edge, %cond_true87.i.cond_true130.i_crit_edge + br label %cond_next135.i + + cond_next135.i: ; preds = %cond_true130.i, %cond_next125.i.cond_next135.i_crit_edge, %cond_true87.i.cond_next135.i_crit_edge + br i1 false, label %cond_true142.i, label %cond_next135.i.cond_next149.i_crit_edge + + cond_next135.i.cond_next149.i_crit_edge: ; preds = %cond_next135.i + br label %cond_next149.i + + cond_true142.i: ; preds = %cond_next135.i + br label %cond_next149.i + + cond_next149.i: ; preds = %cond_true142.i, %cond_next135.i.cond_next149.i_crit_edge + br i1 false, label %cond_true156.i, label %cond_next149.i.cond_next163.i_crit_edge + + cond_next149.i.cond_next163.i_crit_edge: ; preds = %cond_next149.i + br label %cond_next163.i + + cond_true156.i: ; preds = %cond_next149.i + br label %cond_next163.i + + cond_next163.i: ; preds = %cond_true156.i, %cond_next149.i.cond_next163.i_crit_edge + br i1 false, label %cond_true182.i, label %cond_next163.i.cond_next380.i_crit_edge + + cond_next163.i.cond_next380.i_crit_edge: ; preds = %cond_next163.i + br label %cond_next380.i + + cond_true182.i: ; preds = %cond_next163.i + br i1 false, label %cond_true182.i.cond_next380.i_crit_edge, label %cond_true196.i + + cond_true182.i.cond_next380.i_crit_edge: ; preds = %cond_true182.i + br label %cond_next380.i + + cond_true196.i: ; preds = %cond_true182.i + br i1 false, label %cond_true210.i, label %cond_true196.i.cond_next380.i_crit_edge + + cond_true196.i.cond_next380.i_crit_edge: ; preds = %cond_true196.i + br label %cond_next380.i + + cond_true210.i: ; preds = %cond_true196.i + br i1 false, label %cond_true216.i, label %cond_true210.i.cond_next380.i_crit_edge + + cond_true210.i.cond_next380.i_crit_edge: ; preds = %cond_true210.i + br label %cond_next380.i + + cond_true216.i: ; preds = %cond_true210.i + br label %cond_next380.i + + cond_false223.i: ; preds = %cond_next.i + br i1 false, label %cond_true229.i, label %cond_false355.i + + cond_true229.i: ; preds = %cond_false223.i + br i1 false, label %cond_true229.i.HRead.exit.loopexit_crit_edge, label %cond_next243.i + + cond_true229.i.HRead.exit.loopexit_crit_edge: ; preds = %cond_true229.i + br label %HRead.exit.loopexit + + cond_next243.i: ; preds = %cond_true229.i + br i1 false, label %cond_true248.i, label %cond_false255.i + + cond_true248.i: ; preds = %cond_next243.i + br label %cond_next260.i + + cond_false255.i: ; preds = %cond_next243.i + br label %cond_next260.i + + cond_next260.i: ; preds = %cond_false255.i, %cond_true248.i + br i1 false, label %cond_true267.i, label %cond_next273.i + + cond_true267.i: ; preds = %cond_next260.i + br label %bb442.backedge + + bb442.backedge: ; preds = %bb.i, %cond_true267.i + br label %bb442 + + cond_next273.i: ; preds = %cond_next260.i + br i1 false, label %cond_true281.i, label %cond_next273.i.cond_next288.i_crit_edge + + cond_next273.i.cond_next288.i_crit_edge: ; preds = %cond_next273.i + br label %cond_next288.i + + cond_true281.i: ; preds = %cond_next273.i + br label %cond_next288.i + + cond_next288.i: ; preds = %cond_true281.i, %cond_next273.i.cond_next288.i_crit_edge + br i1 false, label %cond_true295.i, label %cond_next288.i.cond_next302.i_crit_edge + + cond_next288.i.cond_next302.i_crit_edge: ; preds = %cond_next288.i + br label %cond_next302.i + + cond_true295.i: ; preds = %cond_next288.i + br label %cond_next302.i + + cond_next302.i: ; preds = %cond_true295.i, %cond_next288.i.cond_next302.i_crit_edge + br i1 false, label %cond_next302.i.cond_next380.i_crit_edge, label %cond_true328.i + + cond_next302.i.cond_next380.i_crit_edge: ; preds = %cond_next302.i + br label %cond_next380.i + + cond_true328.i: ; preds = %cond_next302.i + br i1 false, label %cond_true343.i, label %cond_true328.i.cond_next380.i_crit_edge + + cond_true328.i.cond_next380.i_crit_edge: ; preds = %cond_true328.i + br label %cond_next380.i + + cond_true343.i: ; preds = %cond_true328.i + br i1 false, label %cond_true349.i, label %cond_true343.i.cond_next380.i_crit_edge + + cond_true343.i.cond_next380.i_crit_edge: ; preds = %cond_true343.i + br label %cond_next380.i + + cond_true349.i: ; preds = %cond_true343.i + br label %cond_next380.i + + cond_false355.i: ; preds = %cond_false223.i + br i1 false, label %cond_false355.i.bb.i_crit_edge, label %cond_next363.i + + cond_false355.i.bb.i_crit_edge: ; preds = %cond_false355.i + br label %bb.i + + cond_next363.i: ; preds = %cond_false355.i + br i1 false, label %bb377.i, label %cond_next363.i.bb.i_crit_edge + + cond_next363.i.bb.i_crit_edge: ; preds = %cond_next363.i + br label %bb.i + + bb.i: ; preds = %cond_next363.i.bb.i_crit_edge, %cond_false355.i.bb.i_crit_edge + br label %bb442.backedge + + bb377.i: ; preds = %cond_next363.i + br label %cond_next380.i + + cond_next380.i: ; preds = %bb377.i, %cond_true349.i, %cond_true343.i.cond_next380.i_crit_edge, %cond_true328.i.cond_next380.i_crit_edge, %cond_next302.i.cond_next380.i_crit_edge, %cond_true216.i, %cond_true210.i.cond_next380.i_crit_edge, %cond_true196.i.cond_next380.i_crit_edge, %cond_true182.i.cond_next380.i_crit_edge, %cond_next163.i.cond_next380.i_crit_edge + br i1 false, label %cond_next380.i.HRead.exit_crit_edge, label %cond_true391.i + + cond_next380.i.HRead.exit_crit_edge: ; preds = %cond_next380.i + br label %HRead.exit + + cond_true391.i: ; preds = %cond_next380.i + br label %bb442.outer.backedge + + bb442.outer.backedge: ; preds = %bb439, %cond_true391.i, %cond_true77.i + br label %bb442.outer + + HRead.exit.loopexit: ; preds = %cond_true229.i.HRead.exit.loopexit_crit_edge, %cond_next433.HRead.exit.loopexit_crit_edge + br label %HRead.exit + + HRead.exit: ; preds = %HRead.exit.loopexit, %cond_next380.i.HRead.exit_crit_edge + br label %bb439 + + bb439.loopexit: ; preds = %bb420 + br label %bb439 + + bb439: ; preds = %bb439.loopexit, %HRead.exit + br label %bb442.outer.backedge + + bb442.outer: ; preds = %bb442.outer.backedge, %bb442.preheader + br label %bb442 + + bb442: ; preds = %bb442.outer, %bb442.backedge + br i1 false, label %bb420, label %bb.loopexit + } + + void @Invalidate() { + entry: + br i1 false, label %cond_false, label %cond_true + + cond_true: ; preds = %entry + br i1 false, label %cond_true40, label %cond_true.cond_next_crit_edge + + cond_true.cond_next_crit_edge: ; preds = %cond_true + br label %cond_next + + cond_true40: ; preds = %cond_true + br label %cond_next + + cond_next: ; preds = %cond_true40, %cond_true.cond_next_crit_edge + br i1 false, label %cond_true68, label %cond_next.cond_next73_crit_edge + + cond_next.cond_next73_crit_edge: ; preds = %cond_next + br label %cond_next73 + + cond_true68: ; preds = %cond_next + br label %cond_next73 + + cond_next73: ; preds = %cond_true68, %cond_next.cond_next73_crit_edge + br i1 false, label %cond_true91, label %cond_next73.cond_next96_crit_edge + + cond_next73.cond_next96_crit_edge: ; preds = %cond_next73 + br label %cond_next96 + + cond_true91: ; preds = %cond_next73 + br label %cond_next96 + + cond_next96: ; preds = %cond_true91, %cond_next73.cond_next96_crit_edge + br i1 false, label %cond_next96.cond_next112_crit_edge, label %cond_true105 + + cond_next96.cond_next112_crit_edge: ; preds = %cond_next96 + br label %cond_next112 + + cond_true105: ; preds = %cond_next96 + br label %cond_next112 + + cond_next112: ; preds = %cond_true105, %cond_next96.cond_next112_crit_edge + br i1 false, label %cond_next112.cond_next127_crit_edge, label %cond_true119 + + cond_next112.cond_next127_crit_edge: ; preds = %cond_next112 + br label %cond_next127 + + cond_true119: ; preds = %cond_next112 + br label %cond_next127 + + cond_next127: ; preds = %cond_true119, %cond_next112.cond_next127_crit_edge + br i1 false, label %cond_next141, label %cond_true134 + + cond_true134: ; preds = %cond_next127 + br i1 false, label %cond_true134.bb161_crit_edge, label %cond_true134.bb_crit_edge + + cond_true134.bb_crit_edge: ; preds = %cond_true134 + br label %bb + + cond_true134.bb161_crit_edge: ; preds = %cond_true134 + br label %bb161 + + cond_next141: ; preds = %cond_next127 + br label %bb154 + + bb: ; preds = %bb154.bb_crit_edge, %cond_true134.bb_crit_edge + br label %bb154 + + bb154: ; preds = %bb, %cond_next141 + br i1 false, label %bb154.bb161_crit_edge, label %bb154.bb_crit_edge + + bb154.bb_crit_edge: ; preds = %bb154 + br label %bb + + bb154.bb161_crit_edge: ; preds = %bb154 + br label %bb161 + + bb161: ; preds = %bb154.bb161_crit_edge, %cond_true134.bb161_crit_edge + br i1 false, label %bb161.cond_next201_crit_edge, label %cond_true198 + + bb161.cond_next201_crit_edge: ; preds = %bb161 + br label %cond_next201 + + cond_true198: ; preds = %bb161 + br label %cond_next201 + + cond_next201: ; preds = %cond_true198, %bb161.cond_next201_crit_edge + br i1 false, label %cond_next212, label %cond_true206 + + cond_true206: ; preds = %cond_next201 + br label %UnifiedReturnBlock + + cond_false: ; preds = %entry + br label %UnifiedReturnBlock + + cond_next212: ; preds = %cond_next201 + br label %UnifiedReturnBlock + + UnifiedReturnBlock: ; preds = %cond_next212, %cond_false, %cond_true206 + ret void + } From dpatel at apple.com Tue Apr 17 19:53:18 2007 From: dpatel at apple.com (Devang Patel) Date: Tue, 17 Apr 2007 19:53:18 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/PostDominators.cpp Message-ID: <200704180053.l3I0rIGb028793@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: PostDominators.cpp updated: 1.65 -> 1.66 --- Log message: Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047971.html --- Diffs of the changes: (+1 -1) PostDominators.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Analysis/PostDominators.cpp diff -u llvm/lib/Analysis/PostDominators.cpp:1.65 llvm/lib/Analysis/PostDominators.cpp:1.66 --- llvm/lib/Analysis/PostDominators.cpp:1.65 Sun Apr 15 18:14:18 2007 +++ llvm/lib/Analysis/PostDominators.cpp Tue Apr 17 19:53:01 2007 @@ -284,7 +284,7 @@ for (pred_iterator SI = pred_begin(BB), SE = pred_end(BB); SI != SE; ++SI) // Does Node immediately dominate this predecessor? - if (DT[*SI]->getIDom() != Node) + if (DT[*SI] && DT[*SI]->getIDom() != Node) S.insert(*SI); // At this point, S is DFlocal. Now we union in DFup's of our children... From reid at x10sys.com Tue Apr 17 19:54:07 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 17 Apr 2007 19:54:07 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/bit_set.c bit_set.reference_output bit_set_cpp.cpp bit_set_cpp.reference_output constval.cpp constval.reference_output arith.c array.c bigint.c bit_concat.c bit_concat_cpp.cpp bit_select.c bit_select_cpp.cpp bitbit.c bitlogic.c bits.h cppfield2.cpp matrix.c part_select.c part_select_cpp.cpp part_select_cpp.reference_output arith.h array.h bigint.h bitbit.h bitlogic.h matrix.h Message-ID: <200704180054.l3I0s7p5028858@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: bit_set.c added (r1.1) bit_set.reference_output added (r1.1) bit_set_cpp.cpp added (r1.1) bit_set_cpp.reference_output added (r1.1) constval.cpp added (r1.1) constval.reference_output added (r1.1) arith.c updated: 1.8 -> 1.9 array.c updated: 1.6 -> 1.7 bigint.c updated: 1.6 -> 1.7 bit_concat.c updated: 1.3 -> 1.4 bit_concat_cpp.cpp updated: 1.2 -> 1.3 bit_select.c updated: 1.3 -> 1.4 bit_select_cpp.cpp updated: 1.1 -> 1.2 bitbit.c updated: 1.6 -> 1.7 bitlogic.c updated: 1.6 -> 1.7 bits.h updated: 1.1 -> 1.2 cppfield2.cpp updated: 1.1 -> 1.2 matrix.c updated: 1.8 -> 1.9 part_select.c updated: 1.3 -> 1.4 part_select_cpp.cpp updated: 1.1 -> 1.2 part_select_cpp.reference_output updated: 1.1 -> 1.2 arith.h (r1.1) removed array.h (r1.1) removed bigint.h (r1.1) removed bitbit.h (r1.1) removed bitlogic.h (r1.1) removed matrix.h (r1.2) removed --- Log message: Clean this test suite up. Remove unnecessary header files. Make all the bit tests use standard typenaming conventions and macros for builtins. Add more tests for other bit manipulation intrinsics. --- Diffs of the changes: (+329 -121) arith.c | 2 array.c | 2 bigint.c | 3 - bit_concat.c | 10 ++-- bit_concat_cpp.cpp | 6 +- bit_select.c | 6 +- bit_select_cpp.cpp | 2 bit_set.c | 37 +++++++++++++++ bit_set.reference_output | 49 ++++++++++++++++++++ bit_set_cpp.cpp | 34 +++++++++++++ bit_set_cpp.reference_output | 49 ++++++++++++++++++++ bitbit.c | 2 bitlogic.c | 2 bits.h | 58 +++++++++++++++-------- constval.cpp | 28 +++++++++++ constval.reference_output | 3 + cppfield2.cpp | 13 ++--- matrix.c | 2 part_select.c | 20 ++------ part_select_cpp.cpp | 27 ++++------- part_select_cpp.reference_output | 95 +++++++++++++++++++-------------------- 21 files changed, 329 insertions(+), 121 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/bit_set.c diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/bit_set.c:1.1 *** /dev/null Tue Apr 17 19:54:00 2007 --- llvm-test/SingleSource/UnitTests/Integer/bit_set.c Tue Apr 17 19:53:49 2007 *************** *** 0 **** --- 1,37 ---- + //===--- bit_select.c --- Test The bit_select builtin ---------------------===// + // + // This file was developed by Reid Spencer and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This test case tests the __builtin_bit_select builtin function llvm-gcc. + // bit_select selects one bit out of a larger + // + //===----------------------------------------------------------------------===// + + #include + #include "bits.h" + + #ifdef ENABLE_LARGE_INTEGERS + typedef uint250 BitType; + BitType X = 0; + #else + typedef uint47 BitType; + BitType X = 0; + #endif + + int main(int argc, char** argv) + { + + int i; + + printBits(X); + printf("\n"); + for (i = bitwidthof(BitType); i > 0; --i) { + X = bit_set(X, 1, i-1); + printBits(X); + printf("\n"); + } + return 0; + } Index: llvm-test/SingleSource/UnitTests/Integer/bit_set.reference_output diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/bit_set.reference_output:1.1 *** /dev/null Tue Apr 17 19:54:07 2007 --- llvm-test/SingleSource/UnitTests/Integer/bit_set.reference_output Tue Apr 17 19:53:49 2007 *************** *** 0 **** --- 1,49 ---- + 00000000000000000000000000000000000000000000000 + 10000000000000000000000000000000000000000000000 + 11000000000000000000000000000000000000000000000 + 11100000000000000000000000000000000000000000000 + 11110000000000000000000000000000000000000000000 + 11111000000000000000000000000000000000000000000 + 11111100000000000000000000000000000000000000000 + 11111110000000000000000000000000000000000000000 + 11111111000000000000000000000000000000000000000 + 11111111100000000000000000000000000000000000000 + 11111111110000000000000000000000000000000000000 + 11111111111000000000000000000000000000000000000 + 11111111111100000000000000000000000000000000000 + 11111111111110000000000000000000000000000000000 + 11111111111111000000000000000000000000000000000 + 11111111111111100000000000000000000000000000000 + 11111111111111110000000000000000000000000000000 + 11111111111111111000000000000000000000000000000 + 11111111111111111100000000000000000000000000000 + 11111111111111111110000000000000000000000000000 + 11111111111111111111000000000000000000000000000 + 11111111111111111111100000000000000000000000000 + 11111111111111111111110000000000000000000000000 + 11111111111111111111111000000000000000000000000 + 11111111111111111111111100000000000000000000000 + 11111111111111111111111110000000000000000000000 + 11111111111111111111111111000000000000000000000 + 11111111111111111111111111100000000000000000000 + 11111111111111111111111111110000000000000000000 + 11111111111111111111111111111000000000000000000 + 11111111111111111111111111111100000000000000000 + 11111111111111111111111111111110000000000000000 + 11111111111111111111111111111111000000000000000 + 11111111111111111111111111111111100000000000000 + 11111111111111111111111111111111110000000000000 + 11111111111111111111111111111111111000000000000 + 11111111111111111111111111111111111100000000000 + 11111111111111111111111111111111111110000000000 + 11111111111111111111111111111111111111000000000 + 11111111111111111111111111111111111111100000000 + 11111111111111111111111111111111111111110000000 + 11111111111111111111111111111111111111111000000 + 11111111111111111111111111111111111111111100000 + 11111111111111111111111111111111111111111110000 + 11111111111111111111111111111111111111111111000 + 11111111111111111111111111111111111111111111100 + 11111111111111111111111111111111111111111111110 + 11111111111111111111111111111111111111111111111 + exit 0 Index: llvm-test/SingleSource/UnitTests/Integer/bit_set_cpp.cpp diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/bit_set_cpp.cpp:1.1 *** /dev/null Tue Apr 17 19:54:07 2007 --- llvm-test/SingleSource/UnitTests/Integer/bit_set_cpp.cpp Tue Apr 17 19:53:49 2007 *************** *** 0 **** --- 1,34 ---- + //===--- bit_select.c --- Test The bit_select builtin ---------------------===// + // + // This file was developed by Reid Spencer and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This test case tests the __builtin_bit_select builtin function llvm-gcc. + // bit_select selects one bit out of a larger + // + //===----------------------------------------------------------------------===// + + #include + #include "bits.h" + + #ifdef ENABLE_LARGE_INTEGERS + typedef uint250 BitType; + BitType X = 0; + #else + typedef uint47 BitType; + BitType X = 0; + #endif + + int main(int argc, char** argv) + { + printBits(X); + printf("\n"); + for (int i = bitwidthof(BitType); i > 0; --i) { + X = bit_set(X, 1, i-1); + printBits(X); + printf("\n"); + } + return 0; + } Index: llvm-test/SingleSource/UnitTests/Integer/bit_set_cpp.reference_output diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/bit_set_cpp.reference_output:1.1 *** /dev/null Tue Apr 17 19:54:07 2007 --- llvm-test/SingleSource/UnitTests/Integer/bit_set_cpp.reference_output Tue Apr 17 19:53:49 2007 *************** *** 0 **** --- 1,49 ---- + 00000000000000000000000000000000000000000000000 + 10000000000000000000000000000000000000000000000 + 11000000000000000000000000000000000000000000000 + 11100000000000000000000000000000000000000000000 + 11110000000000000000000000000000000000000000000 + 11111000000000000000000000000000000000000000000 + 11111100000000000000000000000000000000000000000 + 11111110000000000000000000000000000000000000000 + 11111111000000000000000000000000000000000000000 + 11111111100000000000000000000000000000000000000 + 11111111110000000000000000000000000000000000000 + 11111111111000000000000000000000000000000000000 + 11111111111100000000000000000000000000000000000 + 11111111111110000000000000000000000000000000000 + 11111111111111000000000000000000000000000000000 + 11111111111111100000000000000000000000000000000 + 11111111111111110000000000000000000000000000000 + 11111111111111111000000000000000000000000000000 + 11111111111111111100000000000000000000000000000 + 11111111111111111110000000000000000000000000000 + 11111111111111111111000000000000000000000000000 + 11111111111111111111100000000000000000000000000 + 11111111111111111111110000000000000000000000000 + 11111111111111111111111000000000000000000000000 + 11111111111111111111111100000000000000000000000 + 11111111111111111111111110000000000000000000000 + 11111111111111111111111111000000000000000000000 + 11111111111111111111111111100000000000000000000 + 11111111111111111111111111110000000000000000000 + 11111111111111111111111111111000000000000000000 + 11111111111111111111111111111100000000000000000 + 11111111111111111111111111111110000000000000000 + 11111111111111111111111111111111000000000000000 + 11111111111111111111111111111111100000000000000 + 11111111111111111111111111111111110000000000000 + 11111111111111111111111111111111111000000000000 + 11111111111111111111111111111111111100000000000 + 11111111111111111111111111111111111110000000000 + 11111111111111111111111111111111111111000000000 + 11111111111111111111111111111111111111100000000 + 11111111111111111111111111111111111111110000000 + 11111111111111111111111111111111111111111000000 + 11111111111111111111111111111111111111111100000 + 11111111111111111111111111111111111111111110000 + 11111111111111111111111111111111111111111111000 + 11111111111111111111111111111111111111111111100 + 11111111111111111111111111111111111111111111110 + 11111111111111111111111111111111111111111111111 + exit 0 Index: llvm-test/SingleSource/UnitTests/Integer/constval.cpp diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/constval.cpp:1.1 *** /dev/null Tue Apr 17 19:54:07 2007 --- llvm-test/SingleSource/UnitTests/Integer/constval.cpp Tue Apr 17 19:53:49 2007 *************** *** 0 **** --- 1,28 ---- + //===--- constval.c - Test constant APInt values --------------------------===// + // + // This file was developed by Reid Spencer and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This is a general test parsing constant APInt values + // + //===----------------------------------------------------------------------===// + + #include "bits.h" + #include + + void my_test() + { + uint21 x = bitsFromString("123456", 21); + uint16 y = bitsFromString("123456", 16); + printf( "x = %d\n", int(x)); + printf( "y = %d\n", int(y)); + } + + int main(int argc, char** argv) + { + my_test(); + return 0; + } + Index: llvm-test/SingleSource/UnitTests/Integer/constval.reference_output diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/constval.reference_output:1.1 *** /dev/null Tue Apr 17 19:54:07 2007 --- llvm-test/SingleSource/UnitTests/Integer/constval.reference_output Tue Apr 17 19:53:49 2007 *************** *** 0 **** --- 1,3 ---- + x = 123456 + y = 57920 + exit 0 Index: llvm-test/SingleSource/UnitTests/Integer/arith.c diff -u llvm-test/SingleSource/UnitTests/Integer/arith.c:1.8 llvm-test/SingleSource/UnitTests/Integer/arith.c:1.9 --- llvm-test/SingleSource/UnitTests/Integer/arith.c:1.8 Fri Jan 26 21:02:13 2007 +++ llvm-test/SingleSource/UnitTests/Integer/arith.c Tue Apr 17 19:53:49 2007 @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -#include "arith.h" +#include "bits.h" #include Index: llvm-test/SingleSource/UnitTests/Integer/array.c diff -u llvm-test/SingleSource/UnitTests/Integer/array.c:1.6 llvm-test/SingleSource/UnitTests/Integer/array.c:1.7 --- llvm-test/SingleSource/UnitTests/Integer/array.c:1.6 Mon Jan 22 18:17:21 2007 +++ llvm-test/SingleSource/UnitTests/Integer/array.c Tue Apr 17 19:53:49 2007 @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -#include "array.h" +#include "bits.h" #include typedef enum bool{false=0, true=1} bool; Index: llvm-test/SingleSource/UnitTests/Integer/bigint.c diff -u llvm-test/SingleSource/UnitTests/Integer/bigint.c:1.6 llvm-test/SingleSource/UnitTests/Integer/bigint.c:1.7 --- llvm-test/SingleSource/UnitTests/Integer/bigint.c:1.6 Mon Jan 22 18:17:21 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bigint.c Tue Apr 17 19:53:49 2007 @@ -8,7 +8,8 @@ // This is a general test for big integer type. // //===----------------------------------------------------------------------===// -#include "bigint.h" + +#include "bits.h" #include typedef enum bool{false=0, true=1} bool; Index: llvm-test/SingleSource/UnitTests/Integer/bit_concat.c diff -u llvm-test/SingleSource/UnitTests/Integer/bit_concat.c:1.3 llvm-test/SingleSource/UnitTests/Integer/bit_concat.c:1.4 --- llvm-test/SingleSource/UnitTests/Integer/bit_concat.c:1.3 Tue Apr 17 18:12:36 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bit_concat.c Tue Apr 17 19:53:49 2007 @@ -17,9 +17,9 @@ int main(int argc, char** argv) { - Int17 X = 0; - Int19 Y = 0; - Int36 Z = 0; + uint17 X = 0; + uint19 Y = 0; + uint36 Z = 0; int i, j; int count = (argc > 1 ? atoi(argv[1]) % 128 : 128); @@ -27,11 +27,11 @@ for (i = 0; i < count; i++) { Y = X = 0; - for (j = 0; j < bitwidthof(Int17); j++) { + for (j = 0; j < bitwidthof(uint17); j++) { X <<= 1; X += (rand() % 2 == 0 ? 0 : 1); } - for (j = 0; j < bitwidthof(Int19); j++) { + for (j = 0; j < bitwidthof(uint19); j++) { Y <<= 1; Y += (rand() % 2 == 0 ? 0 : 1); } Index: llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp diff -u llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp:1.2 llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp:1.3 --- llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp:1.2 Tue Apr 17 18:12:36 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp Tue Apr 17 19:53:49 2007 @@ -18,9 +18,9 @@ { int count = (argc > 1 ? atoi(argv[1]) % 128 : 128); - Int17 X = 0; - Int19 Y = 0; - Int36 Z = 0; + uint17 X = 0; + uint19 Y = 0; + uint36 Z = 0; srand(count); Index: llvm-test/SingleSource/UnitTests/Integer/bit_select.c diff -u llvm-test/SingleSource/UnitTests/Integer/bit_select.c:1.3 llvm-test/SingleSource/UnitTests/Integer/bit_select.c:1.4 --- llvm-test/SingleSource/UnitTests/Integer/bit_select.c:1.3 Tue Apr 17 18:18:07 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bit_select.c Tue Apr 17 19:53:49 2007 @@ -11,13 +11,13 @@ //===----------------------------------------------------------------------===// #include -#include +#include "bits.h" #ifdef ENABLE_LARGE_INTEGERS -typedef Int250 BitType; +typedef uint250 BitType; const BitType X = 0xAAAAAAAAAAAAAAAAULL; #else -typedef Int47 BitType; +typedef uint47 BitType; const BitType X = 0xAAAAAAAAAAAAULL; #endif Index: llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.cpp diff -u llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.cpp:1.1 llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.cpp:1.2 --- llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.cpp:1.1 Wed Mar 28 11:31:50 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.cpp Tue Apr 17 19:53:49 2007 @@ -34,7 +34,7 @@ BitType i; for (i = numbits-1; i >= 0; --i) { - if (__builtin_bit_select(Y, i)) + if (__builtin_bit_select(&Y, i)) printf("1"); else printf("0"); Index: llvm-test/SingleSource/UnitTests/Integer/bitbit.c diff -u llvm-test/SingleSource/UnitTests/Integer/bitbit.c:1.6 llvm-test/SingleSource/UnitTests/Integer/bitbit.c:1.7 --- llvm-test/SingleSource/UnitTests/Integer/bitbit.c:1.6 Mon Jan 22 18:17:21 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bitbit.c Tue Apr 17 19:53:49 2007 @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -#include "bitbit.h" +#include "bits.h" #include Index: llvm-test/SingleSource/UnitTests/Integer/bitlogic.c diff -u llvm-test/SingleSource/UnitTests/Integer/bitlogic.c:1.6 llvm-test/SingleSource/UnitTests/Integer/bitlogic.c:1.7 --- llvm-test/SingleSource/UnitTests/Integer/bitlogic.c:1.6 Mon Jan 22 18:17:21 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bitlogic.c Tue Apr 17 19:53:49 2007 @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -#include "bitlogic.h" +#include "bits.h" #include Index: llvm-test/SingleSource/UnitTests/Integer/bits.h diff -u llvm-test/SingleSource/UnitTests/Integer/bits.h:1.1 llvm-test/SingleSource/UnitTests/Integer/bits.h:1.2 --- llvm-test/SingleSource/UnitTests/Integer/bits.h:1.1 Tue Apr 17 18:10:20 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bits.h Tue Apr 17 19:53:49 2007 @@ -13,25 +13,38 @@ #include #include -typedef unsigned int __attribute__((bitwidth(1))) Int1; -typedef unsigned int __attribute__((bitwidth(2))) Int2; -typedef unsigned int __attribute__((bitwidth(3))) Int3; -typedef unsigned int __attribute__((bitwidth(4))) Int4; -typedef unsigned int __attribute__((bitwidth(5))) Int5; -typedef unsigned int __attribute__((bitwidth(6))) Int6; -typedef unsigned int __attribute__((bitwidth(7))) Int7; -typedef unsigned int __attribute__((bitwidth(8))) Int8; -typedef unsigned int __attribute__((bitwidth(16))) Int16; -typedef unsigned int __attribute__((bitwidth(17))) Int17; -typedef unsigned int __attribute__((bitwidth(19))) Int19; -typedef unsigned int __attribute__((bitwidth(17))) Int32; -typedef unsigned int __attribute__((bitwidth(36))) Int36; -typedef unsigned int __attribute__((bitwidth(47))) Int47; -typedef unsigned int __attribute__((bitwidth(48))) Int48; -typedef unsigned int __attribute__((bitwidth(64))) Int64; -typedef unsigned int __attribute__((bitwidth(65))) Int65; -typedef unsigned int __attribute__((bitwidth(128))) Int128; -/*typedef unsigned int __attribute__((bitwidth(256))) Int256; */ +typedef unsigned int __attribute__((bitwidth(1))) uint1; +typedef unsigned int __attribute__((bitwidth(2))) uint2; +typedef unsigned int __attribute__((bitwidth(3))) uint3; +typedef unsigned int __attribute__((bitwidth(4))) uint4; +typedef unsigned int __attribute__((bitwidth(5))) uint5; +typedef unsigned int __attribute__((bitwidth(6))) uint6; +typedef unsigned int __attribute__((bitwidth(7))) uint7; +typedef unsigned int __attribute__((bitwidth(8))) uint8; +typedef unsigned int __attribute__((bitwidth(9))) uint9; +typedef unsigned int __attribute__((bitwidth(10))) uint10; +typedef unsigned int __attribute__((bitwidth(16))) uint16; +typedef unsigned int __attribute__((bitwidth(17))) uint17; +typedef unsigned int __attribute__((bitwidth(19))) uint19; +typedef unsigned int __attribute__((bitwidth(21))) uint21; +typedef unsigned int __attribute__((bitwidth(17))) uint32; +typedef unsigned int __attribute__((bitwidth(36))) uint36; +typedef unsigned int __attribute__((bitwidth(47))) uint47; +typedef unsigned int __attribute__((bitwidth(48))) uint48; +typedef unsigned int __attribute__((bitwidth(64))) uint64; +typedef unsigned int __attribute__((bitwidth(65))) uint65; +typedef unsigned int __attribute__((bitwidth(128))) uint128; + +typedef int __attribute__ ((bitwidth(9))) int9; +typedef int __attribute__((bitwidth(10))) int10; +typedef int __attribute__((bitwidth(21))) int21; +typedef int __attribute__((bitwidth(24))) int24; +typedef int __attribute__((bitwidth(32))) int32; +typedef int __attribute__((bitwidth(33))) int33; + +typedef int __attribute__((bitwidth(169))) int169; +typedef unsigned int __attribute__((bitwidth(250))) Int250; +typedef unsigned int __attribute__((bitwidth(256))) Int256; #define bitwidthof(TORV) (__bitwidthof__(typeof(TORV))) @@ -52,7 +65,7 @@ typeof(Val) Result = 0; \ typeof(Val) Val2 = Val; \ typeof(Repl) Repl2 = Repl; \ - __builtin_bit_set(&Result, &Val2, &Repl, Bit); \ + __builtin_bit_set(&Result, &Val2, &Repl2, Bit); \ Result; \ }) @@ -87,3 +100,8 @@ } \ } +#define bitsFromString(str,bits) ({ \ + int __attribute__((bitwidth(bits))) Result; \ + __builtin_bit_from_string(&Result, str, 10); \ + Result; \ +}) Index: llvm-test/SingleSource/UnitTests/Integer/cppfield2.cpp diff -u llvm-test/SingleSource/UnitTests/Integer/cppfield2.cpp:1.1 llvm-test/SingleSource/UnitTests/Integer/cppfield2.cpp:1.2 --- llvm-test/SingleSource/UnitTests/Integer/cppfield2.cpp:1.1 Mon Jan 29 18:48:44 2007 +++ llvm-test/SingleSource/UnitTests/Integer/cppfield2.cpp Tue Apr 17 19:53:49 2007 @@ -10,11 +10,8 @@ #include +#include "bits.h" -typedef unsigned char __attribute__ ((bitwidth(7))) int7; -typedef unsigned int __attribute__ ((bitwidth(17))) int17; -typedef unsigned int __attribute__ ((bitwidth(32))) int32; -typedef unsigned int __attribute__ ((bitwidth(8))) int8; class bitFieldStruct { public: @@ -26,10 +23,10 @@ class bitAccurateStruct { public: - int32 i; - int7 c : 7; - int17 s : 17; - int8 c2; + uint32 i; + uint7 c : 7; + uint17 s : 17; + uint8 c2; }; int main() Index: llvm-test/SingleSource/UnitTests/Integer/matrix.c diff -u llvm-test/SingleSource/UnitTests/Integer/matrix.c:1.8 llvm-test/SingleSource/UnitTests/Integer/matrix.c:1.9 --- llvm-test/SingleSource/UnitTests/Integer/matrix.c:1.8 Thu Jan 25 21:10:17 2007 +++ llvm-test/SingleSource/UnitTests/Integer/matrix.c Tue Apr 17 19:53:49 2007 @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// -#include "matrix.h" +#include "bits.h" #include #include Index: llvm-test/SingleSource/UnitTests/Integer/part_select.c diff -u llvm-test/SingleSource/UnitTests/Integer/part_select.c:1.3 llvm-test/SingleSource/UnitTests/Integer/part_select.c:1.4 --- llvm-test/SingleSource/UnitTests/Integer/part_select.c:1.3 Mon Feb 12 17:17:34 2007 +++ llvm-test/SingleSource/UnitTests/Integer/part_select.c Tue Apr 17 19:53:49 2007 @@ -13,15 +13,14 @@ #include #include #include +#include "bits.h" #ifdef ENABLE_LARGE_INTEGERS -typedef unsigned __attribute__((bitwidth(256))) BitType; +typedef uint256 BitType; const BitType X = 0xFEDCBA9876543210ULL; -unsigned numbits = 256; #else -typedef unsigned __attribute__((bitwidth(47))) BitType; +typedef uint47 BitType; const BitType X = 0xFEDCBA9876543210ULL; -unsigned numbits = 47; #endif int main(int argc, char** argv) @@ -37,17 +36,12 @@ unsigned i, j; - for (i = 0; i < numbits; ++i) { - BitType left = rand() % numbits; + for (i = 0; i < bitwidthof(BitType); ++i) { + BitType left = rand() % bitwidthof(BitType); BitType right = i; printf("part_select(Y, %3u, %3u) = ", (unsigned)left, (unsigned)right); - BitType Z = __builtin_bit_part_select(Y, left, right); - for (j = numbits; j > 0; --j) { - if (__builtin_bit_select(Z, j-1)) - printf("1"); - else - printf("0"); - } + BitType Z = part_select(Y, right, left ); + printBits(Z); uint64_t val = Z; printf(" (%lx)", val); printf("\n"); Index: llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.cpp diff -u llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.cpp:1.1 llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.cpp:1.2 --- llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.cpp:1.1 Wed Mar 28 11:31:50 2007 +++ llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.cpp Tue Apr 17 19:53:49 2007 @@ -13,15 +13,14 @@ #include #include #include +#include "bits.h" #ifdef ENABLE_LARGE_INTEGERS -typedef unsigned __attribute__((bitwidth(256))) BitType; +typedef uint256 BitType; const BitType X = 0xFEDCBA9876543210ULL; -unsigned numbits = 256; #else -typedef unsigned __attribute__((bitwidth(47))) BitType; +typedef uint47 BitType; const BitType X = 0xFEDCBA9876543210ULL; -unsigned numbits = 47; #endif int main(int argc, char** argv) @@ -37,19 +36,17 @@ unsigned i, j; - for (i = 0; i < numbits; ++i) { - BitType left = rand() % numbits; + printf("Selecting bits from: "); + printBits(X); + printf("\n"); + for (i = 0; i < bitwidthof(BitType); ++i) { + BitType left = rand() % bitwidthof(BitType); BitType right = i; - printf("part_select(Y, %3u, %3u) = ", (unsigned)left, (unsigned)right); - BitType Z = __builtin_bit_part_select(Y, left, right); - for (j = numbits; j > 0; --j) { - if (__builtin_bit_select(Z, j-1)) - printf("1"); - else - printf("0"); - } + printf("part_select(Y,%3u,%3u) = ", (unsigned)right, (unsigned)left); + BitType Z = part_select(Y, right, left); + printBits(Z); uint64_t val = Z; - printf(" (%lx)", val); + printf(" (%llx)", val); printf("\n"); } Index: llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.reference_output diff -u llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.reference_output:1.1 llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.reference_output:1.2 --- llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.reference_output:1.1 Wed Mar 28 11:31:50 2007 +++ llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.reference_output Tue Apr 17 19:53:49 2007 @@ -1,48 +1,49 @@ -part_select(Y, 38, 0) = 00000000001100001110110010101000011001000010000 (76543210) -part_select(Y, 4, 1) = 00000000000000000000000000000000000000000001000 (8) -part_select(Y, 18, 2) = 00000000000000000000000000000010000110010000100 (10c84) -part_select(Y, 23, 3) = 00000000000000000000000000010101000011001000010 (a8642) -part_select(Y, 17, 4) = 00000000000000000000000000000000000001100100001 (321) -part_select(Y, 26, 5) = 00000000000000000000000001100101010000110010000 (32a190) -part_select(Y, 16, 6) = 00000000000000000000000000000000000000011001000 (c8) -part_select(Y, 3, 7) = 00000000000000000000000000000000000000000001000 (8) -part_select(Y, 28, 8) = 00000000000000000000000000101100101010000110010 (165432) -part_select(Y, 28, 9) = 00000000000000000000000000010110010101000011001 (b2a19) -part_select(Y, 10, 10) = 00000000000000000000000000000000000000000000000 (0) -part_select(Y, 17, 11) = 00000000000000000000000000000000000000000000110 (6) -part_select(Y, 44, 12) = 00000000000000110101001100001110110010101000011 (a9876543) -part_select(Y, 28, 13) = 00000000000000000000000000000001011001010100001 (b2a1) -part_select(Y, 2, 14) = 00000000000000000000000000000000000010000100110 (426) -part_select(Y, 20, 15) = 00000000000000000000000000000000000000000101000 (28) -part_select(Y, 22, 16) = 00000000000000000000000000000000000000001010100 (54) -part_select(Y, 21, 17) = 00000000000000000000000000000000000000000001010 (a) -part_select(Y, 18, 18) = 00000000000000000000000000000000000000000000001 (1) -part_select(Y, 36, 19) = 00000000000000000000000000000110000111011001010 (30eca) -part_select(Y, 34, 20) = 00000000000000000000000000000000000011101100101 (765) -part_select(Y, 37, 21) = 00000000000000000000000000000001100001110110010 (c3b2) -part_select(Y, 18, 22) = 00000000000000000000000000000000000000000010101 (15) -part_select(Y, 38, 23) = 00000000000000000000000000000000011000011101100 (30ec) -part_select(Y, 20, 24) = 00000000000000000000000000000000000000000010100 (14) -part_select(Y, 1, 25) = 00000000000000000000000001000010011000010101001 (2130a9) -part_select(Y, 31, 26) = 00000000000000000000000000000000000000000011101 (1d) -part_select(Y, 17, 27) = 00000000000000000000000000000000000001010100110 (2a6) -part_select(Y, 20, 28) = 00000000000000000000000000000000000000101001101 (14d) -part_select(Y, 6, 29) = 00000000000000000000000000100110000101010011011 (130a9b) -part_select(Y, 27, 30) = 00000000000000000000000000000000000000000000111 (7) -part_select(Y, 37, 31) = 00000000000000000000000000000000000000000110000 (30) -part_select(Y, 11, 32) = 00000000000000000000000000110000101010011011100 (1854dc) -part_select(Y, 24, 33) = 00000000000000000000000000000000000000110111000 (1b8) -part_select(Y, 39, 34) = 00000000000000000000000000000000000000000100110 (26) -part_select(Y, 7, 35) = 00000000000000000000100110000101010011011100001 (4c2a6e1) -part_select(Y, 3, 36) = 00000000000000100001001100001010100110111000011 (9854dc3) -part_select(Y, 9, 37) = 00000000000000000010011000010101001101110000110 (130a9b86) -part_select(Y, 36, 38) = 00000000000000000000000000000000000000000000100 (4) -part_select(Y, 31, 39) = 00000000000000000000000000000000000000000011001 (19) -part_select(Y, 16, 40) = 00000000000000000000000010101001101110000110010 (54dc32) -part_select(Y, 46, 41) = 00000000000000000000000000000000000000000011101 (1d) -part_select(Y, 27, 42) = 00000000000000000000000000000000111000011001010 (70ca) -part_select(Y, 13, 43) = 00000000000000001000010101001101110000110010101 (42a6e195) -part_select(Y, 6, 44) = 00000000000100110000101010011011100001100101011 (854dc32b) -part_select(Y, 9, 45) = 00000000001001100001010100110111000011001010111 (a9b8657) -part_select(Y, 13, 46) = 00000000000001000010101001101110000110010101110 (15370cae) +Selecting bits from: 01110101001100001110110010101000011001000010000 +part_select(Y, 0, 38) = 00000000001100001110110010101000011001000010000 (1876543210) +part_select(Y, 1, 4) = 00000000000000000000000000000000000000000001000 (8) +part_select(Y, 2, 18) = 00000000000000000000000000000010000110010000100 (10c84) +part_select(Y, 3, 23) = 00000000000000000000000000010101000011001000010 (a8642) +part_select(Y, 4, 17) = 00000000000000000000000000000000000001100100001 (321) +part_select(Y, 5, 26) = 00000000000000000000000001100101010000110010000 (32a190) +part_select(Y, 6, 16) = 00000000000000000000000000000000000000011001000 (c8) +part_select(Y, 7, 3) = 00000000000000000000000000000000000000000001000 (8) +part_select(Y, 8, 28) = 00000000000000000000000000101100101010000110010 (165432) +part_select(Y, 9, 28) = 00000000000000000000000000010110010101000011001 (b2a19) +part_select(Y, 10, 10) = 00000000000000000000000000000000000000000000000 (0) +part_select(Y, 11, 17) = 00000000000000000000000000000000000000000000110 (6) +part_select(Y, 12, 44) = 00000000000000110101001100001110110010101000011 (1a9876543) +part_select(Y, 13, 28) = 00000000000000000000000000000001011001010100001 (b2a1) +part_select(Y, 14, 2) = 00000000000000000000000000000000000010000100110 (426) +part_select(Y, 15, 20) = 00000000000000000000000000000000000000000101000 (28) +part_select(Y, 16, 22) = 00000000000000000000000000000000000000001010100 (54) +part_select(Y, 17, 21) = 00000000000000000000000000000000000000000001010 (a) +part_select(Y, 18, 18) = 00000000000000000000000000000000000000000000001 (1) +part_select(Y, 19, 36) = 00000000000000000000000000000110000111011001010 (30eca) +part_select(Y, 20, 34) = 00000000000000000000000000000000000011101100101 (765) +part_select(Y, 21, 37) = 00000000000000000000000000000001100001110110010 (c3b2) +part_select(Y, 22, 18) = 00000000000000000000000000000000000000000010101 (15) +part_select(Y, 23, 38) = 00000000000000000000000000000000011000011101100 (30ec) +part_select(Y, 24, 20) = 00000000000000000000000000000000000000000010100 (14) +part_select(Y, 25, 1) = 00000000000000000000000001000010011000010101001 (2130a9) +part_select(Y, 26, 31) = 00000000000000000000000000000000000000000011101 (1d) +part_select(Y, 27, 17) = 00000000000000000000000000000000000001010100110 (2a6) +part_select(Y, 28, 20) = 00000000000000000000000000000000000000101001101 (14d) +part_select(Y, 29, 6) = 00000000000000000000000000100110000101010011011 (130a9b) +part_select(Y, 30, 27) = 00000000000000000000000000000000000000000000111 (7) +part_select(Y, 31, 37) = 00000000000000000000000000000000000000000110000 (30) +part_select(Y, 32, 11) = 00000000000000000000000000110000101010011011100 (1854dc) +part_select(Y, 33, 24) = 00000000000000000000000000000000000000110111000 (1b8) +part_select(Y, 34, 39) = 00000000000000000000000000000000000000000100110 (26) +part_select(Y, 35, 7) = 00000000000000000000100110000101010011011100001 (4c2a6e1) +part_select(Y, 36, 3) = 00000000000000100001001100001010100110111000011 (109854dc3) +part_select(Y, 37, 9) = 00000000000000000010011000010101001101110000110 (130a9b86) +part_select(Y, 38, 36) = 00000000000000000000000000000000000000000000100 (4) +part_select(Y, 39, 31) = 00000000000000000000000000000000000000000011001 (19) +part_select(Y, 40, 16) = 00000000000000000000000010101001101110000110010 (54dc32) +part_select(Y, 41, 46) = 00000000000000000000000000000000000000000011101 (1d) +part_select(Y, 42, 27) = 00000000000000000000000000000000111000011001010 (70ca) +part_select(Y, 43, 13) = 00000000000000001000010101001101110000110010101 (42a6e195) +part_select(Y, 44, 6) = 00000000000100110000101010011011100001100101011 (9854dc32b) +part_select(Y, 45, 9) = 00000000001001100001010100110111000011001010111 (130a9b8657) +part_select(Y, 46, 13) = 00000000000001000010101001101110000110010101110 (215370cae) exit 0 From sabre at nondot.org Tue Apr 17 19:57:40 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 19:57:40 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200704180057.l3I0ve1l028942@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.269 -> 1.270 --- Log message: don't access argument list of prototypes --- Diffs of the changes: (+24 -7) AsmWriter.cpp | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.269 llvm/lib/VMCore/AsmWriter.cpp:1.270 --- llvm/lib/VMCore/AsmWriter.cpp:1.269 Thu Apr 12 13:32:50 2007 +++ llvm/lib/VMCore/AsmWriter.cpp Tue Apr 17 19:57:22 2007 @@ -970,13 +970,30 @@ // Loop over the arguments, printing them... unsigned Idx = 1; - for (Function::const_arg_iterator I = F->arg_begin(), E = F->arg_end(); - I != E; ++I) { - // Insert commas as we go... the first arg doesn't get a comma - if (I != F->arg_begin()) Out << ", "; - printArgument(I, (Attrs ? Attrs->getParamAttrs(Idx) - : uint16_t(ParamAttr::None))); - Idx++; + if (!F->isDeclaration()) { + // If this isn't a declaration, print the argument names as well. + for (Function::const_arg_iterator I = F->arg_begin(), E = F->arg_end(); + I != E; ++I) { + // Insert commas as we go... the first arg doesn't get a comma + if (I != F->arg_begin()) Out << ", "; + printArgument(I, (Attrs ? Attrs->getParamAttrs(Idx) + : uint16_t(ParamAttr::None))); + Idx++; + } + } else { + // Otherwise, print the types from the function type. + for (unsigned i = 0, e = FT->getNumParams(); i != e; ++i) { + // Insert commas as we go... the first arg doesn't get a comma + if (i) Out << ", "; + + // Output type... + printType(FT->getParamType(i)); + + unsigned ArgAttrs = ParamAttr::None; + if (Attrs) ArgAttrs = Attrs->getParamAttrs(i+1); + if (ArgAttrs != ParamAttr::None) + Out << ' ' << ParamAttrsList::getParamAttrsText(ArgAttrs); + } } // Finish printing arguments... From dpatel at apple.com Tue Apr 17 20:20:12 2007 From: dpatel at apple.com (Devang Patel) Date: Tue, 17 Apr 2007 20:20:12 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/PostDominators.cpp Message-ID: <200704180120.l3I1KCnI029303@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: PostDominators.cpp updated: 1.66 -> 1.67 --- Log message: Cache DT[*SI] lookup. --- Diffs of the changes: (+4 -2) PostDominators.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/Analysis/PostDominators.cpp diff -u llvm/lib/Analysis/PostDominators.cpp:1.66 llvm/lib/Analysis/PostDominators.cpp:1.67 --- llvm/lib/Analysis/PostDominators.cpp:1.66 Tue Apr 17 19:53:01 2007 +++ llvm/lib/Analysis/PostDominators.cpp Tue Apr 17 20:19:55 2007 @@ -282,10 +282,12 @@ if (BB) for (pred_iterator SI = pred_begin(BB), SE = pred_end(BB); - SI != SE; ++SI) + SI != SE; ++SI) { // Does Node immediately dominate this predecessor? - if (DT[*SI] && DT[*SI]->getIDom() != Node) + DominatorTree::Node *SINode = DT[*SI]; + if (SINode && SINode->getIDom() != Node) S.insert(*SI); + } // At this point, S is DFlocal. Now we union in DFup's of our children... // Loop through and visit the nodes that Node immediately dominates (Node's From evan.cheng at apple.com Tue Apr 17 21:30:41 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 21:30:41 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200704180230.l3I2UfPQ030548@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.235 -> 1.236 --- Log message: Don't populate TryAgainList when coalescing only physical registers with virtual registers. --- Diffs of the changes: (+6 -6) LiveIntervalAnalysis.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.235 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.236 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.235 Tue Apr 17 15:32:26 2007 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Apr 17 21:30:19 2007 @@ -1473,7 +1473,7 @@ void LiveIntervals::CopyCoallesceInMBB(MachineBasicBlock *MBB, - std::vector &TryAgain, bool PhysOnly) { + std::vector *TryAgain, bool PhysOnly) { DOUT << ((Value*)MBB->getBasicBlock())->getName() << ":\n"; for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end(); @@ -1484,8 +1484,8 @@ unsigned SrcReg, DstReg; if (!tii_->isMoveInstr(*Inst, SrcReg, DstReg)) continue; - if (!JoinCopy(Inst, SrcReg, DstReg, PhysOnly)) - TryAgain.push_back(getCopyRec(Inst, SrcReg, DstReg)); + if (TryAgain && !JoinCopy(Inst, SrcReg, DstReg, PhysOnly)) + TryAgain->push_back(getCopyRec(Inst, SrcReg, DstReg)); } } @@ -1502,7 +1502,7 @@ // If there are no loops in the function, join intervals in function order. for (MachineFunction::iterator I = mf_->begin(), E = mf_->end(); I != E; ++I) - CopyCoallesceInMBB(I, TryAgainList); + CopyCoallesceInMBB(I, &TryAgainList); } else { // Otherwise, join intervals in inner loops before other intervals. // Unfortunately we can't just iterate over loop hierarchy here because @@ -1519,9 +1519,9 @@ // Finally, join intervals in loop nest order. for (unsigned i = 0, e = MBBs.size(); i != e; ++i) - CopyCoallesceInMBB(MBBs[i].second, TryAgainList, true); + CopyCoallesceInMBB(MBBs[i].second, NULL, true); for (unsigned i = 0, e = MBBs.size(); i != e; ++i) - CopyCoallesceInMBB(MBBs[i].second, TryAgainList, false); + CopyCoallesceInMBB(MBBs[i].second, &TryAgainList, false); } // Joining intervals can allow other intervals to be joined. Iteratively join From evan.cheng at apple.com Tue Apr 17 21:30:41 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 21:30:41 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h Message-ID: <200704180230.l3I2UfLW030545@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: LiveIntervalAnalysis.h updated: 1.78 -> 1.79 --- Log message: Don't populate TryAgainList when coalescing only physical registers with virtual registers. --- Diffs of the changes: (+1 -1) LiveIntervalAnalysis.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.78 llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.79 --- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.78 Tue Apr 17 15:32:26 2007 +++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h Tue Apr 17 21:30:19 2007 @@ -205,7 +205,7 @@ /// CopyCoallesceInMBB - Coallsece copies in the specified MBB, putting /// copies that cannot yet be coallesced into the "TryAgain" list. void CopyCoallesceInMBB(MachineBasicBlock *MBB, - std::vector &TryAgain, bool PhysOnly = false); + std::vector *TryAgain, bool PhysOnly = false); /// JoinCopy - Attempt to join intervals corresponding to SrcReg/DstReg, /// which are the src/dst of the copy instruction CopyMI. This returns true From evan.cheng at apple.com Tue Apr 17 21:35:27 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Apr 2007 21:35:27 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2007-04-17-LiveIntervalAssert.ll Message-ID: <200704180235.l3I2ZRYK030804@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: 2007-04-17-LiveIntervalAssert.ll added (r1.1) --- Log message: New crasher test case. --- Diffs of the changes: (+42 -0) 2007-04-17-LiveIntervalAssert.ll | 42 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+) Index: llvm/test/CodeGen/X86/2007-04-17-LiveIntervalAssert.ll diff -c /dev/null llvm/test/CodeGen/X86/2007-04-17-LiveIntervalAssert.ll:1.1 *** /dev/null Tue Apr 17 21:35:20 2007 --- llvm/test/CodeGen/X86/2007-04-17-LiveIntervalAssert.ll Tue Apr 17 21:35:10 2007 *************** *** 0 **** --- 1,42 ---- + ; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin -relocation-model=pic --disable-fp-elim + + %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } + %struct.__sFILEX = type opaque + %struct.__sbuf = type { i8*, i32 } + %struct.partition_def = type { i32, [1 x %struct.partition_elem] } + %struct.partition_elem = type { i32, %struct.partition_elem*, i32 } + + define void @partition_print(%struct.partition_def* %part) { + entry: + br i1 false, label %bb.preheader, label %bb99 + + bb.preheader: ; preds = %entry + br i1 false, label %cond_true, label %cond_next90 + + cond_true: ; preds = %bb.preheader + br i1 false, label %bb32, label %bb87.critedge + + bb32: ; preds = %bb32, %cond_true + %i.2115.0 = phi i32 [ 0, %cond_true ], [ %indvar.next127, %bb32 ] ; [#uses=1] + %c.2112.0 = phi i32 [ 0, %cond_true ], [ %tmp49, %bb32 ] ; [#uses=1] + %tmp43 = getelementptr %struct.partition_def* %part, i32 0, i32 1, i32 %c.2112.0, i32 1 ; <%struct.partition_elem**> [#uses=1] + %tmp44 = load %struct.partition_elem** %tmp43 ; <%struct.partition_elem*> [#uses=1] + %tmp4445 = ptrtoint %struct.partition_elem* %tmp44 to i32 ; [#uses=1] + %tmp48 = sub i32 %tmp4445, 0 ; [#uses=1] + %tmp49 = sdiv i32 %tmp48, 12 ; [#uses=1] + %indvar.next127 = add i32 %i.2115.0, 1 ; [#uses=2] + %exitcond128 = icmp eq i32 %indvar.next127, 0 ; [#uses=1] + br i1 %exitcond128, label %bb58, label %bb32 + + bb58: ; preds = %bb32 + ret void + + bb87.critedge: ; preds = %cond_true + ret void + + cond_next90: ; preds = %bb.preheader + ret void + + bb99: ; preds = %entry + ret void + } From sabre at nondot.org Tue Apr 17 22:01:57 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 22:01:57 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Message-ID: <200704180301.l3I31vgc031368@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: TargetLowering.cpp updated: 1.111 -> 1.112 --- Log message: fix a pasto --- Diffs of the changes: (+1 -1) TargetLowering.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.111 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.112 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.111 Tue Apr 17 17:53:02 2007 +++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Apr 17 22:01:40 2007 @@ -583,7 +583,7 @@ SDOperand NewSA = TLO.DAG.getConstant(ShAmt-C1, Op.getOperand(1).getValueType()); MVT::ValueType VT = Op.getValueType(); - return TLO.CombineTo(Op, TLO.DAG.getNode(ISD::SRL, VT, + return TLO.CombineTo(Op, TLO.DAG.getNode(Opc, VT, InOp.getOperand(0), NewSA)); } } From sabre at nondot.org Tue Apr 17 22:04:55 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 22:04:55 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/shl_elim.ll Message-ID: <200704180304.l3I34twC031488@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: shl_elim.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+13 -0) shl_elim.ll | 13 +++++++++++++ 1 files changed, 13 insertions(+) Index: llvm/test/CodeGen/X86/shl_elim.ll diff -c /dev/null llvm/test/CodeGen/X86/shl_elim.ll:1.1 *** /dev/null Tue Apr 17 22:04:47 2007 --- llvm/test/CodeGen/X86/shl_elim.ll Tue Apr 17 22:04:37 2007 *************** *** 0 **** --- 1,13 ---- + ; RUN: llvm-as < %s | llc -march=x86 | grep {movl 8(.esp), %eax} + ; RUN: llvm-as < %s | llc -march=x86 | grep {shll .15, .eax} + ; RUN: llvm-as < %s | llc -march=x86 | grep {sarl .16, .eax} + + define i32 @test1(i64 %a) { + %tmp29 = lshr i64 %a, 24 ; [#uses=1] + %tmp23 = trunc i64 %tmp29 to i32 ; [#uses=1] + %tmp410 = lshr i32 %tmp23, 9 ; [#uses=1] + %tmp45 = trunc i32 %tmp410 to i16 ; [#uses=1] + %tmp456 = sext i16 %tmp45 to i32 ; [#uses=1] + ret i32 %tmp456 + } + From sabre at nondot.org Tue Apr 17 22:05:40 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 22:05:40 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200704180305.l3I35efP031508@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.291 -> 1.292 --- Log message: When replacing a node in SimplifyDemandedBits, if the old node used any single-use nodes, they will be dead soon. Make sure to remove them before processing other nodes. This implements CodeGen/X86/shl_elim.ll --- Diffs of the changes: (+8 -1) DAGCombiner.cpp | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.291 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.292 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.291 Tue Apr 17 14:03:21 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Apr 17 22:05:22 2007 @@ -182,6 +182,13 @@ // something else needing this node. if (TLO.Old.Val->use_empty()) { removeFromWorkList(TLO.Old.Val); + + // If the operands of this node are only used by the node, they will now + // be dead. Make sure to visit them first to delete dead nodes early. + for (unsigned i = 0, e = TLO.Old.Val->getNumOperands(); i != e; ++i) + if (TLO.Old.Val->getOperand(i).Val->hasOneUse()) + AddToWorkList(TLO.Old.Val->getOperand(i).Val); + DAG.DeleteNode(TLO.Old.Val); } return true; @@ -1838,6 +1845,7 @@ // if (srl x, c) is known to be zero, return 0 if (N1C && TLI.MaskedValueIsZero(SDOperand(N, 0), ~0ULL >> (64-OpSizeInBits))) return DAG.getConstant(0, VT); + // fold (srl (srl x, c1), c2) -> 0 or (srl x, c1+c2) if (N1C && N0.getOpcode() == ISD::SRL && N0.getOperand(1).getOpcode() == ISD::Constant) { @@ -1899,7 +1907,6 @@ return DAG.getNode(ISD::XOR, VT, Op, DAG.getConstant(1, VT)); } } - return SDOperand(); } From sabre at nondot.org Tue Apr 17 22:07:07 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Apr 2007 22:07:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200704180307.l3I377cd031560@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.292 -> 1.293 --- Log message: allow SRL to simplify its operands, as it doesn't demand all bits as input. --- Diffs of the changes: (+7 -1) DAGCombiner.cpp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.292 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.293 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.292 Tue Apr 17 22:05:22 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Apr 17 22:06:49 2007 @@ -1728,7 +1728,7 @@ // if (shl x, c) is known to be zero, return 0 if (TLI.MaskedValueIsZero(SDOperand(N, 0), MVT::getIntVTBitMask(VT))) return DAG.getConstant(0, VT); - if (SimplifyDemandedBits(SDOperand(N, 0))) + if (N1C && SimplifyDemandedBits(SDOperand(N, 0))) return SDOperand(N, 0); // fold (shl (shl x, c1), c2) -> 0 or (shl x, c1+c2) if (N1C && N0.getOpcode() == ISD::SHL && @@ -1907,6 +1907,12 @@ return DAG.getNode(ISD::XOR, VT, Op, DAG.getConstant(1, VT)); } } + + // fold operands of srl based on knowledge that the low bits are not + // demanded. + if (N1C && SimplifyDemandedBits(SDOperand(N, 0))) + return SDOperand(N, 0); + return SDOperand(); } From resistor at mac.com Tue Apr 17 23:38:57 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 17 Apr 2007 23:38:57 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h Message-ID: <200704180438.l3I4cvA0000536@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: Dominators.h updated: 1.72 -> 1.73 --- Log message: Add an accessor to make ETForest more useful. --- Diffs of the changes: (+7 -0) Dominators.h | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.72 llvm/include/llvm/Analysis/Dominators.h:1.73 --- llvm/include/llvm/Analysis/Dominators.h:1.72 Sun Apr 15 18:14:18 2007 +++ llvm/include/llvm/Analysis/Dominators.h Tue Apr 17 23:38:39 2007 @@ -320,6 +320,13 @@ return NULL; return Common->getData(); } + + /// Return the immediate dominator of A. + BasicBlock *getIDom(BasicBlock *A) { + ETNode *NodeA = getNode(A); + const ETNode *idom = NodeA->getFather(); + return idom ? idom->getData() : 0; + } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); From resistor at mac.com Tue Apr 17 23:39:49 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 17 Apr 2007 23:39:49 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/LCSSA.cpp Message-ID: <200704180439.l3I4dnEu000560@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: LCSSA.cpp updated: 1.36 -> 1.37 --- Log message: Use ETForest instead of DominatorTree. --- Diffs of the changes: (+18 -21) LCSSA.cpp | 39 ++++++++++++++++++--------------------- 1 files changed, 18 insertions(+), 21 deletions(-) Index: llvm/lib/Transforms/Utils/LCSSA.cpp diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.36 llvm/lib/Transforms/Utils/LCSSA.cpp:1.37 --- llvm/lib/Transforms/Utils/LCSSA.cpp:1.36 Sat Apr 14 17:10:17 2007 +++ llvm/lib/Transforms/Utils/LCSSA.cpp Tue Apr 17 23:39:32 2007 @@ -49,7 +49,7 @@ struct VISIBILITY_HIDDEN LCSSA : public FunctionPass { // Cached analysis information for the current function. LoopInfo *LI; - DominatorTree *DT; + ETForest *ET; std::vector LoopBlocks; virtual bool runOnFunction(Function &F); @@ -66,14 +66,14 @@ AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); AU.addRequired(); - AU.addRequired(); + AU.addRequired(); } private: void getLoopValuesUsedOutsideLoop(Loop *L, SetVector &AffectedValues); - Value *GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst, - std::map &Phis); + Value *GetValueForBlock(BasicBlock *BB, Instruction *OrigInst, + std::map &Phis); /// inLoop - returns true if the given block is within the current loop const bool inLoop(BasicBlock* B) { @@ -92,7 +92,7 @@ bool changed = false; LI = &getAnalysis(); - DT = &getAnalysis(); + ET = &getAnalysis(); for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) changed |= visitSubloop(*I); @@ -142,18 +142,17 @@ ++NumLCSSA; // We are applying the transformation // Keep track of the blocks that have the value available already. - std::map Phis; + std::map Phis; - DominatorTree::Node *InstrNode = DT->getNode(Instr->getParent()); + //ETNode *InstrNode = ET->getNodeForBlock(Instr->getParent()); // Insert the LCSSA phi's into the exit blocks (dominated by the value), and // add them to the Phi's map. for (std::vector::const_iterator BBI = exitBlocks.begin(), BBE = exitBlocks.end(); BBI != BBE; ++BBI) { BasicBlock *BB = *BBI; - DominatorTree::Node *ExitBBNode = DT->getNode(BB); - Value *&Phi = Phis[ExitBBNode]; - if (!Phi && InstrNode->dominates(ExitBBNode)) { + Value *&Phi = Phis[BB]; + if (!Phi && ET->dominates(Instr->getParent(), BB)) { PHINode *PN = new PHINode(Instr->getType(), Instr->getName()+".lcssa", BB->begin()); PN->reserveOperandSpace(std::distance(pred_begin(BB), pred_end(BB))); @@ -186,7 +185,7 @@ // Otherwise, patch up uses of the value with the appropriate LCSSA Phi, // inserting PHI nodes into join points where needed. - Value *Val = GetValueForBlock(DT->getNode(UserBB), Instr, Phis); + Value *Val = GetValueForBlock(UserBB, Instr, Phis); // Preincrement the iterator to avoid invalidating it when we change the // value. @@ -225,8 +224,8 @@ /// GetValueForBlock - Get the value to use within the specified basic block. /// available values are in Phis. -Value *LCSSA::GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst, - std::map &Phis) { +Value *LCSSA::GetValueForBlock(BasicBlock *BB, Instruction *OrigInst, + std::map &Phis) { // If there is no dominator info for this BB, it is unreachable. if (BB == 0) return UndefValue::get(OrigInst->getType()); @@ -235,7 +234,7 @@ Value *&V = Phis[BB]; if (V) return V; - DominatorTree::Node *IDom = BB->getIDom(); + BasicBlock* IDom = ET->getIDom(BB); // Otherwise, there are two cases: we either have to insert a PHI node or we // don't. We need to insert a PHI node if this block is not dominated by one @@ -248,24 +247,22 @@ // dominate this block. Note that we *know* that the block defining the // original instruction is in the idom chain, because if it weren't, then the // original value didn't dominate
    Unconfirmed Attendees
    NameOrganization