From dhurjati at cs.uiuc.edu Mon Jun 23 07:14:02 2003 From: dhurjati at cs.uiuc.edu (Dinakar Dhurjati) Date: Mon Jun 23 07:14:02 2003 Subject: [llvm-commits] CVS: llvm/www/pubs/2003-05-05-LCTES03-CodeSafety.html Message-ID: <200306231213.HAA27460@tank.cs.uiuc.edu> Changes in directory llvm/www/pubs: 2003-05-05-LCTES03-CodeSafety.html updated: 1.2 -> 1.3 --- Log message: Added presentation to downloads --- Diffs of the changes: Index: llvm/www/pubs/2003-05-05-LCTES03-CodeSafety.html diff -u llvm/www/pubs/2003-05-05-LCTES03-CodeSafety.html:1.2 llvm/www/pubs/2003-05-05-LCTES03-CodeSafety.html:1.3 --- llvm/www/pubs/2003-05-05-LCTES03-CodeSafety.html:1.2 Wed May 21 12:15:41 2003 +++ llvm/www/pubs/2003-05-05-LCTES03-CodeSafety.html Mon Jun 23 07:13:36 2003 @@ -58,6 +58,7 @@

Bibtex Entry:

@@ -72,5 +73,9 @@ URL = {http://llvm.cs.uiuc.edu/pubs/2003-05-05-LCTES03-CodeSafety.html} } + +

Links:

+ +SAFECode project From lattner at cs.uiuc.edu Mon Jun 23 12:16:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 12:16:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CFP2000/179.art/Makefile Message-ID: <200306231715.MAA13730@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CFP2000/179.art: Makefile added (r1.1) --- Log message: Initial checkin of new bm --- Diffs of the changes: Index: llvm/test/Programs/External/SPEC/CFP2000/179.art/Makefile diff -c /dev/null llvm/test/Programs/External/SPEC/CFP2000/179.art/Makefile:1.1 *** /dev/null Mon Jun 23 12:15:28 2003 --- llvm/test/Programs/External/SPEC/CFP2000/179.art/Makefile Mon Jun 23 12:15:18 2003 *************** *** 0 **** --- 1,11 ---- + LEVEL = ../../../../../.. + ifdef LARGE_PROBLEM_SIZE + RUN_OPTIONS = -scanfile c756hel.in -trainfile1 a10.img -stride 2 -startx 134 -starty 220 -endx 184 -endy 240 -objects 3 + else + RUN_OPTIONS = -scanfile c756hel.in -trainfile1 a10.img -stride 2 -startx 134 -starty 220 -endx 139 -endy 225 -objects 1 + endif + #STDIN_FILENAME = $(RUN_TYPE).in + STDOUT_FILENAME = $(RUN_TYPE).out + + CPPFLAGS = + include ../../Makefile.spec From lattner at cs.uiuc.edu Mon Jun 23 12:16:06 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 12:16:06 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CFP2000/179.art/ Message-ID: <200306231715.MAA13721@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CFP2000/179.art: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/Programs/External/SPEC/CFP2000/179.art added to the repository --- Diffs of the changes: From lattner at cs.uiuc.edu Mon Jun 23 12:20:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 12:20:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CFP2000/183.equake/Makefile Message-ID: <200306231719.MAA14094@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CFP2000/183.equake: Makefile added (r1.1) --- Log message: Initial checkin --- Diffs of the changes: Index: llvm/test/Programs/External/SPEC/CFP2000/183.equake/Makefile diff -c /dev/null llvm/test/Programs/External/SPEC/CFP2000/183.equake/Makefile:1.1 *** /dev/null Mon Jun 23 12:19:55 2003 --- llvm/test/Programs/External/SPEC/CFP2000/183.equake/Makefile Mon Jun 23 12:19:45 2003 *************** *** 0 **** --- 1,6 ---- + LEVEL = ../../../../../.. + RUN_OPTIONS = + STDIN_FILENAME = inp.in + STDOUT_FILENAME = inp.out + CPPFLAGS = + include ../../Makefile.spec From lattner at cs.uiuc.edu Mon Jun 23 12:20:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 12:20:03 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CFP2000/183.equake/ Message-ID: <200306231719.MAA14085@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CFP2000/183.equake: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/Programs/External/SPEC/CFP2000/183.equake added to the repository --- Diffs of the changes: From lattner at cs.uiuc.edu Mon Jun 23 12:38:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 12:38:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/ExprTypeConvert.cpp TransformInternals.cpp Message-ID: <200306231737.MAA15542@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms: ExprTypeConvert.cpp updated: 1.73 -> 1.74 TransformInternals.cpp updated: 1.35 -> 1.36 --- Log message: avoid dividing by zero when dealing with zero sized types (like [0 x double]) --- Diffs of the changes: Index: llvm/lib/Transforms/ExprTypeConvert.cpp diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.73 llvm/lib/Transforms/ExprTypeConvert.cpp:1.74 --- llvm/lib/Transforms/ExprTypeConvert.cpp:1.73 Thu May 29 10:12:27 2003 +++ llvm/lib/Transforms/ExprTypeConvert.cpp Mon Jun 23 12:36:49 2003 @@ -49,6 +49,7 @@ // Get information about the base datatype being allocated, before & after int ReqTypeSize = TD.getTypeSize(Ty); + if (ReqTypeSize == 0) return false; unsigned OldTypeSize = TD.getTypeSize(MI->getType()->getElementType()); // Must have a scale or offset to analyze it... Index: llvm/lib/Transforms/TransformInternals.cpp diff -u llvm/lib/Transforms/TransformInternals.cpp:1.35 llvm/lib/Transforms/TransformInternals.cpp:1.36 --- llvm/lib/Transforms/TransformInternals.cpp:1.35 Sat Jun 7 16:45:42 2003 +++ llvm/lib/Transforms/TransformInternals.cpp Mon Jun 23 12:36:49 2003 @@ -119,6 +119,7 @@ if (!ElTy->isSized() || (isa(CompTy) && !Indices.empty())) return 0; // Type is unreasonable... escape! unsigned ElSize = TD.getTypeSize(ElTy); + if (ElSize == 0) return 0; // Avoid division by zero... int64_t ElSizeS = ElSize; // See if the user is indexing into a different cell of this array... From lattner at cs.uiuc.edu Mon Jun 23 13:07:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 13:07:00 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2003-06-23-GCC-fold-infinite-recursion.c Message-ID: <200306231806.NAA17029@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2003-06-23-GCC-fold-infinite-recursion.c added (r1.1) --- Log message: New testcase for a GCC bug --- Diffs of the changes: Index: llvm/test/Regression/CFrontend/2003-06-23-GCC-fold-infinite-recursion.c diff -c /dev/null llvm/test/Regression/CFrontend/2003-06-23-GCC-fold-infinite-recursion.c:1.1 *** /dev/null Mon Jun 23 13:06:31 2003 --- llvm/test/Regression/CFrontend/2003-06-23-GCC-fold-infinite-recursion.c Mon Jun 23 13:06:21 2003 *************** *** 0 **** --- 1,4 ---- + double Test(double A, double B, double C, double D) { + return -(A-B) - (C-D); + } + From lattner at cs.uiuc.edu Mon Jun 23 13:18:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 13:18:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CFP2000/188.ammp/Makefile Message-ID: <200306231817.NAA17517@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CFP2000/188.ammp: Makefile added (r1.1) --- Log message: New testcase --- Diffs of the changes: Index: llvm/test/Programs/External/SPEC/CFP2000/188.ammp/Makefile diff -c /dev/null llvm/test/Programs/External/SPEC/CFP2000/188.ammp/Makefile:1.1 *** /dev/null Mon Jun 23 13:17:28 2003 --- llvm/test/Programs/External/SPEC/CFP2000/188.ammp/Makefile Mon Jun 23 13:17:18 2003 *************** *** 0 **** --- 1,6 ---- + LEVEL = ../../../../../.. + RUN_OPTIONS = + STDIN_FILENAME = ammp.in + STDOUT_FILENAME = ammp.out + CPPFLAGS = + include ../../Makefile.spec From lattner at cs.uiuc.edu Mon Jun 23 13:18:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 13:18:03 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CFP2000/188.ammp/ Message-ID: <200306231817.NAA17507@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CFP2000/188.ammp: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/Programs/External/SPEC/CFP2000/188.ammp added to the repository --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 23 13:44:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:44:01 2003 Subject: [llvm-commits] CVS: llvm/include/Config/ Message-ID: <200306231843.h5NIhnC01755@choi.cs.uiuc.edu> Changes in directory llvm/include/Config: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/include/Config added to the repository --> Using per-directory sticky tag `autoconf' --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 23 13:46:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:46:01 2003 Subject: [llvm-commits] CVS: llvm/include/Config/alloca.h assert.h dlfcn.h errno.h fcntl.h limits.h link.h malloc.h memory.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h Message-ID: <200306231845.h5NIjlk01813@choi.cs.uiuc.edu> Changes in directory llvm/include/Config: alloca.h added (r1.1.2.1) assert.h added (r1.1.2.1) dlfcn.h added (r1.1.2.1) errno.h added (r1.1.2.1) fcntl.h added (r1.1.2.1) limits.h added (r1.1.2.1) link.h added (r1.1.2.1) malloc.h added (r1.1.2.1) memory.h added (r1.1.2.1) stdint.h added (r1.1.2.1) stdio.h added (r1.1.2.1) stdlib.h added (r1.1.2.1) string.h added (r1.1.2.1) strings.h added (r1.1.2.1) time.h added (r1.1.2.1) unistd.h added (r1.1.2.1) --- Log message: Added header files that wrap normal header files. Source code should include these header files, which will use information from autoconf to determine which system headers should be included. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 23 13:47:02 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:47:02 2003 Subject: [llvm-commits] CVS: llvm/include/Config/sys/mman.h resource.h stat.h time.h types.h wait.h Message-ID: <200306231846.h5NIkjF01850@choi.cs.uiuc.edu> Changes in directory llvm/include/Config/sys: mman.h added (r1.1.2.1) resource.h added (r1.1.2.1) stat.h added (r1.1.2.1) time.h added (r1.1.2.1) types.h added (r1.1.2.1) wait.h added (r1.1.2.1) --- Log message: Wrapper header files for the system header files. These include the correct header files based upon what autoconf has found. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 23 13:47:04 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:47:04 2003 Subject: [llvm-commits] CVS: llvm/include/Config/sys/ Message-ID: <200306231846.h5NIk3U01826@choi.cs.uiuc.edu> Changes in directory llvm/include/Config/sys: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/include/Config/sys added to the repository --> Using per-directory sticky tag `autoconf' --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 23 13:49:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:49:01 2003 Subject: [llvm-commits] CVS: llvm/include/Config/config.h.in Message-ID: <200306231848.h5NImAC01869@choi.cs.uiuc.edu> Changes in directory llvm/include/Config: config.h.in added (r1.1.2.1) --- Log message: Template config.h file for autoconf. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 23 13:51:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:51:01 2003 Subject: [llvm-commits] CVS: llvm/include/Support/Annotation.h BitSetVector.h Casting.h CommandLine.h DataTypes.h Signals.h TarjanSCCIterator.h Timer.h Tree.h hash_map hash_set ilist iterator slist Message-ID: <200306231850.h5NIomc01933@choi.cs.uiuc.edu> Changes in directory llvm/include/Support: Annotation.h updated: 1.8 -> 1.8.2.1 BitSetVector.h updated: 1.5 -> 1.5.2.1 Casting.h updated: 1.5 -> 1.5.2.1 CommandLine.h updated: 1.12 -> 1.12.2.1 DataTypes.h updated: 1.8 -> 1.8.2.1 Signals.h updated: 1.2 -> 1.2.2.1 TarjanSCCIterator.h updated: 1.5 -> 1.5.2.1 Timer.h updated: 1.6 -> 1.6.2.1 Tree.h updated: 1.3 -> 1.3.2.1 hash_map updated: 1.6 -> 1.6.2.1 hash_set updated: 1.6 -> 1.6.2.1 ilist updated: 1.6 -> 1.6.2.1 iterator updated: 1.2 -> 1.2.2.1 slist updated: 1.2 -> 1.2.2.1 --- Log message: Initial checkin of autoconf code. --- Diffs of the changes: Index: llvm/include/Support/Annotation.h diff -u llvm/include/Support/Annotation.h:1.8 llvm/include/Support/Annotation.h:1.8.2.1 --- llvm/include/Support/Annotation.h:1.8 Wed Jun 11 09:01:21 2003 +++ llvm/include/Support/Annotation.h Mon Jun 23 13:50:38 2003 @@ -16,7 +16,8 @@ #define SUPPORT_ANNOTATION_H #include -#include +#include "Config/assert.h" + class AnnotationID; class Annotation; class Annotable; Index: llvm/include/Support/BitSetVector.h diff -u llvm/include/Support/BitSetVector.h:1.5 llvm/include/Support/BitSetVector.h:1.5.2.1 --- llvm/include/Support/BitSetVector.h:1.5 Wed Jun 11 09:01:21 2003 +++ llvm/include/Support/BitSetVector.h Mon Jun 23 13:50:38 2003 @@ -31,7 +31,7 @@ #include #include -#include +#include "Config/assert.h" #define WORDSIZE (32U) Index: llvm/include/Support/Casting.h diff -u llvm/include/Support/Casting.h:1.5 llvm/include/Support/Casting.h:1.5.2.1 --- llvm/include/Support/Casting.h:1.5 Thu May 29 10:07:48 2003 +++ llvm/include/Support/Casting.h Mon Jun 23 13:50:38 2003 @@ -8,7 +8,7 @@ #ifndef SUPPORT_CASTING_H #define SUPPORT_CASTING_H -#include +#include "Config/assert.h" //===----------------------------------------------------------------------===// // isa Support Templates Index: llvm/include/Support/CommandLine.h diff -u llvm/include/Support/CommandLine.h:1.12 llvm/include/Support/CommandLine.h:1.12.2.1 --- llvm/include/Support/CommandLine.h:1.12 Wed Jun 11 09:01:21 2003 +++ llvm/include/Support/CommandLine.h Mon Jun 23 13:50:38 2003 @@ -19,7 +19,7 @@ #include #include "boost/type_traits/object_traits.hpp" -#include +#include "Config/assert.h" /// cl Namespace - This namespace contains all of the command line option /// processing machinery. It is intentionally a short name to make qualified Index: llvm/include/Support/DataTypes.h diff -u llvm/include/Support/DataTypes.h:1.8 llvm/include/Support/DataTypes.h:1.8.2.1 --- llvm/include/Support/DataTypes.h:1.8 Wed Jun 11 14:44:48 2003 +++ llvm/include/Support/DataTypes.h Mon Jun 23 13:50:38 2003 @@ -19,44 +19,21 @@ #ifndef LLVM_SUPPORT_DATATYPES_H #define LLVM_SUPPORT_DATATYPES_H -#define __STDC_LIMIT_MACROS 1 -#include - -#ifdef __linux__ -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# undef BIG_ENDIAN -# else -# undef LITTLE_ENDIAN -# endif -#else -# if (BSD >= 199103) -# include -# endif -#endif - -#ifdef __sparc__ -# include -# ifdef _LITTLE_ENDIAN -# define LITTLE_ENDIAN 1 -# else -# define BIG_ENDIAN 1 -# endif -#endif - // -// Convert the information from the header files into our own local -// endian macros. We do this because various strange systems define both -// BIG_ENDIAN and LITTLE_ENDIAN, and we don't want to conflict with them. +// Un-define these constants so that we can re-define only the one that we want +// (which is really to say that we'll define LITTLE_ENDIAN if the machine is +// little endian, and not define anything otherwise). // -// Don't worry; once we introduce autoconf, this will look a lot nicer. -// -#ifdef LITTLE_ENDIAN -#define ENDIAN_LITTLE +#include "Config/config.h" + +#define __STDC_LIMIT_MACROS 1 + +#ifdef HAVE_INTTYPES_H +#include #endif -#ifdef BIG_ENDIAN -#define ENDIAN_BIG +#ifdef HAVE_SYS_TYPES_H +#include #endif #if (defined(ENDIAN_LITTLE) && defined(ENDIAN_BIG)) Index: llvm/include/Support/Signals.h diff -u llvm/include/Support/Signals.h:1.2 llvm/include/Support/Signals.h:1.2.2.1 --- llvm/include/Support/Signals.h:1.2 Wed Dec 11 21:43:30 2002 +++ llvm/include/Support/Signals.h Mon Jun 23 13:50:38 2003 @@ -10,6 +10,11 @@ #include +// +// This will include the signal handler return type. +// +#include "Config/config.h" + // RemoveFileOnSignal - This function registers signal handlers to ensure that // if a signal gets delivered that the named file is removed. // Index: llvm/include/Support/TarjanSCCIterator.h diff -u llvm/include/Support/TarjanSCCIterator.h:1.5 llvm/include/Support/TarjanSCCIterator.h:1.5.2.1 --- llvm/include/Support/TarjanSCCIterator.h:1.5 Wed Jun 11 09:01:21 2003 +++ llvm/include/Support/TarjanSCCIterator.h Mon Jun 23 13:50:38 2003 @@ -21,7 +21,7 @@ #include #include -#include +#include "Config/assert.h" //-------------------------------------------------------------------------- // class SCC : A simple representation of an SCC in a generic Graph. Index: llvm/include/Support/Timer.h diff -u llvm/include/Support/Timer.h:1.6 llvm/include/Support/Timer.h:1.6.2.1 --- llvm/include/Support/Timer.h:1.6 Wed Jun 11 09:01:21 2003 +++ llvm/include/Support/Timer.h Mon Jun 23 13:50:38 2003 @@ -29,7 +29,7 @@ #include #include -#include +#include "Config/assert.h" class TimerGroup; Index: llvm/include/Support/Tree.h diff -u llvm/include/Support/Tree.h:1.3 llvm/include/Support/Tree.h:1.3.2.1 --- llvm/include/Support/Tree.h:1.3 Wed Jun 11 09:01:21 2003 +++ llvm/include/Support/Tree.h Mon Jun 23 13:50:38 2003 @@ -10,7 +10,7 @@ #include -#include +#include "Config/assert.h" template class Tree { Index: llvm/include/Support/hash_map diff -u llvm/include/Support/hash_map:1.6 llvm/include/Support/hash_map:1.6.2.1 --- llvm/include/Support/hash_map:1.6 Fri Jan 31 22:14:28 2003 +++ llvm/include/Support/hash_map Mon Jun 23 13:50:38 2003 @@ -17,23 +17,25 @@ // 3.0.4 std ext/hash_map // 3.1 __gnu_cxx ext/hash_map // -#if __GNUC__ == 3 -#include -#ifndef HASH_NAMESPACE -#if __GNUC_MINOR__ == 0 -#define HASH_NAMESPACE std -#else +#include "Config/config.h" + +#ifdef HAVE_GNU_EXT_HASH_MAP + +#include #define HASH_NAMESPACE __gnu_cxx -#endif -#endif #else -#include -#ifndef HASH_NAMESPACE +#ifdef HAVE_STD_EXT_HASH_MAP +#include #define HASH_NAMESPACE std + +#else +#include +#define HASH_NAMESPACE #endif + #endif using HASH_NAMESPACE::hash_map; Index: llvm/include/Support/hash_set diff -u llvm/include/Support/hash_set:1.6 llvm/include/Support/hash_set:1.6.2.1 --- llvm/include/Support/hash_set:1.6 Fri Nov 8 08:07:33 2002 +++ llvm/include/Support/hash_set Mon Jun 23 13:50:38 2003 @@ -17,23 +17,25 @@ // 3.0.4 std ext/hash_set // 3.1 __gnu_cxx ext/hash_set // -#if __GNUC__==3 -#include -#ifndef HASH_NAMESPACE -#if __GNUC_MINOR__ == 0 -#define HASH_NAMESPACE std -#else +#include "Config/config.h" + +#ifdef HAVE_GNU_EXT_HASH_SET + +#include #define HASH_NAMESPACE __gnu_cxx -#endif -#endif #else -#include -#ifndef HASH_NAMESPACE +#ifdef HAVE_STD_EXT_HASH_SET +#include #define HASH_NAMESPACE std + +#else +#include +#define HASH_NAMESPACE #endif + #endif using HASH_NAMESPACE::hash_set; Index: llvm/include/Support/ilist diff -u llvm/include/Support/ilist:1.6 llvm/include/Support/ilist:1.6.2.1 --- llvm/include/Support/ilist:1.6 Wed Apr 23 11:17:53 2003 +++ llvm/include/Support/ilist Mon Jun 23 13:50:38 2003 @@ -31,7 +31,7 @@ #ifndef INCLUDED_SUPPORT_ILIST #define INCLUDED_SUPPORT_ILIST -#include +#include "Config/assert.h" #include #include Index: llvm/include/Support/iterator diff -u llvm/include/Support/iterator:1.2 llvm/include/Support/iterator:1.2.2.1 --- llvm/include/Support/iterator:1.2 Wed Jul 24 17:07:13 2002 +++ llvm/include/Support/iterator Mon Jun 23 13:50:38 2003 @@ -19,9 +19,11 @@ #ifndef SUPPORT_ITERATOR_H #define SUPPORT_ITERATOR_H +#include "Config/config.h" + #include -#if __GNUC__ == 3 +#ifdef HAVE_STD_ITERATOR // Define stupid wrappers around std::iterator... template @@ -35,6 +37,7 @@ }; #else + // Just use bidirectional_iterator directly. using std::bidirectional_iterator; using std::forward_iterator; Index: llvm/include/Support/slist diff -u llvm/include/Support/slist:1.2 llvm/include/Support/slist:1.2.2.1 --- llvm/include/Support/slist:1.2 Sun Feb 23 22:40:35 2003 +++ llvm/include/Support/slist Mon Jun 23 13:50:38 2003 @@ -10,6 +10,8 @@ #ifndef SUPPORT_SLIST_H #define SUPPORT_SLIST_H +#include "Config/config.h" + // Compiler Support Matrix // // Version Namespace Header File @@ -17,18 +19,19 @@ // 3.0.4 std ext/slist // 3.1 __gnu_cxx ext/slist // -#if __GNUC__ == 3 + +#ifdef HAVE_EXT_SLIST #include +#else +#include +#endif -#if __GNUC_MINOR__ == 0 +#if HAVE_EXT_SLIST == std using std::slist; -#else -using __gnu_cxx::slist; #endif -#else -// GCC 2.x -#include +#if HAVE_EXT_SLIST == gnu +using __gnu_cxx::slist; #endif #endif From criswell at choi.cs.uiuc.edu Mon Jun 23 13:53:02 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:53:02 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/AliasSetTracker.h CallGraph.h ConstantsScanner.h DSGraph.h DSGraphTraits.h DSNode.h DSSupport.h DataStructure.h DependenceGraph.h Dominators.h IPModRef.h InstForest.h IntervalIterator.h MemoryDepAnalysis.h PgmDependenceGraph.h Message-ID: <200306231852.h5NIqRM02108@choi.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: AliasSetTracker.h updated: 1.5 -> 1.5.2.1 CallGraph.h updated: 1.27 -> 1.27.2.1 ConstantsScanner.h updated: 1.10 -> 1.10.2.1 DSGraph.h updated: 1.48 -> 1.48.2.1 DSGraphTraits.h updated: 1.14 -> 1.14.2.1 DSNode.h updated: 1.24 -> 1.24.2.1 DSSupport.h updated: 1.16 -> 1.16.2.1 DataStructure.h updated: 1.63 -> 1.63.2.1 DependenceGraph.h updated: 1.4 -> 1.4.2.1 Dominators.h updated: 1.33 -> 1.33.2.1 IPModRef.h updated: 1.10 -> 1.10.2.1 InstForest.h updated: 1.17 -> 1.17.2.1 IntervalIterator.h updated: 1.11 -> 1.11.2.1 MemoryDepAnalysis.h updated: 1.2 -> 1.2.2.1 PgmDependenceGraph.h updated: 1.2 -> 1.2.2.1 --- Log message: Initial checkin of autoconf code. --- Diffs of the changes: Index: llvm/include/llvm/Analysis/AliasSetTracker.h diff -u llvm/include/llvm/Analysis/AliasSetTracker.h:1.5 llvm/include/llvm/Analysis/AliasSetTracker.h:1.5.2.1 --- llvm/include/llvm/Analysis/AliasSetTracker.h:1.5 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/AliasSetTracker.h Mon Jun 23 13:51:46 2003 @@ -10,7 +10,7 @@ #ifndef LLVM_ANALYSIS_ALIASSETTRACKER_H #define LLVM_ANALYSIS_ALIASSETTRACKER_H -#include +#include "Config/assert.h" #include "llvm/Support/CallSite.h" #include "Support/iterator" Index: llvm/include/llvm/Analysis/CallGraph.h diff -u llvm/include/llvm/Analysis/CallGraph.h:1.27 llvm/include/llvm/Analysis/CallGraph.h:1.27.2.1 --- llvm/include/llvm/Analysis/CallGraph.h:1.27 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/CallGraph.h Mon Jun 23 13:51:47 2003 @@ -41,7 +41,7 @@ #ifndef LLVM_ANALYSIS_CALLGRAPH_H #define LLVM_ANALYSIS_CALLGRAPH_H -#include +#include "Config/assert.h" #include "Support/GraphTraits.h" #include "Support/STLExtras.h" Index: llvm/include/llvm/Analysis/ConstantsScanner.h diff -u llvm/include/llvm/Analysis/ConstantsScanner.h:1.10 llvm/include/llvm/Analysis/ConstantsScanner.h:1.10.2.1 --- llvm/include/llvm/Analysis/ConstantsScanner.h:1.10 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/ConstantsScanner.h Mon Jun 23 13:51:47 2003 @@ -9,7 +9,7 @@ #ifndef LLVM_ANALYSIS_CONSTANTSSCANNER_H #define LLVM_ANALYSIS_CONSTANTSSCANNER_H -#include +#include "Config/assert.h" #include "llvm/Support/InstIterator.h" #include "llvm/Instruction.h" Index: llvm/include/llvm/Analysis/DSGraph.h diff -u llvm/include/llvm/Analysis/DSGraph.h:1.48 llvm/include/llvm/Analysis/DSGraph.h:1.48.2.1 --- llvm/include/llvm/Analysis/DSGraph.h:1.48 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/DSGraph.h Mon Jun 23 13:51:47 2003 @@ -7,7 +7,7 @@ #ifndef LLVM_ANALYSIS_DSGRAPH_H #define LLVM_ANALYSIS_DSGRAPH_H -#include +#include "Config/assert.h" #include "llvm/Analysis/DSNode.h" Index: llvm/include/llvm/Analysis/DSGraphTraits.h diff -u llvm/include/llvm/Analysis/DSGraphTraits.h:1.14 llvm/include/llvm/Analysis/DSGraphTraits.h:1.14.2.1 --- llvm/include/llvm/Analysis/DSGraphTraits.h:1.14 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/DSGraphTraits.h Mon Jun 23 13:51:47 2003 @@ -9,7 +9,7 @@ #ifndef LLVM_ANALYSIS_DSGRAPHTRAITS_H #define LLVM_ANALYSIS_DSGRAPHTRAITS_H -#include +#include "Config/assert.h" #include "llvm/Analysis/DSGraph.h" #include "Support/GraphTraits.h" Index: llvm/include/llvm/Analysis/DSNode.h diff -u llvm/include/llvm/Analysis/DSNode.h:1.24 llvm/include/llvm/Analysis/DSNode.h:1.24.2.1 --- llvm/include/llvm/Analysis/DSNode.h:1.24 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/DSNode.h Mon Jun 23 13:51:47 2003 @@ -7,7 +7,7 @@ #ifndef LLVM_ANALYSIS_DSNODE_H #define LLVM_ANALYSIS_DSNODE_H -#include +#include "Config/assert.h" #include "llvm/Analysis/DSSupport.h" template Index: llvm/include/llvm/Analysis/DSSupport.h diff -u llvm/include/llvm/Analysis/DSSupport.h:1.16 llvm/include/llvm/Analysis/DSSupport.h:1.16.2.1 --- llvm/include/llvm/Analysis/DSSupport.h:1.16 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/DSSupport.h Mon Jun 23 13:51:47 2003 @@ -7,7 +7,7 @@ #ifndef LLVM_ANALYSIS_DSSUPPORT_H #define LLVM_ANALYSIS_DSSUPPORT_H -#include +#include "Config/assert.h" #include #include Index: llvm/include/llvm/Analysis/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure.h:1.63 llvm/include/llvm/Analysis/DataStructure.h:1.63.2.1 --- llvm/include/llvm/Analysis/DataStructure.h:1.63 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/DataStructure.h Mon Jun 23 13:51:47 2003 @@ -7,7 +7,7 @@ #ifndef LLVM_ANALYSIS_DATA_STRUCTURE_H #define LLVM_ANALYSIS_DATA_STRUCTURE_H -#include +#include "Config/assert.h" #include "llvm/Pass.h" #include "Support/HashExtras.h" Index: llvm/include/llvm/Analysis/DependenceGraph.h diff -u llvm/include/llvm/Analysis/DependenceGraph.h:1.4 llvm/include/llvm/Analysis/DependenceGraph.h:1.4.2.1 --- llvm/include/llvm/Analysis/DependenceGraph.h:1.4 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/DependenceGraph.h Mon Jun 23 13:51:47 2003 @@ -23,7 +23,7 @@ #include #include -#include +#include "Config/assert.h" class Instruction; class Function; Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.33 llvm/include/llvm/Analysis/Dominators.h:1.33.2.1 --- llvm/include/llvm/Analysis/Dominators.h:1.33 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/Dominators.h Mon Jun 23 13:51:47 2003 @@ -20,7 +20,7 @@ #include "llvm/Pass.h" #include -#include +#include "Config/assert.h" class Instruction; template struct GraphTraits; Index: llvm/include/llvm/Analysis/IPModRef.h diff -u llvm/include/llvm/Analysis/IPModRef.h:1.10 llvm/include/llvm/Analysis/IPModRef.h:1.10.2.1 --- llvm/include/llvm/Analysis/IPModRef.h:1.10 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/IPModRef.h Mon Jun 23 13:51:47 2003 @@ -39,7 +39,7 @@ #ifndef LLVM_ANALYSIS_IPMODREF_H #define LLVM_ANALYSIS_IPMODREF_H -#include +#include "Config/assert.h" #include "llvm/Pass.h" #include "Support/BitSetVector.h" Index: llvm/include/llvm/Analysis/InstForest.h diff -u llvm/include/llvm/Analysis/InstForest.h:1.17 llvm/include/llvm/Analysis/InstForest.h:1.17.2.1 --- llvm/include/llvm/Analysis/InstForest.h:1.17 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/InstForest.h Mon Jun 23 13:51:47 2003 @@ -19,7 +19,7 @@ #include "llvm/Function.h" #include "Support/Tree.h" #include -#include +#include "Config/assert.h" template class InstTreeNode; template class InstForest; Index: llvm/include/llvm/Analysis/IntervalIterator.h diff -u llvm/include/llvm/Analysis/IntervalIterator.h:1.11 llvm/include/llvm/Analysis/IntervalIterator.h:1.11.2.1 --- llvm/include/llvm/Analysis/IntervalIterator.h:1.11 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/IntervalIterator.h Mon Jun 23 13:51:47 2003 @@ -33,7 +33,7 @@ #include #include #include -#include +#include "Config/assert.h" // getNodeHeader - Given a source graph node and the source graph, return the // BasicBlock that is the header node. This is the opposite of Index: llvm/include/llvm/Analysis/MemoryDepAnalysis.h diff -u llvm/include/llvm/Analysis/MemoryDepAnalysis.h:1.2 llvm/include/llvm/Analysis/MemoryDepAnalysis.h:1.2.2.1 --- llvm/include/llvm/Analysis/MemoryDepAnalysis.h:1.2 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/MemoryDepAnalysis.h Mon Jun 23 13:51:47 2003 @@ -20,7 +20,7 @@ #include "Support/NonCopyable.h" #include "Support/hash_map" -#include +#include "Config/assert.h" class Instruction; class Function; Index: llvm/include/llvm/Analysis/PgmDependenceGraph.h diff -u llvm/include/llvm/Analysis/PgmDependenceGraph.h:1.2 llvm/include/llvm/Analysis/PgmDependenceGraph.h:1.2.2.1 --- llvm/include/llvm/Analysis/PgmDependenceGraph.h:1.2 Wed Jun 11 09:01:29 2003 +++ llvm/include/llvm/Analysis/PgmDependenceGraph.h Mon Jun 23 13:51:47 2003 @@ -40,7 +40,7 @@ #include "Support/NonCopyable.h" #include -#include +#include "Config/assert.h" class Instruction; class Function; From criswell at choi.cs.uiuc.edu Mon Jun 23 13:53:04 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:53:04 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/AbstractTypeUser.h Constant.h ConstantHandling.h Constants.h DerivedTypes.h GlobalVariable.h Instruction.h Pass.h PassAnalysisSupport.h PassSupport.h SymbolTable.h User.h iOther.h iPHINode.h iTerminators.h Message-ID: <200306231852.h5NIqK402072@choi.cs.uiuc.edu> Changes in directory llvm/include/llvm: AbstractTypeUser.h updated: 1.6 -> 1.6.2.1 Constant.h updated: 1.7 -> 1.7.2.1 ConstantHandling.h updated: 1.26 -> 1.26.2.1 Constants.h updated: 1.26 -> 1.26.2.1 DerivedTypes.h updated: 1.29 -> 1.29.2.1 GlobalVariable.h updated: 1.20 -> 1.20.2.1 Instruction.h updated: 1.40 -> 1.40.2.1 Pass.h updated: 1.33 -> 1.33.2.1 PassAnalysisSupport.h updated: 1.12 -> 1.12.2.1 PassSupport.h updated: 1.12 -> 1.12.2.1 SymbolTable.h updated: 1.21 -> 1.21.2.1 User.h updated: 1.18 -> 1.18.2.1 iOther.h updated: 1.35 -> 1.35.2.1 iPHINode.h updated: 1.9 -> 1.9.2.1 iTerminators.h updated: 1.27 -> 1.27.2.1 --- Log message: Initial checkin of autoconf code. --- Diffs of the changes: Index: llvm/include/llvm/AbstractTypeUser.h diff -u llvm/include/llvm/AbstractTypeUser.h:1.6 llvm/include/llvm/AbstractTypeUser.h:1.6.2.1 --- llvm/include/llvm/AbstractTypeUser.h:1.6 Tue Jan 14 15:29:52 2003 +++ llvm/include/llvm/AbstractTypeUser.h Mon Jun 23 13:51:40 2003 @@ -21,7 +21,7 @@ #ifndef LLVM_ABSTRACT_TYPE_USER_H #define LLVM_ABSTRACT_TYPE_USER_H -#include +#include "Config/assert.h" class Type; class DerivedType; Index: llvm/include/llvm/Constant.h diff -u llvm/include/llvm/Constant.h:1.7 llvm/include/llvm/Constant.h:1.7.2.1 --- llvm/include/llvm/Constant.h:1.7 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/Constant.h Mon Jun 23 13:51:40 2003 @@ -7,7 +7,7 @@ #ifndef LLVM_CONSTANT_H #define LLVM_CONSTANT_H -#include +#include "Config/assert.h" #include "llvm/User.h" class Constant : public User { Index: llvm/include/llvm/ConstantHandling.h diff -u llvm/include/llvm/ConstantHandling.h:1.26 llvm/include/llvm/ConstantHandling.h:1.26.2.1 --- llvm/include/llvm/ConstantHandling.h:1.26 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/ConstantHandling.h Mon Jun 23 13:51:40 2003 @@ -33,7 +33,7 @@ #ifndef LLVM_CONSTANTHANDLING_H #define LLVM_CONSTANTHANDLING_H -#include +#include "Config/assert.h" #include "llvm/Constants.h" #include "llvm/Type.h" Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.26 llvm/include/llvm/Constants.h:1.26.2.1 --- llvm/include/llvm/Constants.h:1.26 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/Constants.h Mon Jun 23 13:51:40 2003 @@ -8,7 +8,7 @@ #ifndef LLVM_CONSTANTS_H #define LLVM_CONSTANTS_H -#include +#include "Config/assert.h" #include "llvm/Constant.h" #include "Support/DataTypes.h" Index: llvm/include/llvm/DerivedTypes.h diff -u llvm/include/llvm/DerivedTypes.h:1.29 llvm/include/llvm/DerivedTypes.h:1.29.2.1 --- llvm/include/llvm/DerivedTypes.h:1.29 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/DerivedTypes.h Mon Jun 23 13:51:40 2003 @@ -11,7 +11,7 @@ #ifndef LLVM_DERIVED_TYPES_H #define LLVM_DERIVED_TYPES_H -#include +#include "Config/assert.h" #include "llvm/Type.h" Index: llvm/include/llvm/GlobalVariable.h diff -u llvm/include/llvm/GlobalVariable.h:1.20 llvm/include/llvm/GlobalVariable.h:1.20.2.1 --- llvm/include/llvm/GlobalVariable.h:1.20 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/GlobalVariable.h Mon Jun 23 13:51:40 2003 @@ -13,7 +13,7 @@ #ifndef LLVM_GLOBAL_VARIABLE_H #define LLVM_GLOBAL_VARIABLE_H -#include +#include "Config/assert.h" #include "llvm/GlobalValue.h" class Module; Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.40 llvm/include/llvm/Instruction.h:1.40.2.1 --- llvm/include/llvm/Instruction.h:1.40 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/Instruction.h Mon Jun 23 13:51:40 2003 @@ -8,7 +8,7 @@ #ifndef LLVM_INSTRUCTION_H #define LLVM_INSTRUCTION_H -#include +#include "Config/assert.h" #include "llvm/User.h" template struct ilist_traits; Index: llvm/include/llvm/Pass.h diff -u llvm/include/llvm/Pass.h:1.33 llvm/include/llvm/Pass.h:1.33.2.1 --- llvm/include/llvm/Pass.h:1.33 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/Pass.h Mon Jun 23 13:51:40 2003 @@ -22,7 +22,7 @@ #ifndef LLVM_PASS_H #define LLVM_PASS_H -#include +#include "Config/assert.h" #include #include Index: llvm/include/llvm/PassAnalysisSupport.h diff -u llvm/include/llvm/PassAnalysisSupport.h:1.12 llvm/include/llvm/PassAnalysisSupport.h:1.12.2.1 --- llvm/include/llvm/PassAnalysisSupport.h:1.12 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/PassAnalysisSupport.h Mon Jun 23 13:51:40 2003 @@ -14,7 +14,7 @@ // No need to include Pass.h, we are being included by it! -#include +#include "Config/assert.h" //===----------------------------------------------------------------------===// // AnalysisUsage - Represent the analysis usage information of a pass. This Index: llvm/include/llvm/PassSupport.h diff -u llvm/include/llvm/PassSupport.h:1.12 llvm/include/llvm/PassSupport.h:1.12.2.1 --- llvm/include/llvm/PassSupport.h:1.12 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/PassSupport.h Mon Jun 23 13:51:40 2003 @@ -14,7 +14,7 @@ #ifndef LLVM_PASS_SUPPORT_H #define LLVM_PASS_SUPPORT_H -#include +#include "Config/assert.h" // No need to include Pass.h, we are being included by it! Index: llvm/include/llvm/SymbolTable.h diff -u llvm/include/llvm/SymbolTable.h:1.21 llvm/include/llvm/SymbolTable.h:1.21.2.1 --- llvm/include/llvm/SymbolTable.h:1.21 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/SymbolTable.h Mon Jun 23 13:51:40 2003 @@ -16,7 +16,7 @@ #ifndef LLVM_SYMBOL_TABLE_H #define LLVM_SYMBOL_TABLE_H -#include +#include "Config/assert.h" #include "llvm/Value.h" #include Index: llvm/include/llvm/User.h diff -u llvm/include/llvm/User.h:1.18 llvm/include/llvm/User.h:1.18.2.1 --- llvm/include/llvm/User.h:1.18 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/User.h Mon Jun 23 13:51:40 2003 @@ -12,7 +12,7 @@ #ifndef LLVM_USER_H #define LLVM_USER_H -#include +#include "Config/assert.h" #include "llvm/Value.h" Index: llvm/include/llvm/iOther.h diff -u llvm/include/llvm/iOther.h:1.35 llvm/include/llvm/iOther.h:1.35.2.1 --- llvm/include/llvm/iOther.h:1.35 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/iOther.h Mon Jun 23 13:51:40 2003 @@ -8,7 +8,7 @@ #ifndef LLVM_IOTHER_H #define LLVM_IOTHER_H -#include +#include "Config/assert.h" #include "llvm/InstrTypes.h" Index: llvm/include/llvm/iPHINode.h diff -u llvm/include/llvm/iPHINode.h:1.9 llvm/include/llvm/iPHINode.h:1.9.2.1 --- llvm/include/llvm/iPHINode.h:1.9 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/iPHINode.h Mon Jun 23 13:51:40 2003 @@ -7,7 +7,7 @@ #ifndef LLVM_IPHINODE_H #define LLVM_IPHINODE_H -#include +#include "Config/assert.h" #include "llvm/Instruction.h" class BasicBlock; Index: llvm/include/llvm/iTerminators.h diff -u llvm/include/llvm/iTerminators.h:1.27 llvm/include/llvm/iTerminators.h:1.27.2.1 --- llvm/include/llvm/iTerminators.h:1.27 Wed Jun 11 09:01:26 2003 +++ llvm/include/llvm/iTerminators.h Mon Jun 23 13:51:40 2003 @@ -9,7 +9,7 @@ #ifndef LLVM_ITERMINATORS_H #define LLVM_ITERMINATORS_H -#include +#include "Config/assert.h" #include "llvm/InstrTypes.h" From criswell at choi.cs.uiuc.edu Mon Jun 23 13:53:05 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:53:05 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h TargetCacheInfo.h TargetInstrInfo.h TargetRegInfo.h TargetSchedInfo.h Message-ID: <200306231852.h5NIq9M02038@choi.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: MRegisterInfo.h updated: 1.16 -> 1.16.2.1 TargetCacheInfo.h updated: 1.9 -> 1.9.2.1 TargetInstrInfo.h updated: 1.45 -> 1.45.2.1 TargetRegInfo.h updated: 1.38 -> 1.38.2.1 TargetSchedInfo.h updated: 1.17 -> 1.17.2.1 --- Log message: Initial checkin of autoconf code. --- Diffs of the changes: Index: llvm/include/llvm/Target/MRegisterInfo.h diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.16 llvm/include/llvm/Target/MRegisterInfo.h:1.16.2.1 --- llvm/include/llvm/Target/MRegisterInfo.h:1.16 Sun Jan 12 18:19:44 2003 +++ llvm/include/llvm/Target/MRegisterInfo.h Mon Jun 23 13:51:59 2003 @@ -10,7 +10,7 @@ #define LLVM_TARGET_MREGISTERINFO_H #include "llvm/CodeGen/MachineBasicBlock.h" -#include +#include "Config/assert.h" class Type; class MachineFunction; Index: llvm/include/llvm/Target/TargetCacheInfo.h diff -u llvm/include/llvm/Target/TargetCacheInfo.h:1.9 llvm/include/llvm/Target/TargetCacheInfo.h:1.9.2.1 --- llvm/include/llvm/Target/TargetCacheInfo.h:1.9 Wed Jun 11 09:01:36 2003 +++ llvm/include/llvm/Target/TargetCacheInfo.h Mon Jun 23 13:51:59 2003 @@ -8,7 +8,7 @@ #define LLVM_TARGET_TARGETCACHEINFO_H #include "Support/DataTypes.h" -#include +#include "Config/assert.h" class TargetMachine; Index: llvm/include/llvm/Target/TargetInstrInfo.h diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.45 llvm/include/llvm/Target/TargetInstrInfo.h:1.45.2.1 --- llvm/include/llvm/Target/TargetInstrInfo.h:1.45 Wed Jun 11 09:01:36 2003 +++ llvm/include/llvm/Target/TargetInstrInfo.h Mon Jun 23 13:51:59 2003 @@ -9,7 +9,7 @@ #include "Support/DataTypes.h" #include -#include +#include "Config/assert.h" class MachineInstr; class TargetMachine; Index: llvm/include/llvm/Target/TargetRegInfo.h diff -u llvm/include/llvm/Target/TargetRegInfo.h:1.38 llvm/include/llvm/Target/TargetRegInfo.h:1.38.2.1 --- llvm/include/llvm/Target/TargetRegInfo.h:1.38 Wed Jun 11 09:01:36 2003 +++ llvm/include/llvm/Target/TargetRegInfo.h Mon Jun 23 13:51:59 2003 @@ -10,7 +10,7 @@ #include "Support/hash_map" #include -#include +#include "Config/assert.h" class TargetMachine; class IGNode; Index: llvm/include/llvm/Target/TargetSchedInfo.h diff -u llvm/include/llvm/Target/TargetSchedInfo.h:1.17 llvm/include/llvm/Target/TargetSchedInfo.h:1.17.2.1 --- llvm/include/llvm/Target/TargetSchedInfo.h:1.17 Wed Jun 11 09:01:36 2003 +++ llvm/include/llvm/Target/TargetSchedInfo.h Mon Jun 23 13:51:59 2003 @@ -10,7 +10,7 @@ #include "llvm/Target/TargetInstrInfo.h" #include "Support/hash_map" #include -#include +#include "Config/assert.h" typedef long long cycles_t; static const cycles_t HUGE_LATENCY = ~((long long) 1 << (sizeof(cycles_t)-2)); From criswell at choi.cs.uiuc.edu Mon Jun 23 13:53:07 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:53:07 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/CFG.h InstVisitor.h PassNameParser.h Message-ID: <200306231852.h5NIq7w02022@choi.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: CFG.h updated: 1.11 -> 1.11.2.1 InstVisitor.h updated: 1.17 -> 1.17.2.1 PassNameParser.h updated: 1.6 -> 1.6.2.1 --- Log message: Initial checkin of autoconf code. --- Diffs of the changes: Index: llvm/include/llvm/Support/CFG.h diff -u llvm/include/llvm/Support/CFG.h:1.11 llvm/include/llvm/Support/CFG.h:1.11.2.1 --- llvm/include/llvm/Support/CFG.h:1.11 Wed Jun 11 09:01:35 2003 +++ llvm/include/llvm/Support/CFG.h Mon Jun 23 13:51:57 2003 @@ -13,7 +13,7 @@ #include "llvm/InstrTypes.h" #include "Support/iterator" -#include +#include "Config/assert.h" //===--------------------------------------------------------------------===// // BasicBlock pred_iterator definition Index: llvm/include/llvm/Support/InstVisitor.h diff -u llvm/include/llvm/Support/InstVisitor.h:1.17 llvm/include/llvm/Support/InstVisitor.h:1.17.2.1 --- llvm/include/llvm/Support/InstVisitor.h:1.17 Wed Jun 11 09:01:35 2003 +++ llvm/include/llvm/Support/InstVisitor.h Mon Jun 23 13:51:57 2003 @@ -44,7 +44,7 @@ #define LLVM_SUPPORT_INSTVISITOR_H #include "llvm/Instruction.h" -#include +#include "Config/assert.h" class Module; Index: llvm/include/llvm/Support/PassNameParser.h diff -u llvm/include/llvm/Support/PassNameParser.h:1.6 llvm/include/llvm/Support/PassNameParser.h:1.6.2.1 --- llvm/include/llvm/Support/PassNameParser.h:1.6 Wed Jun 11 09:01:35 2003 +++ llvm/include/llvm/Support/PassNameParser.h Mon Jun 23 13:51:57 2003 @@ -20,7 +20,7 @@ #include "llvm/Pass.h" #include #include -#include +#include "Config/assert.h" //===----------------------------------------------------------------------===// // PassNameParser class - Make use of the pass registration mechanism to From criswell at choi.cs.uiuc.edu Mon Jun 23 13:53:08 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:53:08 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Reoptimizer/BinInterface/regmask.h sparcbin.h Message-ID: <200306231852.h5NIq5w02010@choi.cs.uiuc.edu> Changes in directory llvm/include/llvm/Reoptimizer/BinInterface: regmask.h updated: 1.2 -> 1.2.2.1 sparcbin.h updated: 1.3 -> 1.3.2.1 --- Log message: Initial checkin of autoconf code. --- Diffs of the changes: Index: llvm/include/llvm/Reoptimizer/BinInterface/regmask.h diff -u llvm/include/llvm/Reoptimizer/BinInterface/regmask.h:1.2 llvm/include/llvm/Reoptimizer/BinInterface/regmask.h:1.2.2.1 --- llvm/include/llvm/Reoptimizer/BinInterface/regmask.h:1.2 Wed Jun 11 09:01:34 2003 +++ llvm/include/llvm/Reoptimizer/BinInterface/regmask.h Mon Jun 23 13:51:55 2003 @@ -11,7 +11,7 @@ #include "bitmath.h" #include #include -#include +#include "Config/assert.h" #define VREG_ISMEM(x) (x >= 32) #define VREG_ISREG(x) (x < 32) Index: llvm/include/llvm/Reoptimizer/BinInterface/sparcbin.h diff -u llvm/include/llvm/Reoptimizer/BinInterface/sparcbin.h:1.3 llvm/include/llvm/Reoptimizer/BinInterface/sparcbin.h:1.3.2.1 --- llvm/include/llvm/Reoptimizer/BinInterface/sparcbin.h:1.3 Wed Jun 11 09:01:34 2003 +++ llvm/include/llvm/Reoptimizer/BinInterface/sparcbin.h Mon Jun 23 13:51:55 2003 @@ -18,7 +18,7 @@ #include "sparcpriv.h" #include #include -#include +#include "Config/assert.h" using std::vector; From criswell at choi.cs.uiuc.edu Mon Jun 23 13:53:09 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:53:09 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Reoptimizer/TraceCache.h VirtualMem.h Message-ID: <200306231852.h5NIq2102000@choi.cs.uiuc.edu> Changes in directory llvm/include/llvm/Reoptimizer: TraceCache.h updated: 1.10 -> 1.10.2.1 VirtualMem.h updated: 1.7 -> 1.7.2.1 --- Log message: Initial checkin of autoconf code. --- Diffs of the changes: Index: llvm/include/llvm/Reoptimizer/TraceCache.h diff -u llvm/include/llvm/Reoptimizer/TraceCache.h:1.10 llvm/include/llvm/Reoptimizer/TraceCache.h:1.10.2.1 --- llvm/include/llvm/Reoptimizer/TraceCache.h:1.10 Wed Jun 11 09:01:32 2003 +++ llvm/include/llvm/Reoptimizer/TraceCache.h Mon Jun 23 13:51:52 2003 @@ -11,7 +11,7 @@ #include #include #include -#include +#include "Config/assert.h" class VirtualMem; class MemoryManager; Index: llvm/include/llvm/Reoptimizer/VirtualMem.h diff -u llvm/include/llvm/Reoptimizer/VirtualMem.h:1.7 llvm/include/llvm/Reoptimizer/VirtualMem.h:1.7.2.1 --- llvm/include/llvm/Reoptimizer/VirtualMem.h:1.7 Sat May 31 21:31:24 2003 +++ llvm/include/llvm/Reoptimizer/VirtualMem.h Mon Jun 23 13:51:52 2003 @@ -8,10 +8,11 @@ #define LLVM_REOPTIMIZER_TRACECACHE_VIRTUALMEMORY_H #include "Support/DataTypes.h" -#include -#include -#include -#include +#include "Config/fcntl.h" +#include "Config/unistd.h" + +#include "Config/stdio.h" +#include "Config/assert.h" #include #include From criswell at choi.cs.uiuc.edu Mon Jun 23 13:53:11 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:53:11 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/IGNode.h InstrForest.h InstrSelection.h LiveRange.h LiveVariables.h MachineCodeForInstruction.h MachineFrameInfo.h MachineInstr.h MachineInstrAnnot.h SSARegMap.h Message-ID: <200306231852.h5NIq0101988@choi.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: IGNode.h updated: 1.12 -> 1.12.2.1 InstrForest.h updated: 1.26 -> 1.26.2.1 InstrSelection.h updated: 1.23 -> 1.23.2.1 LiveRange.h updated: 1.19 -> 1.19.2.1 LiveVariables.h updated: 1.5 -> 1.5.2.1 MachineCodeForInstruction.h updated: 1.9 -> 1.9.2.1 MachineFrameInfo.h updated: 1.5 -> 1.5.2.1 MachineInstr.h updated: 1.103 -> 1.103.2.1 MachineInstrAnnot.h updated: 1.9 -> 1.9.2.1 SSARegMap.h updated: 1.4 -> 1.4.2.1 --- Log message: Initial checkin of autoconf code. --- Diffs of the changes: Index: llvm/include/llvm/CodeGen/IGNode.h diff -u llvm/include/llvm/CodeGen/IGNode.h:1.12 llvm/include/llvm/CodeGen/IGNode.h:1.12.2.1 --- llvm/include/llvm/CodeGen/IGNode.h:1.12 Wed Jun 11 09:01:30 2003 +++ llvm/include/llvm/CodeGen/IGNode.h Mon Jun 23 13:51:50 2003 @@ -26,7 +26,7 @@ #define IG_NODE_H #include "llvm/CodeGen/LiveRange.h" -#include +#include "Config/assert.h" class RegClass; //---------------------------------------------------------------------------- Index: llvm/include/llvm/CodeGen/InstrForest.h diff -u llvm/include/llvm/CodeGen/InstrForest.h:1.26 llvm/include/llvm/CodeGen/InstrForest.h:1.26.2.1 --- llvm/include/llvm/CodeGen/InstrForest.h:1.26 Wed Jun 11 09:01:30 2003 +++ llvm/include/llvm/CodeGen/InstrForest.h Mon Jun 23 13:51:50 2003 @@ -21,7 +21,7 @@ #include "llvm/Instruction.h" #include "Support/HashExtras.h" -#include +#include "Config/assert.h" class Constant; class BasicBlock; Index: llvm/include/llvm/CodeGen/InstrSelection.h diff -u llvm/include/llvm/CodeGen/InstrSelection.h:1.23 llvm/include/llvm/CodeGen/InstrSelection.h:1.23.2.1 --- llvm/include/llvm/CodeGen/InstrSelection.h:1.23 Wed Jun 11 09:01:30 2003 +++ llvm/include/llvm/CodeGen/InstrSelection.h Mon Jun 23 13:51:50 2003 @@ -8,7 +8,7 @@ #define LLVM_CODEGEN_INSTR_SELECTION_H #include "llvm/Instruction.h" -#include +#include "Config/assert.h" class Function; class InstrForest; class MachineInstr; Index: llvm/include/llvm/CodeGen/LiveRange.h diff -u llvm/include/llvm/CodeGen/LiveRange.h:1.19 llvm/include/llvm/CodeGen/LiveRange.h:1.19.2.1 --- llvm/include/llvm/CodeGen/LiveRange.h:1.19 Wed Jun 11 09:01:30 2003 +++ llvm/include/llvm/CodeGen/LiveRange.h Mon Jun 23 13:51:50 2003 @@ -14,7 +14,7 @@ #include "llvm/CodeGen/ValueSet.h" #include "llvm/Value.h" -#include +#include "Config/assert.h" class RegClass; class IGNode; Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.5 llvm/include/llvm/CodeGen/LiveVariables.h:1.5.2.1 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.5 Wed Jun 11 09:01:30 2003 +++ llvm/include/llvm/CodeGen/LiveVariables.h Mon Jun 23 13:51:50 2003 @@ -24,7 +24,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include -#include +#include "Config/assert.h" class MRegisterInfo; Index: llvm/include/llvm/CodeGen/MachineCodeForInstruction.h diff -u llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.9 llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.9.2.1 --- llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.9 Wed Jun 11 09:01:30 2003 +++ llvm/include/llvm/CodeGen/MachineCodeForInstruction.h Mon Jun 23 13:51:50 2003 @@ -20,7 +20,7 @@ #include "Support/Annotation.h" #include -#include +#include "Config/assert.h" class MachineInstr; class Instruction; Index: llvm/include/llvm/CodeGen/MachineFrameInfo.h diff -u llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.5 llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.5.2.1 --- llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.5 Wed Jun 11 09:01:30 2003 +++ llvm/include/llvm/CodeGen/MachineFrameInfo.h Mon Jun 23 13:51:50 2003 @@ -35,7 +35,7 @@ class TargetRegisterClass; class MachineFunction; #include -#include +#include "Config/assert.h" class MachineFrameInfo { Index: llvm/include/llvm/CodeGen/MachineInstr.h diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.103 llvm/include/llvm/CodeGen/MachineInstr.h:1.103.2.1 --- llvm/include/llvm/CodeGen/MachineInstr.h:1.103 Wed Jun 11 09:01:30 2003 +++ llvm/include/llvm/CodeGen/MachineInstr.h Mon Jun 23 13:51:50 2003 @@ -13,7 +13,7 @@ #include "Support/Annotation.h" #include "Support/iterator" #include -#include +#include "Config/assert.h" class Value; class Function; Index: llvm/include/llvm/CodeGen/MachineInstrAnnot.h diff -u llvm/include/llvm/CodeGen/MachineInstrAnnot.h:1.9 llvm/include/llvm/CodeGen/MachineInstrAnnot.h:1.9.2.1 --- llvm/include/llvm/CodeGen/MachineInstrAnnot.h:1.9 Wed Jun 11 09:01:31 2003 +++ llvm/include/llvm/CodeGen/MachineInstrAnnot.h Mon Jun 23 13:51:50 2003 @@ -10,7 +10,7 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Target/TargetRegInfo.h" -#include +#include "Config/assert.h" class Value; class TmpInstruction; Index: llvm/include/llvm/CodeGen/SSARegMap.h diff -u llvm/include/llvm/CodeGen/SSARegMap.h:1.4 llvm/include/llvm/CodeGen/SSARegMap.h:1.4.2.1 --- llvm/include/llvm/CodeGen/SSARegMap.h:1.4 Wed Jun 11 09:01:31 2003 +++ llvm/include/llvm/CodeGen/SSARegMap.h Mon Jun 23 13:51:50 2003 @@ -12,7 +12,7 @@ #include "llvm/Target/MRegisterInfo.h" -#include +#include "Config/assert.h" class TargetRegisterClass; From criswell at choi.cs.uiuc.edu Mon Jun 23 13:55:00 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 13:55:00 2003 Subject: [llvm-commits] CVS: llvm/mkinstalldirs ltmain.sh install-sh aclocal.m4 config.guess config.sub configure.ac Message-ID: <200306231854.h5NIsXq02144@choi.cs.uiuc.edu> Changes in directory llvm: mkinstalldirs added (r1.1.2.1) ltmain.sh added (r1.1.2.1) install-sh added (r1.1.2.1) aclocal.m4 added (r1.1.2.1) config.guess added (r1.1.2.1) config.sub added (r1.1.2.1) configure.ac added (r1.1.2.1) --- Log message: Initial autoconf checkin. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 23 14:00:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:00:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.config.in Message-ID: <200306231859.h5NIxYM02186@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in added (r1.1.2.1) --- Log message: Initial checkin of autoconf. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 23 14:03:02 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:03:02 2003 Subject: [llvm-commits] CVS: llvm/utils/Burg/Makefile Message-ID: <200306231902.h5NJ2kn02232@choi.cs.uiuc.edu> Changes in directory llvm/utils/Burg: Makefile updated: 1.13 -> 1.13.2.1 --- Log message: Made clean target clean up extra .c files. --- Diffs of the changes: Index: llvm/utils/Burg/Makefile diff -u llvm/utils/Burg/Makefile:1.13 llvm/utils/Burg/Makefile:1.13.2.1 --- llvm/utils/Burg/Makefile:1.13 Wed Jun 11 08:57:48 2003 +++ llvm/utils/Burg/Makefile Mon Jun 23 14:02:36 2003 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.13 2003/06/11 13:57:48 criswell Exp $ +# $Id: Makefile,v 1.13.2.1 2003/06/23 19:02:36 criswell Exp $ LEVEL = ../.. TOOLNAME = burg EXTRASOURCES = gram.tab.c @@ -26,3 +26,4 @@ $(TOOLEXENAME_G) -I sample.gr -o tmp && cmp tmp sample.c $(TOOLEXENAME_G) -I -O0 tmp && cmp tmp sample.c $(TOOLEXENAME_G) -I -= tmp && cmp tmp sample.c + $(RM) -f tmp sample.c From criswell at choi.cs.uiuc.edu Mon Jun 23 14:05:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:05:01 2003 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/Makefile SystemUtils.cpp Message-ID: <200306231904.h5NJ4xn02280@choi.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: Makefile updated: 1.3 -> 1.3.2.1 SystemUtils.cpp updated: 1.3 -> 1.3.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/tools/bugpoint/Makefile diff -u llvm/tools/bugpoint/Makefile:1.3 llvm/tools/bugpoint/Makefile:1.3.2.1 --- llvm/tools/bugpoint/Makefile:1.3 Tue Jan 14 15:30:30 2003 +++ llvm/tools/bugpoint/Makefile Mon Jun 23 14:04:49 2003 @@ -8,6 +8,4 @@ USEDLIBS = ipo scalaropts analysis $(OPTLIBS) $(ANALIBS) \ transformutils asmparser bcreader bcwriter vmcore support -TOOLLINKOPTS = -ldl - include $(LEVEL)/Makefile.common Index: llvm/tools/bugpoint/SystemUtils.cpp diff -u llvm/tools/bugpoint/SystemUtils.cpp:1.3 llvm/tools/bugpoint/SystemUtils.cpp:1.3.2.1 --- llvm/tools/bugpoint/SystemUtils.cpp:1.3 Wed Jan 29 12:15:34 2003 +++ llvm/tools/bugpoint/SystemUtils.cpp Mon Jun 23 14:04:49 2003 @@ -10,12 +10,12 @@ #include #include #include -#include +#include "Config/alloca.h" #include #include -#include +#include "Config/fcntl.h" #include -#include +#include "Config/unistd.h" #include /// removeFile - Delete the specified file From criswell at choi.cs.uiuc.edu Mon Jun 23 14:05:03 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:05:03 2003 Subject: [llvm-commits] CVS: llvm/tools/analyze/Makefile Message-ID: <200306231904.h5NJ4uh02268@choi.cs.uiuc.edu> Changes in directory llvm/tools/analyze: Makefile updated: 1.18 -> 1.18.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/tools/analyze/Makefile diff -u llvm/tools/analyze/Makefile:1.18 llvm/tools/analyze/Makefile:1.18.2.1 --- llvm/tools/analyze/Makefile:1.18 Mon Mar 31 11:30:35 2003 +++ llvm/tools/analyze/Makefile Mon Jun 23 14:04:46 2003 @@ -2,7 +2,6 @@ TOOLNAME = analyze USEDLIBS = asmparser bcreader scalaropts.a transforms.a analysis ipa \ datastructure target.a transformutils.a scalaropts.a vmcore support -TOOLLINKOPTS = -ldl include $(LEVEL)/Makefile.common From criswell at choi.cs.uiuc.edu Mon Jun 23 14:06:02 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:06:02 2003 Subject: [llvm-commits] CVS: llvm/tools/opt/Makefile Message-ID: <200306231905.h5NJ55T02326@choi.cs.uiuc.edu> Changes in directory llvm/tools/opt: Makefile updated: 1.39 -> 1.39.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/tools/opt/Makefile diff -u llvm/tools/opt/Makefile:1.39 llvm/tools/opt/Makefile:1.39.2.1 --- llvm/tools/opt/Makefile:1.39 Wed Apr 16 17:55:55 2003 +++ llvm/tools/opt/Makefile Mon Jun 23 14:04:55 2003 @@ -6,6 +6,4 @@ ipo ipa.a datastructure transforms target.a analysis \ transformutils vmcore support -TOOLLINKOPTS = -ldl - include $(LEVEL)/Makefile.common From criswell at choi.cs.uiuc.edu Mon Jun 23 14:06:05 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:06:05 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/ExecutionEngine.cpp Makefile Message-ID: <200306231905.h5NJ51D02300@choi.cs.uiuc.edu> Changes in directory llvm/tools/lli: ExecutionEngine.cpp updated: 1.12 -> 1.12.2.1 Makefile updated: 1.24 -> 1.24.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/tools/lli/ExecutionEngine.cpp diff -u llvm/tools/lli/ExecutionEngine.cpp:1.12 llvm/tools/lli/ExecutionEngine.cpp:1.12.2.1 --- llvm/tools/lli/ExecutionEngine.cpp:1.12 Wed May 14 12:53:49 2003 +++ llvm/tools/lli/ExecutionEngine.cpp Mon Jun 23 14:04:51 2003 @@ -12,7 +12,7 @@ #include "llvm/Module.h" #include "llvm/Target/TargetData.h" #include "Support/Statistic.h" -#include +#include "Config/dlfcn.h" Statistic<> NumInitBytes("lli", "Number of bytes of global vars initialized"); Index: llvm/tools/lli/Makefile diff -u llvm/tools/lli/Makefile:1.24 llvm/tools/lli/Makefile:1.24.2.1 --- llvm/tools/lli/Makefile:1.24 Tue May 27 16:42:05 2003 +++ llvm/tools/lli/Makefile Mon Jun 23 14:04:51 2003 @@ -22,9 +22,4 @@ USEDLIBS = lli-interpreter $(JITLIBS) bcreader vmcore scalaropts \ analysis.a support.a target.a $(ARCHLIBS) -# Have gcc tell the linker to export symbols from the program so that -# dynamically loaded modules can be linked against them. -# -TOOLLINKOPTS = -ldl - include $(LEVEL)/Makefile.common From criswell at choi.cs.uiuc.edu Mon Jun 23 14:06:07 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:06:07 2003 Subject: [llvm-commits] CVS: llvm/tools/llc/Makefile Message-ID: <200306231905.h5NJ50002289@choi.cs.uiuc.edu> Changes in directory llvm/tools/llc: Makefile updated: 1.35 -> 1.35.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/tools/llc/Makefile diff -u llvm/tools/llc/Makefile:1.35 llvm/tools/llc/Makefile:1.35.2.1 --- llvm/tools/llc/Makefile:1.35 Tue May 27 16:23:02 2003 +++ llvm/tools/llc/Makefile Mon Jun 23 14:04:50 2003 @@ -18,7 +18,6 @@ bcwriter \ vmcore \ support -TOOLLINKOPTS = -ldl include $(LEVEL)/Makefile.common From criswell at choi.cs.uiuc.edu Mon Jun 23 14:06:09 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:06:09 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/Interpreter/ExternalFunctions.cpp Message-ID: <200306231905.h5NJ52P02308@choi.cs.uiuc.edu> Changes in directory llvm/tools/lli/Interpreter: ExternalFunctions.cpp updated: 1.52 -> 1.52.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/tools/lli/Interpreter/ExternalFunctions.cpp diff -u llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.52 llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.52.2.1 --- llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.52 Wed May 14 09:21:30 2003 +++ llvm/tools/lli/Interpreter/ExternalFunctions.cpp Mon Jun 23 14:04:52 2003 @@ -17,10 +17,10 @@ #include "llvm/SymbolTable.h" #include "llvm/Target/TargetData.h" #include -#include -#include +#include "Config/dlfcn.h" +#include "Config/link.h" #include -#include +#include "Config/stdio.h" using std::vector; typedef GenericValue (*ExFunc)(FunctionType *, const vector &); From criswell at choi.cs.uiuc.edu Mon Jun 23 14:06:12 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:06:12 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/JIT/Emitter.cpp Intercept.cpp Message-ID: <200306231905.h5NJ54202318@choi.cs.uiuc.edu> Changes in directory llvm/tools/lli/JIT: Emitter.cpp updated: 1.14 -> 1.14.2.1 Intercept.cpp updated: 1.4 -> 1.4.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/tools/lli/JIT/Emitter.cpp diff -u llvm/tools/lli/JIT/Emitter.cpp:1.14 llvm/tools/lli/JIT/Emitter.cpp:1.14.2.1 --- llvm/tools/lli/JIT/Emitter.cpp:1.14 Sun Jun 8 01:43:57 2003 +++ llvm/tools/lli/JIT/Emitter.cpp Mon Jun 23 14:04:54 2003 @@ -6,6 +6,7 @@ //===----------------------------------------------------------------------===// #include "VM.h" +#include "Config/sys/mman.h" #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineConstantPool.h" @@ -79,7 +80,7 @@ static unsigned long Counter = 0; pa = mmap((void*)(0x140000000UL+Counter), pageSize*NumPages, PROT_READ|PROT_WRITE|PROT_EXEC, - MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0); /* fd = -1 */ + MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, -1, 0); /* fd = -1 */ Counter += pageSize*NumPages; #else std::cerr << "This architecture is not supported by the JIT\n"; Index: llvm/tools/lli/JIT/Intercept.cpp diff -u llvm/tools/lli/JIT/Intercept.cpp:1.4 llvm/tools/lli/JIT/Intercept.cpp:1.4.2.1 --- llvm/tools/lli/JIT/Intercept.cpp:1.4 Tue Jun 3 20:57:22 2003 +++ llvm/tools/lli/JIT/Intercept.cpp Mon Jun 23 14:04:54 2003 @@ -9,7 +9,7 @@ //===----------------------------------------------------------------------===// #include "VM.h" -#include // dlsym access +#include "Config/dlfcn.h" // dlsym access #include // AtExitList - List of functions registered with the at_exit function From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:08 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:08 2003 Subject: [llvm-commits] CVS: llvm/lib/Makefile Message-ID: <200306231907.h5NJ7dH02488@choi.cs.uiuc.edu> Changes in directory llvm/lib: Makefile updated: 1.11 -> 1.11.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/Makefile diff -u llvm/lib/Makefile:1.11 llvm/lib/Makefile:1.11.2.1 --- llvm/lib/Makefile:1.11 Tue Sep 17 22:25:55 2002 +++ llvm/lib/Makefile Mon Jun 23 14:06:59 2003 @@ -1,6 +1,8 @@ LEVEL = .. -PARALLEL_DIRS = VMCore Analysis Transforms AsmParser Bytecode Support CodeGen Target CWriter Reoptimizer +PARALLEL_DIRS = VMCore Analysis Transforms AsmParser Bytecode Support CodeGen Target CWriter + +OPTIONAL_DIRS = Reoptimizer include $(LEVEL)/Makefile.common From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:15 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:15 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/PassManagerT.h Message-ID: <200306231907.h5NJ7Pt02482@choi.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: PassManagerT.h updated: 1.38 -> 1.38.2.1 --- Log message: Modified code so that it compiles under GCC 3.3, but should otherwise function the same. --- Diffs of the changes: Index: llvm/lib/VMCore/PassManagerT.h diff -u llvm/lib/VMCore/PassManagerT.h:1.38 llvm/lib/VMCore/PassManagerT.h:1.38.2.1 --- llvm/lib/VMCore/PassManagerT.h:1.38 Thu Apr 24 15:07:38 2003 +++ llvm/lib/VMCore/PassManagerT.h Mon Jun 23 14:06:45 2003 @@ -130,8 +130,14 @@ typedef typename Traits::BatcherClass BatcherClass; typedef typename Traits::ParentClass ParentClass; - friend typename Traits::PassClass; - friend typename Traits::SubPassClass; + // + // JTC: + // GCC 3.3 does not permit friend declarations without the class keyword. + // Hence, I changed the following two lines to allow the code to compiler + // under the new compiler. + // + friend class PassManagerTraits::PassClass; + friend class PassManagerTraits::SubPassClass; friend class Traits; friend class ImmutablePass; From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:19 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:19 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Pass.cpp Message-ID: <200306231907.h5NJ7Lq02476@choi.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Pass.cpp updated: 1.41 -> 1.41.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/VMCore/Pass.cpp diff -u llvm/lib/VMCore/Pass.cpp:1.41 llvm/lib/VMCore/Pass.cpp:1.41.2.1 --- llvm/lib/VMCore/Pass.cpp:1.41 Fri Mar 21 15:41:02 2003 +++ llvm/lib/VMCore/Pass.cpp Mon Jun 23 14:07:11 2003 @@ -11,10 +11,10 @@ #include "llvm/Module.h" #include "Support/STLExtras.h" #include "Support/TypeInfo.h" -#include -#include -#include -#include +#include "Config/stdio.h" +#include "Config/sys/resource.h" +#include "Config/sys/time.h" +#include "Config/unistd.h" #include // IncludeFile - Stub function used to help linking out. From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:21 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:21 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp ProfilePaths.cpp Message-ID: <200306231907.h5NJ7K002468@choi.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation/ProfilePaths: EdgeCode.cpp updated: 1.21 -> 1.21.2.1 ProfilePaths.cpp updated: 1.28 -> 1.28.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.21 llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.21.2.1 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.21 Thu Jun 5 01:02:27 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp Mon Jun 23 14:07:10 2003 @@ -16,7 +16,7 @@ #include "llvm/iOperators.h" #include "llvm/iPHINode.h" #include "llvm/Module.h" -#include +#include "Config/stdio.h" #define INSERT_LOAD_COUNT #define INSERT_STORE Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.28 llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.28.2.1 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.28 Thu Jun 5 01:02:46 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp Mon Jun 23 14:07:10 2003 @@ -34,7 +34,7 @@ #include "llvm/Module.h" #include "Graph.h" #include -#include +#include "Config/stdio.h" using std::vector; struct ProfilePaths : public FunctionPass { From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:24 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:24 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp Message-ID: <200306231907.h5NJ7JL02458@choi.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86CodeEmitter.cpp updated: 1.28 -> 1.28.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/Target/X86/X86CodeEmitter.cpp diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.28 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.28.2.1 --- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.28 Fri Jun 6 13:25:33 2003 +++ llvm/lib/Target/X86/X86CodeEmitter.cpp Mon Jun 23 14:07:08 2003 @@ -13,7 +13,7 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Value.h" #include "Support/Statistic.h" -#include +#include "Config/alloca.h" namespace { Statistic<> From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:27 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:27 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/Makefile SparcInstrInfo.cpp SparcInternals.h SparcOptInfo.cpp Message-ID: <200306231907.h5NJ7Ih02450@choi.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: Makefile updated: 1.23 -> 1.23.2.1 SparcInstrInfo.cpp updated: 1.47 -> 1.47.2.1 SparcInternals.h updated: 1.90 -> 1.90.2.1 SparcOptInfo.cpp updated: 1.8 -> 1.8.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/Makefile diff -u llvm/lib/Target/Sparc/Makefile:1.23 llvm/lib/Target/Sparc/Makefile:1.23.2.1 --- llvm/lib/Target/Sparc/Makefile:1.23 Wed Jun 11 08:49:11 2003 +++ llvm/lib/Target/Sparc/Makefile Mon Jun 23 14:07:07 2003 @@ -24,10 +24,10 @@ $(CompileP) $< -o $@ Debug/Sparc.burg.in1 : Sparc.burg.in Debug/.dir - $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | sed '/^# /d' | sed 's/Ydefine/#define/' > $@ + $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Ydefine/#define/' > $@ Debug/Sparc.burm : Debug/Sparc.burg.in1 - $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | sed '/^# /d' | sed 's/Xinclude/#include/g' | sed 's/Xdefine/#define/g' > $@ + $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Xinclude/#include/g' | ${SED} 's/Xdefine/#define/g' > $@ $(BUILD_OBJ_DIR)/Depend/Sparc.burm.d: $(BUILD_OBJ_DIR)/Depend/.dir touch $@ @@ -35,8 +35,8 @@ SparcV9CodeEmitter.cpp: SparcV9CodeEmitter.inc SparcV9CodeEmitter.inc: SparcV9.td SparcV9_F2.td SparcV9_F3.td SparcV9_F4.td SparcV9_Reg.td $(TBLGEN) - @echo "TableGen-erating $@" + @${ECHO} "TableGen-erating $@" cpp -P SparcV9.td | $(TBLGEN) -gen-emitter -o $@ clean:: - rm -f SparcV9CodeEmitter.inc + ${RM} -f SparcV9CodeEmitter.inc Index: llvm/lib/Target/Sparc/SparcInstrInfo.cpp diff -u llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.47 llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.47.2.1 --- llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.47 Fri Jun 6 04:52:23 2003 +++ llvm/lib/Target/Sparc/SparcInstrInfo.cpp Mon Jun 23 14:07:07 2003 @@ -13,7 +13,7 @@ #include "llvm/Function.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" -#include +#include "Config/stdlib.h" static const uint32_t MAXLO = (1 << 10) - 1; // set bits set by %lo(*) static const uint32_t MAXSIMM = (1 << 12) - 1; // set bits in simm13 field of OR Index: llvm/lib/Target/Sparc/SparcInternals.h diff -u llvm/lib/Target/Sparc/SparcInternals.h:1.90 llvm/lib/Target/Sparc/SparcInternals.h:1.90.2.1 --- llvm/lib/Target/Sparc/SparcInternals.h:1.90 Mon Jun 16 10:31:09 2003 +++ llvm/lib/Target/Sparc/SparcInternals.h Mon Jun 23 14:07:07 2003 @@ -17,7 +17,7 @@ #include "llvm/Target/TargetOptInfo.h" #include "llvm/Type.h" #include "SparcRegClassInfo.h" -#include +#include "Config/sys/types.h" class LiveRange; class UltraSparc; Index: llvm/lib/Target/Sparc/SparcOptInfo.cpp diff -u llvm/lib/Target/Sparc/SparcOptInfo.cpp:1.8 llvm/lib/Target/Sparc/SparcOptInfo.cpp:1.8.2.1 --- llvm/lib/Target/Sparc/SparcOptInfo.cpp:1.8 Tue May 27 17:39:29 2003 +++ llvm/lib/Target/Sparc/SparcOptInfo.cpp Mon Jun 23 14:07:07 2003 @@ -7,7 +7,7 @@ #include "SparcInternals.h" #include "llvm/Target/TargetRegInfo.h" #include "llvm/CodeGen/MachineInstr.h" -#include +#include "Config/stdlib.h" //---------------------------------------------------------------------------- // Function: IsUselessCopy From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:30 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:30 2003 Subject: [llvm-commits] CVS: llvm/lib/Support/PluginLoader.cpp Signals.cpp Timer.cpp Message-ID: <200306231907.h5NJ7Gp02435@choi.cs.uiuc.edu> Changes in directory llvm/lib/Support: PluginLoader.cpp updated: 1.2 -> 1.2.2.1 Signals.cpp updated: 1.5 -> 1.5.2.1 Timer.cpp updated: 1.18 -> 1.18.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/Support/PluginLoader.cpp diff -u llvm/lib/Support/PluginLoader.cpp:1.2 llvm/lib/Support/PluginLoader.cpp:1.2.2.1 --- llvm/lib/Support/PluginLoader.cpp:1.2 Thu Jul 25 01:17:46 2002 +++ llvm/lib/Support/PluginLoader.cpp Mon Jun 23 14:07:06 2003 @@ -11,8 +11,8 @@ //===----------------------------------------------------------------------===// #include "Support/CommandLine.h" -#include -#include +#include "Config/dlfcn.h" +#include "Config/link.h" #include namespace { Index: llvm/lib/Support/Signals.cpp diff -u llvm/lib/Support/Signals.cpp:1.5 llvm/lib/Support/Signals.cpp:1.5.2.1 --- llvm/lib/Support/Signals.cpp:1.5 Tue May 27 11:25:04 2003 +++ llvm/lib/Support/Signals.cpp Mon Jun 23 14:07:06 2003 @@ -32,7 +32,7 @@ // SignalHandler - The signal handler that runs... -static void SignalHandler(int Sig) { +static RETSIGTYPE SignalHandler(int Sig) { while (!FilesToRemove.empty()) { std::remove(FilesToRemove.back().c_str()); FilesToRemove.pop_back(); Index: llvm/lib/Support/Timer.cpp diff -u llvm/lib/Support/Timer.cpp:1.18 llvm/lib/Support/Timer.cpp:1.18.2.1 --- llvm/lib/Support/Timer.cpp:1.18 Fri Jun 6 17:13:01 2003 +++ llvm/lib/Support/Timer.cpp Mon Jun 23 14:07:06 2003 @@ -4,14 +4,15 @@ // //===----------------------------------------------------------------------===// +#include "Config/malloc.h" + #include "Support/Timer.h" #include "Support/CommandLine.h" -#include -#include -#include -#include -#include -#include + +#include "Config/sys/resource.h" +#include "Config/sys/time.h" +#include "Config/unistd.h" +#include "Config/stdio.h" #include #include #include @@ -20,10 +21,12 @@ std::string LibSupportInfoOutputFilename; namespace { +#ifdef HAVE_MALLINFO cl::opt TrackSpace("track-memory", cl::desc("Enable -time-passes memory " "tracking (this may be slow)"), cl::Hidden); +#endif cl::opt InfoOutputFilename("info-output-file", @@ -75,12 +78,16 @@ } static long getMemUsage() { +#ifdef HAVE_MALLINFO if (TrackSpace) { struct mallinfo MI = mallinfo(); return MI.uordblks/*+MI.hblkhd*/; } else { return 0; } +#else + return 0; +#endif } struct TimeRecord { From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:33 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:33 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/InstrSelection/InstrForest.cpp Message-ID: <200306231907.h5NJ7Fi02423@choi.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/InstrSelection: InstrForest.cpp updated: 1.40 -> 1.40.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/CodeGen/InstrSelection/InstrForest.cpp diff -u llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.40 llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.40.2.1 --- llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.40 Sat Aug 24 16:02:09 2002 +++ llvm/lib/CodeGen/InstrSelection/InstrForest.cpp Mon Jun 23 14:07:05 2003 @@ -21,7 +21,7 @@ #include "llvm/Type.h" #include "llvm/CodeGen/MachineInstr.h" #include "Support/STLExtras.h" -#include +#include "Config/alloca.h" using std::cerr; using std::vector; From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:37 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:37 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineFunction.cpp Message-ID: <200306231907.h5NJ7EP02414@choi.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineFunction.cpp updated: 1.39 -> 1.39.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/CodeGen/MachineFunction.cpp diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.39 llvm/lib/CodeGen/MachineFunction.cpp:1.39.2.1 --- llvm/lib/CodeGen/MachineFunction.cpp:1.39 Wed Apr 23 11:36:09 2003 +++ llvm/lib/CodeGen/MachineFunction.cpp Mon Jun 23 14:07:04 2003 @@ -19,7 +19,7 @@ #include "llvm/Function.h" #include "llvm/iOther.h" #include "llvm/Pass.h" -#include +#include "Config/limits.h" const int INVALID_FRAME_OFFSET = INT_MAX; // std::numeric_limits::max(); From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:40 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:40 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200306231907.h5NJ7D202405@choi.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.34 -> 1.34.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.34 llvm/lib/Bytecode/Writer/Writer.cpp:1.34.2.1 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.34 Thu May 22 13:35:38 2003 +++ llvm/lib/Bytecode/Writer/Writer.cpp Mon Jun 23 14:07:03 2003 @@ -26,7 +26,7 @@ #include "llvm/DerivedTypes.h" #include "Support/STLExtras.h" #include "Support/Statistic.h" -#include +#include "Config/string.h" #include static RegisterPass X("emitbytecode", "Bytecode Writer"); From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:43 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:43 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReadArchive.cpp Reader.cpp Message-ID: <200306231907.h5NJ7CH02396@choi.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReadArchive.cpp updated: 1.3 -> 1.3.2.1 Reader.cpp updated: 1.56 -> 1.56.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReadArchive.cpp diff -u llvm/lib/Bytecode/Reader/ReadArchive.cpp:1.3 llvm/lib/Bytecode/Reader/ReadArchive.cpp:1.3.2.1 --- llvm/lib/Bytecode/Reader/ReadArchive.cpp:1.3 Tue Apr 22 21:59:05 2003 +++ llvm/lib/Bytecode/Reader/ReadArchive.cpp Mon Jun 23 14:07:02 2003 @@ -11,9 +11,9 @@ #include "llvm/Bytecode/Reader.h" #include "llvm/Module.h" -#include -#include -#include +#include "Config/sys/stat.h" +#include "Config/sys/mman.h" +#include "Config/fcntl.h" namespace { struct ar_hdr { Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.56 llvm/lib/Bytecode/Reader/Reader.cpp:1.56.2.1 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.56 Thu May 22 13:26:48 2003 +++ llvm/lib/Bytecode/Reader/Reader.cpp Mon Jun 23 14:07:02 2003 @@ -11,17 +11,17 @@ //===----------------------------------------------------------------------===// #include "ReaderInternals.h" +#include "Config/sys/mman.h" #include "llvm/Bytecode/Reader.h" #include "llvm/Bytecode/Format.h" #include "llvm/Module.h" #include "llvm/Constants.h" #include "llvm/iPHINode.h" #include "llvm/iOther.h" -#include -#include -#include -#include -#include +#include "Config/sys/types.h" +#include "Config/sys/stat.h" +#include "Config/fcntl.h" +#include "Config/unistd.h" #include bool BytecodeParser::getTypeSlot(const Type *Ty, unsigned &Slot) { From criswell at choi.cs.uiuc.edu Mon Jun 23 14:08:46 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:08:46 2003 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Lexer.l Message-ID: <200306231907.h5NJ7BD02386@choi.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.l updated: 1.34 -> 1.34.2.1 --- Log message: Initial autoconf checkin. --- Diffs of the changes: Index: llvm/lib/AsmParser/Lexer.l diff -u llvm/lib/AsmParser/Lexer.l:1.34 llvm/lib/AsmParser/Lexer.l:1.34.2.1 --- llvm/lib/AsmParser/Lexer.l:1.34 Wed May 7 21:44:01 2003 +++ llvm/lib/AsmParser/Lexer.l Mon Jun 23 14:07:01 2003 @@ -23,7 +23,7 @@ #include #include "llvmAsmParser.h" #include -#include +#include "Config/stdlib.h" #define RET_TOK(type, Enum, sym) \ llvmAsmlval.type = Instruction::Enum; return sym From criswell at choi.cs.uiuc.edu Mon Jun 23 14:12:02 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 23 14:12:02 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200306231911.h5NJBq502544@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.88 -> 1.88.2.1 --- Log message: Initial autoconf checkin. Uses a modified version of libtool for building files. --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.88 llvm/Makefile.common:1.88.2.1 --- llvm/Makefile.common:1.88 Wed Jun 11 08:55:26 2003 +++ llvm/Makefile.common Mon Jun 23 14:11:41 2003 @@ -117,8 +117,13 @@ # gross and should be autoconfiscated (automake actually), but should hopefully # work on Linux and solaris (SunOS). # -UNAME := $(shell uname) -include $(LLVM_SRC_ROOT)/Makefile.$(UNAME) +include $(LLVM_SRC_ROOT)/Makefile.$(OS) + +########################################################################### +# Default Targets: +# The following targets are the standard top level targets for +# building. +########################################################################### ifdef SHARED_LIBRARY # if SHARED_LIBRARY is specified, the default is to build the dynamic lib @@ -134,6 +139,12 @@ # Default rule for test. It ensures everything has a test rule test:: +########################################################################### +# Miscellaneous paths and commands: +# This section defines various configuration macros, such as where +# to find burg, tblgen, and libtool. +########################################################################### + #-------------------------------------------------------------------- # Variables derived from configuration options... #-------------------------------------------------------------------- @@ -157,8 +168,21 @@ endif endif +# +# Enable this for profiling support with 'gprof' +# This automatically enables optimized builds. +# +ifdef ENABLE_PROFILING + PROFILE = -pg +endif + +# +# Suffixes for library compilation rules +# +.SUFFIXES: .so + ########################################################################### -# Library Locations +# Library Locations: # These variables describe various library locations: # # DEST* = Location of where libraries that are built will be placed. @@ -208,36 +232,45 @@ PROJTOOLPROFILE := $(BUILD_OBJ_ROOT)/tools/Profile PROJTOOLCURRENT := $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION) +# +# Libtool is found in the current directory. +# +ifdef VERBOSE +LIBTOOL=$(LLVM_SRC_ROOT)/libtool +else +LIBTOOL=$(LLVM_SRC_ROOT)/libtool --silent +endif + +# # Verbosity levels +# ifndef VERBOSE VERB := @ endif -#--------------------------------------------------------- -# Compilation options... -#--------------------------------------------------------- - ########################################################################### -# Special tools used while building the LLVM tree. Burg is built as part of the -# utils directory. +# Miscellaneous paths and commands (part deux): +# This section defines various configuration macros, such as where +# to find burg, tblgen, and libtool. ########################################################################### + +#-------------------------------------------------------------------------- +# Special tools used while building the LLVM tree. Burg is built as part +# of the utils directory. +#-------------------------------------------------------------------------- BURG := $(LLVMTOOLCURRENT)/burg RunBurg := $(BURG) $(BURG_OPTS) TBLGEN := $(LLVMTOOLCURRENT)/tblgen -# Enable this for profiling support with 'gprof' -# This automatically enables optimized builds. -ifdef ENABLE_PROFILING - PROFILE = -pg -endif ########################################################################### # Compile Time Flags ########################################################################### # -# Include both the project headers and the LLVM headers for compilation +# Include both the project headers and the LLVM headers for compilation and +# dependency computation. # CPPFLAGS += -I$(BUILD_SRC_ROOT)/include -I$(LLVM_SRC_ROOT)/include @@ -254,47 +287,71 @@ CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums +# +# Compile commands with libtool. +# +Compile := $(LIBTOOL) --mode=compile $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CompileCommonOpts) +CompileC := $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CCFLAGS) $(CompileCommonOpts) + +# +# Add the LLVM specific "-only-static" option so that we only compile .o files +# once when not building a shared library. +# +# For shared libraries, we will end up building twice, but that doesn't happen +# very often, so we'll let it go. +# +ifndef SHARED_LIBRARY +Compile := $(Compile) -only-static +CompileC := $(CompileC) -only-static +endif + # Compile a cpp file, don't link... -Compile := $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CompileCommonOpts) CompileG := $(Compile) -g -D_DEBUG CompileO := $(Compile) $(CompileOptimizeOpts) -felide-constructors -fomit-frame-pointer CompileP := $(Compile) $(CompileOptimizeOpts) -felide-constructors $(PROFILE) # Compile a c file, don't link... -CompileC := $(CC) -c $(CPPFLAGS) $(CCFLAGS) $(CompileCommonOpts) CompileCG := $(CompileC) -g -D_DEBUG CompileCO := $(CompileC) $(CompileOptimizeOpts) -fomit-frame-pointer CompileCP := $(CompileC) $(CompileOptimizeOpts) $(PROFILE) +########################################################################### +# Link Time Options +########################################################################### +# # Link final executable - +# (Note that we always link with the C++ compiler). +# ifdef ENABLE_PURIFY # To enable purify, build with 'gmake ENABLE_PURIFY=1' -Link := $(PURIFY) $(CXX) -static +Link := $(PURIFY) $(LIBTOOL) --mode=link $(CXX) -static else -Link := $(CXX) +Link := $(LIBTOOL) --mode=link $(CXX) endif -ifdef PROJ_COMPILE -# include both projlib source and llvmlib source +# link both projlib and llvmlib libraries LinkG := $(Link) -g -L$(PROJLIBDEBUGSOURCE) -L$(LLVMLIBDEBUGSOURCE) $(STRIP) LinkO := $(Link) -O3 -L$(PROJLIBRELEASESOURCE) -L$(LLVMLIBRELEASESOURCE) LinkP := $(Link) -O3 -L$(PROJLIBPROFILESOURCE) -L$(LLVMLIBPROFILESOURCE) $(PROFILE) -else -LinkG := $(Link) -g -L$(LLVMLIBDEBUGSOURCE) $(STRIP) -LinkO := $(Link) -O3 -L$(LLVMLIBRELEASESOURCE) -LinkP := $(Link) -O3 -L$(LLVMLIBPROFILESOURCE) $(PROFILE) -endif - - # Create one .o file from a bunch of .o files... -Relink = ${LD} -r +Relink = ${LIBTOOL} --mode=link $(CXX) # MakeSO - Create a .so file from a .o files... -MakeSO := $(CXX) $(MakeSharedObjectOption) -MakeSOO := $(MakeSO) -O3 -MakeSOP := $(MakeSOO) $(PROFILE) +#MakeSO := $(LIBTOOL) --mode=link $(CXX) $(MakeSharedObjectOption) +#MakeSOO := $(MakeSO) -O3 +#MakeSOP := $(MakeSOO) $(PROFILE) + +# +# Configure where the item being compiled should go. +# +ifdef LIBRARYNAME +Link := $(Link) -rpath $(DESTLIBCURRENT) +endif + +ifdef TOOLNAME +Link := $(Link) -rpath $(DESTTOOLCURRENT) +endif # Create dependancy file from CPP file, send to stdout. Depend := $(CXX) -MM -I$(LEVEL)/include $(CPPFLAGS) @@ -318,6 +375,10 @@ ObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(Objs)) ObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(Objs)) +LObjs := $(sort $(patsubst Debug/%.lo, %.lo, $(addsuffix .lo,$(notdir $(basename $(Source)))))) +LObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(LObjs)) +LObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(LObjs)) +LObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(LObjs)) #--------------------------------------------------------- # Handle the DIRS and PARALLEL_DIRS options @@ -341,6 +402,9 @@ $(VERB) cd $(@D); $(MAKE) $(subst $(@D)/.make,,$@) endif +########################################################################### +# Library Build Rules: +# #--------------------------------------------------------- # Handle the LIBRARYNAME option - used when building libs... #--------------------------------------------------------- @@ -357,6 +421,7 @@ # it's built as a .o file, then all of the constituent .o files in it will be # linked into tools (for example gccas) even if they only use one of the parts # of it. For this reason, sometimes it's useful to use libraries as .a files. +########################################################################### ifdef LIBRARYNAME @@ -373,6 +438,11 @@ LIBNAME_OBJP := $(DESTLIBPROFILE)/$(LIBRARYNAME).o LIBNAME_OBJG := $(DESTLIBDEBUG)/$(LIBRARYNAME).o +#-------------------------------------------------------------------- +# Library Targets +# Modify the top level targets to build the desired libraries. +#-------------------------------------------------------------------- + # dynamic target builds a shared object version of the library... dynamic:: $(DESTLIBCURRENT)/lib$(LIBRARYNAME).so @@ -386,33 +456,49 @@ all:: $(DESTLIBCURRENT)/lib$(LIBRARYNAME).a endif -$(LIBNAME_O): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir +#-------------------------------------------------------------------- +# Rules for building libraries +#-------------------------------------------------------------------- + +# +# Rules for building dynamically linked libraries. +# +$(LIBNAME_O): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir @echo ======= Linking $(LIBRARYNAME) release library ======= - $(VERB) $(MakeSOO) -o $@ $(ObjectsO) $(LibSubDirs) $(LibLinkOpts) + $(VERB) $(Link) -o $*.la $(LObjectsO) $(LibSubDirs) $(LibLinkOpts); \ + $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); -$(LIBNAME_P): $(ObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir +$(LIBNAME_P): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir @echo ======= Linking $(LIBRARYNAME) profile library ======= - $(VERB) $(MakeSOP) -o $@ $(ObjectsP) $(LibSubDirs) $(LibLinkOpts) + $(VERB) $(Link) -o $*.la $(LObjectsP) $(LibSubDirs) $(LibLinkOpts); \ + $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); -$(LIBNAME_G): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir +$(LIBNAME_G): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir @echo ======= Linking $(LIBRARYNAME) debug library ======= - $(VERB) $(MakeSO) -g -o $@ $(ObjectsG) $(LibSubDirs) $(LibLinkOpts) + $(VERB) $(Link) -o $*.la $(LObjectsG) $(LibSubDirs) $(LibLinkOpts); \ + $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); -$(LIBNAME_AO): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir +# +# Rules for building static archive libraries. +# +$(LIBNAME_AO): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir @echo ======= Linking $(LIBRARYNAME) release library ======= - @rm -f $@ - $(VERB) $(AR) $@ $(ObjectsO) $(LibSubDirs) + @$(RM) -f $@ + $(VERB) $(LinkO) -o $@ $(LObjectsO) $(LibSubDirs) -static -$(LIBNAME_AP): $(ObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir +$(LIBNAME_AP): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir @echo ======= Linking $(LIBRARYNAME) profile library ======= - @rm -f $@ - $(VERB) $(AR) $@ $(ObjectsP) $(LibSubDirs) + @$(RM) -f $@ + $(VERB) $(LinkP) -o $@ $(LObjectsP) $(LibSubDirs) -static $(LIBNAME_AG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir @echo ======= Linking $(LIBRARYNAME) debug library ======= - @rm -f $@ - $(VERB) $(AR) $@ $(ObjectsG) $(LibSubDirs) + @$(RM) -f $@ + $(VERB) $(LinkG) -o $@ $(LObjectsG) $(LibSubDirs) -static +# +# Rules for building .o libraries. +# $(LIBNAME_OBJO): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir @echo "Linking $@" $(VERB) $(Relink) -o $@ $(ObjectsO) $(LibSubDirs) @@ -431,11 +517,16 @@ # Create a TAGS database for emacs #------------------------------------------------------------------------ +ifdef ETAGS ifeq ($(LEVEL), .) tags: - etags -l c++ `find include lib tools -name '*.cpp' -o -name '*.h'` + $(ETAGS) -l c++ `find include lib tools -name '*.cpp' -o -name '*.h'` all:: tags endif +else +tags: + ${ECHO} "Cannot build $@: The program etags is not installed" +endif #------------------------------------------------------------------------ # Handle the TOOLNAME option - used when building tool executables... @@ -477,8 +568,14 @@ USED_LIB_PATHS_G := $(addprefix $(DESTLIBDEBUG)/, $(STATICUSEDLIBS)) USED_LIB_PATHS_O := $(addprefix $(DESTLIBRELEASE)/, $(STATICUSEDLIBS)) USED_LIB_PATHS_P := $(addprefix $(DESTLIBPROFILE)/, $(STATICUSEDLIBS)) -LINK_OPTS := $(TOOLLINKOPTS) $(PLATFORMLINKOPTS) +#LINK_OPTS := $(TOOLLINKOPTS) $(PLATFORMLINKOPTS) +# +# Libtool link options: +# Ensure that all binaries have their symbols exported so that they can +# by dlsym'ed. +# +LINK_OPTS := -export-dynamic $(TOOLLINKOPTS) @@ -491,19 +588,19 @@ all:: $(TOOLEXENAMES) clean:: - $(VERB) rm -f $(TOOLEXENAMES) + $(VERB) $(RM) -f $(TOOLEXENAMES) $(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(DESTTOOLDEBUG)/.dir @echo ======= Linking $(TOOLNAME) debug executable $(STRIP_WARN_MSG)======= - $(VERB) $(LinkG) -o $@ $(ObjectsG) $(LIB_OPTS_G) $(LINK_OPTS) + $(VERB) $(LinkG) -o $@ $(ObjectsG) $(LIB_OPTS_G) $(LINK_OPTS) $(LIBS) $(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(DESTTOOLRELEASE)/.dir @echo ======= Linking $(TOOLNAME) release executable ======= - $(VERB) $(LinkO) -o $@ $(ObjectsO) $(LIB_OPTS_O) $(LINK_OPTS) + $(VERB) $(LinkO) -o $@ $(ObjectsO) $(LIB_OPTS_O) $(LINK_OPTS) $(LIBS) $(TOOLEXENAME_P): $(ObjectsP) $(USED_LIB_PATHS_P) $(DESTTOOLPROFILE)/.dir @echo ======= Linking $(TOOLNAME) profile executable ======= - $(VERB) $(LinkP) -o $@ $(ObjectsP) $(LIB_OPTS_P) $(LINK_OPTS) + $(VERB) $(LinkP) -o $@ $(ObjectsP) $(LIB_OPTS_P) $(LINK_OPTS) $(LIBS) endif @@ -536,6 +633,29 @@ $(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir $(VERB) $(CompileCG) $< -o $@ +# Create .lo files in the ObjectFiles directory from the .cpp and .c files... +$(BUILD_OBlJ_DIR)/Release/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir + @echo "Compiling $<" + $(VERB) $(CompileO) $< -o $@ + +$(BUILD_OBJ_DIR)/Release/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Release/.dir + $(VERB) $(CompileCO) $< -o $@ + +$(BUILD_OBJ_DIR)/Profile/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Profile/.dir + @echo "Compiling $<" + $(VERB) $(CompileP) $< -o $@ + +$(BUILD_OBJ_DIR)/Profile/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Profile/.dir + @echo "Compiling $<" + $(VERB) $(CompileCP) $< -o $@ + +$(BUILD_OBJ_DIR)/Debug/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Debug/.dir + @echo "Compiling $<" + $(VERB) $(CompileG) $< -o $@ + +$(BUILD_OBJ_DIR)/Debug/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir + $(VERB) $(CompileCG) $< -o $@ + # # Rules for building lex/yacc files # @@ -554,10 +674,10 @@ # FIXME. (f.e. char Buffer[10000]; ) # %.cpp: %.l - $(FLEX) -t $< | sed '/^find_rule/d' | \ - sed 's/void yyunput/inline void yyunput/' | \ - sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \ - sed 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@ + $(FLEX) -t $< | $(SED) '/^find_rule/d' | \ + $(SED) 's/void yyunput/inline void yyunput/' | \ + $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \ + $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@ # Rule for building the bison parsers... %.c: %.y # Cancel built-in rules for yacc @@ -565,23 +685,28 @@ %.cpp %.h : %.y @echo Bison\'ing $<... $(VERB) $(BISON) -v -d -p $(<:%Parser.y=%) $*.y - $(VERB) mv -f $*.tab.c $*.cpp - $(VERB) mv -f $*.tab.h $*.h + $(VERB) ${MV} -f $*.tab.c $*.cpp + $(VERB) ${MV} -f $*.tab.h $*.h # To create the directories... %/.dir: - $(VERB) mkdir -p $* - @date > $@ + $(VERB) ${MKDIR} $* + @$(DATE) > $@ # To create postscript files from dot files... +ifdef DOT %.ps: %.dot - dot -Tps < $< > $@ + ${DOT} -Tps < $< > $@ +else +%.ps: %.dot + ${ECHO} "Cannot build $@: The program dot is not installed" +endif # 'make clean' nukes the tree clean:: - $(VERB) rm -rf $(BUILD_OBJ_DIR)/Debug $(BUILD_OBJ_DIR)/Release $(BUILD_OBJ_DIR)/Profile $(BUILD_OBJ_DIR)/Depend - $(VERB) rm -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc - $(VERB) rm -f $(LEX_OUTPUT) $(YACC_OUTPUT) + $(VERB) $(RM) -rf $(BUILD_OBJ_DIR)/Debug $(BUILD_OBJ_DIR)/Release $(BUILD_OBJ_DIR)/Profile $(BUILD_OBJ_DIR)/Depend + $(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc + $(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT) # If dependencies were generated for the file that included this file, # include the dependancies now... @@ -592,12 +717,12 @@ # Create dependencies for the *.cpp files... #$(SourceDepend): \x $(BUILD_OBJ_DIR)/Depend/%.d: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Depend/.dir - $(VERB) $(Depend) $< | sed 's|$*\.o *|$(BUILD_OBJ_DIR)/Release/& $(BUILD_OBJ_DIR)/Profile/& $(BUILD_OBJ_DIR)/Debug/& $(BUILD_OBJ_DIR)/Depend/$(@F)|g' > $@ + $(VERB) $(Depend) $< | $(SED) 's|$*\.o *|$(BUILD_OBJ_DIR)/Release/& $(BUILD_OBJ_DIR)/Profile/& $(BUILD_OBJ_DIR)/Debug/& $(BUILD_OBJ_DIR)/Depend/$(@F)|g' > $@ # Create dependencies for the *.c files... #$(SourceDepend): \x $(BUILD_OBJ_DIR)/Depend/%.d: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Depend/.dir - $(VERB) $(DependC) $< | sed 's|$*\.o *|Release/& Profile/& Debug/& Depend/$(@F)|g' > $@ + $(VERB) $(DependC) $< | $(SED) 's|$*\.o *|Release/& Profile/& Debug/& Depend/$(@F)|g' > $@ ifneq ($(SourceDepend),) -include $(SourceDepend) From lattner at cs.uiuc.edu Mon Jun 23 14:17:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 14:17:02 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/PassManagerT.h Message-ID: <200306231916.OAA20598@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: PassManagerT.h updated: 1.38 -> 1.39 --- Log message: Add support for GCC 3.3 --- Diffs of the changes: Index: llvm/lib/VMCore/PassManagerT.h diff -u llvm/lib/VMCore/PassManagerT.h:1.38 llvm/lib/VMCore/PassManagerT.h:1.39 --- llvm/lib/VMCore/PassManagerT.h:1.38 Thu Apr 24 15:07:38 2003 +++ llvm/lib/VMCore/PassManagerT.h Mon Jun 23 14:16:20 2003 @@ -130,8 +130,8 @@ typedef typename Traits::BatcherClass BatcherClass; typedef typename Traits::ParentClass ParentClass; - friend typename Traits::PassClass; - friend typename Traits::SubPassClass; + friend class PassManagerTraits::PassClass; + friend class PassManagerTraits::SubPassClass; friend class Traits; friend class ImmutablePass; From gaeke at cs.uiuc.edu Mon Jun 23 14:43:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon Jun 23 14:43:01 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/Interpreter/ExternalFunctions.cpp Message-ID: <200306231942.OAA21346@neo.cs.uiuc.edu> Changes in directory llvm/tools/lli/Interpreter: ExternalFunctions.cpp updated: 1.53 -> 1.54 --- Log message: Include instead of Remove isnan; it's too unportable to handle cleanly at this point. --- Diffs of the changes: Index: llvm/tools/lli/Interpreter/ExternalFunctions.cpp diff -u llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.53 llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.54 --- llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.53 Tue Jun 17 14:59:17 2003 +++ llvm/tools/lli/Interpreter/ExternalFunctions.cpp Mon Jun 23 14:41:55 2003 @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include using std::vector; @@ -217,14 +217,6 @@ return GV; } -// int isnan(double value); -GenericValue lle_X_isnan(FunctionType *F, const vector &Args) { - assert(Args.size() == 1); - GenericValue GV; - GV.IntVal = std::isnan(Args[0].DoubleVal); - return GV; -} - // double floor(double) GenericValue lle_X_floor(FunctionType *M, const vector &Args) { assert(Args.size() == 1); @@ -744,7 +736,6 @@ FuncNames["lle_X_pow"] = lle_X_pow; FuncNames["lle_X_exp"] = lle_X_exp; FuncNames["lle_X_log"] = lle_X_log; - FuncNames["lle_X_isnan"] = lle_X_isnan; FuncNames["lle_X_floor"] = lle_X_floor; FuncNames["lle_X_srand"] = lle_X_srand; FuncNames["lle_X_drand48"] = lle_X_drand48; From gaeke at cs.uiuc.edu Mon Jun 23 15:00:03 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon Jun 23 15:00:03 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CBackend/Makefile Message-ID: <200306231959.OAA08571@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CBackend: Makefile updated: 1.7 -> 1.8 --- Log message: Allow .llx testcases (i.e., those that contain explicit RUN: stmts.) --- Diffs of the changes: Index: llvm/test/Regression/CBackend/Makefile diff -u llvm/test/Regression/CBackend/Makefile:1.7 llvm/test/Regression/CBackend/Makefile:1.8 --- llvm/test/Regression/CBackend/Makefile:1.7 Mon May 12 10:33:52 2003 +++ llvm/test/Regression/CBackend/Makefile Mon Jun 23 14:58:50 2003 @@ -10,9 +10,9 @@ .PRECIOUS: Output/%.c TESTS := $(wildcard *.ll) +FTESTS := $(wildcard *.llx) # Freeform tests -all:: $(addprefix Output/, $(TESTS:%.ll=%.to)) - +all:: $(addprefix Output/, $(TESTS:%.ll=%.to)) $(addprefix Output/, $(FTESTS:%.llx=%.llx.out)) Output/%.to: Output/%.c $(CC) -c -Werror $< -o $@ || \ @@ -21,3 +21,7 @@ Output/%.c: %.ll Output/.dir $(LAS) $(LDIS) $(LAS) < $< | $(LDIS) -c > $@ || \ (rm -f $@; $(FAILURE) $@ ) + +Output/%.llx.out: %.llx Output/.dir $(LAS) $(LDIS) + -$(TESTRUNR) $< + From gaeke at cs.uiuc.edu Mon Jun 23 15:00:06 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon Jun 23 15:00:06 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx Message-ID: <200306231959.OAA08564@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CBackend: 2003-06-23-PromotedExprs.llx added (r1.1) --- Log message: New test case for C Writer regression found in 256.bzip2 --- Diffs of the changes: Index: llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx diff -c /dev/null llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx:1.1 *** /dev/null Mon Jun 23 14:59:27 2003 --- llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx Mon Jun 23 14:59:17 2003 *************** *** 0 **** --- 1,16 ---- + + ; RUN: as < %s | dis -c > Output/%s.cbe.c + ; RUN: gcc -B/usr/bin/ Output/%s.cbe.c -o Output/%s.cbe + ; RUN: Output/%s.cbe + + bool %doTest(ubyte %x) { + %dec.0 = add ubyte %x, 255 + %tmp.1001 = cast ubyte %dec.0 to bool + ret bool %tmp.1001 + } + + int %main () { + %result = call bool %doTest(ubyte 1) + %p = cast bool %result to int + ret int %p + } From gaeke at cs.uiuc.edu Mon Jun 23 15:02:03 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon Jun 23 15:02:03 2003 Subject: [llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp Message-ID: <200306232001.PAA08587@zion.cs.uiuc.edu> Changes in directory llvm/lib/CWriter: Writer.cpp updated: 1.97 -> 1.98 --- Log message: Fix 2003-06-23-PromotedExprs.llx -- if we are adding two bytes we better explicitly cast the result to be a byte, or C will gleefully promote it to int. --- Diffs of the changes: Index: llvm/lib/CWriter/Writer.cpp diff -u llvm/lib/CWriter/Writer.cpp:1.97 llvm/lib/CWriter/Writer.cpp:1.98 --- llvm/lib/CWriter/Writer.cpp:1.97 Tue Jun 17 18:55:31 2003 +++ llvm/lib/CWriter/Writer.cpp Mon Jun 23 15:00:51 2003 @@ -1029,6 +1029,16 @@ void CWriter::visitBinaryOperator(Instruction &I) { // binary instructions, shift instructions, setCond instructions. assert(!isa(I.getType())); + + // We must cast the results of binary operations which might be promoted. + bool needsCast = false; + if ((I.getType() == Type::UByteTy) || (I.getType() == Type::SByteTy) + || (I.getType() == Type::UShortTy) || (I.getType() == Type::ShortTy)) { + needsCast = true; + Out << "(("; + printType(Out, I.getType(), "", false, false); + Out << ")("; + } writeOperand(I.getOperand(0)); @@ -1053,6 +1063,10 @@ } writeOperand(I.getOperand(1)); + + if (needsCast) { + Out << "))"; + } } void CWriter::visitCastInst(CastInst &I) { From lattner at cs.uiuc.edu Mon Jun 23 16:49:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 16:49:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/cast.ll Message-ID: <200306232148.QAA25554@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: cast.ll updated: 1.6 -> 1.7 --- Log message: Test cases for when casts to bool can be eliminated --- Diffs of the changes: Index: llvm/test/Regression/Transforms/InstCombine/cast.ll diff -u llvm/test/Regression/Transforms/InstCombine/cast.ll:1.6 llvm/test/Regression/Transforms/InstCombine/cast.ll:1.7 --- llvm/test/Regression/Transforms/InstCombine/cast.ll:1.6 Mon Sep 23 18:39:17 2002 +++ llvm/test/Regression/Transforms/InstCombine/cast.ll Mon Jun 23 16:48:26 2003 @@ -68,3 +68,16 @@ %c2 = cast uint %c1 to short ret short %c2 } + +bool %test11(ubyte %A, ubyte %B) { + %C = sub ubyte %A, %B + %D = cast ubyte %C to bool ; == setne A, B + ret bool %D +} + +bool %test12(ubyte %A) { + %B = add ubyte %A, 255 + %C = cast ubyte %B to bool ; === A != 1 + ret bool %C +} + From lattner at cs.uiuc.edu Mon Jun 23 16:50:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 16:50:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/cast.ll Message-ID: <200306232149.QAA25637@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: cast.ll updated: 1.7 -> 1.8 --- Log message: Yet another testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/InstCombine/cast.ll diff -u llvm/test/Regression/Transforms/InstCombine/cast.ll:1.7 llvm/test/Regression/Transforms/InstCombine/cast.ll:1.8 --- llvm/test/Regression/Transforms/InstCombine/cast.ll:1.7 Mon Jun 23 16:48:26 2003 +++ llvm/test/Regression/Transforms/InstCombine/cast.ll Mon Jun 23 16:49:25 2003 @@ -81,3 +81,9 @@ ret bool %C } +bool %test13(ubyte %A, ubyte %b) { + %B = add ubyte %A, %b + %C = cast ubyte %B to bool ; === A != 1 + ret bool %C +} + From lattner at cs.uiuc.edu Mon Jun 23 16:54:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 16:54:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/cast.ll Message-ID: <200306232153.QAA29864@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: cast.ll updated: 1.8 -> 1.9 --- Log message: Fix comment --- Diffs of the changes: Index: llvm/test/Regression/Transforms/InstCombine/cast.ll diff -u llvm/test/Regression/Transforms/InstCombine/cast.ll:1.8 llvm/test/Regression/Transforms/InstCombine/cast.ll:1.9 --- llvm/test/Regression/Transforms/InstCombine/cast.ll:1.8 Mon Jun 23 16:49:25 2003 +++ llvm/test/Regression/Transforms/InstCombine/cast.ll Mon Jun 23 16:52:59 2003 @@ -83,7 +83,7 @@ bool %test13(ubyte %A, ubyte %b) { %B = add ubyte %A, %b - %C = cast ubyte %B to bool ; === A != 1 + %C = cast ubyte %B to bool ; === A != -b ret bool %C } From lattner at cs.uiuc.edu Mon Jun 23 17:01:12 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 17:01:12 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200306232200.RAA00349@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.91 -> 1.92 --- Log message: Implement new transforms: Replace (cast (sub A, B) to bool) -> (setne A, B) Replace (cast (add A, B) to bool) -> (setne A, -B) --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.91 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.92 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.91 Sat Jun 21 18:12:02 2003 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Jun 23 16:59:52 2003 @@ -898,15 +898,17 @@ // CastInst simplification // Instruction *InstCombiner::visitCastInst(CastInst &CI) { + Value *Src = CI.getOperand(0); + // If the user is casting a value to the same type, eliminate this cast // instruction... - if (CI.getType() == CI.getOperand(0)->getType()) - return ReplaceInstUsesWith(CI, CI.getOperand(0)); + if (CI.getType() == Src->getType()) + return ReplaceInstUsesWith(CI, Src); // If casting the result of another cast instruction, try to eliminate this // one! // - if (CastInst *CSrc = dyn_cast(CI.getOperand(0))) { + if (CastInst *CSrc = dyn_cast(Src)) { if (isEliminableCastOfCast(CI, CSrc)) { // This instruction now refers directly to the cast's src operand. This // has a good chance of making CSrc dead. @@ -933,7 +935,7 @@ // If casting the result of a getelementptr instruction with no offset, turn // this into a cast of the original pointer! // - if (GetElementPtrInst *GEP = dyn_cast(CI.getOperand(0))) { + if (GetElementPtrInst *GEP = dyn_cast(Src)) { bool AllZeroOperands = true; for (unsigned i = 1, e = GEP->getNumOperands(); i != e; ++i) if (!isa(GEP->getOperand(i)) || @@ -944,6 +946,33 @@ if (AllZeroOperands) { CI.setOperand(0, GEP->getOperand(0)); return &CI; + } + } + + // If this is a cast to bool (which is effectively a "!=0" test), then we can + // perform a few optimizations... + // + if (CI.getType() == Type::BoolTy) { + if (BinaryOperator *BO = dyn_cast(Src)) { + Value *Op0 = BO->getOperand(0), *Op1 = BO->getOperand(1); + + // Replace (cast (sub A, B) to bool) with (setne A, B) + if (BO->getOpcode() == Instruction::Sub) + return new SetCondInst(Instruction::SetNE, Op0, Op1); + + // Replace (cast (add A, B) to bool) with (setne A, -B) if B is + // efficiently invertible, or if the add has just this one use. + if (BO->getOpcode() == Instruction::Add) + if (Value *NegVal = dyn_castNegVal(Op1)) + return new SetCondInst(Instruction::SetNE, Op0, NegVal); + else if (Value *NegVal = dyn_castNegVal(Op0)) + return new SetCondInst(Instruction::SetNE, NegVal, Op1); + else if (BO->use_size() == 1) { + Instruction *Neg = BinaryOperator::createNeg(Op1, BO->getName()); + BO->setName(""); + InsertNewInstBefore(Neg, CI); + return new SetCondInst(Instruction::SetNE, Op0, Neg); + } } } From lattner at cs.uiuc.edu Mon Jun 23 17:18:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 17:18:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CFP2000/Makefile Message-ID: <200306232217.RAA03845@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CFP2000: Makefile updated: 1.1 -> 1.2 --- Log message: Add support for disabled directories --- Diffs of the changes: Index: llvm/test/Programs/External/SPEC/CFP2000/Makefile diff -u llvm/test/Programs/External/SPEC/CFP2000/Makefile:1.1 llvm/test/Programs/External/SPEC/CFP2000/Makefile:1.2 --- llvm/test/Programs/External/SPEC/CFP2000/Makefile:1.1 Sun Jun 1 21:45:11 2003 +++ llvm/test/Programs/External/SPEC/CFP2000/Makefile Mon Jun 23 17:17:25 2003 @@ -1,3 +1,3 @@ LEVEL = ../../../../.. -DIRS := $(sort $(filter-out CVS/, $(wildcard */))) +PARALLEL_DIRS := $(filter-out %-disabled/, $(sort $(filter-out CVS/, $(wildcard */)))) include ${LEVEL}/test/Makefile.tests From lattner at cs.uiuc.edu Mon Jun 23 17:37:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 23 17:37:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.nightly.Makefile Message-ID: <200306232236.RAA06300@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.nightly.Makefile updated: 1.15 -> 1.16 --- Log message: Prevent crafty from stopping the nightly tester! --- Diffs of the changes: Index: llvm/test/Programs/TEST.nightly.Makefile diff -u llvm/test/Programs/TEST.nightly.Makefile:1.15 llvm/test/Programs/TEST.nightly.Makefile:1.16 --- llvm/test/Programs/TEST.nightly.Makefile:1.15 Sat Jun 21 21:38:29 2003 +++ llvm/test/Programs/TEST.nightly.Makefile Mon Jun 23 17:36:09 2003 @@ -21,8 +21,9 @@ # Compilation tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.compile.report.txt): \ Output/%.nightly.compile.report.txt: Output/%.llvm.bc $(LGCCAS) - @echo '$(LGCCAS) Output/$*.linked.rll -o /dev/null $(TIMEOPT) > $@ 2>&1' - @if ($(LGCCAS) Output/$*.linked.rll -o /dev/null $(TIMEOPT) > $@ 2>&1)\ + @echo > $@ + @echo '$(LGCCAS) Output/$*.linked.rll -o/dev/null $(TIMEOPT) >> $@ 2>&1' + @if ($(LGCCAS) Output/$*.linked.rll -o /dev/null $(TIMEOPT) >> $@ 2>&1)\ ;then \ echo "TEST-PASS: compile $(RELDIR)/$*" >> $@;\ echo -n "TEST-RESULT-compile: " >> $@;\ @@ -42,14 +43,16 @@ # NAT tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.nat.report.txt): \ Output/%.nightly.nat.report.txt: Output/%.out-nat + @echo > $@ echo -n "TEST-RESULT-nat-time: " >> $@ -grep "^real" Output/$*.out-nat.time >> $@ # LLC tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.llc.report.txt): \ Output/%.nightly.llc.report.txt: Output/%.llvm.bc $(LLC) + @echo > $@ @echo 'time -p $(LLC) -f $(TIMEOPT) $< -o /dev/null) > $@ 2>&1' - @if (time -p $(LLC) -f $(TIMEOPT) $< -o /dev/null) > $@ 2>&1; then \ + @if (time -p $(LLC) -f $(TIMEOPT) $< -o /dev/null) >> $@ 2>&1; then \ echo "TEST-PASS: llc $(RELDIR)/$*" >> $@;\ echo -n "TEST-RESULT-llc: " >> $@;\ grep "Total Execution Time" $@.info >> $@;\ @@ -65,7 +68,8 @@ # CBE tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.cbe.report.txt): \ Output/%.nightly.cbe.report.txt: Output/%.llvm.bc Output/%.exe-cbe $(LDIS) - -head -n 100 Output/$*.exe-cbe > $@ + @echo > $@ + -head -n 100 Output/$*.exe-cbe >> $@ @if test -f Output/$*.exe-cbe; then \ echo "TEST-PASS: cbe $(RELDIR)/$*" >> $@;\ echo "TEST-RESULT-cbe: YES" >> $@;\ @@ -79,7 +83,8 @@ # JIT tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.jit.report.txt): \ Output/%.nightly.jit.report.txt: Output/%.llvm.bc Output/%.exe-jit $(LLI) - -head -n 100 Output/$*.exe-jit > $@ + @echo > $@ + -head -n 100 Output/$*.exe-jit >> $@ @if test -f Output/$*.exe-jit; then \ echo "TEST-PASS: jit $(RELDIR)/$*" >> $@;\ echo -n "TEST-RESULT-jit-time: " >> $@;\ From jstanley at cs.uiuc.edu Mon Jun 23 17:45:01 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Mon Jun 23 17:45:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Reoptimizer/BinInterface/sparc9.h Message-ID: <200306232244.RAA02526@trinity.cs.uiuc.edu> Changes in directory llvm/include/llvm/Reoptimizer/BinInterface: sparc9.h updated: 1.14 -> 1.15 --- Log message: --- Diffs of the changes: Index: llvm/include/llvm/Reoptimizer/BinInterface/sparc9.h diff -u llvm/include/llvm/Reoptimizer/BinInterface/sparc9.h:1.14 llvm/include/llvm/Reoptimizer/BinInterface/sparc9.h:1.15 --- llvm/include/llvm/Reoptimizer/BinInterface/sparc9.h:1.14 Sat May 31 17:16:52 2003 +++ llvm/include/llvm/Reoptimizer/BinInterface/sparc9.h Mon Jun 23 17:44:25 2003 @@ -430,12 +430,111 @@ MK_FLD(INSTR_I, 1) | \ MK_FLD(INSTR_OP3, OP3_ADD)) -#define MK_INSTR_BRANCH_RS1(cond) \ +#define MK_INSTR_BRANCH_RS1(cond) \ (MK_FLD(INSTR_OP, OP_BRANCH) | \ MK_FLD(INSTR_BPR, BPR) | \ MK_FLD(INSTR_BPR_COND, cond)) #define MK_INSTR_BRANCH_NO_RS1(cond) \ (MK_FLD(INSTR_OP, OP_BRANCH) | \ - MK_FLD(INSTR_INT_BR, Bicc) | \ + MK_FLD(INSTR_INT_BR, Bicc) | \ MK_FLD(INSTR_INTBR_COND, cond)) + +// Add a register to a register + +#define MK_ADD_R_R(dreg, sreg1, sreg2) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_ADD) | \ + MK_FLD(INSTR_RS1, sreg1) | \ + MK_FLD(INSTR_I, 0) | \ + MK_FLD(INSTR_RS2, sreg2)) + +// Construct immediate-valued logical operation + +#define MK_LOGIC_IMM(op3, dreg, sreg, imm) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_SIMM13, imm) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_OP3, op3)) + +// Construct reg-to-reg logical operation + +#define MK_LOGIC(op3, dreg, sreg1, sreg2) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_RS1, sreg1) | \ + MK_FLD(INSTR_RS2, sreg2) | \ + MK_FLD(INSTR_I, 0) | \ + MK_FLD(INSTR_OP3, op3)) + +// Construct sethi instruction + +#define MK_SETHI(dreg, imm) \ + (MK_FLD(INSTR_OP, OP_BRANCH) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP2, OP2_SETHI) | \ + MK_FLD(INSTR_IMM22, imm)) + +// Construct S{LL,RL,RA}X shift instruction. + +#define MK_SHIFTX(op3, dreg, sreg, shcnt) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, op3) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_X, 1) | \ + MK_FLD(INSTR_SHCNT64, shcnt)) + +#define MK_STORE_IMM(srcreg, basereg, offset) \ + (MK_FLD(INSTR_OP, OP_3) | \ + MK_FLD(INSTR_RD, srcreg) | \ + MK_FLD(INSTR_OP3, OP3_STX) | \ + MK_FLD(INSTR_RS1, basereg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_SIMM13, offset)) + +#define MK_LOAD_IMM(destreg, basereg, offset) \ + (MK_FLD(INSTR_OP, OP_3) | \ + MK_FLD(INSTR_RD, destreg) | \ + MK_FLD(INSTR_OP3, OP3_LDX) | \ + MK_FLD(INSTR_RS1, basereg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_SIMM13, offset)) + +// Construct save instruction + +#define MK_SAVE_IMM(dreg, sreg, imm) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_SAVE) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_SIMM13, imm)) + +#define MK_SAVE_REG(dreg, sreg1, sreg2) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_SAVE) | \ + MK_FLD(INSTR_RS1, sreg1) | \ + MK_FLD(INSTR_I, 0) | \ + MK_FLD(INSTR_RS2, sreg2)) + +#define MK_RESTORE_IMM(dreg, sreg, imm) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_RESTORE) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_SIMM13, imm)) + +#define MK_JMPL_INDIRECT(dreg, sreg, imm) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_JMPL) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_SIMM13, imm)) From jstanley at cs.uiuc.edu Mon Jun 23 18:32:00 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Mon Jun 23 18:32:00 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h Message-ID: <200306232331.SAA03187@trinity.cs.uiuc.edu> Changes in directory llvm/include/llvm/Reoptimizer/BinInterface: bitmath.h updated: 1.9 -> 1.10 --- Log message: --- Diffs of the changes: Index: llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h diff -u llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h:1.9 llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h:1.10 --- llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h:1.9 Sat May 31 17:16:41 2003 +++ llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h Mon Jun 23 18:31:47 2003 @@ -16,6 +16,8 @@ #ifndef __BITMATH_H__ #define __BITMATH_H__ +#include "Support/DataTypes.h" + //********************************* // Misc functions //********************************* @@ -29,7 +31,7 @@ //********************************* #define FLD_UPPER(FLD_DEF) (1 ? FLD_DEF) #define FLD_LOWER(FLD_DEF) (0 ? FLD_DEF) -#define MASKBELOW(V) ((1 << V) - 1) +#define MASKBELOW(V) ((((uint64_t) 1) << V) - 1) // 64-bit '1' constant here to avoid overflow warnings #define MASKEQBELOW(V) ((1 << V) | MASKBELOW(V)) //masks off everything ABOVE #define RD_FLD(x, FLD) ((x & MASKEQBELOW(FLD_UPPER(FLD))) >> FLD_LOWER(FLD)) #define MK_FLD(FLD, val) ((val << FLD_LOWER(FLD)) & MASKEQBELOW(FLD_UPPER(FLD))) @@ -129,7 +131,9 @@ return ((0xFFFFAA50 >> w) & 3)+n; // this is a LUT } - +static unsigned LOW10(unsigned value) { return value & 0x000003ff; } +static unsigned HIGH22(unsigned value) { return value >> 10; } +static unsigned HIGHWORD(uint64_t value) { return (unsigned) (value >> 32); } +static unsigned LOWWORD(uint64_t value) { return (unsigned) value; } #endif - From jstanley at cs.uiuc.edu Mon Jun 23 21:47:01 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Mon Jun 23 21:47:01 2003 Subject: [llvm-commits] CVS: llvm/test/Libraries/libinstr/tracelib.c Message-ID: <200306240246.VAA20238@trinity.cs.uiuc.edu> Changes in directory llvm/test/Libraries/libinstr: tracelib.c updated: 1.3 -> 1.4 --- Log message: Prevented inclusion of (non-existent) stdint.h on Sparc. --- Diffs of the changes: Index: llvm/test/Libraries/libinstr/tracelib.c diff -u llvm/test/Libraries/libinstr/tracelib.c:1.3 llvm/test/Libraries/libinstr/tracelib.c:1.4 --- llvm/test/Libraries/libinstr/tracelib.c:1.3 Tue May 27 16:43:14 2003 +++ llvm/test/Libraries/libinstr/tracelib.c Mon Jun 23 21:46:47 2003 @@ -10,7 +10,9 @@ #include #include #include +#ifndef sun #include +#endif /*===---------------------------------------------------------------------===== * HASH FUNCTIONS From jstanley at cs.uiuc.edu Tue Jun 24 10:30:02 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Tue Jun 24 10:30:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Reoptimizer/inst/Makefile Test1.c Message-ID: <200306241529.KAA00266@trinity.cs.uiuc.edu> Changes in directory llvm/test/Regression/Reoptimizer/inst: Makefile updated: 1.5 -> 1.5.2.1 Test1.c updated: 1.4.2.1 -> 1.4.2.2 --- Log message: --- Diffs of the changes: Index: llvm/test/Regression/Reoptimizer/inst/Makefile diff -u llvm/test/Regression/Reoptimizer/inst/Makefile:1.5 llvm/test/Regression/Reoptimizer/inst/Makefile:1.5.2.1 --- llvm/test/Regression/Reoptimizer/inst/Makefile:1.5 Thu May 22 22:25:43 2003 +++ llvm/test/Regression/Reoptimizer/inst/Makefile Tue Jun 24 10:29:11 2003 @@ -1,4 +1,5 @@ -LEVEL = /localhome/$(USER)/Research/llvm +LEVEL = ../../../../ +#LEVEL = /localhome/$(USER)/Research/llvm CC = /usr/dcs/software/evaluation/bin/gcc CXX = /usr/dcs/software/evaluation/bin/g++ @@ -10,8 +11,8 @@ $(LEVEL)/lib/Debug/libtracecache.a \ $(LEVEL)/lib/Debug/libbininterface.a - -LIBINSTRBC = /home/vadve/lattner/cvs/gcc_install_sparc/llvm/lib/libinstr.bc +CRTEND = $(LLVM_LIB_SEARCH_PATH)/crtend.o +LIBINSTRBC = $(LEVEL)/test/Libraries/Output/libinstr.bc Test1: Test1.o $(PERFOBJS) # NB: The only reason we don't include the PAPI library in the list of exclusions @@ -19,8 +20,8 @@ # tables, and thus will never try to instrument the PAPI functions, which are # dynamically linked. - mkexcl $(PERFOBJS) libinstr.o > mkexcl.cpp - $(CXX) -o Test1 $^ mkexcl.cpp -L$(PAPIDIR) -lpapi -lelf + mkexcl $(PERFOBJS) libinstr.o crtend.o > mkexcl.cpp + $(CXX) -o Test1 $^ mkexcl.cpp crtend.o -L$(PAPIDIR) -lpapi -lelf Test1.o: Test1.opt.c $(CC) -c Test1.opt.c -o Test1.o @@ -28,12 +29,16 @@ Test1.opt.c: Test1.opt.bc dis -c < Test1.opt.bc > Test1.opt.c -Test1.opt.bc: Test1.bc libinstr.o $(LEVEL)/lib/Debug/libperf.so +Test1.opt.bc: Test1.bc libinstr.o crtend.o $(LEVEL)/lib/Debug/libperf.so opt -load $(LEVEL)/lib/Debug/libperf.so -pp1 -emitfuncs -deadtypeelim < Test1.bc > Test1.opt.o gccld -disable-internalize $(LIBINSTRBC) Test1.opt.o -o Test1.opt Test1.bc: Test1.c $(LLVMGCC) -I$(LOCAL_CVSROOT)/llvm/lib/Reoptimizer/Inst/rtl -c Test1.c -o Test1.bc + +crtend.o: $(CRTEND) + dis -c < $^ > $(@:.o=.c) + $(CC) -c $(@:.o=.c) 2>/dev/null libinstr.o: $(LIBINSTRBC) dis -c < $^ > $(@:.o=.c) Index: llvm/test/Regression/Reoptimizer/inst/Test1.c diff -u llvm/test/Regression/Reoptimizer/inst/Test1.c:1.4.2.1 llvm/test/Regression/Reoptimizer/inst/Test1.c:1.4.2.2 --- llvm/test/Regression/Reoptimizer/inst/Test1.c:1.4.2.1 Fri May 30 10:23:50 2003 +++ llvm/test/Regression/Reoptimizer/inst/Test1.c Tue Jun 24 10:29:11 2003 @@ -22,10 +22,6 @@ printf("Just about to call fibs() for the first time...\n"); fibs(); - registerIntervalInst(42, pp_L1_cache_miss_start, - pp_L1_cache_miss_end, sizeof(int), - &l1cachemiss); - printf("Just about to call fibs() for the second time...\n"); fibs(); @@ -55,6 +51,10 @@ printf("after for loop...\n"); fflush(stdout); + + registerIntervalInst(42, pp_L1_cache_miss_start, + pp_L1_cache_miss_end, sizeof(int), + &l1cachemiss); pp_declareIntervalEnd(42, &tmp); From jstanley at cs.uiuc.edu Tue Jun 24 10:34:01 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Tue Jun 24 10:34:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Reoptimizer/inst/Makefile Test1.c Message-ID: <200306241533.KAA00287@trinity.cs.uiuc.edu> Changes in directory llvm/test/Regression/Reoptimizer/inst: Makefile updated: 1.5 -> 1.6 Test1.c updated: 1.4 -> 1.5 --- Log message: Merge from branch. --- Diffs of the changes: Index: llvm/test/Regression/Reoptimizer/inst/Makefile diff -u llvm/test/Regression/Reoptimizer/inst/Makefile:1.5 llvm/test/Regression/Reoptimizer/inst/Makefile:1.6 --- llvm/test/Regression/Reoptimizer/inst/Makefile:1.5 Thu May 22 22:25:43 2003 +++ llvm/test/Regression/Reoptimizer/inst/Makefile Tue Jun 24 10:33:31 2003 @@ -1,4 +1,5 @@ -LEVEL = /localhome/$(USER)/Research/llvm +LEVEL = ../../../../ +#LEVEL = /localhome/$(USER)/Research/llvm CC = /usr/dcs/software/evaluation/bin/gcc CXX = /usr/dcs/software/evaluation/bin/g++ @@ -10,8 +11,8 @@ $(LEVEL)/lib/Debug/libtracecache.a \ $(LEVEL)/lib/Debug/libbininterface.a - -LIBINSTRBC = /home/vadve/lattner/cvs/gcc_install_sparc/llvm/lib/libinstr.bc +CRTEND = $(LLVM_LIB_SEARCH_PATH)/crtend.o +LIBINSTRBC = $(LEVEL)/test/Libraries/Output/libinstr.bc Test1: Test1.o $(PERFOBJS) # NB: The only reason we don't include the PAPI library in the list of exclusions @@ -19,8 +20,8 @@ # tables, and thus will never try to instrument the PAPI functions, which are # dynamically linked. - mkexcl $(PERFOBJS) libinstr.o > mkexcl.cpp - $(CXX) -o Test1 $^ mkexcl.cpp -L$(PAPIDIR) -lpapi -lelf + mkexcl $(PERFOBJS) libinstr.o crtend.o > mkexcl.cpp + $(CXX) -o Test1 $^ mkexcl.cpp crtend.o -L$(PAPIDIR) -lpapi -lelf Test1.o: Test1.opt.c $(CC) -c Test1.opt.c -o Test1.o @@ -28,12 +29,16 @@ Test1.opt.c: Test1.opt.bc dis -c < Test1.opt.bc > Test1.opt.c -Test1.opt.bc: Test1.bc libinstr.o $(LEVEL)/lib/Debug/libperf.so +Test1.opt.bc: Test1.bc libinstr.o crtend.o $(LEVEL)/lib/Debug/libperf.so opt -load $(LEVEL)/lib/Debug/libperf.so -pp1 -emitfuncs -deadtypeelim < Test1.bc > Test1.opt.o gccld -disable-internalize $(LIBINSTRBC) Test1.opt.o -o Test1.opt Test1.bc: Test1.c $(LLVMGCC) -I$(LOCAL_CVSROOT)/llvm/lib/Reoptimizer/Inst/rtl -c Test1.c -o Test1.bc + +crtend.o: $(CRTEND) + dis -c < $^ > $(@:.o=.c) + $(CC) -c $(@:.o=.c) 2>/dev/null libinstr.o: $(LIBINSTRBC) dis -c < $^ > $(@:.o=.c) Index: llvm/test/Regression/Reoptimizer/inst/Test1.c diff -u llvm/test/Regression/Reoptimizer/inst/Test1.c:1.4 llvm/test/Regression/Reoptimizer/inst/Test1.c:1.5 --- llvm/test/Regression/Reoptimizer/inst/Test1.c:1.4 Thu May 22 22:25:43 2003 +++ llvm/test/Regression/Reoptimizer/inst/Test1.c Tue Jun 24 10:33:31 2003 @@ -3,41 +3,30 @@ // The following is actually the semantic result of processing a metric // declaration (need more sigfun support) -double elapsedTime = 0; -double elapsedTime2 = 0; +double elapsedTime = 3.14; int l1cachemiss = 0; #include -void phase2(); - int fib(int n); void fibs(); -void someOtherFunction() -{ - int x; - pp_L1_cache_miss_start(&x); - printf("this statement resides within a region!\n"); - pp_L1_cache_miss_end(&l1cachemiss, &x); - printf("someOtherFunction complete: retval is %d\n", l1cachemiss); -} - int main(int argc, char** argv) { phase2(); - printf("Just about to call fibs()...\n"); + registerIntervalInst(42, pp_elapsed_time_start, + pp_elapsed_time_end, sizeof(double), + &elapsedTime); + + printf("Just about to call fibs() for the first time...\n"); fibs(); - printf("Just about to call someOtherFunction()...\n"); - someOtherFunction(); + printf("Just about to call fibs() for the second time...\n"); + fibs(); printf("Leaving main...\n"); - pp_regionPair(pp_elapsed_time_start, pp_elapsed_time_end); - pp_regionPair(pp_L1_cache_miss_start, pp_L1_cache_miss_end); - return 0; } @@ -49,39 +38,12 @@ return fib(n-2) + fib(n-1); } -void functionToBeInlined() -{ - double y; - pp_elapsed_time_start(&y); - printf("This function should be inlined..."); - pp_elapsed_time_end(&elapsedTime2, &y); -} - void fibs() { int i; + double tmp; - printf("Inside fibs now, calling functionToBeInlined...\n"); - - functionToBeInlined(); - - //////////////// - // The following is the "scope" that the sampling applies to, represented by - // sigfuns. We need better sigfun support. - // - // That is, the below should look like: - // - // pp_region_start(elapsedTime); - // - // pp_region_end(elaspedTime); - // - // or something similar. We should not be putting the actual invoked functions below, - // although the post-phase1 transformed code should be "similar" (calls removed and - // volatile loads put in their place, of course!) - - long x; - double y; - pp_elapsed_time_start(&y); + pp_declareIntervalStart(&tmp, 42); for(i = 10; i > 0; i--) { printf("fib(%d) = %d\n", i, fib(i)); @@ -90,9 +52,14 @@ printf("after for loop...\n"); fflush(stdout); - pp_elapsed_time_end(&elapsedTime, &y); + registerIntervalInst(42, pp_L1_cache_miss_start, + pp_L1_cache_miss_end, sizeof(int), + &l1cachemiss); + + pp_declareIntervalEnd(42, &tmp); - printf("ElapsedTime (metric variable) has address %lx, value %f\n", &elapsedTime, elapsedTime); + printf("value of variable elapsedTime: %f\n", elapsedTime); + printf("value of variable l1cachemiss: %d\n", l1cachemiss); // //////////////// From jstanley at cs.uiuc.edu Tue Jun 24 10:36:00 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Tue Jun 24 10:36:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Reoptimizer/Inst/lib/design.txt Message-ID: <200306241535.KAA00318@trinity.cs.uiuc.edu> Changes in directory llvm/lib/Reoptimizer/Inst/lib: design.txt updated: 1.15 -> 1.15.2.1 --- Log message: --- Diffs of the changes: Index: llvm/lib/Reoptimizer/Inst/lib/design.txt diff -u llvm/lib/Reoptimizer/Inst/lib/design.txt:1.15 llvm/lib/Reoptimizer/Inst/lib/design.txt:1.15.2.1 --- llvm/lib/Reoptimizer/Inst/lib/design.txt:1.15 Sun May 18 12:45:26 2003 +++ llvm/lib/Reoptimizer/Inst/lib/design.txt Tue Jun 24 10:35:06 2003 @@ -880,91 +880,70 @@ {{{ MILESTONES + - Experiments + - The Paper + - The Thesis }}} {{{ TODO - - Move statically-sized spill regions so that they are internal to SparcInstManip. - (do not need variable-sized spill region except for phase5 invocations) + In priority order: - - Start table-of-stacks implementation for phase4 authorship of phase 5 slots. - - Placed on hold temporary because of "alloca-finding" approach. However, see the - following e-mail for the current state of things: - - {{{ E-mail regarding alloca-finding and table-of-stacks approach -Okay, this is starting to seem intractable. I have another problem that -I don't think can be resolved without resorting to a custom-stack -mechanism that will incur prohibitive overhead. - -Everything is working for start-region instrumentation sites. For -end-region instrumentation sites, however, there's a problem. In order -to write the slot for end sites, I have to know (or know how to compute) -the address of the return value of the corresponding start site. I had -originally thought that I would just store this in the GBT, or -"something", but I clearly didn't think through the problem well enough. - -There are only two ways I can think of that this can occur: - -(a) Write the effective address of the return value of the start inst -func, so that it gets passed to the end inst func. - -or - -(b) Somehow encode the stack offset to the return value from the start -inst, where the offset is from the %sp *at the end-region site* - -Both of these have problems. - -First, I don't think (b) can work at all, given that there may be -alloca's present in the original application that would change the %sp, -and thus the offset value that we'd need, and we can't determine the -exact allocas that are executed statically. - -For (a), the effective address isn't known until runtime. We can store -this address in some global table where the phase 4 invocation for the -end site can find it, but it is not sufficient to have a single scalar -address here -- we must have a stack, due to potential recursive -invocations. I think that this is clear, please let me know if I'm not -making sense. :) - -Hence, we'd need to maintain a stack of effective addresses, which was -pushed during the execution of phase 5 for the start site, and then read -and popped during the execution of phase 5 for the end site. We're -already really bloated with how many instructions we've got going on for -all of the spills, etc, and I'm concerned about the effect that this -stack manipulation will have on our overhead, as we talked about before. - -The way I see it, we only have two options if we're to make forward -progress and not obliterate our chances of having lower overhead -numbers. Hopefully we have some better choices. In the interests of -short-term forward progress, I'm going to go with #1 for now. - -#1 - Make another common-case assumption that there will be no allocas -between start and end sites, on *any* control path. If this is the case, -then we know that the stack pointer will not have been manipulated (I -think) between the start and end sites, and so the %sp offsets to the -requisite data will be unchanged since when the phase 5 step occurred -for the start site. - -#2 - Just implement our fall-back solution that everything seems to be -pointing to. I'm not sure exactly what other logistic nightmares might -be entailed in this, though, because I've only a sketch of the idea. - -I wanted to point out, also, that the so-called "fall back" approach we -discussed previous also involves manipulation of a stack at runtime -(push/pop actions still have to occur at runtime), so perhaps the stack -of effective addresses is less prohibitive than I thought, if only in -the sense that we cannot avoid it. :( - }}} - - - Write phase 5 stuff for end-region sites -- will assume that not allocas lie between - the start and end sites, which is not particularly a fair assumption. - - - Optimizations: - - No need to save registers (other than those clobbered) in phase 3 slot, since phase 3 - is invoked at the start of the function. Must still spill/restore shared, though. - - No need to save registers (other than those clobbered) in general. + 1) New implementation for instrumenting at function-level granularity + 2) Apache through LLVM, experiments + 3) Writing, writing, writing: ICS version 2 paper, do + a) outline + b) intro + c) language section + d) compiler section + + The three top-level items above are more-or-less interchangable. However, the + experiments will not be able to be completed unless the "instrumentation @ + function-level granularity" implementation is done, and there should be an emphasis on + getting Apache through LLVM in the short-term because Chris is leaving for Norway in + early July. + + However, *all* of the writing (including experimentation sections) for ICS v2 must be + done by the end of June, so that Adve can approve it, make the desired corrections, + etc., so that I can get started on thesis authorship and submission. Realistically, + the timeframe should look something like this: + + Week of 6/10 (5 days): Implementation, Apache w/ bug reports + Week of 6/16 (6 days): Implementation, Small example, continue Apache & do tests + + -- At this point, all experiments should be more-or-less completed -- + + Week of 6/23 (6 days): Write, write, write. 3 days nonstop for content, 3 + days of Adve making corrections, etc. + + Monday, 6/30 is D-Day... + + Schedule revision 13 Jun 2003: Apache is in stasis waiting to hear back from + Chris. Some effort might be expended to see if any more work can be done on compiling + Apache even though the build process currently fails altogether. Implementation for + instrumentation at function-level granularity is in stasis until I hear back from + Vikram. This leaves three immediate options open until either of the two are + resolved, in which case forward progress on either the implementation or Apache should + be made. + + Option 1) POV-Ray through LLVM. + Option 2) Writing + Option 3) "Small example" + + Option 3 really shouldn't be undertaken until we know if obtaining things like I/O + elapsed time (via function-level) is possible, or until I can talk with Vikram in our + next meeting about what the heck this nebulous example should look like...this leaves + only options 1 and 2 above as viable. + + POV-Ray should be an easy thing to start, and would be good both as a fall-back if + Apache isn't possible as well as a useful additional example if the latter is + possible. This would also give V & C some time to respond to the pending queries. + + - Optimizations: - No need to save registers (other than those clobbered) in + phase 3 slot, since phase 3 is invoked at the start of the function. Must + still spill/restore shared, though. - No need to save registers (other than + those clobbered) in general. }}} @@ -1460,5 +1439,226 @@ Also, Chris remarked that any novel page-management mechanisms, etc., (for the code that is jumped to in newly-allocated pages) that I devise should perhaps be integrated into the LLVM JIT if they are suitable. + +}}} + +{{{ Experiments + +We must devise experiments that demonstrate the novel aspects of the work. We +are currently planning on using Apache and/or POV-Ray, and demonstrating how a +"deep" performance analysis can be encoded using performance primitives. A +"deep" performance analysis is one which essentially (using Hollingsworth's +terminology from his PhD thesis) gets at the "what, where, and when" aspects of +performance bottlenecks. However, instead of doing this at the "arbitrary +program during execution" level, as the W^3 search model does, we will encode +these performance aspects at the application level itself. + +Here's what Vikram suggested for a good start: + + I just thought that the examples of performance issues he explores in his + automatic search would give you (a) some insights into what performance issues + make sense to consider, and (b) some ideas about how to do a systematic + diagnosis, albeit at the application level. + + But isn't detecting the "what, why, and when" of performance bottlenecks + pretty closely related to the goal of performance diagnosis? We'd be looking + for bottlenecks too, except that we can use application domain information, we + can look for bottlenecks at the algorithmic level instead of the general + system level, and we can record it permanently in the program as a first class + feature of the program. + + Anyway, about your second question: here's a way to do what I suggesting: + + -- think about 2-3 key performance issues with Apache (or POV-Ray) that you'd + want to diagnose e.g., cache misses, TLB misses, thread overhead (estimating + that could be interesting), I/O delays + + -- if those issues make sense with a small sort example, try to diagnose those + issues in the small example first. e.g., I think cache misses, TLB misses, + and I/O delays would all be issues if you were sorting a huge file of some + kind. + + This is purely to give you a small, well-understood code to try out before + going to the big ones where it may be difficult to know, when one diagnosis + attempt fails, whether it failed because you misunderstood the performance + issues or because the guess was wrong or both. + +TLB misses aren't an option, because we cannot get at them with PAPI. Cache +misses are available, so that'd certainly be a good place to start. As for I/O +delays, I have no idea how we'd measure this, either. The following is the +comprehensive list of the low-level metrics that are exposed to us via PAPI. On +our own, we can support simple things like elapsed time, load average, etc. I'm +not altogether clear how we'd determine how much time (for a particular region) +was spent doing I/O-bound activities... + +Number of hardware counters: 2 +Name: PAPI_L1_ICM Description: Level 1 instruction cache misses +Name: PAPI_L2_TCM Description: Level 2 cache misses +Name: PAPI_CA_SNP Description: Requests for a snoop +Name: PAPI_CA_INV Description: Requests for cache line invalidation +Name: PAPI_L1_LDM Description: Level 1 load misses +Name: PAPI_L1_STM Description: Level 1 store misses +Name: PAPI_BR_MSP Description: Conditional branch instructions mispredicted +Name: PAPI_TOT_IIS Description: Instructions issued +Name: PAPI_TOT_INS Description: Instructions completed +Name: PAPI_LD_INS Description: Load instructions +Name: PAPI_SR_INS Description: Store instructions +Name: PAPI_TOT_CYC Description: Total cycles +Name: PAPI_IPS Description: Instructions per second +Name: PAPI_L1_DCR Description: Level 1 data cache reads +Name: PAPI_L1_DCW Description: Level 1 data cache writes +Name: PAPI_L1_ICH Description: Level 1 instruction cache hits +Name: PAPI_L2_ICH Description: Level 2 instruction cache hits +Name: PAPI_L1_ICA Description: Level 1 instruction cache accesses +Name: PAPI_L2_TCH Description: Level 2 total cache hits +Name: PAPI_L2_TCA Description: Level 2 total cache accesses + +So, in the short-term, we have two outstanding problems. First, what kinds of +metric would we want to apply to Apache/POV-Ray/Simple example? Second, of those +metrics, which can we actually realize with the current system? Third, we should +create the simple program (such as sorting large amounts of data from a file, +etc.) so that it can use these metrics in such a way that "models" or +"anticipates" the way they will be used in the bigger applications. + +This is an outstanding issue, and I don't really know where to go with it yet. + +More notes about this as of 4 Jun 2003: + +One way to obtain metric values that are based on the elapsed times of +particular functions is to somehow register instrumentation for those particular +functions, and for a particular region -- Vikram argues that we have the ability +to do this dynamically and we don't need any markers or phase-1 actions because +we're operating at function-level granularity. + +Here is a sample scenario: We have defined an interval I over some scoped region +of code. During phase 1 and phase 2, no instrumentation is registered for this +interval. Later on, we construct a metric that is qualified by a list of +functions that (for example) are to have their runtimes measured and added to +some running total. Let's call this the "measure_functions_start" and +"measure_functions_end" metric, and have it yield a value of type double which +is the aggregate runtime of the list of functions when they get executed within +interval I. The metric registration function will have to have some way +(varargs?) of denoting what the functions are: perhaps it can simply pass in an +array of function names together with a size. + +Example: + +pp_registerIntervalInst(intervalID, measure_functions_start, + measure_functions_end, &retVal, sizeof(double), + func1, func2, func3, ...); + +However, what do "measure_functions_start" have to do with anything? More than +likely, what we need to do is specify a particular metric to apply to a +paritcular function, such that the value will be sampled each time that function +gets executed. Then, since there can be multiple invocations (and hence, +multiple samples) for this selected function within I, we will have to have some +default or user-specified way of aggregating the data :(. This is gross. In +other words, we should probably simplify the above to something like: + +pp_registerIntervalInst(intervalID, some_metric_start, some_metric_end, + &retVal, sizeof(double), HOW_TO_AGGREGATE, func1); + +Where func1 is the function to be instrumented and HOW_TO_AGGREGATE is some +value that specifies one from a couple of ways of combining the data. For now, +HOW_TO_AGGREGATE will not exist and will implicitly sum all return +values...hence, if the some_metric_{start,end} function ptrs above were to +elapsed time, at the end of the interval I with interval id intervalID, retVal +would contain the combined elapsed time of all time spent in function func1. + +Enabling this measurement at the start of the interval, disabling at the end of +the interval; clearly, the start-instrumentation site will need to transform +func1 (to compute the metric value) when crossed, and the end-insturmentation +site must remove such instrumentation when crossed. This doesn't follow the +normal model of what occurs at the instrumentation sites, in terms of just +ripping down a list of functions...or does it? Perhaps one of the functions in +the list is just this function that does the transformation on the target +function...in this case, the process would look something like: + +1. Register the transformation function (for the start point) -- call this +xform_start -- as a regular instrumentation function. The runtime call to do +the registration will build the appropriate data structures which will encode +what metric to associated with the target function, aggregation method, return +value, etc. + +2. Register the transformation function (for the end point) -- call this +xform_end -- as a regular instrumentation function. + +3. When xform_start is invoked as a regular instrumentation function, it will +instrument the target function with the selected instrumentation. + +This is the hardest step to conceptualize and realize. The problem is that, +without any placeholders from phase 1, it's not clear that we can instrument the +target function easily. Clearly, our instrumentation points are at the start +and end points of the function (entry and exit). But this is not really true. +Our instrumentation points are really at the entry and *all* function exits. + +The important question is, what if we have all of the exit points at our +disposal? Would that change anything? + +It would. The entry point together with all exit points would form a set of +instrumentation points. For each of these instrumentation points, we could +over-write a branch to a new slot that would call the desired instrumentation +function, restore the replaced instruction, and return to the instrumentation +point to continue execution. This would potentially work. One major problem +that comes to mind is that for system calls (such as read()), the body of the +function is highly likely to be out of short-jmp range to the +tracecache-allocated slot. The only way around this would be to create a heap +region and copy the target function into it, etc. We don't have any code to do +this yet, so again there is no code reuse or (much) leveraging of existing +functionality. Additionally, work will have to be done to make the data +structure that maps the address of a function to its extents (which come from +the ELf information). + +-- + +The other alternative is to make sure a "wrapper" function (i.e., for the +function read()): + +int read_wrapper(args for read) { + start_inst(); + int rc = read(args for read); + end_inst(); + return rc; +} + +But this isn't an option because we cannot locate the calls to read() to replace +them with the wrapper. We could do the following: + +3a. Copy the entire target function to a heap region, and instrument it to our +heart's content. However, finding exit points may not be easy without a CFG, +etc. + +3b. Replace the body of the real target function with a call to the modified +duplicate of the target function, returning whatever the modified duplicate +returns. + +This works, I think, but is incredibly cumbersome and, contrary to what was +previously discussed, we do *not* possess all of the mechanisms. + +-- + +Notes on POV-Ray experiment 23 Jun 2003 + +We propose using a user-defined metric, flops/display pixel to compute the +computational cost per pixel. + +1. Compute flops/dpixel and report using pp mechanisms. + 1a. flops can be obtained via PAPI, IIRC. + +2. Create a moving average of flops/dpixel. + +3. When the flops/dpixel exceeds mavg flops/dpixel by some multiplicative +threshold (e.g.), a performance assertion is violated. When the PA is violated, +we report other metrics (perhaps ranked in some manner) that had been being +recorded but not reported. Initial suggestions for the other metrics to measure +_over the same region_ (say, the main routine for a single ray-trace) are: + + 1) MAverage L1 icache misses vs. this-ray L1 icache misses + 2) MAverage L2 cache misses vs. this-ray L2 cache misses + 3) MAverage load count vs. this-ray load count + 4) MAverage store count vs. this-ray store count + +Immediate problem: I don't think we can monitor more than 2 of these values +concurrently due to hardware limitations on the SPARC... }}} From jstanley at cs.uiuc.edu Tue Jun 24 10:41:01 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Tue Jun 24 10:41:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Reoptimizer/Inst/rtl/pprtl.cpp pprtl.h Message-ID: <200306241540.KAA01771@trinity.cs.uiuc.edu> Changes in directory llvm/lib/Reoptimizer/Inst/rtl: pprtl.cpp updated: 1.2 -> 1.3 pprtl.h updated: 1.3 -> 1.4 --- Log message: Merge from branch jrsdev. --- Diffs of the changes: Index: llvm/lib/Reoptimizer/Inst/rtl/pprtl.cpp diff -u llvm/lib/Reoptimizer/Inst/rtl/pprtl.cpp:1.2 llvm/lib/Reoptimizer/Inst/rtl/pprtl.cpp:1.3 --- llvm/lib/Reoptimizer/Inst/rtl/pprtl.cpp:1.2 Thu May 22 22:26:13 2003 +++ llvm/lib/Reoptimizer/Inst/rtl/pprtl.cpp Tue Jun 24 10:39:54 2003 @@ -57,7 +57,7 @@ printf("pp_L1_cache_miss_start invoked: retVal addr is 0x%lx\n", (unsigned long) retVal); start_papi_sample(events, 1); *retVal = PAPI_L1_ICM; - printf("pp_L1_cache_miss_start returning!\n"); + printf("pp_L1_cache_miss_start returning value %x!\n", *retVal); } void pp_L1_cache_miss_end(int* retVal, int* start) Index: llvm/lib/Reoptimizer/Inst/rtl/pprtl.h diff -u llvm/lib/Reoptimizer/Inst/rtl/pprtl.h:1.3 llvm/lib/Reoptimizer/Inst/rtl/pprtl.h:1.4 --- llvm/lib/Reoptimizer/Inst/rtl/pprtl.h:1.3 Thu May 22 22:26:13 2003 +++ llvm/lib/Reoptimizer/Inst/rtl/pprtl.h Tue Jun 24 10:39:54 2003 @@ -16,11 +16,22 @@ void pp_L1_cache_miss_end(int* retVal, int* start); unsigned pp_counterPrim(void); - // significant functions + // significant functions and rtl functions + + void phase2(); + void registerIntervalInst(unsigned siteID, + void* startFunc, + void* endFunc, + unsigned paramSize, + void* retVal); void pp_regionPair(void*, void*); void pp_metricSpec(void*); + // Interval declaration sigfuns: the placeholder variable is to connect the + // two sigfuns via uses. + void pp_declareIntervalStart(double* placeHolder, unsigned intervalID); + void pp_declareIntervalEnd(unsigned intervalID, double* placeHolder); #ifdef _BUILDING_RUNTIME_LIBRARY_ } From jstanley at cs.uiuc.edu Tue Jun 24 10:41:05 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Tue Jun 24 10:41:05 2003 Subject: [llvm-commits] CVS: llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp PrimInfo.cpp PrimInfo.h Message-ID: <200306241540.KAA01765@trinity.cs.uiuc.edu> Changes in directory llvm/lib/Reoptimizer/Inst/lib/Phase1: Phase1.cpp updated: 1.26 -> 1.27 PrimInfo.cpp updated: 1.15 -> 1.16 PrimInfo.h updated: 1.10 -> 1.11 --- Log message: Merge from branch jrsdev. --- Diffs of the changes: Index: llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp diff -u llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp:1.26 llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp:1.27 --- llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp:1.26 Thu May 22 22:26:13 2003 +++ llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp Tue Jun 24 10:39:53 2003 @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include "llvm/Pass.h" #include "llvm/Module.h" @@ -78,6 +78,12 @@ Module* m_module; // Current module vector m_primInfos; // Deferred documentation structures TargetData m_targetData; // For obtaining target-specific info + + static const unsigned NUM_START_OPDS = 3; + static const unsigned NUM_END_OPDS = 3; + static const unsigned NUM_STOPD_USES = 2; + static const unsigned ENDCALL_ID_OPIDX = 1; + static const unsigned POINTCALL_ID_OPIDX = 1; }; //////////////// Phase1 implementation //////////////// @@ -112,7 +118,7 @@ m_module); // Invoke PrimInfo's static initializer - PrimInfo::buildStructType(&m); + PrimInfo::buildStructTypes(&m); // //////////////// @@ -181,12 +187,17 @@ // Populate with builtins - // TODO: Replace the hard-coded mechanism for the point metrics with a - // sigfun registration mechanism like that which exists for region metrics - // (pp_regionPair()). + // The new approach: pp_declareInterval{Start,End} are the only sigfuns used to + // declare an interval, instead of the interval being implicit by the given locations + // of the calls to (registered) region sigfuns. For now, we will still use the old + // code for processing the contents of 'rpairs', but the only element of rpairs will + // be the pair of interval-declaration sigfuns. TODO: Clean up this approach, and do + // the same for point-site declarations. + + Function* intervalStartDeclFunc = m_module->getNamedFunction("pp_declareIntervalStart"); + Function* intervalEndDeclFunc = m_module->getNamedFunction("pp_declareIntervalEnd"); - // Find user-declared region-pairs and add them to the list - findRegionPairs(rpairs); + rpairs.push_back(std::make_pair(intervalStartDeclFunc, intervalEndDeclFunc)); //////////////// // Build list of point metric spec sigfuns, finding ppMetricSpec will yield @@ -218,26 +229,10 @@ for(unsigned i = 0, e = rpairs.size(); i < e; ++i) transformSites(rpairs[i]); - // Build the interval PrimInfo instance -> GBT index map. This maps the address of a - // particular interval PrimInfo instance to the index in the GBT that corresponds to - // the record that represents the start-interval global-volatile and related - // information. - - std::map gbtIdxMap; - int idx = 0; - for(vector::iterator i = m_primInfos.begin(), e = m_primInfos.end(); i != e; ++i){ - if(i->getType() == PrimInfo::REGION) { - gbtIdxMap[&*i] = idx; - idx += 2; - } - else - idx++; - } - // Build the global bookkeeping table (GBT) contents vector gbtElems; for(vector::iterator i = m_primInfos.begin(), e = m_primInfos.end(); i != e; ++i) - i->buildStructInstances(gbtElems, gbtIdxMap, &m_targetData); + i->buildStructInstances(gbtElems); // Make the GBT itself, and the corresponding global variable. ArrayType* gbtType = ArrayType::get(PrimInfo::getStructType(), gbtElems.size()); @@ -295,19 +290,19 @@ CallInst* startCall = dyn_cast(*u); assert(startCall && "Use of a registered pp sigfun not in a call"); - + // Find call to endpoint: The first operand of the start function is used in only // two places: the call to the start function, and the call to the end // function. Find the call to the end function. - assert(startCall->getNumOperands() == 2 && - "Start-region call insts should only have 2 operands"); + assert(startCall->getNumOperands() == NUM_START_OPDS && + "Start-region call inst has unexpected number of operands"); Value* stOpd = startCall->getOperand(1); assert(isa(stOpd) && "Unexpected first operand of start call"); - assert(stOpd->use_size() == 2 && - "Expect only two uses of start-region operand"); + assert(stOpd->use_size() == NUM_STOPD_USES && + "Unexpected number of uses of of start-region (\"connector\") operand"); CallInst* endCall; if((endCall = dyn_cast(stOpd->use_back()))) { @@ -338,11 +333,21 @@ return cast(ci->getOperand(1)); } - + +static unsigned extractUnsignedValue(CallInst* ci, unsigned nth) +{ + // extract the literal value of the nth actual of ci, which must be of type + // unsigned. + + if(ConstantUInt* ui = dyn_cast(ci->getOperand(nth))) + return ui->getValue(); + + assert(0 && "Failed to find unsigned value as call actual"); + return 0; // squash warning +} + void Phase1::transformSite(CallInst* startCall, CallInst* endCall) { - GlobalVariable* metricVar = GetLHSGlobal(endCall); - // Insert placeholder code PlaceholderPair startPair, endPair; generatePlaceholder(startCall, startPair); @@ -350,8 +355,9 @@ // Create info about this site for later documentation - m_primInfos.push_back(PrimInfo(PrimInfo::REGION, startPair.first, endPair.first, - metricVar, m_module, + unsigned siteID = extractUnsignedValue(endCall, ENDCALL_ID_OPIDX); + m_primInfos.push_back(PrimInfo(PrimInfo::REGION, siteID, + startPair.first, endPair.first, m_module, startCall->getCalledFunction(), endCall->getCalledFunction())); @@ -379,8 +385,6 @@ void Phase1::transformSite(CallInst* pointCall) { - GlobalVariable* metricVar = GetLHSGlobal(pointCall); - // Insert placeholder code PlaceholderPair php; generatePlaceholder(pointCall, php); @@ -391,7 +395,8 @@ PrimInfo::PrimType type = pointCall->getCalledFunction() == m_counterPrimFunc ? PrimInfo::COUNTER : PrimInfo::POINT; - m_primInfos.push_back(PrimInfo(type, php.first, metricVar, m_module, + unsigned siteID = extractUnsignedValue(pointCall, POINTCALL_ID_OPIDX); + m_primInfos.push_back(PrimInfo(type, siteID, php.first, m_module, pointCall->getCalledFunction())); // Remove the call Index: llvm/lib/Reoptimizer/Inst/lib/Phase1/PrimInfo.cpp diff -u llvm/lib/Reoptimizer/Inst/lib/Phase1/PrimInfo.cpp:1.15 llvm/lib/Reoptimizer/Inst/lib/Phase1/PrimInfo.cpp:1.16 --- llvm/lib/Reoptimizer/Inst/lib/Phase1/PrimInfo.cpp:1.15 Tue May 13 14:43:03 2003 +++ llvm/lib/Reoptimizer/Inst/lib/Phase1/PrimInfo.cpp Tue Jun 24 10:39:53 2003 @@ -2,10 +2,8 @@ // programmer: Joel Stanley // date: Tue Jan 28 14:07:05 CST 2003 // fileid: PrimInfo.cpp -// purpose: Captures information about an instance of a performance primitive. The -// information is intended to be carried between phases by reconstructing PrimInfo -// contents that have been placed in global static data structures by Phase1's -// invocation of PrimInfo::Document. +// purpose: Captures information about an instance of a performance primitive "marker" +// in the code. #include "llvm/Module.h" #include "llvm/Type.h" @@ -15,7 +13,6 @@ #include "llvm/GlobalVariable.h" #include "llvm/Constant.h" #include "Support/VectorExtras.h" -#include "llvm/Target/TargetData.h" #include "PrimInfo.h" #include "Intraphase.h" @@ -31,16 +28,16 @@ StructType* PrimInfo::sm_structType = 0; PrimInfo::PrimInfo(PrimType type, + unsigned siteID, GlobalVariable* startGlob, GlobalVariable* endGlob, - GlobalVariable* metricVar, Module* module, Function* startFunc, Function* endFunc): m_type(type), + m_siteID(siteID), m_globVol(startGlob), m_globVolEnd(endGlob), - m_metricVar(metricVar), m_module(module), m_startFunc(startFunc), m_endFunc(endFunc) @@ -48,126 +45,75 @@ } PrimInfo::PrimInfo(PrimType type, + unsigned siteID, GlobalVariable* globVol, - GlobalVariable* metricVar, Module* module, Function* calledFunc): m_type(type), + m_siteID(siteID), m_globVol(globVol), - m_metricVar(metricVar), m_module(module), m_startFunc(calledFunc) { assert(type != POINT || calledFunc && "point type --> non-null called function"); } -void PrimInfo::buildStructType(Module* module) +void PrimInfo::buildStructTypes(Module* module) { - // The structure deposited into the LLVM bytecode essentially looks like: - // struct PrimInfo + static bool init = false; + + assert(!init && "Expect only one invocation of this function"); + init = true; + + // {{{ struct PrimInfo // { + // // Site ID for this site (one value identifies one entire interval as well) + // unsigned siteID; + // // // Type of GBT entry type (i.e., member of enum GBTEntryType) // unsigned gbtType; // // // Address of global variable corresponding to this primitive. // unsigned short* loadVar; // - // // Index in GBT of struct of corresponding GBT_INTERVAL_START entry - // // (NB: Only valid if gbtType == GBT_INTERVAL_END) - // unsigned gbtStartIdx; - // - // // Size, in bytes, of the parameter to the instrumentation function that must be - // // invoked at the instrumentation that corresponds to this structure instance. - // unsigned paramSize; - // - // // Pointer to memory for instFunc's return value - // // This is initalized to null for start-interval sites, and filled in at runtime - // // by a pointer to heap-allocated memory of the appropriate size. For all other - // // site types, this is initialized to the metric variable address. - // void* retVal; - // - // // Pointer to instrumentation function - // void* instFunc; - // - // Other stuff will need to go here...(TODO) // }; - - static bool init = false; - - assert(!init && "Expect only one invocation of this function"); - init = true; + // }}} PointerType* uspt = PointerType::get(Type::UShortTy); - PointerType* vpt = PointerType::get(Type::VoidTy); + sm_structType = StructType::get(make_vector( - Type::UIntTy, uspt, Type::UIntTy, Type::UIntTy, vpt, vpt, 0)); - module->addTypeName("PrimInfo", sm_structType); -} - + Type::UIntTy, Type::UIntTy, uspt, 0)); -// For start sites -static ConstantStruct* makeConstStruct(StructType* st, - unsigned gbtType, - GlobalVariable* loadVar, - unsigned paramSize, - Function* instFunc) -{ - std::vector init; - init.push_back(ConstantUInt::get(Type::UIntTy, gbtType)); - init.push_back(ConstantPointerRef::get(loadVar)); - init.push_back(ConstantUInt::get(Type::UIntTy, 0)); - init.push_back(ConstantUInt::get(Type::UIntTy, paramSize)); - init.push_back(Constant::getNullValue(PointerType::get(Type::VoidTy))); - init.push_back(ConstantExpr::getCast(ConstantPointerRef::get(instFunc), - PointerType::get(Type::VoidTy))); - return ConstantStruct::get(st, init); + module->addTypeName("PrimInfo", sm_structType); } -// For non-start sites static ConstantStruct* makeConstStruct(StructType* st, + unsigned siteID, unsigned gbtType, - GlobalVariable* loadVar, - unsigned startLinkIdx, - unsigned paramSize, - GlobalVariable* metricVar, - Function* instFunc) + GlobalVariable* loadVar) { std::vector init; - init.push_back(ConstantUInt::get(Type::UIntTy, gbtType)); - init.push_back(ConstantPointerRef::get(loadVar)); - init.push_back(ConstantUInt::get(Type::UIntTy, startLinkIdx)); - init.push_back(ConstantUInt::get(Type::UIntTy, paramSize)); - init.push_back(ConstantExpr::getCast(ConstantPointerRef::get(metricVar), - PointerType::get(Type::VoidTy))); - init.push_back(ConstantExpr::getCast(ConstantPointerRef::get(instFunc), - PointerType::get(Type::VoidTy))); + init.push_back(ConstantUInt::get(Type::UIntTy, siteID)); // siteID + init.push_back(ConstantUInt::get(Type::UIntTy, gbtType)); // gbtType + init.push_back(ConstantPointerRef::get(loadVar)); // loadVar return ConstantStruct::get(st, init); } -void PrimInfo::buildStructInstances(std::vector& gbtElems, - std::map& gbtIdxMap, - const TargetData* targetData) +void PrimInfo::buildStructInstances(std::vector& gbtElems) { StructType* st = getStructType(); switch(m_type) { case REGION: { - - std::map::iterator i = gbtIdxMap.find(this); - assert(i != gbtIdxMap.end() && "No entry in map for this PrimInfo instance"); - + // Create the struct for the start of the region - assert(m_startFunc->asize() == 1 && "Unexpected # args for start func"); - unsigned psize = targetData->getTypeSize(m_startFunc->afront().getType()); - gbtElems.push_back(makeConstStruct(st, GBT_INTERVAL_START, m_globVol, - psize, m_startFunc)); + assert(m_startFunc->asize() == 2 && "Unexpected # args for start func"); + gbtElems.push_back(makeConstStruct(st, m_siteID, GBT_INTERVAL_START, m_globVol)); // Create the struct for the end of the region assert(m_endFunc->asize() == 2 && "Unexpected # args for end func"); - psize = targetData->getTypeSize(m_endFunc->afront().getType()); - gbtElems.push_back(makeConstStruct(st, GBT_INTERVAL_END, m_globVolEnd, - i->second, psize, m_metricVar, m_endFunc)); + gbtElems.push_back(makeConstStruct(st, m_siteID, GBT_INTERVAL_END, m_globVolEnd)); break; } Index: llvm/lib/Reoptimizer/Inst/lib/Phase1/PrimInfo.h diff -u llvm/lib/Reoptimizer/Inst/lib/Phase1/PrimInfo.h:1.10 llvm/lib/Reoptimizer/Inst/lib/Phase1/PrimInfo.h:1.11 --- llvm/lib/Reoptimizer/Inst/lib/Phase1/PrimInfo.h:1.10 Mon May 12 21:00:24 2003 +++ llvm/lib/Reoptimizer/Inst/lib/Phase1/PrimInfo.h Tue Jun 24 10:39:54 2003 @@ -13,8 +13,6 @@ #include -class TargetData; - namespace pp { @@ -26,7 +24,6 @@ PrimInfo(Module* m): m_globVol(0), m_globVolEnd(0), - m_metricVar(0), m_module(m), m_startFunc(0), m_endFunc(0) @@ -35,16 +32,16 @@ // Phase 1 construction -- point/counter computation site PrimInfo(PrimType type, + unsigned siteID, GlobalVariable* globVol, - GlobalVariable* metricVar, Module* m, Function* calledFunc = 0); // Phase 1 construction -- region computation site PrimInfo(PrimType type, + unsigned siteID, GlobalVariable* startGlob, GlobalVariable* endGlob, - GlobalVariable* metricVar, Module* m, Function* startFunc, Function* endFunc); @@ -57,15 +54,11 @@ const Function* getStartFunc() const { return m_startFunc; } Function* getEndFunc() { return m_endFunc; } const Function* getEndFunc() const { return m_endFunc; } - GlobalVariable* getMetricVar() { return m_metricVar; } - const GlobalVariable* getMetricVar() const { return m_metricVar; } PrimType getType() const { return m_type; } - void buildStructInstances(std::vector& gbtElems, - std::map& gbtIdxMap, - const TargetData* targetData); + void buildStructInstances(std::vector& gbtElems); - static void buildStructType(Module* module); + static void buildStructTypes(Module* module); static StructType* getStructType() { return sm_structType; } private: @@ -74,9 +67,9 @@ // supplied configuration parameters. PrimType m_type; + unsigned m_siteID; GlobalVariable* m_globVol; GlobalVariable* m_globVolEnd; - GlobalVariable* m_metricVar; Module* m_module; Function* m_startFunc; Function* m_endFunc; From jstanley at cs.uiuc.edu Tue Jun 24 10:41:08 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Tue Jun 24 10:41:08 2003 Subject: [llvm-commits] CVS: llvm/lib/Reoptimizer/Inst/lib/PhaseInfo.h Phases.cpp SparcInstManip.cpp design.txt Message-ID: <200306241540.KAA01748@trinity.cs.uiuc.edu> Changes in directory llvm/lib/Reoptimizer/Inst/lib: PhaseInfo.h updated: 1.9 -> 1.10 Phases.cpp updated: 1.35 -> 1.36 SparcInstManip.cpp updated: 1.16 -> 1.17 design.txt updated: 1.15 -> 1.16 --- Log message: Merge from branch jrsdev. --- Diffs of the changes: Index: llvm/lib/Reoptimizer/Inst/lib/PhaseInfo.h diff -u llvm/lib/Reoptimizer/Inst/lib/PhaseInfo.h:1.9 llvm/lib/Reoptimizer/Inst/lib/PhaseInfo.h:1.10 --- llvm/lib/Reoptimizer/Inst/lib/PhaseInfo.h:1.9 Sun May 18 15:33:46 2003 +++ llvm/lib/Reoptimizer/Inst/lib/PhaseInfo.h Tue Jun 24 10:39:52 2003 @@ -27,12 +27,9 @@ typedef std::pair AddressRange; typedef struct GBTElem { - unsigned gbtType; - unsigned short* loadVar; - unsigned gbtStartIdx; - unsigned paramSize; - void* retVal; - void* instFunc; + unsigned siteID; + unsigned gbtType; + unsigned short* loadVar; }; class Phase3Info Index: llvm/lib/Reoptimizer/Inst/lib/Phases.cpp diff -u llvm/lib/Reoptimizer/Inst/lib/Phases.cpp:1.35 llvm/lib/Reoptimizer/Inst/lib/Phases.cpp:1.36 --- llvm/lib/Reoptimizer/Inst/lib/Phases.cpp:1.35 Thu May 22 22:26:12 2003 +++ llvm/lib/Reoptimizer/Inst/lib/Phases.cpp Tue Jun 24 10:39:52 2003 @@ -45,10 +45,13 @@ // // 2. Change the branch to the phase 4 slot to branch to a (new) phase 5 slot. See // appropriate InstManip instance for detailed information about phase 5 slot -// contents. +// contents. If there is no registered instrumentation for the phase 5 slot, leave a +// nop in place of the branch to reduce runtime overhead. // // 3. Deallocate the slot that originated this invocation of phase4(). // +// PHASE 5: Phase 5 isn't like the other phases; rather, it simply invokes all +// registered instrumentation functions for a particular site. #include #include @@ -56,6 +59,7 @@ #include #include #include +#include #include "llvm/Reoptimizer/Inst/ElfReader.h" #include "llvm/Reoptimizer/MemoryManager.h" @@ -146,11 +150,173 @@ uint64_t m_tag; // Entry to look for in the GBT }; +// InstFunctionInfo is the class used to represent information (e.g., address of return +// value, pointer-to-instrumentation function) about particular registered instrumentation +// functions. In the case of end-interval functions, the link 'm_pStart' is filled in to +// refer to the InstFunctionInfo instance that contains information about the +// corresponding start-interval function. + +class InstFunctionInfo +{ + public: + InstFunctionInfo(void* pRetVal, + void* pInstFunc, + InstFunctionInfo* pStart = 0): + m_pRetVal(pRetVal), + m_pInstFunc(pInstFunc), + m_pStart(pStart), + m_invoked(false) + { + } + + InstFunctionInfo(): + m_pRetVal(0), + m_pInstFunc(0), + m_pStart(0), + m_invoked(false) + { + } + + void invoke(); + + protected: + void* m_pRetVal; + void* m_pInstFunc; + InstFunctionInfo* m_pStart; // Info about start-interval function + bool m_invoked; // Has this function been invoked yet? +}; + +// InstSiteInfo instances contain information about the state of particular +// instrumentation sites. More specifically, it holds the instrumentation +// status (e.g. whether or not the site has been handled by phase 4 yet) of the +// sites as well as the list of (pointers to) the InstFunctionInfo instances +// registered with a particular site. + +class InstSiteInfo +{ + public: + InstSiteInfo(): + m_branchInstalled(false), + m_instrumented(false) + { + } + + // For start-interval sites only -- allocates memory for the return value of + // the instrumentation function (size of allocated memory is retValBytes). + // Returns a pointer to the InstFunctionInfo* that corresponds to the + // instrumentation function, or null if the function has already been + // registered. + + InstFunctionInfo* push_back(unsigned retValBytes, + void* func); + + // For end-interval sites (w/ optional link to corresponding start); other + // site types should use this routine as well. The provided retVal ptr is + // used as the return-value parameter of the instrumentation function. + + void push_back(void* retVal, + void* func, + InstFunctionInfo* startInfo = 0); + + void invokeFunctions(); + + protected: + bool m_branchInstalled; // Installed branch to slot yet? + bool m_instrumented; // Has phase 4 instrumented site? + uint64_t m_brInstallAddr; // Address to install branch inst + unsigned m_branchInst; // The branch inst to install + std::set m_registeredFuncs; // Set of func-ptrs registered here + vector m_instFuncInfos; // Info for all registered funcs + + friend void Phase4::transform(); + + void installBranch(); + + bool isRegistered(void* func) + { + return m_registeredFuncs.find(func) != m_registeredFuncs.end(); + } + + void setInstrumented() { m_instrumented = true; } + + void setBranchInst(uint64_t addr, unsigned branchInst) + { + m_brInstallAddr = addr; + m_branchInst = branchInst; + } +}; + +// InstInfo is the class that holds data about the instrumentation that gets +// bound to instrumentation sites and intervals at runtime. There should only +// be on instance of this class (i.e., it is a singleton class). The +// implementation hides an STL map that maps the unique identifier associated +// with an instrumentation interval/site to a pair of InstSiteInfo instances, +// which contains the information about the instrumentations registered for the +// given interval or point site. In the case of intervals, the first element of +// the pair is the InstSiteInfo instance that contains data about the start +// site, whereas the second element of the pair contains data about the end +// site. For point sites, only the first element of the pair contains valid +// data. + +class InstInfo +{ + public: + typedef std::pair SiteInfoPair; + + static InstInfo* instance() + { + if(!m_pInstance) + m_pInstance = new InstInfo; + return m_pInstance; + } + + static InstSiteInfo* findSiteInfo(unsigned siteID, unsigned gbtType) + { + SiteInfoPair* sip = instance()->findSiteInfo(siteID); + InstSiteInfo* siteInfo; + + switch(gbtType) { + case pp::GBT_INTERVAL_START: siteInfo = &sip->first; break; + case pp::GBT_INTERVAL_END: siteInfo = &sip->second; break; + default: assert(0 && "Unhandled gbtType encountered"); break; + } + + return siteInfo; + } + + SiteInfoPair* findSiteInfo(unsigned siteID) + { + SiteInfoMap::iterator i = m_siteInfoMap.find(siteID); + if(i == m_siteInfoMap.end()) + return &m_siteInfoMap[siteID]; + return &i->second; + } + + void setVM(VirtualMem* vm) { m_pVM = vm; } + VirtualMem* getVM() const { return m_pVM; } + + protected: + typedef std::map SiteInfoMap; + + InstInfo(): m_pVM(0) + { + } + + SiteInfoMap m_siteInfoMap; + VirtualMem* m_pVM; + + private: + static InstInfo* m_pInstance; +}; + +InstInfo* InstInfo::m_pInstance = 0; + //////////////// Phase 2 implementation //////////////// extern "C" void phase2() { TraceCache* pTC = new TraceCache(); + InstInfo::instance()->setVM(pTC->getVM()); Phase2 ph(pTC, new SparcInstManip(pTC)); ph.transform(); } @@ -192,7 +358,7 @@ if(m_excludeSet.find(i->first) == m_excludeSet.end()) { // Function is not in exclude set, so go ahead and transform it - DEBUG_MSG(1, "Transforming function " << i->first + DEBUG_MSG(4, "Transforming function " << i->first << "[" << HEX(i->second.first) << ", " << HEX(i->second.second) << "]...\n"); @@ -217,17 +383,30 @@ ::doFlush(slotBase, slotBase + im->getInstWidth() * snippet.size()); } +static uint64_t makeNewSlot(uint64_t srcAddr, + unsigned slotSize, + unsigned& branchInst, + TraceCache* tc, + InstManip* im) +{ + // Return a branch instruction to the new slot via branchInst. + uint64_t slotBase = tc->getMemMgr()->getMemory(slotSize); + assert(slotBase && "Unable to obtain memory from MemoryManager instance"); + + branchInst = im->getBranchAlways(slotBase, srcAddr); + return slotBase; +} + static uint64_t replaceInstWithBrToSlot(uint64_t srcAddr, unsigned slotSize, TraceCache* tc, InstManip* im) { - // Obtain a new slot of the given size - uint64_t slotBase = tc->getMemMgr()->getMemory(slotSize); - assert(slotBase && "Unable to obtain memory from MemoryManager instance"); + unsigned branchInst; + uint64_t slotBase = makeNewSlot(srcAddr, slotSize, branchInst, tc, im); // Replace instruction at srcAddr with branch to start of new slot - tc->getVM()->writeInstToVM(srcAddr, im->getBranchAlways(slotBase, srcAddr)); + tc->getVM()->writeInstToVM(srcAddr, branchInst); ::doFlush(srcAddr, srcAddr + im->getInstWidth()); return slotBase; @@ -363,8 +542,8 @@ vector snippet; m_pIM->buildSlot(p4info, snippet); - DEBUG_MSG(3, "phase4 slot instructions:\n"); -#if VERBOSE > 2 + DEBUG_MSG(4, "phase4 slot instructions:\n"); +#if VERBOSE > 3 dumpSnippet(snippet, m_pIM); #endif @@ -430,7 +609,7 @@ for(unsigned i = 0; i < ppGBTSize; ++i) { ostr << "[pp] ppGBT[" << i << "]: " << ppGBT[i].gbtType << ", " - << ppGBT[i].loadVar << ", " << ppGBT[i].gbtStartIdx << endl; + << ppGBT[i].loadVar << endl; } } @@ -460,29 +639,44 @@ && "Unexpected number of instructions in candidate"); // Write NOPs over the original instructions that were associated with the elected - // candidate. No need to no-op over the candidate load instruction itself since - // we're about to write over it with a branch to the phase 5 slot. + // candidate. VirtualMem* vm = m_pTC->getVM(); - for(vector >::const_iterator i = cand.getInsts().begin() + 1, + for(vector >::const_iterator i = cand.getInsts().begin(), e = cand.getInsts().end(); i != e; ++i) vm->writeInstToVM(i->first, m_pIM->getNOP()); - // Obtain memory (& rewrite branch) to the phase 5 jump slot. + // Obtain new slot, the phase 5 jump slot. unsigned slotSize = m_pIM->getSlotSize(this); uint64_t repAddr = cand.front().first; - uint64_t slotBase = replaceInstWithBrToSlot(repAddr, slotSize, m_pTC, m_pIM); + unsigned branchInst; + uint64_t slotBase = makeNewSlot(repAddr, slotSize, branchInst, m_pTC, m_pIM); vector snippet; m_pIM->buildSlot(gbte, slotBase, repAddr, m_pPhase4Info->getRange(), snippet); - DEBUG_MSG(3, "phase 5 slot contents:\n"); -#if VERBOSE > 2 + DEBUG_MSG(4, "phase 5 slot contents:\n"); +#if VERBOSE > 3 dumpSnippet(snippet, m_pIM); #endif copySnippetToSlot(snippet, slotBase, m_pTC->getVM(), m_pIM); + + // Grab the information about this particular site. + + assert(gbte->gbtType == pp::GBT_INTERVAL_START || + gbte->gbtType == pp::GBT_INTERVAL_END && + "Unhandled gbtType encountered (must implement)"); + + InstSiteInfo* siteInfo = InstInfo::findSiteInfo(gbte->siteID, gbte->gbtType); + + // Take steps to install the branch; note that the InstSiteInfo instance + // knows whether or not to actually write the branch instruction, etc. + + siteInfo->setInstrumented(); + siteInfo->setBranchInst(repAddr, branchInst); + siteInfo->installBranch(); } else { DEBUG_MSG(1, "does not match\n"); @@ -495,14 +689,6 @@ m_pPhase4Info->getCandidate().front().second); } -#if 0 - // (TEMP) For now, restore the candidate load to its original position for debugging - // purposes. - - m_pPhase4Info->getTraceCache()->getVM()->writeInstToVM(m_pPhase4Info->getCandidate().front().first, - m_pPhase4Info->getCandidate().front().second); -#endif - DEBUG_MSG(1, "================ End Phase 4 ================\n"); } @@ -510,27 +696,131 @@ void phase5(GBTElem* gbte) { - switch(gbte->gbtType){ - case pp::GBT_INTERVAL_START: { - DEBUG_MSG(1, "--- phase 5 start site invocation ---\n"); - DEBUG_MSG(2, "retVal address is " << HEX(gbte->retVal) << endl); - - void (*instFunc)(void*) = (void (*)(void*)) gbte->instFunc; - instFunc(gbte->retVal); - break; - } - case pp::GBT_INTERVAL_END: { - DEBUG_MSG(1, "--- phase 5 end site invocation ---\n"); - DEBUG_MSG(2, "start parameter is at gbt index " << gbte->gbtStartIdx << endl); - DEBUG_MSG(2, "start parameter addr is " - << HEX(ppGBT[gbte->gbtStartIdx].retVal) << endl); + DEBUG_MSG(1, "================ Begin Phase 5 ================\n"); + InstSiteInfo* siteInfo = InstInfo::findSiteInfo(gbte->siteID, gbte->gbtType); + siteInfo->invokeFunctions(); + DEBUG_MSG(1, "================ End Phase 5 ================\n"); +} + +//////////////// InstSiteInfo implementation //////////////// + +InstFunctionInfo* InstSiteInfo::push_back(unsigned retValBytes, + void* func) +{ + DEBUG_MSG(3, "Inside InstSiteInfo::push_back, registering func w/ address " + << HEX(func) << ", new retVal of size " << retValBytes << endl); + + InstFunctionInfo* fi = 0; + + if(!isRegistered(func)) { + DEBUG_MSG(3, "not yet registered, registering...\n"); + + void* retVal = static_cast(new char[retValBytes]); + m_registeredFuncs.insert(func); + m_instFuncInfos.push_back(fi = new InstFunctionInfo(retVal, func)); + installBranch(); + } + else + DEBUG_MSG(3, "WARNING: Attempt to register instrumentation at site that was already instrumented\n"); + + return fi; +} - void (*instFunc)(void*, void*) = (void (*)(void*, void*)) gbte->instFunc; - instFunc(gbte->retVal, ppGBT[gbte->gbtStartIdx].retVal); +void InstSiteInfo::push_back(void* retVal, + void* func, + InstFunctionInfo* startInfo) +{ + DEBUG_MSG(3, "Inside InstSiteInfo::push_back, registering func w/ address " + << HEX(func) << ", retVal addr " << HEX(retVal) << endl); + + if(!isRegistered(func)) { + DEBUG_MSG(3, "not yet registered, registering...\n"); + + m_registeredFuncs.insert(func); + m_instFuncInfos.push_back(new InstFunctionInfo(retVal, func, startInfo)); + installBranch(); + } + else + DEBUG_MSG(3, "WARNING: Attempt to register instrumentation at site that was already instrumented\n"); +} + +void InstSiteInfo::invokeFunctions() +{ + assert(m_branchInstalled && m_instrumented && "Invoking functions not permitted"); + + for(int i = 0, e = m_instFuncInfos.size(); i < e; ++i) { + DEBUG_MSG(3, "Invoking function " << i << endl); + m_instFuncInfos[i]->invoke(); + } +} + +void InstSiteInfo::installBranch() +{ + if(!m_branchInstalled && m_instrumented && m_instFuncInfos.size() > 0) { + DEBUG_MSG(3, "(InstSiteInfo::installBranch) Installing branch...\n"); + VirtualMem* vm = InstInfo::instance()->getVM(); + vm->writeInstToVM(m_brInstallAddr, m_branchInst); + m_branchInstalled = true; + } + else + DEBUG_MSG(3, "(InstSiteInfo::installBranch) Not installing branch, it's not needed\n"); +} + +//////////////// InstFunctionInfo implementation //////////////// - break; +void InstFunctionInfo::invoke() +{ + // In the case of start-interval functions, the boolean m_invoked is set to true upon + // completion of the invocation. This same boolean (i.e, the one associated with the + // start-interval InstFunctionInfo instance) is cleared by the corresponding + // end-interval function invocation. This is to ensure that no end-interval + // instrumentation function is ever invoked unless its corresponding start-interval + // instrumentation function has been invoked (which implies that the start-interval + // site has been handled properly and all of the registration mechanisms). + + DEBUG_MSG(3, "(InstFunctionInfo::invoke) retVal address is: " << HEX(m_pRetVal) << endl); + if(m_pStart) { + DEBUG_MSG(3, "End-interval inst func detected\n"); + void (*instFunc)(void*, void*) = (void (*)(void*, void*)) m_pInstFunc; + + if(m_pStart->m_invoked) { + DEBUG_MSG(4, "Corresponding start function has been invoked, so invoking this inst func\n"); + instFunc(m_pRetVal, m_pStart->m_pRetVal); + m_pStart->m_invoked = false; } + else + DEBUG_MSG(4, "Corresponding start func has not been invoked, so not invoking\n"); + } + else { + DEBUG_MSG(3, "Start-interval or non-end inst func detected\n"); + void (*instFunc)(void*) = (void (*)(void*)) m_pInstFunc; + instFunc(m_pRetVal); + m_invoked = true; } + + DEBUG_MSG(3, "(InstFunctionInfo::invoke) instrumentation function returned\n"); +} + +//////////////// register{Interval,Point}Inst implementation //////////////// - DEBUG_MSG(1, "--- phase 5 invocation completed ---\n" << std::flush); +extern "C" void registerIntervalInst(unsigned siteID, + void* startFunc, + void* endFunc, + unsigned paramSize, + void* retVal) +{ + InstInfo::SiteInfoPair* sip = InstInfo::instance()->findSiteInfo(siteID); + assert(sip && "Unable to obtain SiteInfoPair"); + + // Handle start function + DEBUG_MSG(3, "registerIntervalInst: Registering start function...\n"); + InstFunctionInfo* fi = sip->first.push_back(paramSize, startFunc); + + if(fi) { + // Handle end function + DEBUG_MSG(3, "registerIntervalInst: Registering end function...\n"); + sip->second.push_back(retVal, endFunc, fi); + } + else + DEBUG_MSG(3, "WARNING: Register-start-function returned 0, which implies redundant registration"); } Index: llvm/lib/Reoptimizer/Inst/lib/SparcInstManip.cpp diff -u llvm/lib/Reoptimizer/Inst/lib/SparcInstManip.cpp:1.16 llvm/lib/Reoptimizer/Inst/lib/SparcInstManip.cpp:1.17 --- llvm/lib/Reoptimizer/Inst/lib/SparcInstManip.cpp:1.16 Wed May 28 08:52:41 2003 +++ llvm/lib/Reoptimizer/Inst/lib/SparcInstManip.cpp Tue Jun 24 10:39:53 2003 @@ -242,14 +242,6 @@ DEBUG_MSG(2, "buildPhase5HeapSlot completed\n"); - // If we're dealing with a start-interval instrumentation function, heap-allocate - // its parameter memory - - if(gbte->gbtType == pp::GBT_INTERVAL_START) { - assert(!gbte->retVal && "Expected null retVal value"); - gbte->retVal = static_cast(new char[gbte->paramSize]); - } - //////////////// // Construct the phase 5 jump slot @@ -363,7 +355,7 @@ unsigned sizeBytes, int protBits) { - DEBUG_MSG(3, "Setting access bits on heap slot page(s)" << endl); + DEBUG_MSG(4, "Setting access bits on heap slot page(s)" << endl); int rc = mprotect(pageBase, sizeBytes, protBits); if(rc < 0) { @@ -416,10 +408,10 @@ setPageBits(heapSlot, numHeapBytes, PROT_READ | PROT_WRITE | PROT_EXEC); -#if VERBOSE > 2 - DEBUG_MSG(3, "Dumping contents of heap-slot memory...\n"); +#if VERBOSE > 3 + DEBUG_MSG(4, "Dumping contents of heap-slot memory...\n"); dumpHeapSlot(heapSlot, getPhase5HeapSize(), this); - DEBUG_MSG(3, "Done with heap region construction, moving on to jump slot\n"); + DEBUG_MSG(4, "Done with heap region construction, moving on to jump slot\n"); #endif return heapSlot; @@ -462,7 +454,7 @@ return addr + getInstWidth(); } else { - DEBUG_MSG(2, "WARNING: Non-save instruction at function entry\n"); + DEBUG_MSG(4, "WARNING: Non-save instruction at function entry\n"); return addr; } @@ -569,7 +561,7 @@ m_logicalToActualReg[useForIndirect], offset)); - DEBUG_MSG(3, "JMPL instruction word is " << HEX(m_pCurrSnippet->back()) << endl); + DEBUG_MSG(4, "JMPL instruction word is " << HEX(m_pCurrSnippet->back()) << endl); m_pCurrSnippet->push_back(getNOP()); assert(m_pCurrSnippet->size() - initSize == GEN_JMPL_SIZE && Index: llvm/lib/Reoptimizer/Inst/lib/design.txt diff -u llvm/lib/Reoptimizer/Inst/lib/design.txt:1.15 llvm/lib/Reoptimizer/Inst/lib/design.txt:1.16 --- llvm/lib/Reoptimizer/Inst/lib/design.txt:1.15 Sun May 18 12:45:26 2003 +++ llvm/lib/Reoptimizer/Inst/lib/design.txt Tue Jun 24 10:39:53 2003 @@ -880,91 +880,70 @@ {{{ MILESTONES + - Experiments + - The Paper + - The Thesis }}} {{{ TODO - - Move statically-sized spill regions so that they are internal to SparcInstManip. - (do not need variable-sized spill region except for phase5 invocations) + In priority order: - - Start table-of-stacks implementation for phase4 authorship of phase 5 slots. - - Placed on hold temporary because of "alloca-finding" approach. However, see the - following e-mail for the current state of things: - - {{{ E-mail regarding alloca-finding and table-of-stacks approach -Okay, this is starting to seem intractable. I have another problem that -I don't think can be resolved without resorting to a custom-stack -mechanism that will incur prohibitive overhead. - -Everything is working for start-region instrumentation sites. For -end-region instrumentation sites, however, there's a problem. In order -to write the slot for end sites, I have to know (or know how to compute) -the address of the return value of the corresponding start site. I had -originally thought that I would just store this in the GBT, or -"something", but I clearly didn't think through the problem well enough. - -There are only two ways I can think of that this can occur: - -(a) Write the effective address of the return value of the start inst -func, so that it gets passed to the end inst func. - -or - -(b) Somehow encode the stack offset to the return value from the start -inst, where the offset is from the %sp *at the end-region site* - -Both of these have problems. - -First, I don't think (b) can work at all, given that there may be -alloca's present in the original application that would change the %sp, -and thus the offset value that we'd need, and we can't determine the -exact allocas that are executed statically. - -For (a), the effective address isn't known until runtime. We can store -this address in some global table where the phase 4 invocation for the -end site can find it, but it is not sufficient to have a single scalar -address here -- we must have a stack, due to potential recursive -invocations. I think that this is clear, please let me know if I'm not -making sense. :) - -Hence, we'd need to maintain a stack of effective addresses, which was -pushed during the execution of phase 5 for the start site, and then read -and popped during the execution of phase 5 for the end site. We're -already really bloated with how many instructions we've got going on for -all of the spills, etc, and I'm concerned about the effect that this -stack manipulation will have on our overhead, as we talked about before. - -The way I see it, we only have two options if we're to make forward -progress and not obliterate our chances of having lower overhead -numbers. Hopefully we have some better choices. In the interests of -short-term forward progress, I'm going to go with #1 for now. - -#1 - Make another common-case assumption that there will be no allocas -between start and end sites, on *any* control path. If this is the case, -then we know that the stack pointer will not have been manipulated (I -think) between the start and end sites, and so the %sp offsets to the -requisite data will be unchanged since when the phase 5 step occurred -for the start site. - -#2 - Just implement our fall-back solution that everything seems to be -pointing to. I'm not sure exactly what other logistic nightmares might -be entailed in this, though, because I've only a sketch of the idea. - -I wanted to point out, also, that the so-called "fall back" approach we -discussed previous also involves manipulation of a stack at runtime -(push/pop actions still have to occur at runtime), so perhaps the stack -of effective addresses is less prohibitive than I thought, if only in -the sense that we cannot avoid it. :( - }}} - - - Write phase 5 stuff for end-region sites -- will assume that not allocas lie between - the start and end sites, which is not particularly a fair assumption. - - - Optimizations: - - No need to save registers (other than those clobbered) in phase 3 slot, since phase 3 - is invoked at the start of the function. Must still spill/restore shared, though. - - No need to save registers (other than those clobbered) in general. + 1) New implementation for instrumenting at function-level granularity + 2) Apache through LLVM, experiments + 3) Writing, writing, writing: ICS version 2 paper, do + a) outline + b) intro + c) language section + d) compiler section + + The three top-level items above are more-or-less interchangable. However, the + experiments will not be able to be completed unless the "instrumentation @ + function-level granularity" implementation is done, and there should be an emphasis on + getting Apache through LLVM in the short-term because Chris is leaving for Norway in + early July. + + However, *all* of the writing (including experimentation sections) for ICS v2 must be + done by the end of June, so that Adve can approve it, make the desired corrections, + etc., so that I can get started on thesis authorship and submission. Realistically, + the timeframe should look something like this: + + Week of 6/10 (5 days): Implementation, Apache w/ bug reports + Week of 6/16 (6 days): Implementation, Small example, continue Apache & do tests + + -- At this point, all experiments should be more-or-less completed -- + + Week of 6/23 (6 days): Write, write, write. 3 days nonstop for content, 3 + days of Adve making corrections, etc. + + Monday, 6/30 is D-Day... + + Schedule revision 13 Jun 2003: Apache is in stasis waiting to hear back from + Chris. Some effort might be expended to see if any more work can be done on compiling + Apache even though the build process currently fails altogether. Implementation for + instrumentation at function-level granularity is in stasis until I hear back from + Vikram. This leaves three immediate options open until either of the two are + resolved, in which case forward progress on either the implementation or Apache should + be made. + + Option 1) POV-Ray through LLVM. + Option 2) Writing + Option 3) "Small example" + + Option 3 really shouldn't be undertaken until we know if obtaining things like I/O + elapsed time (via function-level) is possible, or until I can talk with Vikram in our + next meeting about what the heck this nebulous example should look like...this leaves + only options 1 and 2 above as viable. + + POV-Ray should be an easy thing to start, and would be good both as a fall-back if + Apache isn't possible as well as a useful additional example if the latter is + possible. This would also give V & C some time to respond to the pending queries. + + - Optimizations: - No need to save registers (other than those clobbered) in + phase 3 slot, since phase 3 is invoked at the start of the function. Must + still spill/restore shared, though. - No need to save registers (other than + those clobbered) in general. }}} @@ -1460,5 +1439,226 @@ Also, Chris remarked that any novel page-management mechanisms, etc., (for the code that is jumped to in newly-allocated pages) that I devise should perhaps be integrated into the LLVM JIT if they are suitable. + +}}} + +{{{ Experiments + +We must devise experiments that demonstrate the novel aspects of the work. We +are currently planning on using Apache and/or POV-Ray, and demonstrating how a +"deep" performance analysis can be encoded using performance primitives. A +"deep" performance analysis is one which essentially (using Hollingsworth's +terminology from his PhD thesis) gets at the "what, where, and when" aspects of +performance bottlenecks. However, instead of doing this at the "arbitrary +program during execution" level, as the W^3 search model does, we will encode +these performance aspects at the application level itself. + +Here's what Vikram suggested for a good start: + + I just thought that the examples of performance issues he explores in his + automatic search would give you (a) some insights into what performance issues + make sense to consider, and (b) some ideas about how to do a systematic + diagnosis, albeit at the application level. + + But isn't detecting the "what, why, and when" of performance bottlenecks + pretty closely related to the goal of performance diagnosis? We'd be looking + for bottlenecks too, except that we can use application domain information, we + can look for bottlenecks at the algorithmic level instead of the general + system level, and we can record it permanently in the program as a first class + feature of the program. + + Anyway, about your second question: here's a way to do what I suggesting: + + -- think about 2-3 key performance issues with Apache (or POV-Ray) that you'd + want to diagnose e.g., cache misses, TLB misses, thread overhead (estimating + that could be interesting), I/O delays + + -- if those issues make sense with a small sort example, try to diagnose those + issues in the small example first. e.g., I think cache misses, TLB misses, + and I/O delays would all be issues if you were sorting a huge file of some + kind. + + This is purely to give you a small, well-understood code to try out before + going to the big ones where it may be difficult to know, when one diagnosis + attempt fails, whether it failed because you misunderstood the performance + issues or because the guess was wrong or both. + +TLB misses aren't an option, because we cannot get at them with PAPI. Cache +misses are available, so that'd certainly be a good place to start. As for I/O +delays, I have no idea how we'd measure this, either. The following is the +comprehensive list of the low-level metrics that are exposed to us via PAPI. On +our own, we can support simple things like elapsed time, load average, etc. I'm +not altogether clear how we'd determine how much time (for a particular region) +was spent doing I/O-bound activities... + +Number of hardware counters: 2 +Name: PAPI_L1_ICM Description: Level 1 instruction cache misses +Name: PAPI_L2_TCM Description: Level 2 cache misses +Name: PAPI_CA_SNP Description: Requests for a snoop +Name: PAPI_CA_INV Description: Requests for cache line invalidation +Name: PAPI_L1_LDM Description: Level 1 load misses +Name: PAPI_L1_STM Description: Level 1 store misses +Name: PAPI_BR_MSP Description: Conditional branch instructions mispredicted +Name: PAPI_TOT_IIS Description: Instructions issued +Name: PAPI_TOT_INS Description: Instructions completed +Name: PAPI_LD_INS Description: Load instructions +Name: PAPI_SR_INS Description: Store instructions +Name: PAPI_TOT_CYC Description: Total cycles +Name: PAPI_IPS Description: Instructions per second +Name: PAPI_L1_DCR Description: Level 1 data cache reads +Name: PAPI_L1_DCW Description: Level 1 data cache writes +Name: PAPI_L1_ICH Description: Level 1 instruction cache hits +Name: PAPI_L2_ICH Description: Level 2 instruction cache hits +Name: PAPI_L1_ICA Description: Level 1 instruction cache accesses +Name: PAPI_L2_TCH Description: Level 2 total cache hits +Name: PAPI_L2_TCA Description: Level 2 total cache accesses + +So, in the short-term, we have two outstanding problems. First, what kinds of +metric would we want to apply to Apache/POV-Ray/Simple example? Second, of those +metrics, which can we actually realize with the current system? Third, we should +create the simple program (such as sorting large amounts of data from a file, +etc.) so that it can use these metrics in such a way that "models" or +"anticipates" the way they will be used in the bigger applications. + +This is an outstanding issue, and I don't really know where to go with it yet. + +More notes about this as of 4 Jun 2003: + +One way to obtain metric values that are based on the elapsed times of +particular functions is to somehow register instrumentation for those particular +functions, and for a particular region -- Vikram argues that we have the ability +to do this dynamically and we don't need any markers or phase-1 actions because +we're operating at function-level granularity. + +Here is a sample scenario: We have defined an interval I over some scoped region +of code. During phase 1 and phase 2, no instrumentation is registered for this +interval. Later on, we construct a metric that is qualified by a list of +functions that (for example) are to have their runtimes measured and added to +some running total. Let's call this the "measure_functions_start" and +"measure_functions_end" metric, and have it yield a value of type double which +is the aggregate runtime of the list of functions when they get executed within +interval I. The metric registration function will have to have some way +(varargs?) of denoting what the functions are: perhaps it can simply pass in an +array of function names together with a size. + +Example: + +pp_registerIntervalInst(intervalID, measure_functions_start, + measure_functions_end, &retVal, sizeof(double), + func1, func2, func3, ...); + +However, what do "measure_functions_start" have to do with anything? More than +likely, what we need to do is specify a particular metric to apply to a +paritcular function, such that the value will be sampled each time that function +gets executed. Then, since there can be multiple invocations (and hence, +multiple samples) for this selected function within I, we will have to have some +default or user-specified way of aggregating the data :(. This is gross. In +other words, we should probably simplify the above to something like: + +pp_registerIntervalInst(intervalID, some_metric_start, some_metric_end, + &retVal, sizeof(double), HOW_TO_AGGREGATE, func1); + +Where func1 is the function to be instrumented and HOW_TO_AGGREGATE is some +value that specifies one from a couple of ways of combining the data. For now, +HOW_TO_AGGREGATE will not exist and will implicitly sum all return +values...hence, if the some_metric_{start,end} function ptrs above were to +elapsed time, at the end of the interval I with interval id intervalID, retVal +would contain the combined elapsed time of all time spent in function func1. + +Enabling this measurement at the start of the interval, disabling at the end of +the interval; clearly, the start-instrumentation site will need to transform +func1 (to compute the metric value) when crossed, and the end-insturmentation +site must remove such instrumentation when crossed. This doesn't follow the +normal model of what occurs at the instrumentation sites, in terms of just +ripping down a list of functions...or does it? Perhaps one of the functions in +the list is just this function that does the transformation on the target +function...in this case, the process would look something like: + +1. Register the transformation function (for the start point) -- call this +xform_start -- as a regular instrumentation function. The runtime call to do +the registration will build the appropriate data structures which will encode +what metric to associated with the target function, aggregation method, return +value, etc. + +2. Register the transformation function (for the end point) -- call this +xform_end -- as a regular instrumentation function. + +3. When xform_start is invoked as a regular instrumentation function, it will +instrument the target function with the selected instrumentation. + +This is the hardest step to conceptualize and realize. The problem is that, +without any placeholders from phase 1, it's not clear that we can instrument the +target function easily. Clearly, our instrumentation points are at the start +and end points of the function (entry and exit). But this is not really true. +Our instrumentation points are really at the entry and *all* function exits. + +The important question is, what if we have all of the exit points at our +disposal? Would that change anything? + +It would. The entry point together with all exit points would form a set of +instrumentation points. For each of these instrumentation points, we could +over-write a branch to a new slot that would call the desired instrumentation +function, restore the replaced instruction, and return to the instrumentation +point to continue execution. This would potentially work. One major problem +that comes to mind is that for system calls (such as read()), the body of the +function is highly likely to be out of short-jmp range to the +tracecache-allocated slot. The only way around this would be to create a heap +region and copy the target function into it, etc. We don't have any code to do +this yet, so again there is no code reuse or (much) leveraging of existing +functionality. Additionally, work will have to be done to make the data +structure that maps the address of a function to its extents (which come from +the ELf information). + +-- + +The other alternative is to make sure a "wrapper" function (i.e., for the +function read()): + +int read_wrapper(args for read) { + start_inst(); + int rc = read(args for read); + end_inst(); + return rc; +} + +But this isn't an option because we cannot locate the calls to read() to replace +them with the wrapper. We could do the following: + +3a. Copy the entire target function to a heap region, and instrument it to our +heart's content. However, finding exit points may not be easy without a CFG, +etc. + +3b. Replace the body of the real target function with a call to the modified +duplicate of the target function, returning whatever the modified duplicate +returns. + +This works, I think, but is incredibly cumbersome and, contrary to what was +previously discussed, we do *not* possess all of the mechanisms. + +-- + +Notes on POV-Ray experiment 23 Jun 2003 + +We propose using a user-defined metric, flops/display pixel to compute the +computational cost per pixel. + +1. Compute flops/dpixel and report using pp mechanisms. + 1a. flops can be obtained via PAPI, IIRC. + +2. Create a moving average of flops/dpixel. + +3. When the flops/dpixel exceeds mavg flops/dpixel by some multiplicative +threshold (e.g.), a performance assertion is violated. When the PA is violated, +we report other metrics (perhaps ranked in some manner) that had been being +recorded but not reported. Initial suggestions for the other metrics to measure +_over the same region_ (say, the main routine for a single ray-trace) are: + + 1) MAverage L1 icache misses vs. this-ray L1 icache misses + 2) MAverage L2 cache misses vs. this-ray L2 cache misses + 3) MAverage load count vs. this-ray load count + 4) MAverage store count vs. this-ray store count + +Immediate problem: I don't think we can monitor more than 2 of these values +concurrently due to hardware limitations on the SPARC... }}} From criswell at choi.cs.uiuc.edu Tue Jun 24 11:01:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jun 24 11:01:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200306241600.h5OG0C011480@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.88.2.1 -> 1.88.2.2 --- Log message: Added some code from the GNU Make manual that prevents dependencies from being generated if the user is attempting to do a make clean. --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.88.2.1 llvm/Makefile.common:1.88.2.2 --- llvm/Makefile.common:1.88.2.1 Mon Jun 23 14:11:41 2003 +++ llvm/Makefile.common Tue Jun 24 11:00:01 2003 @@ -708,6 +708,12 @@ $(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc $(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT) +########################################################################### +# C/C++ Dependencies +# Define variables and rules that generate header file dependencies +# from C/C++ source files. +########################################################################### + # If dependencies were generated for the file that included this file, # include the dependancies now... # @@ -724,6 +730,12 @@ $(BUILD_OBJ_DIR)/Depend/%.d: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Depend/.dir $(VERB) $(DependC) $< | $(SED) 's|$*\.o *|Release/& Profile/& Debug/& Depend/$(@F)|g' > $@ +# +# Include dependencies generated from C/C++ source files, but not if we +# are cleaning (this example taken from the GNU Make Manual). +# +ifneq ($(MAKECMDGOALS),clean) ifneq ($(SourceDepend),) -include $(SourceDepend) +endif endif From lattner at cs.uiuc.edu Tue Jun 24 12:32:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 12:32:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.nightly.Makefile Message-ID: <200306241731.MAA09127@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.nightly.Makefile updated: 1.16 -> 1.17 --- Log message: Really fix crafty in nightly tester --- Diffs of the changes: Index: llvm/test/Programs/TEST.nightly.Makefile diff -u llvm/test/Programs/TEST.nightly.Makefile:1.16 llvm/test/Programs/TEST.nightly.Makefile:1.17 --- llvm/test/Programs/TEST.nightly.Makefile:1.16 Mon Jun 23 17:36:09 2003 +++ llvm/test/Programs/TEST.nightly.Makefile Tue Jun 24 12:31:24 2003 @@ -104,7 +104,7 @@ # Overall tests: just run subordinate tests $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \ Output/%.$(TEST).report.txt: $(addprefix Output/%.nightly., $(REPORTS_SUFFIX)) - cat $(addprefix Output/$*.nightly., $(REPORTS_SUFFIX)) > $@ + -cat $(addprefix Output/$*.nightly., $(REPORTS_SUFFIX)) > $@ From criswell at choi.cs.uiuc.edu Tue Jun 24 13:27:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jun 24 13:27:01 2003 Subject: [llvm-commits] CVS: llvm/utils/TableGen/Makefile Message-ID: <200306241826.h5OIQW206583@choi.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: Makefile updated: 1.4 -> 1.4.2.1 --- Log message: Added a dependency that forces make to generate the parser header file before generating header files dependencies. --- Diffs of the changes: Index: llvm/utils/TableGen/Makefile diff -u llvm/utils/TableGen/Makefile:1.4 llvm/utils/TableGen/Makefile:1.4.2.1 --- llvm/utils/TableGen/Makefile:1.4 Tue Dec 3 00:00:11 2002 +++ llvm/utils/TableGen/Makefile Tue Jun 24 13:26:22 2003 @@ -6,6 +6,13 @@ include $(LEVEL)/Makefile.common +# +# Make the source file depend on the header file. In this way, dependencies +# (which depend on the source file) won't get generated until bison is done +# generating the C source and header files for the parser. +# +FileLexer.cpp: FileParser.h + clean:: -rm -f FileParser.cpp FileParser.h FileLexer.cpp CommandLine.cpp -rm -f FileParser.output From criswell at choi.cs.uiuc.edu Tue Jun 24 13:28:03 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jun 24 13:28:03 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200306241827.h5OIREK06604@choi.cs.uiuc.edu> Changes in directory llvm: configure added (r1.1.2.1) --- Log message: Initial checkin of autoconf. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Tue Jun 24 13:48:02 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jun 24 13:48:02 2003 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Makefile Message-ID: <200306241847.h5OIlOB23481@choi.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Makefile updated: 1.2 -> 1.2.2.1 --- Log message: Added a rule that prevents make from generating header file dependencies until after the parser file (*.y) is processed by bison. --- Diffs of the changes: Index: llvm/lib/AsmParser/Makefile diff -u llvm/lib/AsmParser/Makefile:1.2 llvm/lib/AsmParser/Makefile:1.2.2.1 --- llvm/lib/AsmParser/Makefile:1.2 Mon Apr 8 15:17:06 2002 +++ llvm/lib/AsmParser/Makefile Tue Jun 24 13:47:14 2003 @@ -5,3 +5,9 @@ include $(LEVEL)/Makefile.common +# +# Make the source code file for the lexer depend upon the header file generated +# by the Bison parser. This prevents the generation of dependencies from +# being performed until after the header file has been created. +# +Lexer.cpp: llvmAsmParser.h From lattner at cs.uiuc.edu Tue Jun 24 13:50:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 13:50:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/Sandbox.sh Message-ID: <200306241849.NAA10723@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC: Sandbox.sh updated: 1.7 -> 1.8 --- Log message: Silence a silly warning --- Diffs of the changes: Index: llvm/test/Programs/External/SPEC/Sandbox.sh diff -u llvm/test/Programs/External/SPEC/Sandbox.sh:1.7 llvm/test/Programs/External/SPEC/Sandbox.sh:1.8 --- llvm/test/Programs/External/SPEC/Sandbox.sh:1.7 Fri Jun 20 15:42:46 2003 +++ llvm/test/Programs/External/SPEC/Sandbox.sh Tue Jun 24 13:49:38 2003 @@ -22,7 +22,7 @@ cp -r $INPUT_DIR/* . # If there is an "all" input directory, take it as well... -cp -r $INPUT_DIR/../../all/input/* . 2>&1 > /dev/null +cp -r $INPUT_DIR/../../all/input/* . > /dev/null 2>&1 # Run the program now... echo Running: $* From lattner at cs.uiuc.edu Tue Jun 24 13:51:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 13:51:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Makefile Message-ID: <200306241850.NAA10737@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms: Makefile updated: 1.23 -> 1.24 --- Log message: Run the tail dup tests --- Diffs of the changes: Index: llvm/test/Regression/Transforms/Makefile diff -u llvm/test/Regression/Transforms/Makefile:1.23 llvm/test/Regression/Transforms/Makefile:1.24 --- llvm/test/Regression/Transforms/Makefile:1.23 Tue May 27 11:10:03 2003 +++ llvm/test/Regression/Transforms/Makefile Tue Jun 24 13:49:51 2003 @@ -23,6 +23,7 @@ Reassociate \ SCCP \ ScalarRepl \ - SimplifyCFG + SimplifyCFG \ + TailDup include $(LEVEL)/Makefile.common From lattner at cs.uiuc.edu Tue Jun 24 14:18:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 14:18:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/TailDup/2003-06-24-Simpleloop.ll Message-ID: <200306241917.OAA11383@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/TailDup: 2003-06-24-Simpleloop.ll added (r1.1) --- Log message: Testcase reduced by bugpoint --- Diffs of the changes: Index: llvm/test/Regression/Transforms/TailDup/2003-06-24-Simpleloop.ll diff -c /dev/null llvm/test/Regression/Transforms/TailDup/2003-06-24-Simpleloop.ll:1.1 *** /dev/null Tue Jun 24 14:17:47 2003 --- llvm/test/Regression/Transforms/TailDup/2003-06-24-Simpleloop.ll Tue Jun 24 14:17:37 2003 *************** *** 0 **** --- 1,18 ---- + ; RUN: as < %s | opt -tailduplicate -disable-output + + void %motion_result7() { + entry: + br label %endif + + endif: + %i.1 = phi int [ %inc, %no_exit ], [ 0, %entry ] + %inc = add int %i.1, 1 + br bool false, label %no_exit, label %UnifiedExitNode + + no_exit: + br bool false, label %UnifiedExitNode, label %endif + + UnifiedExitNode: + ret void + } + From jstanley at cs.uiuc.edu Tue Jun 24 14:48:03 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Tue Jun 24 14:48:03 2003 Subject: [llvm-commits] CVS: llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp Message-ID: <200306241947.OAA17591@trinity.cs.uiuc.edu> Changes in directory llvm/lib/Reoptimizer/BinInterface: sparcbin.cpp updated: 1.7 -> 1.8 --- Log message: Fix to remove warning. --- Diffs of the changes: Index: llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp diff -u llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp:1.7 llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp:1.8 --- llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp:1.7 Wed Jun 4 04:40:54 2003 +++ llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp Tue Jun 24 14:47:23 2003 @@ -274,7 +274,7 @@ if (instr->flags & IF_BRINTERNAL) printf("{dest:s%02d} ", instr->ibranch.dest); else - printf("{dest:0x%x} ", (intptr_t)instr->ebranch.dest); + printf("{dest:0x%lx} ", (intptr_t)instr->ebranch.dest); sparc_print_pseudo(instr->instr, instr->alu.genrs1, From jstanley at cs.uiuc.edu Tue Jun 24 14:49:01 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Tue Jun 24 14:49:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h Message-ID: <200306241948.OAA17815@trinity.cs.uiuc.edu> Changes in directory llvm/include/llvm/Reoptimizer/BinInterface: bitmath.h updated: 1.10 -> 1.11 --- Log message: Fix to remove warning. --- Diffs of the changes: Index: llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h diff -u llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h:1.10 llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h:1.11 --- llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h:1.10 Mon Jun 23 18:31:47 2003 +++ llvm/include/llvm/Reoptimizer/BinInterface/bitmath.h Tue Jun 24 14:48:43 2003 @@ -33,7 +33,7 @@ #define FLD_LOWER(FLD_DEF) (0 ? FLD_DEF) #define MASKBELOW(V) ((((uint64_t) 1) << V) - 1) // 64-bit '1' constant here to avoid overflow warnings #define MASKEQBELOW(V) ((1 << V) | MASKBELOW(V)) //masks off everything ABOVE -#define RD_FLD(x, FLD) ((x & MASKEQBELOW(FLD_UPPER(FLD))) >> FLD_LOWER(FLD)) +#define RD_FLD(x, FLD) (unsigned)(((x & MASKEQBELOW(FLD_UPPER(FLD))) >> FLD_LOWER(FLD))) #define MK_FLD(FLD, val) ((val << FLD_LOWER(FLD)) & MASKEQBELOW(FLD_UPPER(FLD))) #define MASK_FLD(FLD) (MASKEQBELOW(FLD_UPPER(FLD)) & ~MASKBELOW(FLD_LOWER(FLD))) #define RM_FLD(FLD, val) (val & ~(MASK_FLD(FLD))) From lattner at cs.uiuc.edu Tue Jun 24 14:49:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 14:49:04 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/TailDuplication.cpp Message-ID: <200306241948.OAA17231@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: TailDuplication.cpp updated: 1.3 -> 1.4 --- Log message: Fix bug: TailDup/2003-06-24-Simpleloop.ll --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/TailDuplication.cpp diff -u llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.3 llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.4 --- llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.3 Sun Jun 22 15:46:00 2003 +++ llvm/lib/Transforms/Scalar/TailDuplication.cpp Tue Jun 24 14:48:06 2003 @@ -203,7 +203,8 @@ for (Value::use_iterator I = OrigInst->use_begin(), E = OrigInst->use_end(); I != E; ++I) { Instruction *In = cast(*I); - if (In->getParent() != OrigBlock) // Don't modify uses in the orig block! + if (In->getParent() != OrigBlock || // Don't modify uses in the orig block! + isa(In)) Users.push_back(In); } From lattner at cs.uiuc.edu Tue Jun 24 15:30:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 15:30:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll Message-ID: <200306242029.PAA17770@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/SCCP: 2003-06-24-OverdefinedPHIValue.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll diff -c /dev/null llvm/test/Regression/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll:1.1 *** /dev/null Tue Jun 24 15:29:46 2003 --- llvm/test/Regression/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll Tue Jun 24 15:29:36 2003 *************** *** 0 **** --- 1,36 ---- + ; RUN: if as < %s | opt -sccp -simplifycfg | dis | grep then: + ; RUN: then exit 1 + ; RUN: else exit 0 + ; RUN: fi + + void %cprop_test11(int* %data.1) { + entry: ; No predecessors! + %tmp.1 = load int* %data.1 ; [#uses=3] + %tmp.41 = setgt int %tmp.1, 1 ; [#uses=1] + br bool %tmp.41, label %no_exit, label %loopexit + + no_exit: ; preds = %entry, %then, %endif + %j.0 = phi int [ %j.0, %endif ], [ %i.0, %then ], [ 1, %entry ] ; [#uses=3] + %i.0 = phi int [ %inc, %endif ], [ %inc1, %then ], [ 1, %entry ] ; [#uses=4] + %tmp.8.not = cast int %j.0 to bool ; [#uses=1] + br bool %tmp.8.not, label %endif, label %then + + then: ; preds = %no_exit + %inc1 = add int %i.0, 1 ; [#uses=3] + %tmp.42 = setlt int %inc1, %tmp.1 ; [#uses=1] + br bool %tmp.42, label %no_exit, label %loopexit + + endif: ; preds = %no_exit + %inc = add int %i.0, 1 ; [#uses=3] + %tmp.4 = setlt int %inc, %tmp.1 ; [#uses=1] + br bool %tmp.4, label %no_exit, label %loopexit + + loopexit: ; preds = %entry, %endif, %then + %j.1 = phi int [ 1, %entry ], [ %j.0, %endif ], [ %i.0, %then ] ; [#uses=1] + %i.1 = phi int [ 1, %entry ], [ %inc, %endif ], [ %inc1, %then ] ; [#uses=1] + %tmp.17 = getelementptr int* %data.1, long 1 ; [#uses=1] + store int %j.1, int* %tmp.17 + %tmp.23 = getelementptr int* %data.1, long 2 ; [#uses=1] + store int %i.1, int* %tmp.23 + ret void + } From lattner at cs.uiuc.edu Tue Jun 24 15:31:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 15:31:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/SCCP.cpp Message-ID: <200306242030.PAA17784@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: SCCP.cpp updated: 1.69 -> 1.70 --- Log message: Fix bug: SCCP/2003-06-24-OverdefinedPHIValue.ll --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/SCCP.cpp diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.69 llvm/lib/Transforms/Scalar/SCCP.cpp:1.70 --- llvm/lib/Transforms/Scalar/SCCP.cpp:1.69 Tue May 20 16:01:16 2003 +++ llvm/lib/Transforms/Scalar/SCCP.cpp Tue Jun 24 15:29:52 2003 @@ -420,12 +420,13 @@ for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { InstVal &IV = getValueState(PN.getIncomingValue(i)); if (IV.isUndefined()) continue; // Doesn't influence PHI node. - if (IV.isOverdefined()) { // PHI node becomes overdefined! - markOverdefined(&PN); - return; - } if (isEdgeFeasible(PN.getIncomingBlock(i), PN.getParent())) { + if (IV.isOverdefined()) { // PHI node becomes overdefined! + markOverdefined(&PN); + return; + } + if (OperandVal == 0) { // Grab the first value... OperandVal = IV.getConstant(); } else { // Another value is being merged in! From criswell at choi.cs.uiuc.edu Tue Jun 24 15:37:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jun 24 15:37:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200306242036.h5OKaFt05770@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.88.2.2 -> 1.88.2.3 --- Log message: Added comments about the new environment variables (LLVM_SRC_DIR and friends). Removed the use of Makefile.Linux and Makefile.SunOS. Fixed the errors regarding invalid options to libtool for building static libraries. --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.88.2.2 llvm/Makefile.common:1.88.2.3 --- llvm/Makefile.common:1.88.2.2 Tue Jun 24 11:00:01 2003 +++ llvm/Makefile.common Tue Jun 24 15:36:04 2003 @@ -30,15 +30,24 @@ # are in, if they are not in the current directory. This should include a # trailing / character. # -# 6. PROJ_COMPILE - If set to 1, then this makefile can also be used to -# compile other projects using llvm. Note if this option is set then the -# following *must* hold -# PROJLEVEL should be set to the top of the source directory for the -# project files -# LEVEL should be set to the top of LLVM source tree -# LLVM_LIB_DIR should be set to the top of the LLVM build tree +# 6. LLVM_SRC_ROOT - If specified, points to the top of the LLVM source tree. # -# +# 7. LLVM_OBJ_ROOT - If specified, points to the top directory where LLVM +# object files are placed. +# +# 8. BUILD_SRC_DIR - The directory which contains the current set of Makefiles +# and usually the source code too (unless SourceDir is set). +# +# 9. BUILD_SRC_ROOT - The root directory of the source code being compiled. +# +# 10. BUILD_OBJ_DIR - The directory where object code should be placed. +# +# 11. BUILD_OBJ_ROOT - The root directory for where object code should be +# placed. +# +# For building, +# LLVM, LLVM_SRC_ROOT = BUILD_SRC_ROOT, and +# LLVM_OBJ_ROOT = BUILD_OBJ_ROOT. #===-----------------------------------------------------------------------==== # Configuration file to set paths specific to local installation of LLVM @@ -113,12 +122,6 @@ LLVM_OBJ_ROOT = $(BUILD_OBJ_ROOT) endif -# Figure out how to do platform specific stuff on this platform. This is really -# gross and should be autoconfiscated (automake actually), but should hopefully -# work on Linux and solaris (SunOS). -# -include $(LLVM_SRC_ROOT)/Makefile.$(OS) - ########################################################################### # Default Targets: # The following targets are the standard top level targets for @@ -345,7 +348,7 @@ # # Configure where the item being compiled should go. # -ifdef LIBRARYNAME +ifdef SHARED_LIBRARY Link := $(Link) -rpath $(DESTLIBCURRENT) endif @@ -484,17 +487,17 @@ $(LIBNAME_AO): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir @echo ======= Linking $(LIBRARYNAME) release library ======= @$(RM) -f $@ - $(VERB) $(LinkO) -o $@ $(LObjectsO) $(LibSubDirs) -static + $(VERB) $(Link) -03 -o $@ $(LObjectsO) $(LibSubDirs) -static $(LIBNAME_AP): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir @echo ======= Linking $(LIBRARYNAME) profile library ======= @$(RM) -f $@ - $(VERB) $(LinkP) -o $@ $(LObjectsP) $(LibSubDirs) -static + $(VERB) $(Link) -03 $(PROFILE) -o $@ $(LObjectsP) $(LibSubDirs) -static $(LIBNAME_AG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir @echo ======= Linking $(LIBRARYNAME) debug library ======= @$(RM) -f $@ - $(VERB) $(LinkG) -o $@ $(LObjectsG) $(LibSubDirs) -static + $(VERB) $(Link) -g $(STRIP) -o $@ $(LObjectsG) $(LibSubDirs) -static # # Rules for building .o libraries. @@ -708,6 +711,12 @@ $(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc $(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT) +distclean:: clean + $(VERB) $(RM) -rf $(LEVEL)/Makefile.config \ + $(LEVEL)/include/Config/config.h \ + $(LEVEL)/autom4te.cache \ + $(LEVEL)/config.log + ########################################################################### # C/C++ Dependencies # Define variables and rules that generate header file dependencies @@ -719,6 +728,13 @@ # SourceBaseNames := $(basename $(notdir $(filter-out Debug/%, $(Source)))) SourceDepend := $(SourceBaseNames:%=$(BUILD_OBJ_DIR)/Depend/%.d) + +# +# Depend target: +# This allows a user to manually ask for an update in the dependencies +# +depend: $(SourceDepend) + # Create dependencies for the *.cpp files... #$(SourceDepend): \x From criswell at choi.cs.uiuc.edu Tue Jun 24 16:20:03 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jun 24 16:20:03 2003 Subject: [llvm-commits] CVS: llvm/Makefile.Linux Makefile.SunOS Makefile.config.in configure configure.ac Message-ID: <200306242119.h5OLJPS12224@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.Linux updated: 1.10 -> 1.10.2.1 Makefile.SunOS updated: 1.9 -> 1.9.2.1 Makefile.config.in updated: 1.1.2.1 -> 1.1.2.2 configure updated: 1.1.2.1 -> 1.1.2.2 configure.ac updated: 1.1.2.1 -> 1.1.2.2 --- Log message: Moved functionality from Makefile. to the autoconf scripts. --- Diffs of the changes: Index: llvm/Makefile.Linux diff -u llvm/Makefile.Linux:1.10 llvm/Makefile.Linux:1.10.2.1 --- llvm/Makefile.Linux:1.10 Sun May 25 11:52:41 2003 +++ llvm/Makefile.Linux Tue Jun 24 16:19:14 2003 @@ -8,16 +8,6 @@ # Set the architecture so that x86 platform dependant code is compmiled ARCH := x86 -# MakeSharedObjectOption - This option is passed to the linker by -# Makefile.common when compiling a shared object. -# -MakeSharedObjectOption := -shared - -# PLATFORMLINKOPTS - On Linux, we must specify this linker option so that all -# symbols are exported by tools for runtime use by dlsym. -# -PLATFORMLINKOPTS := -Wl,--export-dynamic - # PLATFORMSTRIPOPTS - Command to pass to the link phase to cause symbols to be # stripped from the resultant binary. PLATFORMSTRIPOPTS := -Wl,-x Index: llvm/Makefile.SunOS diff -u llvm/Makefile.SunOS:1.9 llvm/Makefile.SunOS:1.9.2.1 --- llvm/Makefile.SunOS:1.9 Sun May 25 11:52:41 2003 +++ llvm/Makefile.SunOS Tue Jun 24 16:19:14 2003 @@ -8,15 +8,6 @@ # Set the architecture so that Sparc platform dependant code is compmiled ARCH := Sparc -# MakeSharedObjectOption - This option is passed to the linker by -# Makefile.common when compiling a shared object. -# -MakeSharedObjectOption := -G - -# PLATFORMLINKOPTS - On sun we need to link to libmalloc.so to get a definition -# of mallinfo. -PLATFORMLINKOPTS := -lmalloc - # PLATFORMSTRIPOPTS - Command to pass to the link phase to cause symbols to be # stripped from the resultant binary. # Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.1.2.1 llvm/Makefile.config.in:1.1.2.2 --- llvm/Makefile.config.in:1.1.2.1 Mon Jun 23 13:59:24 2003 +++ llvm/Makefile.config.in Tue Jun 24 16:19:14 2003 @@ -63,7 +63,7 @@ # # Determine the target for which LLVM should generate code. # -#LLVMGCCARCH := @target@/3.4-llvm +LLVMGCCARCH := @target@/3.4-llvm # Path to directory where object files should be stored during a build. # Set OBJ_ROOT to "." if you do not want to use a separate place for @@ -75,7 +75,7 @@ # Path to location for LLVM front-end this should only be specified here if you # want to override the value set in Makefile.$(uname) # -#LLVMGCCDIR := @LLVMGCCDIR@ +LLVMGCCDIR := @LLVMGCCDIR@ # When this setting is set to true, programs in the llvm/test/Programs hierarchy # are not recompiled from source code. Instead, the bytecode for the file is @@ -146,4 +146,14 @@ # #ENABLE_PURIFY = 1 @ENABLE_PURIFY@ + +# +# Enable JIT for this platform +# + at JIT@ + +# +# Disable LLC diffs for testing. +# + at DISABLE_LLC_DIFFS@ Index: llvm/configure diff -u llvm/configure:1.1.2.1 llvm/configure:1.1.2.2 --- llvm/configure:1.1.2.1 Tue Jun 24 13:27:03 2003 +++ llvm/configure Tue Jun 24 16:19:14 2003 @@ -1009,13 +1009,19 @@ --enable-spec Compile SPEC benchmarks (default is NO) --enable-precompiled_bytecode Use pre-compiled bytecode (default is NO) + --enable-jit Enable Just In Time Compiling (default is NO) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld default=no --with-pic try to use only PIC/non-PIC objects default=use both - + --with-spec Location of SPEC benchmarks + --with-llvmgccdir Location of LLVM GCC front-end + --with-bcrepos Location of Bytecode Repository + --with-papi Location of PAPI + --with-objroot Location where object files should be placed + (default is .) Some influential environment variables: CXX C++ compiler command @@ -1578,14 +1584,30 @@ NONENONEs,x,x, && program_prefix=${target_alias}- -echo $build case $build in *i*86*) OS=Linux + DISABLE_LLC_DIFFS=DISABLE_LLC_DIFFS:=1 + + LLVMGCCDIR=/home/vadve/lattner/local/x86/llvm-gcc/ + ;; + *sparc*) OS=SunOS + LLVMGCCDIR=/home/vadve/lattner/local/sparc/llvm-gcc/ + ;; + + *) OS=Unknown + + ;; +esac + +case $target in + *sparc*solaris*) target=sparcv9-sun-solaris2.8 + + ;; esac @@ -4274,7 +4296,7 @@ case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4277 "configure"' > conftest.$ac_ext + echo '#line 4299 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4824,7 +4846,7 @@ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6655,7 +6677,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 +echo $ECHO_N "checking for mprotect... $ECHO_C" >&6 +if test "${ac_cv_func_mprotect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char mprotect (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char mprotect (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_mprotect) || defined (__stub___mprotect) +choke me +#else +f = mprotect; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_mprotect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_mprotect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mprotect" >&5 +echo "${ECHO_T}$ac_cv_func_mprotect" >&6 +if test $ac_cv_func_mprotect = yes; then + : +else + { { echo "$as_me:$LINENO: error: Function mprotect() required but not found" >&5 +echo "$as_me: error: Function mprotect() required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + # Check whether --enable-purify or --disable-purify was given. if test "${enable_purify+set}" = set; then @@ -11398,6 +11492,20 @@ UPB= fi; +case $build in + *i*86*) # Check whether --enable-jit or --disable-jit was given. +if test "${enable_jit+set}" = set; then + enableval="$enable_jit" + JIT=TARGET_HAS_JIT=1 + +else + JIT= + +fi; + ;; + *) + ;; +esac # Check whether --with-spec or --without-spec was given. @@ -12018,6 +12126,8 @@ s, at target_vendor@,$target_vendor,;t t s, at target_os@,$target_os,;t t s, at OS@,$OS,;t t +s, at DISABLE_LLC_DIFFS@,$DISABLE_LLC_DIFFS,;t t +s, at LLVMGCCDIR@,$LLVMGCCDIR,;t t s, at CXX@,$CXX,;t t s, at CXXFLAGS@,$CXXFLAGS,;t t s, at LDFLAGS@,$LDFLAGS,;t t @@ -12059,8 +12169,8 @@ s, at ENABLE_OPTIMIZED@,$ENABLE_OPTIMIZED,;t t s, at USE_SPEC@,$USE_SPEC,;t t s, at UPB@,$UPB,;t t +s, at JIT@,$JIT,;t t s, at SPEC_ROOT@,$SPEC_ROOT,;t t -s, at LLVMGCCDIR@,$LLVMGCCDIR,;t t s, at BCR@,$BCR,;t t s, at PAPIDIR@,$PAPIDIR,;t t s, at OBJROOT@,$OBJROOT,;t t Index: llvm/configure.ac diff -u llvm/configure.ac:1.1.2.1 llvm/configure.ac:1.1.2.2 --- llvm/configure.ac:1.1.2.1 Mon Jun 23 13:54:23 2003 +++ llvm/configure.ac Tue Jun 24 16:19:14 2003 @@ -33,17 +33,32 @@ dnl dnl Now, for some of our own magic: -dnl We will use the build machine information to determine which master -dnl Makefile dnl to load. It will either be Linux or SparcV9 +dnl We will use the build machine information to set some variables. dnl -echo $build case $build in *i*86*) AC_SUBST(OS,[Linux]) + AC_SUBST(DISABLE_LLC_DIFFS,[[DISABLE_LLC_DIFFS:=1]]) + AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/x86/llvm-gcc/]) ;; + *sparc*) AC_SUBST(OS,[SunOS]) + AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/sparc/llvm-gcc/]) + ;; + + *) AC_SUBST(OS,[Unknown]) ;; esac +dnl +dnl If we are on a Solaris machine, pretend that it is V9, since that is all +dnl that we support at the moment, and autoconf will only tell us we're a +dnl sparc. +dnl +case $target in + *sparc*solaris*) AC_SUBST(target,[[sparcv9-sun-solaris2.8]]) + ;; +esac + dnl ************************************************************************** dnl * Check for programs. dnl ************************************************************************** @@ -190,6 +205,7 @@ dnl As the code is made more portable (i.e. less reliant on these functions, dnl these checks should go away. AC_CHECK_FUNC(mmap,,AC_MSG_ERROR([Function mmap() required but not found])) +AC_CHECK_FUNC(mprotect,,AC_MSG_ERROR([Function mprotect() required but not found])) dnl ************************************************************************** dnl * Enable various compile-time options @@ -200,14 +216,20 @@ AC_ARG_ENABLE(optimized,AC_HELP_STRING([--enable-optimized],[Compile with optimizations enabled (default is NO)]), AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]]), AC_SUBST(ENABLE_OPTIMIZED,[[]])) AC_ARG_ENABLE(spec,AC_HELP_STRING([--enable-spec],[Compile SPEC benchmarks (default is NO)]), AC_SUBST(USE_SPEC,[[USE_SPEC=1]]), AC_SUBST(USE_SPEC,[[]])) AC_ARG_ENABLE(precompiled_bytecode,AC_HELP_STRING([--enable-precompiled_bytecode],[Use pre-compiled bytecode (default is NO)]), AC_SUBST(UPB,[[USE_PRECOMPILED_BYTECODE=1]]), AC_SUBST(UPB,[[]])) +case $build in + *i*86*) AC_ARG_ENABLE(jit,AC_HELP_STRING([--enable-jit],[Enable Just In Time Compiling (default is NO)]), AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]), AC_SUBST(JIT,[[]])) + ;; + *) + ;; +esac dnl ************************************************************************** dnl * Set the location of various third-party software packages dnl ************************************************************************** -AC_ARG_WITH(spec,,AC_SUBST(SPEC_ROOT,[$withval]),AC_SUBST(SPEC_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec])) -AC_ARG_WITH(llvmgccdir,,AC_SUBST(LLVMGCCDIR,[$withval])) -AC_ARG_WITH(bcrepos,,AC_SUBST(BCR,[$withval]),AC_SUBST(BCR,[/home/vadve/lattner/LLVMPrograms])) -AC_ARG_WITH(papi,,AC_SUBST(PAPIDIR,[$withval]),AC_SUBST(PAPIDIR,[/home/vadve/shared/papi-2.3.4.1])) -AC_ARG_WITH(objroot,,AC_SUBST(OBJROOT,[$withval]),AC_SUBST(OBJROOT,[.])) +AC_ARG_WITH(spec,AC_HELP_STRING([--with-spec],[Location of SPEC benchmarks]),AC_SUBST(SPEC_ROOT,[$withval]),AC_SUBST(SPEC_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec])) +AC_ARG_WITH(llvmgccdir,AC_HELP_STRING([--with-llvmgccdir],[Location of LLVM GCC front-end]),AC_SUBST(LLVMGCCDIR,[$withval])) +AC_ARG_WITH(bcrepos,AC_HELP_STRING([--with-bcrepos],[Location of Bytecode Repository]),AC_SUBST(BCR,[$withval]),AC_SUBST(BCR,[/home/vadve/lattner/LLVMPrograms])) +AC_ARG_WITH(papi,AC_HELP_STRING([--with-papi],[Location of PAPI]),AC_SUBST(PAPIDIR,[$withval]),AC_SUBST(PAPIDIR,[/home/vadve/shared/papi-2.3.4.1])) +AC_ARG_WITH(objroot,AC_HELP_STRING([--with-objroot],[Location where object files should be placed (default is .)]),AC_SUBST(OBJROOT,[$withval]),AC_SUBST(OBJROOT,[.])) AC_OUTPUT(Makefile.config) From lattner at cs.uiuc.edu Tue Jun 24 16:22:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 16:22:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/basictest1.ll basictest2.ll Message-ID: <200306242121.QAA19269@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: basictest1.ll updated: 1.2 -> 1.3 basictest2.ll updated: 1.2 -> 1.3 --- Log message: Modernize testcases --- Diffs of the changes: Index: llvm/test/Regression/Transforms/ADCE/basictest1.ll diff -u llvm/test/Regression/Transforms/ADCE/basictest1.ll:1.2 llvm/test/Regression/Transforms/ADCE/basictest1.ll:1.3 --- llvm/test/Regression/Transforms/ADCE/basictest1.ll:1.2 Thu Aug 22 11:39:04 2002 +++ llvm/test/Regression/Transforms/ADCE/basictest1.ll Tue Jun 24 16:21:31 2003 @@ -31,7 +31,7 @@ br bool %cond266, label %bb3, label %bb2 bb2: ;[#uses=1] - %cast273 = getelementptr [17 x sbyte]* %.LC12, uint 0, uint 0 ; [#uses=0] + %cast273 = getelementptr [17 x sbyte]* %.LC12, long 0, long 0 ; [#uses=0] br label %bb3 bb3: ;[#uses=2] @@ -39,19 +39,19 @@ br bool %cond267, label %bb5, label %bb4 bb4: ;[#uses=2] - %reg111 = getelementptr [20 x %FILE]* %__iob, uint 0, uint 1, ubyte 3 ; [#uses=1] - %cast274 = getelementptr [34 x sbyte]* %.LC9, uint 0, uint 0 ; [#uses=0] + %reg111 = getelementptr [20 x %FILE]* %__iob, long 0, long 1, ubyte 3 ; [#uses=1] + %cast274 = getelementptr [34 x sbyte]* %.LC9, long 0, long 0 ; [#uses=0] %cast282 = cast ubyte* %reg111 to %FILE* ; <%FILE*> [#uses=0] call void %exit( int 1 ) br label %UnifiedExitNode bb5: ;[#uses=1] - %reg107-idxcast1 = cast int %fd to uint ; [#uses=2] - %reg107-idxcast2 = cast int %fd to uint ; [#uses=1] - %reg1311 = getelementptr [3 x %spec_fd_t]* %spec_fd, uint 0, uint %reg107-idxcast2 ; <%spec_fd_t*> [#uses=1] - %idx1 = getelementptr [3 x %spec_fd_t]* %spec_fd, uint 0, uint %reg107-idxcast1, ubyte 2 ; [#uses=3] + %reg107-idxcast1 = cast int %fd to long ; [#uses=2] + %reg107-idxcast2 = cast int %fd to long ; [#uses=1] + %reg1311 = getelementptr [3 x %spec_fd_t]* %spec_fd, long 0, long %reg107-idxcast2 ; <%spec_fd_t*> [#uses=1] + %idx1 = getelementptr [3 x %spec_fd_t]* %spec_fd, long 0, long %reg107-idxcast1, ubyte 2 ; [#uses=3] %reg1321 = load int* %idx1 - %idx2 = getelementptr %spec_fd_t* %reg1311, uint 0, ubyte 1 ; [#uses=1] + %idx2 = getelementptr %spec_fd_t* %reg1311, long 0, ubyte 1 ; [#uses=1] %reg1331 = load int* %idx2 %cond270 = setlt int %reg1321, %reg1331 ; [#uses=1] br bool %cond270, label %bb9, label %bb6 @@ -62,29 +62,29 @@ br bool %cond271, label %bb8, label %bb7 bb7: ;[#uses=1] - %cast277 = getelementptr [4 x sbyte]* %.LC10, uint 0, uint 0 ; [#uses=0] + %cast277 = getelementptr [4 x sbyte]* %.LC10, long 0, long 0 ; [#uses=0] br label %bb8 bb8: ;[#uses=3] br label %UnifiedExitNode bb9: ;[#uses=1] - %reg107-idxcast3 = cast int %fd to uint ; [#uses=1] - %idx3 = getelementptr [3 x %spec_fd_t]* %spec_fd, uint 0, uint %reg107-idxcast3, ubyte 3 ; [#uses=1] + %reg107-idxcast3 = cast int %fd to long ; [#uses=1] + %idx3 = getelementptr [3 x %spec_fd_t]* %spec_fd, long 0, long %reg107-idxcast3, ubyte 3 ; [#uses=1] %reg1601 = load ubyte** %idx3 - %reg132-idxcast1 = cast int %reg1321 to uint ; [#uses=1] - %idx4 = getelementptr ubyte* %reg1601, uint %reg132-idxcast1 ; [#uses=2] + %reg132-idxcast1 = cast int %reg1321 to long ; [#uses=1] + %idx4 = getelementptr ubyte* %reg1601, long %reg132-idxcast1 ; [#uses=2] %reg1621 = load ubyte* %idx4 - %cast108 = cast ubyte %reg1621 to uint ; [#uses=0] + %cast108 = cast ubyte %reg1621 to long ; [#uses=0] %reg157 = add int %reg1321, 1 ; [#uses=1] - %idx5 = getelementptr [3 x %spec_fd_t]* %spec_fd, uint 0, uint %reg107-idxcast1, ubyte 2 + %idx5 = getelementptr [3 x %spec_fd_t]* %spec_fd, long 0, long %reg107-idxcast1, ubyte 2 store int %reg157, int* %idx5 %reg163 = load int* %dbglvl ; [#uses=1] %cond272 = setle int %reg163, 4 ; [#uses=1] br bool %cond272, label %bb11, label %bb10 bb10: ;[#uses=1] - %cast279 = getelementptr [4 x sbyte]* %.LC11, uint 0, uint 0 ; [#uses=0] + %cast279 = getelementptr [4 x sbyte]* %.LC11, long 0, long 0 ; [#uses=0] br label %bb11 bb11: ;[#uses=3] Index: llvm/test/Regression/Transforms/ADCE/basictest2.ll diff -u llvm/test/Regression/Transforms/ADCE/basictest2.ll:1.2 llvm/test/Regression/Transforms/ADCE/basictest2.ll:1.3 --- llvm/test/Regression/Transforms/ADCE/basictest2.ll:1.2 Thu Aug 22 11:39:04 2002 +++ llvm/test/Regression/Transforms/ADCE/basictest2.ll Tue Jun 24 16:21:31 2003 @@ -31,7 +31,7 @@ br bool %cond266, label %bb3, label %bb2 bb2: ;[#uses=1] - %cast273 = getelementptr [17 x sbyte]* %.LC12, uint 0, uint 0 ; [#uses=0] + %cast273 = getelementptr [17 x sbyte]* %.LC12, long 0, long 0 ; [#uses=0] br label %bb3 bb3: ;[#uses=2] @@ -40,19 +40,19 @@ br label %bb5 bb4: ;[#uses=2] - %reg111 = getelementptr [20 x %FILE]* %__iob, uint 0, uint 1, ubyte 3 ; [#uses=1] - %cast274 = getelementptr [34 x sbyte]* %.LC9, uint 0, uint 0 ; [#uses=0] + %reg111 = getelementptr [20 x %FILE]* %__iob, long 0, long 1, ubyte 3 ; [#uses=1] + %cast274 = getelementptr [34 x sbyte]* %.LC9, long 0, long 0 ; [#uses=0] %cast282 = cast ubyte* %reg111 to %FILE* ; <%FILE*> [#uses=0] call void %exit( int 1 ) br label %UnifiedExitNode bb5: ;[#uses=1] - %reg107-idxcast1 = cast int %fd to uint ; [#uses=2] - %reg107-idxcast2 = cast int %fd to uint ; [#uses=1] - %reg1311 = getelementptr [3 x %spec_fd_t]* %spec_fd, uint 0, uint %reg107-idxcast2 ; <%spec_fd_t*> [#uses=1] - %idx1 = getelementptr [3 x %spec_fd_t]* %spec_fd, uint 0, uint %reg107-idxcast1, ubyte 2 ; [#uses=3] + %reg107-idxcast1 = cast int %fd to long ; [#uses=2] + %reg107-idxcast2 = cast int %fd to long ; [#uses=1] + %reg1311 = getelementptr [3 x %spec_fd_t]* %spec_fd, long 0, long %reg107-idxcast2 ; <%spec_fd_t*> [#uses=1] + %idx1 = getelementptr [3 x %spec_fd_t]* %spec_fd, long 0, long %reg107-idxcast1, ubyte 2 ; [#uses=3] %reg1321 = load int* %idx1 - %idx2 = getelementptr %spec_fd_t* %reg1311, uint 0, ubyte 1 ; [#uses=1] + %idx2 = getelementptr %spec_fd_t* %reg1311, long 0, ubyte 1 ; [#uses=1] %reg1331 = load int* %idx2 %cond270 = setlt int %reg1321, %reg1331 ; [#uses=1] br bool %cond270, label %bb9, label %bb6 @@ -63,29 +63,29 @@ br bool %cond271, label %bb8, label %bb7 bb7: ;[#uses=1] - %cast277 = getelementptr [4 x sbyte]* %.LC10, uint 0, uint 0 ; [#uses=0] + %cast277 = getelementptr [4 x sbyte]* %.LC10, long 0, long 0 ; [#uses=0] br label %bb8 bb8: ;[#uses=3] br label %UnifiedExitNode bb9: ;[#uses=1] - %reg107-idxcast3 = cast int %fd to uint ; [#uses=1] - %idx3 = getelementptr [3 x %spec_fd_t]* %spec_fd, uint 0, uint %reg107-idxcast3, ubyte 3 ; [#uses=1] + %reg107-idxcast3 = cast int %fd to long ; [#uses=1] + %idx3 = getelementptr [3 x %spec_fd_t]* %spec_fd, long 0, long %reg107-idxcast3, ubyte 3 ; [#uses=1] %reg1601 = load ubyte** %idx3 - %reg132-idxcast1 = cast int %reg1321 to uint ; [#uses=1] - %idx4 = getelementptr ubyte* %reg1601, uint %reg132-idxcast1 ; [#uses=2] + %reg132-idxcast1 = cast int %reg1321 to long ; [#uses=1] + %idx4 = getelementptr ubyte* %reg1601, long %reg132-idxcast1 ; [#uses=2] %reg1621 = load ubyte* %idx4 - %cast108 = cast ubyte %reg1621 to uint ; [#uses=0] + %cast108 = cast ubyte %reg1621 to long ; [#uses=0] %reg157 = add int %reg1321, 1 ; [#uses=1] - %idx5 = getelementptr [3 x %spec_fd_t]* %spec_fd, uint 0, uint %reg107-idxcast1, ubyte 2 + %idx5 = getelementptr [3 x %spec_fd_t]* %spec_fd, long 0, long %reg107-idxcast1, ubyte 2 store int %reg157, int* %idx5 %reg163 = load int* %dbglvl ; [#uses=1] %cond272 = setle int %reg163, 4 ; [#uses=1] br bool %cond272, label %bb11, label %bb10 bb10: ;[#uses=1] - %cast279 = getelementptr [4 x sbyte]* %.LC11, uint 0, uint 0 ; [#uses=0] + %cast279 = getelementptr [4 x sbyte]* %.LC11, long 0, long 0 ; [#uses=0] br label %bb11 bb11: ;[#uses=3] From lattner at cs.uiuc.edu Tue Jun 24 16:23:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 16:23:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll Message-ID: <200306242122.QAA19419@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: 2003-06-24-BasicFunctionality.ll added (r1.1) --- Log message: Make sure adce is basically working! --- Diffs of the changes: Index: llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll diff -c /dev/null llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll:1.1 *** /dev/null Tue Jun 24 16:22:19 2003 --- llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll Tue Jun 24 16:22:09 2003 *************** *** 0 **** --- 1,43 ---- + ; RUN: if as < %s | opt -adce -simplifycfg | dis | grep then: + ; RUN: then exit 1 + ; RUN: else exit 0 + ; RUN: fi + + void %dead_test8(int* %data.1, int %idx.1) { + entry: ; No predecessors! + %tmp.1 = load int* %data.1 ; [#uses=2] + %tmp.41 = setgt int %tmp.1, 0 ; [#uses=1] + br bool %tmp.41, label %no_exit.preheader, label %return + + no_exit.preheader: ; preds = %entry + %tmp.11 = getelementptr int* %data.1, long 1 ; [#uses=1] + %tmp.22-idxcast = cast int %idx.1 to long ; [#uses=1] + %tmp.28 = getelementptr int* %data.1, long %tmp.22-idxcast ; [#uses=1] + br label %no_exit + + no_exit: ; preds = %no_exit.preheader, %endif + %k.1 = phi int [ %k.0, %endif ], [ 0, %no_exit.preheader ] ; [#uses=3] + %i.0 = phi int [ %inc.1, %endif ], [ 0, %no_exit.preheader ] ; [#uses=1] + %tmp.12 = load int* %tmp.11 ; [#uses=1] + %tmp.14 = sub int 0, %tmp.12 ; [#uses=1] + %tmp.161 = setne int %k.1, %tmp.14 ; [#uses=1] + br bool %tmp.161, label %then, label %else + + then: ; preds = %no_exit + %inc.0 = add int %k.1, 1 ; [#uses=1] + br label %endif + + else: ; preds = %no_exit + %dec = add int %k.1, -1 ; [#uses=1] + br label %endif + + endif: ; preds = %else, %then + %k.0 = phi int [ %dec, %else ], [ %inc.0, %then ] ; [#uses=1] + store int 2, int* %tmp.28 + %inc.1 = add int %i.0, 1 ; [#uses=2] + %tmp.4 = setlt int %inc.1, %tmp.1 ; [#uses=1] + br bool %tmp.4, label %no_exit, label %return + + return: ; preds = %entry, %endif + ret void + } From lattner at cs.uiuc.edu Tue Jun 24 16:25:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 16:25:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll Message-ID: <200306242124.QAA19450@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: 2002-05-28-Crash.ll updated: 1.2 -> 1.3 --- Log message: modernize testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll diff -u llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll:1.2 llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll:1.3 --- llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll:1.2 Tue May 28 16:29:28 2002 +++ llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll Tue Jun 24 16:23:50 2003 @@ -26,7 +26,8 @@ %reg129 = add int %cast109, -1 ; [#uses=1] %reg114-idxcast = cast ulong %reg114 to uint ; [#uses=1] %reg114-idxcast-offset = add uint %reg114-idxcast, 1073741823 ; [#uses=1] - %reg124 = getelementptr uint* %set, uint %reg114-idxcast-offset ; [#uses=1] + %reg114-idxcast-offset = cast uint %reg114-idxcast-offset to long + %reg124 = getelementptr uint* %set, long %reg114-idxcast-offset ; [#uses=1] %reg125 = load uint* %reg124 ; [#uses=1] %cond232 = setne uint %reg125, 0 ; [#uses=1] br bool %cond232, label %bb3, label %bb2 @@ -38,7 +39,8 @@ %add1-indvar = add int %cann-indvar, 1 ; [#uses=1] %reg130-idxcast = cast int %reg130 to uint ; [#uses=1] %reg130-idxcast-offset = add uint %reg130-idxcast, 1073741823 ; [#uses=1] - %reg118 = getelementptr uint* %set, uint %reg130-idxcast-offset ; [#uses=1] + %reg130-idxcast-offset = cast uint %reg130-idxcast-offset to long + %reg118 = getelementptr uint* %set, long %reg130-idxcast-offset ; [#uses=1] %reg119 = load uint* %reg118 ; [#uses=1] %cond233 = seteq uint %reg119, 0 ; [#uses=1] br bool %cond233, label %bb2, label %bb3 From lattner at cs.uiuc.edu Tue Jun 24 16:50:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 16:50:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp Message-ID: <200306242149.QAA26055@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: ADCE.cpp updated: 1.54 -> 1.55 --- Log message: Do not mark ALL terminators live if any instruciton in the block is live. We only want to mark it live if it is an unconditional branch. This fixes bug: ADCE/2002-05-28-Crash.ll and makes this pass _much_ more useful. --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/ADCE.cpp diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.54 llvm/lib/Transforms/Scalar/ADCE.cpp:1.55 --- llvm/lib/Transforms/Scalar/ADCE.cpp:1.54 Mon Jun 16 07:10:45 2003 +++ llvm/lib/Transforms/Scalar/ADCE.cpp Tue Jun 24 16:49:45 2003 @@ -105,8 +105,11 @@ bind_obj(this, &ADCE::markTerminatorLive)); } - // If this basic block is live, then the terminator must be as well! - markTerminatorLive(BB); + // If this basic block is live, and it ends in an unconditional branch, then + // the branch is alive as well... + if (BranchInst *BI = dyn_cast(BB->getTerminator())) + if (BI->isUnconditional()) + markTerminatorLive(BB); } // dropReferencesOfDeadInstructionsInLiveBlock - Loop over all of the @@ -248,6 +251,7 @@ NewEntry->getInstList().push_back(new BranchInst(&Func->front())); Func->getBasicBlockList().push_front(NewEntry); AliveBlocks.insert(NewEntry); // This block is always alive! + LiveSet.insert(NewEntry->getTerminator()); // The branch is live } // Loop over all of the alive blocks in the function. If any successor @@ -260,6 +264,23 @@ BasicBlock *BB = I; TerminatorInst *TI = BB->getTerminator(); + // If the terminator instruction is alive, but the block it is contained + // in IS alive, this means that this terminator is a conditional branch + // on a condition that doesn't matter. Make it an unconditional branch + // to ONE of the successors. This has the side effect of dropping a use + // of the conditional value, which may also be dead. + if (!LiveSet.count(TI)) { + assert(TI->getNumSuccessors() > 1 && "Not a conditional?"); + BranchInst *NB = new BranchInst(TI->getSuccessor(0), TI); + + // Remove entries from PHI nodes to avoid confusing ourself later... + for (unsigned i = 1, e = TI->getNumSuccessors(); i != e; ++i) + TI->getSuccessor(i)->removePredecessor(BB); + + BB->getInstList().erase(TI); + TI = NB; + } + // Loop over all of the successors, looking for ones that are not alive. // We cannot save the number of successors in the terminator instruction // here because we may remove them if we don't have a postdominator... From lattner at cs.uiuc.edu Tue Jun 24 16:52:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 16:52:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll Message-ID: <200306242151.QAA26438@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: 2002-05-23-ZeroArgPHITest.ll updated: 1.2 -> 1.3 --- Log message: Modernize testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll diff -u llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll:1.2 llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll:1.3 --- llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll:1.2 Thu Aug 22 11:39:04 2002 +++ llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll Tue Jun 24 16:51:03 2003 @@ -23,7 +23,7 @@ bb2: ;[#uses=3] %reg109 = phi %node_t* [ %reg110, %bb2 ], [ %reg107, %bb1 ] ; <%node_t*> [#uses=1] - %reg212 = getelementptr %node_t* %reg109, uint 0, ubyte 1 ; <%node_t**> [#uses=1] + %reg212 = getelementptr %node_t* %reg109, long 0, ubyte 1 ; <%node_t**> [#uses=1] %reg110 = load %node_t** %reg212 ; <%node_t*> [#uses=2] %cond213 = setne %node_t* %reg110, null ; [#uses=1] br bool %cond213, label %bb2, label %bb3 From criswell at choi.cs.uiuc.edu Tue Jun 24 17:11:03 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jun 24 17:11:03 2003 Subject: [llvm-commits] CVS: llvm/configure configure.ac Message-ID: <200306242210.h5OMAZg11734@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.1.2.2 -> 1.1.2.3 configure.ac updated: 1.1.2.2 -> 1.1.2.3 --- Log message: Added options for purify. --- Diffs of the changes: Index: llvm/configure diff -u llvm/configure:1.1.2.2 llvm/configure:1.1.2.3 --- llvm/configure:1.1.2.2 Tue Jun 24 16:19:14 2003 +++ llvm/configure Tue Jun 24 17:10:24 2003 @@ -1022,6 +1022,7 @@ --with-papi Location of PAPI --with-objroot Location where object files should be placed (default is .) + --with-purify Location of purify program Some influential environment variables: CXX C++ compiler command @@ -4296,7 +4297,7 @@ case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4299 "configure"' > conftest.$ac_ext + echo '#line 4300 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4846,7 +4847,7 @@ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6677,7 +6678,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/lib/VMCore: Value.cpp updated: 1.31 -> 1.32 --- Log message: Make assertion more descriptive --- Diffs of the changes: Index: llvm/lib/VMCore/Value.cpp diff -u llvm/lib/VMCore/Value.cpp:1.31 llvm/lib/VMCore/Value.cpp:1.32 --- llvm/lib/VMCore/Value.cpp:1.31 Thu Feb 13 13:46:22 2003 +++ llvm/lib/VMCore/Value.cpp Tue Jun 24 17:20:19 2003 @@ -40,7 +40,7 @@ << **I << "\n"; } #endif - assert(Uses.begin() == Uses.end()); + assert(Uses.begin() == Uses.end() &&"Uses remain when a value is destroyed!"); // There should be no uses of this object anymore, remove it. LeakDetector::removeGarbageObject(this); From lattner at cs.uiuc.edu Tue Jun 24 17:59:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 17:59:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/2003-06-24-BadSuccessor.ll Message-ID: <200306242258.RAA30578@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: 2003-06-24-BadSuccessor.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/ADCE/2003-06-24-BadSuccessor.ll diff -c /dev/null llvm/test/Regression/Transforms/ADCE/2003-06-24-BadSuccessor.ll:1.1 *** /dev/null Tue Jun 24 17:58:16 2003 --- llvm/test/Regression/Transforms/ADCE/2003-06-24-BadSuccessor.ll Tue Jun 24 17:58:05 2003 *************** *** 0 **** --- 1,94 ---- + ; RUN: as < %s | opt -adce -disable-output + + target endian = little + target pointersize = 32 + %struct..CppObjTypeDesc = type { uint, ushort, ushort } + %struct..TypeToken = type { uint, ushort, ushort } + + implementation ; Functions: + + uint %C_ReFaxToDb() { + entry: ; No predecessors! + br bool false, label %endif.0, label %then.0 + + then.0: ; preds = %entry + ret uint 0 + + endif.0: ; preds = %entry + br bool false, label %then.11, label %then.4 + + then.4: ; preds = %endif.0 + ret uint 0 + + then.11: ; preds = %endif.0 + br bool false, label %loopentry.0, label %else.2 + + loopentry.0: ; preds = %then.11, %endif.14, %loopentry.1 + br bool false, label %endif.14, label %loopexit.0 + + endif.14: ; preds = %loopentry.0 + br bool false, label %loopentry.1, label %loopentry.0 + + loopentry.1: ; preds = %endif.14, %then.53, %then.53, %then.53, %then.53, %then.53 + %SubArrays.10 = phi uint* [ %SubArrays.8, %then.53 ] , [ null, %endif.14 ] ; [#uses=3] + br bool false, label %no_exit.1, label %loopentry.0 + + no_exit.1: ; preds = %loopentry.1 + switch uint 0, label %label.17 [ + uint 2, label %label.11 + uint 19, label %label.10 + ] + + label.10: ; preds = %no_exit.1 + br bool false, label %then.43, label %endif.43 + + then.43: ; preds = %label.10 + br bool false, label %then.44, label %endif.44 + + then.44: ; preds = %then.43 + br bool false, label %shortcirc_next.4, label %endif.45 + + shortcirc_next.4: ; preds = %then.44 + br bool false, label %no_exit.2, label %loopexit.2 + + no_exit.2: ; preds = %shortcirc_next.4 + %tmp.897 = getelementptr uint* %SubArrays.10, long 0 ; [#uses=1] + %tmp.899 = load uint* %tmp.897 ; [#uses=1] + store uint %tmp.899, uint* null + ret uint 0 + + loopexit.2: ; preds = %shortcirc_next.4 + ret uint 0 + + endif.45: ; preds = %then.44 + ret uint 0 + + endif.44: ; preds = %then.43 + ret uint 0 + + endif.43: ; preds = %label.10 + ret uint 0 + + label.11: ; preds = %no_exit.1 + ret uint 0 + + label.17: ; preds = %no_exit.1, %no_exit.1, %no_exit.1, %no_exit.1, %no_exit.1, %no_exit.1 + br bool false, label %then.53, label %shortcirc_next.7 + + shortcirc_next.7: ; preds = %label.17 + br bool false, label %then.53, label %shortcirc_next.8 + + shortcirc_next.8: ; preds = %shortcirc_next.7 + ret uint 0 + + then.53: ; preds = %shortcirc_next.7, %label.17 + %SubArrays.8 = phi uint* [ %SubArrays.10, %shortcirc_next.7 ], [ %SubArrays.10, %label.17 ] ; [#uses=5] + %tmp.1023 = load uint* null ; [#uses=1] + switch uint %tmp.1023, label %loopentry.1 [] + + loopexit.0: ; preds = %loopentry.0 + ret uint 0 + + else.2: ; preds = %then.11 + ret uint 0 + } From lattner at cs.uiuc.edu Tue Jun 24 18:03:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 18:03:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp Message-ID: <200306242302.SAA31033@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: ADCE.cpp updated: 1.55 -> 1.56 --- Log message: Fix bug: ADCE/2003-06-24-BadSuccessor.ll --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/ADCE.cpp diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.55 llvm/lib/Transforms/Scalar/ADCE.cpp:1.56 --- llvm/lib/Transforms/Scalar/ADCE.cpp:1.55 Tue Jun 24 16:49:45 2003 +++ llvm/lib/Transforms/Scalar/ADCE.cpp Tue Jun 24 18:02:45 2003 @@ -73,6 +73,8 @@ // instructions that are dead according to LiveSet. bool dropReferencesOfDeadInstructionsInLiveBlock(BasicBlock *BB); + TerminatorInst *convertToUnconditionalBranch(TerminatorInst *TI); + inline void markInstructionLive(Instruction *I) { if (LiveSet.count(I)) return; DEBUG(std::cerr << "Insn Live: " << I); @@ -139,6 +141,24 @@ } +/// convertToUnconditionalBranch - Transform this conditional terminator +/// instruction into an unconditional branch because we don't care which of the +/// successors it goes to. This eliminate a use of the condition as well. +/// +TerminatorInst *ADCE::convertToUnconditionalBranch(TerminatorInst *TI) { + BranchInst *NB = new BranchInst(TI->getSuccessor(0), TI); + BasicBlock *BB = TI->getParent(); + + // Remove entries from PHI nodes to avoid confusing ourself later... + for (unsigned i = 1, e = TI->getNumSuccessors(); i != e; ++i) + TI->getSuccessor(i)->removePredecessor(BB); + + // Delete the old branch itself... + BB->getInstList().erase(TI); + return NB; +} + + // doADCE() - Run the Aggressive Dead Code Elimination algorithm, returning // true if the function was modified. // @@ -234,13 +254,25 @@ // new entry node... // if (AliveBlocks.size() == Func->size()) { // No dead blocks? - for (Function::iterator I = Func->begin(), E = Func->end(); I != E; ++I) + for (Function::iterator I = Func->begin(), E = Func->end(); I != E; ++I) { // Loop over all of the instructions in the function, telling dead // instructions to drop their references. This is so that the next sweep // over the program can safely delete dead instructions without other dead // instructions still refering to them. // dropReferencesOfDeadInstructionsInLiveBlock(I); + + // Check to make sure the terminator instruction is live. If it isn't, + // this means that the condition that it branches on (we know it is not an + // unconditional branch), is not needed to make the decision of where to + // go to, because all outgoing edges go to the same place. We must remove + // the use of the condition (because it's probably dead), so we convert + // the terminator to a conditional branch. + // + TerminatorInst *TI = I->getTerminator(); + if (!LiveSet.count(TI)) + convertToUnconditionalBranch(TI); + } } else { // If there are some blocks dead... // If the entry node is dead, insert a new entry node to eliminate the entry @@ -269,17 +301,8 @@ // on a condition that doesn't matter. Make it an unconditional branch // to ONE of the successors. This has the side effect of dropping a use // of the conditional value, which may also be dead. - if (!LiveSet.count(TI)) { - assert(TI->getNumSuccessors() > 1 && "Not a conditional?"); - BranchInst *NB = new BranchInst(TI->getSuccessor(0), TI); - - // Remove entries from PHI nodes to avoid confusing ourself later... - for (unsigned i = 1, e = TI->getNumSuccessors(); i != e; ++i) - TI->getSuccessor(i)->removePredecessor(BB); - - BB->getInstList().erase(TI); - TI = NB; - } + if (!LiveSet.count(TI)) + TI = convertToUnconditionalBranch(TI); // Loop over all of the successors, looking for ones that are not alive. // We cannot save the number of successors in the terminator instruction From lattner at cs.uiuc.edu Tue Jun 24 18:39:12 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 18:39:12 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/BugPoint/Makefile Message-ID: <200306242338.SAA04465@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/BugPoint: Makefile updated: 1.2 -> 1.3 --- Log message: Don't print message, remove temp files --- Diffs of the changes: Index: llvm/test/Regression/BugPoint/Makefile diff -u llvm/test/Regression/BugPoint/Makefile:1.2 llvm/test/Regression/BugPoint/Makefile:1.3 --- llvm/test/Regression/BugPoint/Makefile:1.2 Mon Dec 23 17:47:39 2002 +++ llvm/test/Regression/BugPoint/Makefile Tue Jun 24 18:38:09 2003 @@ -12,8 +12,8 @@ Output/%.ll.out: %.ll Output/.dir $(LAS) $(LBUGPOINT) -$(TESTRUNR) $< - -# Remove temporary files generated... - @rm -f bugpoint-$<-* + -@# Remove temporary files generated... + - at rm -f bugpoint-* clean:: rm -f *.bc From lattner at cs.uiuc.edu Tue Jun 24 18:41:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 18:41:00 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/BugPoint/remove_arguments_test.ll Message-ID: <200306242340.SAA04586@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/BugPoint: remove_arguments_test.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: Index: llvm/test/Regression/BugPoint/remove_arguments_test.ll diff -c /dev/null llvm/test/Regression/BugPoint/remove_arguments_test.ll:1.1 *** /dev/null Tue Jun 24 18:40:37 2003 --- llvm/test/Regression/BugPoint/remove_arguments_test.ll Tue Jun 24 18:40:27 2003 *************** *** 0 **** --- 1,9 ---- + ; RUN: bugpoint %s -bugpoint-crashcalls + + ; Test to make sure that arguments are removed from the function if they are unnecessary. + + declare int %test2() + int %test(int %A, int %B, float %C) { + call int %test2() + ret int %0 + } From gaeke at cs.uiuc.edu Tue Jun 24 22:06:00 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 24 22:06:00 2003 Subject: [llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp Message-ID: <200306250305.WAA02888@neo.cs.uiuc.edu> Changes in directory llvm/lib/CWriter: Writer.cpp updated: 1.98 -> 1.99 --- Log message: It seems likely that floats would need a cast too, because they are ordinarily promoted to doubles. --- Diffs of the changes: Index: llvm/lib/CWriter/Writer.cpp diff -u llvm/lib/CWriter/Writer.cpp:1.98 llvm/lib/CWriter/Writer.cpp:1.99 --- llvm/lib/CWriter/Writer.cpp:1.98 Mon Jun 23 15:00:51 2003 +++ llvm/lib/CWriter/Writer.cpp Tue Jun 24 22:05:33 2003 @@ -1033,7 +1033,8 @@ // We must cast the results of binary operations which might be promoted. bool needsCast = false; if ((I.getType() == Type::UByteTy) || (I.getType() == Type::SByteTy) - || (I.getType() == Type::UShortTy) || (I.getType() == Type::ShortTy)) { + || (I.getType() == Type::UShortTy) || (I.getType() == Type::ShortTy) + || (I.getType() == Type::FloatTy)) { needsCast = true; Out << "(("; printType(Out, I.getType(), "", false, false); From lattner at cs.uiuc.edu Tue Jun 24 23:13:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 23:13:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp Message-ID: <200306250412.XAA05108@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: DeadArgumentElimination.cpp updated: 1.2 -> 1.3 --- Log message: Add argument to DAE to allow operation on non-internal functions --- Diffs of the changes: Index: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp diff -u llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.2 llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.3 --- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.2 Wed Jun 18 11:25:51 2003 +++ llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp Tue Jun 24 23:12:49 2003 @@ -25,15 +25,27 @@ Statistic<> NumArgumentsEliminated("deadargelim", "Number of args removed"); struct DAE : public Pass { + DAE(bool DFEF = false) : DeleteFromExternalFunctions(DFEF) {} bool run(Module &M); + + private: + bool DeleteFromExternalFunctions; + bool FunctionArgumentsIntrinsicallyAlive(const Function &F); + void RemoveDeadArgumentsFromFunction(Function *F, + std::set &DeadArguments); }; RegisterOpt X("deadargelim", "Dead Argument Elimination"); } -// createDeadArgEliminationPass - This pass removes arguments from functions -// which are not used by the body of the function. -// -Pass *createDeadArgEliminationPass() { return new DAE(); } +/// createDeadArgEliminationPass - This pass removes arguments from functions +/// which are not used by the body of the function. If +/// DeleteFromExternalFunctions is true, the pass will modify functions that +/// have external linkage, which is not usually safe (this is used by bugpoint +/// to reduce testcases). +/// +Pass *createDeadArgEliminationPass(bool DeleteFromExternalFunctions) { + return new DAE(DeleteFromExternalFunctions); +} // FunctionArgumentsIntrinsicallyAlive - Return true if the arguments of the @@ -42,8 +54,8 @@ // We consider arguments of non-internal functions to be intrinsically alive as // well as arguments to functions which have their "address taken". // -static bool FunctionArgumentsIntrinsicallyAlive(const Function &F) { - if (!F.hasInternalLinkage()) return true; +bool DAE::FunctionArgumentsIntrinsicallyAlive(const Function &F) { + if (!F.hasInternalLinkage() && !DeleteFromExternalFunctions) return true; for (Value::use_const_iterator I = F.use_begin(), E = F.use_end(); I!=E; ++I){ // If this use is anything other than a call site, the function is alive. @@ -151,8 +163,8 @@ // specified by the DeadArguments list. Transform the function and all of the // callees of the function to not have these arguments. // -static void RemoveDeadArgumentsFromFunction(Function *F, - std::set &DeadArguments){ +void DAE::RemoveDeadArgumentsFromFunction(Function *F, + std::set &DeadArguments){ // Start by computing a new prototype for the function, which is the same as // the old function, but has fewer arguments. const FunctionType *FTy = F->getFunctionType(); @@ -166,7 +178,7 @@ FTy->isVarArg()); // Create the new function body and insert it into the module... - Function *NF = new Function(NFTy, Function::InternalLinkage, F->getName()); + Function *NF = new Function(NFTy, F->getLinkage(), F->getName()); F->getParent()->getFunctionList().insert(F, NF); // Loop over all of the callers of the function, transforming the call sites From lattner at cs.uiuc.edu Tue Jun 24 23:13:06 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 23:13:06 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/IPO.h Message-ID: <200306250412.XAA05096@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms: IPO.h updated: 1.17 -> 1.18 --- Log message: Add argument to DAE to allow operation on non-internal functions --- Diffs of the changes: Index: llvm/include/llvm/Transforms/IPO.h diff -u llvm/include/llvm/Transforms/IPO.h:1.17 llvm/include/llvm/Transforms/IPO.h:1.18 --- llvm/include/llvm/Transforms/IPO.h:1.17 Mon Jun 16 07:16:52 2003 +++ llvm/include/llvm/Transforms/IPO.h Tue Jun 24 23:12:29 2003 @@ -70,9 +70,12 @@ //===----------------------------------------------------------------------===// // createDeadArgEliminationPass - This pass removes arguments from functions -// which are not used by the body of the function. +// which are not used by the body of the function. If +// DeleteFromExternalFunctions is true, the pass will modify functions that have +// external linkage, which is not usually safe (this is used by bugpoint to +// reduce testcases). // -Pass *createDeadArgEliminationPass(); +Pass *createDeadArgEliminationPass(bool DeleteFromExternalFunctions=false); //===----------------------------------------------------------------------===// From lattner at cs.uiuc.edu Tue Jun 24 23:15:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 23:15:01 2003 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp Message-ID: <200306250414.XAA05134@apoc.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: ExtractFunction.cpp updated: 1.9 -> 1.10 --- Log message: Run dead arg elimination, and tell it that it's ok to hack up non-internal functions --- Diffs of the changes: Index: llvm/tools/bugpoint/ExtractFunction.cpp diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.9 llvm/tools/bugpoint/ExtractFunction.cpp:1.10 --- llvm/tools/bugpoint/ExtractFunction.cpp:1.9 Wed May 21 15:38:59 2003 +++ llvm/tools/bugpoint/ExtractFunction.cpp Tue Jun 24 23:13:36 2003 @@ -97,6 +97,7 @@ CleanupPasses.add(createFunctionResolvingPass()); CleanupPasses.add(createGlobalDCEPass()); CleanupPasses.add(createDeadTypeEliminationPass()); + CleanupPasses.add(createDeadArgEliminationPass(true)); CleanupPasses.add(createVerifierPass()); CleanupPasses.run(*M); return M; From lattner at cs.uiuc.edu Tue Jun 24 23:15:05 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 24 23:15:05 2003 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/CrashDebugger.cpp Message-ID: <200306250414.XAA05129@apoc.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: CrashDebugger.cpp updated: 1.10 -> 1.11 --- Log message: Try to run cleanups even if nothing was modified in the preview passes --- Diffs of the changes: Index: llvm/tools/bugpoint/CrashDebugger.cpp diff -u llvm/tools/bugpoint/CrashDebugger.cpp:1.10 llvm/tools/bugpoint/CrashDebugger.cpp:1.11 --- llvm/tools/bugpoint/CrashDebugger.cpp:1.10 Sun Jun 1 23:54:29 2003 +++ llvm/tools/bugpoint/CrashDebugger.cpp Tue Jun 24 23:13:52 2003 @@ -360,20 +360,18 @@ } while (Simplification); // Try to clean up the testcase by running funcresolve and globaldce... - if (AnyReduction) { - std::cout << "\n*** Attempting to perform final cleanups: "; - Module *M = performFinalCleanups(); - std::swap(Program, M); + std::cout << "\n*** Attempting to perform final cleanups: "; + Module *M = performFinalCleanups(); + std::swap(Program, M); - // Find out if the pass still crashes on the cleaned up program... - if (runPasses(PassesToRun)) { - // Yup, it does, keep the reduced version... - delete M; - AnyReduction = true; - } else { - delete Program; // Otherwise, restore the original module... - Program = M; - } + // Find out if the pass still crashes on the cleaned up program... + if (runPasses(PassesToRun)) { + // Yup, it does, keep the reduced version... + delete M; + AnyReduction = true; + } else { + delete Program; // Otherwise, restore the original module... + Program = M; } if (AnyReduction) From jstanley at cs.uiuc.edu Tue Jun 24 23:53:01 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Tue Jun 24 23:53:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp Message-ID: <200306250452.XAA13272@trinity.cs.uiuc.edu> Changes in directory llvm/lib/CWriter: Writer.cpp updated: 1.99 -> 1.100 --- Log message: - Fixed name mangling conditions to handle 'linkonce' linkage type. In particular, name mangling for GlobalValues only occurs when the linkage type is internal or when the name must be mangled to avoid a collision. See comments in CWriter::getValueName for more information. - 'inline' keyword is now emitted for functions with 'linkonce' linkage type. - Fixed typos. --- Diffs of the changes: Index: llvm/lib/CWriter/Writer.cpp diff -u llvm/lib/CWriter/Writer.cpp:1.99 llvm/lib/CWriter/Writer.cpp:1.100 --- llvm/lib/CWriter/Writer.cpp:1.99 Tue Jun 24 22:05:33 2003 +++ llvm/lib/CWriter/Writer.cpp Tue Jun 24 23:52:09 2003 @@ -164,14 +164,25 @@ } std::string CWriter::getValueName(const Value *V) { - if (V->hasName()) { // Print out the label if it exists... - if (isa(V) && // Do not mangle globals... - (cast(V)->hasExternalLinkage() &&// Unless it's internal or - !MangledGlobals.count(V))) // Unless the name would collide if we don't - return makeNameProper(V->getName()); - + if (V->hasName()) { // Print out the label if it exists... + + // Name mangling occurs as follows: + // - If V is not a global, mangling always occurs. + // - Otherwise, mangling occurs when any of the following are true: + // 1) V has internal linkage + // 2) V's name would collide if it is not mangled. + // + + if(const GlobalValue* gv = dyn_cast(V)) { + if(!gv->hasInternalLinkage() && !MangledGlobals.count(gv)) { + // No internal linkage, name will not collide -> no mangling. + return makeNameProper(gv->getName()); + } + } + + // Non-global, or global with internal linkage / colliding name -> mangle. return "l" + utostr(V->getType()->getUniqueID()) + "_" + - makeNameProper(V->getName()); + makeNameProper(V->getName()); } int Slot = Table->getValSlot(V); @@ -220,23 +231,23 @@ switch (Ty->getPrimitiveID()) { case Type::FunctionTyID: { const FunctionType *MTy = cast(Ty); - std::stringstream FunctionInards; - FunctionInards << " (" << NameSoFar << ") ("; + std::stringstream FunctionInnards; + FunctionInnards << " (" << NameSoFar << ") ("; for (FunctionType::ParamTypes::const_iterator I = MTy->getParamTypes().begin(), E = MTy->getParamTypes().end(); I != E; ++I) { if (I != MTy->getParamTypes().begin()) - FunctionInards << ", "; - printType(FunctionInards, *I, ""); + FunctionInnards << ", "; + printType(FunctionInnards, *I, ""); } if (MTy->isVarArg()) { if (!MTy->getParamTypes().empty()) - FunctionInards << ", ..."; + FunctionInnards << ", ..."; } else if (MTy->getParamTypes().empty()) { - FunctionInards << "void"; + FunctionInnards << "void"; } - FunctionInards << ")"; - std::string tstr = FunctionInards.str(); + FunctionInnards << ")"; + std::string tstr = FunctionInnards.str(); printType(Out, MTy->getReturnType(), tstr); return Out; } @@ -650,9 +661,9 @@ Out << "extern void * malloc(size_t);\n\n"; } - // Output the global variable declerations + // Output the global variable declarations if (!M->gempty()) { - Out << "\n\n/* Global Variable Declerations */\n"; + Out << "\n\n/* Global Variable Declarations */\n"; for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) if (!I->isExternal()) { Out << "extern "; @@ -768,33 +779,36 @@ void CWriter::printFunctionSignature(const Function *F, bool Prototype) { - // If the program provides it's own malloc prototype we don't need + // If the program provides its own malloc prototype we don't need // to include the general one. if (getValueName(F) == "malloc") needsMalloc = false; - if (F->hasInternalLinkage()) Out << "static "; + + if (F->hasInternalLinkage()) Out << "static "; + if (F->hasLinkOnceLinkage()) Out << "inline "; + // Loop over the arguments, printing them... const FunctionType *FT = cast(F->getFunctionType()); - std::stringstream FunctionInards; + std::stringstream FunctionInnards; // Print out the name... - FunctionInards << getValueName(F) << "("; + FunctionInnards << getValueName(F) << "("; if (!F->isExternal()) { if (!F->aempty()) { std::string ArgName; if (F->abegin()->hasName() || !Prototype) ArgName = getValueName(F->abegin()); - printType(FunctionInards, F->afront().getType(), ArgName); + printType(FunctionInnards, F->afront().getType(), ArgName); for (Function::const_aiterator I = ++F->abegin(), E = F->aend(); I != E; ++I) { - FunctionInards << ", "; + FunctionInnards << ", "; if (I->hasName() || !Prototype) ArgName = getValueName(I); else ArgName = ""; - printType(FunctionInards, I->getType(), ArgName); + printType(FunctionInnards, I->getType(), ArgName); } } } else { @@ -802,8 +816,8 @@ for (FunctionType::ParamTypes::const_iterator I = FT->getParamTypes().begin(), E = FT->getParamTypes().end(); I != E; ++I) { - if (I != FT->getParamTypes().begin()) FunctionInards << ", "; - printType(FunctionInards, *I); + if (I != FT->getParamTypes().begin()) FunctionInnards << ", "; + printType(FunctionInnards, *I); } } @@ -811,12 +825,12 @@ // unless there are no known types, in which case, we just emit (). // if (FT->isVarArg() && !FT->getParamTypes().empty()) { - if (FT->getParamTypes().size()) FunctionInards << ", "; - FunctionInards << "..."; // Output varargs portion of signature! + if (FT->getParamTypes().size()) FunctionInnards << ", "; + FunctionInnards << "..."; // Output varargs portion of signature! } - FunctionInards << ")"; + FunctionInnards << ")"; // Print out the return type and the entire signature for that matter - printType(Out, F->getReturnType(), FunctionInards.str()); + printType(Out, F->getReturnType(), FunctionInnards.str()); } From lattner at cs.uiuc.edu Wed Jun 25 09:32:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 25 09:32:00 2003 Subject: [llvm-commits] CVS: llvm/www/docs/OpenProjects.html Message-ID: <200306251431.JAA01106@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: OpenProjects.html updated: 1.6 -> 1.7 --- Log message: Remove completed tasks --- Diffs of the changes: Index: llvm/www/docs/OpenProjects.html diff -u llvm/www/docs/OpenProjects.html:1.6 llvm/www/docs/OpenProjects.html:1.7 --- llvm/www/docs/OpenProjects.html:1.6 Tue May 6 15:47:11 2003 +++ llvm/www/docs/OpenProjects.html Wed Jun 25 09:31:06 2003 @@ -130,7 +130,6 @@
  • Transform setjmp and longjmp calls to use the LLVM invoke mechanism.
  • Add support for a volatile attribute on loads and stores -
  • Support for variable argument functions
  • Add a new conditional move instruction: X = select bool Cond, Y, Z
  • Add support for platform independent prefetch support. The GCC prefetch project page @@ -192,7 +191,7 @@
  • Implement a flow-sensitive context-sensitive alias analysis algorithm
    - Pick one of the somewhat efficient algorithms, but strive for maximum precision -
  • Implement a flow-sensitive context-insensitive alias anlaysis algorithm
    +
  • Implement a flow-sensitive context-insensitive alias analysis algorithm
    - Just an efficient local algorithm perhaps?
  • Implement an interface to update analyses in response to common code motion @@ -200,15 +199,6 @@
  • Implement alias analysis based optimizations:
    • Dead store elimination -
    • Store+Reload or "store forwarding" elimination:

      - Change: -

      -        store int X, int* P
      -        Y = load int* P
      - into: -
      -        store int X, int *P
      -        Y = X
    @@ -290,6 +280,6 @@
    Chris Lattner
    -Last modified: Tue May 6 15:46:48 CDT 2003 +Last modified: Wed Jun 25 09:30:27 CDT 2003 From lattner at cs.uiuc.edu Wed Jun 25 09:56:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 25 09:56:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll Message-ID: <200306251455.JAA07332@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Mem2Reg: 2003-06-26-IterativePromote.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll diff -c /dev/null llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll:1.1 *** /dev/null Wed Jun 25 09:55:40 2003 --- llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll Wed Jun 25 09:55:30 2003 *************** *** 0 **** --- 1,19 ---- + ; Promoting some values allows promotion of other values. + ; RUN: if as < %s | opt -mem2reg | dis | grep alloca + ; RUN: then exit 1 + ; RUN: else exit 0 + ; RUN: fi + + int %test2() { + %result = alloca int ; ty=int* + %a = alloca int ; ty=int* + %p = alloca int* ; ty=int** + store int 0, int* %a + store int* %a, int** %p + %tmp.0 = load int** %p ; ty=int* + %tmp.1 = load int* %tmp.0 ; ty=int + store int %tmp.1, int* %result + %tmp.2 = load int* %result ; ty=int + ret int %tmp.2 + } + From lattner at cs.uiuc.edu Wed Jun 25 10:00:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 25 10:00:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/Mem2Reg.cpp Message-ID: <200306251459.JAA07487@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: Mem2Reg.cpp updated: 1.3 -> 1.4 --- Log message: Fix bug: Mem2Reg/2003-06-26-IterativePromote.ll --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/Mem2Reg.cpp diff -u llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.3 llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.4 --- llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.3 Wed Apr 23 11:37:42 2003 +++ llvm/lib/Transforms/Scalar/Mem2Reg.cpp Wed Jun 25 09:58:56 2003 @@ -40,19 +40,26 @@ BasicBlock &BB = F.getEntryNode(); // Get the entry node for the function - // Find allocas that are safe to promote, by looking at all instructions in - // the entry node - for (BasicBlock::iterator I = BB.begin(), E = --BB.end(); I != E; ++I) - if (AllocaInst *AI = dyn_cast(I)) // Is it an alloca? - if (isAllocaPromotable(AI, TD)) - Allocas.push_back(AI); + bool Changed = false; + + while (1) { + Allocas.clear(); + + // Find allocas that are safe to promote, by looking at all instructions in + // the entry node + for (BasicBlock::iterator I = BB.begin(), E = --BB.end(); I != E; ++I) + if (AllocaInst *AI = dyn_cast(I)) // Is it an alloca? + if (isAllocaPromotable(AI, TD)) + Allocas.push_back(AI); + + if (Allocas.empty()) break; - if (!Allocas.empty()) { PromoteMemToReg(Allocas, getAnalysis(), TD); NumPromoted += Allocas.size(); - return true; + Changed = true; } - return false; + + return Changed; } // createPromoteMemoryToRegister - Provide an entry point to create this pass. From jstanley at cs.uiuc.edu Wed Jun 25 10:48:01 2003 From: jstanley at cs.uiuc.edu (Joel Stanley) Date: Wed Jun 25 10:48:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp Message-ID: <200306251547.KAA26697@trinity.cs.uiuc.edu> Changes in directory llvm/lib/Reoptimizer/BinInterface: sparcbin.cpp updated: 1.8 -> 1.9 --- Log message: Removed warning. --- Diffs of the changes: Index: llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp diff -u llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp:1.8 llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp:1.9 --- llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp:1.8 Tue Jun 24 14:47:23 2003 +++ llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp Wed Jun 25 10:46:52 2003 @@ -274,7 +274,7 @@ if (instr->flags & IF_BRINTERNAL) printf("{dest:s%02d} ", instr->ibranch.dest); else - printf("{dest:0x%lx} ", (intptr_t)instr->ebranch.dest); + printf("{dest:%p} ", instr->ebranch.dest); sparc_print_pseudo(instr->instr, instr->alu.genrs1, From criswell at choi.cs.uiuc.edu Wed Jun 25 11:16:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Wed Jun 25 11:16:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.SunOS Message-ID: <200306251615.h5PGFTS14169@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.SunOS (r1.9.2.1) removed --- Log message: Removed because autoconf takes care of platform specific options now. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Wed Jun 25 11:16:06 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Wed Jun 25 11:16:06 2003 Subject: [llvm-commits] CVS: llvm/Makefile.Linux Message-ID: <200306251615.h5PGFAm14159@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.Linux (r1.10.2.1) removed --- Log message: Removed because autoconf takes care of this now. --- Diffs of the changes: From lattner at cs.uiuc.edu Wed Jun 25 12:09:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 25 12:09:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LevelRaise/2003-06-25-ExprAnalysis.ll Message-ID: <200306251708.MAA09570@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LevelRaise: 2003-06-25-ExprAnalysis.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/LevelRaise/2003-06-25-ExprAnalysis.ll diff -c /dev/null llvm/test/Regression/Transforms/LevelRaise/2003-06-25-ExprAnalysis.ll:1.1 *** /dev/null Wed Jun 25 12:08:45 2003 --- llvm/test/Regression/Transforms/LevelRaise/2003-06-25-ExprAnalysis.ll Wed Jun 25 12:08:34 2003 *************** *** 0 **** --- 1,27 ---- + ; The expr analysis routines were being too aggressive across cast instructions! + + ; RUN: if as < %s | opt -raise | dis | grep 4294967295 + ; RUN: then exit 1 + ; RUN: else exit 0 + ; RUN: fi + + target endian = big + target pointersize = 64 + %struct..istack_struct = type { %struct..istack_struct*, %struct..istk_entry*, uint } + %struct..istk_entry = type { double, int, int, double, double, sbyte* } + + implementation ; Functions: + bool %Intersection(%struct..istack_struct* %tmp.0, uint %tmp.12) { ; No predecessors! + %tmp.8 = getelementptr %struct..istack_struct* %tmp.0, long 0, ubyte 1 ; <%struct..istk_entry**> [#uses=1] + %tmp.9 = load %struct..istk_entry** %tmp.8 ; <%struct..istk_entry*> [#uses=1] + %dec = sub uint %tmp.12, 1 ; [#uses=1] + %tmp.13 = cast uint %dec to ulong ; [#uses=1] + %tmp.14 = mul ulong %tmp.13, 40 ; [#uses=1] + %tmp.16 = cast %struct..istk_entry* %tmp.9 to long ; [#uses=1] + %tmp.17 = cast ulong %tmp.14 to long ; [#uses=1] + %tmp.18 = add long %tmp.16, %tmp.17 ; [#uses=1] + %tmp.19 = cast long %tmp.18 to %struct..istk_entry* ; <%struct..istk_entry*> [#uses=1] + %tmp.21 = setne %struct..istk_entry* %tmp.19, null ; [#uses=1] + ret bool %tmp.21 + } + From lattner at cs.uiuc.edu Wed Jun 25 12:10:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 25 12:10:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200306251709.MAA09600@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.92 -> 1.93 --- Log message: Instcombine: X * -1 -> -X --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.92 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.93 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.92 Mon Jun 23 16:59:52 2003 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Jun 25 12:09:20 2003 @@ -361,10 +361,11 @@ if (Constant *Op1 = dyn_cast(I.getOperand(1))) { if (ConstantInt *CI = dyn_cast(Op1)) { const Type *Ty = CI->getType(); - uint64_t Val = Ty->isSigned() ? - (uint64_t)cast(CI)->getValue() : - cast(CI)->getValue(); + int64_t Val = Ty->isSigned() ? cast(CI)->getValue() : + (int64_t)cast(CI)->getValue(); switch (Val) { + case -1: // X * -1 -> -X + return BinaryOperator::createNeg(Op0, I.getName()); case 0: return ReplaceInstUsesWith(I, Op1); // Eliminate 'mul double %X, 0' case 1: From lattner at cs.uiuc.edu Wed Jun 25 12:10:08 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 25 12:10:08 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/Expressions.cpp Message-ID: <200306251709.MAA09589@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: Expressions.cpp updated: 1.31 -> 1.32 --- Log message: Fix bug: LevelRaise/2003-06-25-ExprAnalysis.ll --- Diffs of the changes: Index: llvm/lib/Analysis/Expressions.cpp diff -u llvm/lib/Analysis/Expressions.cpp:1.31 llvm/lib/Analysis/Expressions.cpp:1.32 --- llvm/lib/Analysis/Expressions.cpp:1.31 Tue May 20 13:45:29 2003 +++ llvm/lib/Analysis/Expressions.cpp Wed Jun 25 12:09:03 2003 @@ -317,12 +317,10 @@ if (isa(DestTy)) DestTy = Type::ULongTy; // Pointer types are represented as ulong - /* if (!Src.getExprType(0)->isLosslesslyConvertibleTo(DestTy)) { if (Src.ExprTy != ExprType::Constant) return I; // Converting cast, and not a constant value... } - */ const ConstantInt *Offset = Src.Offset; const ConstantInt *Scale = Src.Scale; From lattner at cs.uiuc.edu Wed Jun 25 12:11:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 25 12:11:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/mul.ll Message-ID: <200306251710.MAA09618@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: mul.ll updated: 1.5 -> 1.6 --- Log message: Add test for instcombine -1*X -> -X --- Diffs of the changes: Index: llvm/test/Regression/Transforms/InstCombine/mul.ll diff -u llvm/test/Regression/Transforms/InstCombine/mul.ll:1.5 llvm/test/Regression/Transforms/InstCombine/mul.ll:1.6 --- llvm/test/Regression/Transforms/InstCombine/mul.ll:1.5 Mon Mar 10 16:43:56 2003 +++ llvm/test/Regression/Transforms/InstCombine/mul.ll Wed Jun 25 12:10:34 2003 @@ -33,8 +33,18 @@ ret int %B } -int %test6(ubyte %A) { +ubyte %test6(ubyte %A) { %B = mul ubyte %A, 8 %C = mul ubyte %B, 13 ret ubyte %C +} + +int %test7(int %i) { + %tmp = mul int %i, -1 ; %tmp = sub 0, %i + ret int %tmp +} + +ulong %test8(ulong %i) { + %j = mul ulong %i, 18446744073709551615 ; tmp = sub 0, %i + ret ulong %j } From lattner at cs.uiuc.edu Wed Jun 25 12:30:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 25 12:30:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.nightly.Makefile Message-ID: <200306251729.MAA09673@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.nightly.Makefile updated: 1.17 -> 1.18 --- Log message: Hopefully this will finally get crafty working --- Diffs of the changes: Index: llvm/test/Programs/TEST.nightly.Makefile diff -u llvm/test/Programs/TEST.nightly.Makefile:1.17 llvm/test/Programs/TEST.nightly.Makefile:1.18 --- llvm/test/Programs/TEST.nightly.Makefile:1.17 Tue Jun 24 12:31:24 2003 +++ llvm/test/Programs/TEST.nightly.Makefile Wed Jun 25 12:29:27 2003 @@ -23,7 +23,7 @@ Output/%.nightly.compile.report.txt: Output/%.llvm.bc $(LGCCAS) @echo > $@ @echo '$(LGCCAS) Output/$*.linked.rll -o/dev/null $(TIMEOPT) >> $@ 2>&1' - @if ($(LGCCAS) Output/$*.linked.rll -o /dev/null $(TIMEOPT) >> $@ 2>&1)\ + @-if ($(LGCCAS) Output/$*.linked.rll -o /dev/null $(TIMEOPT) >> $@ 2>&1)\ ;then \ echo "TEST-PASS: compile $(RELDIR)/$*" >> $@;\ echo -n "TEST-RESULT-compile: " >> $@;\ @@ -52,7 +52,7 @@ Output/%.nightly.llc.report.txt: Output/%.llvm.bc $(LLC) @echo > $@ @echo 'time -p $(LLC) -f $(TIMEOPT) $< -o /dev/null) > $@ 2>&1' - @if (time -p $(LLC) -f $(TIMEOPT) $< -o /dev/null) >> $@ 2>&1; then \ + @-if (time -p $(LLC) -f $(TIMEOPT) $< -o /dev/null) >> $@ 2>&1; then \ echo "TEST-PASS: llc $(RELDIR)/$*" >> $@;\ echo -n "TEST-RESULT-llc: " >> $@;\ grep "Total Execution Time" $@.info >> $@;\ @@ -70,7 +70,7 @@ Output/%.nightly.cbe.report.txt: Output/%.llvm.bc Output/%.exe-cbe $(LDIS) @echo > $@ -head -n 100 Output/$*.exe-cbe >> $@ - @if test -f Output/$*.exe-cbe; then \ + @-if test -f Output/$*.exe-cbe; then \ echo "TEST-PASS: cbe $(RELDIR)/$*" >> $@;\ echo "TEST-RESULT-cbe: YES" >> $@;\ echo -n "TEST-RESULT-cbe-time: " >> $@;\ @@ -85,7 +85,7 @@ Output/%.nightly.jit.report.txt: Output/%.llvm.bc Output/%.exe-jit $(LLI) @echo > $@ -head -n 100 Output/$*.exe-jit >> $@ - @if test -f Output/$*.exe-jit; then \ + @-if test -f Output/$*.exe-jit; then \ echo "TEST-PASS: jit $(RELDIR)/$*" >> $@;\ echo -n "TEST-RESULT-jit-time: " >> $@;\ grep "^real" $(INFO_PREFIX)jit.time >> $@;\ @@ -113,6 +113,6 @@ @echo "---------------------------------------------------------------" @echo ">>> ========= '$(RELDIR)/$*' Program" @echo "---------------------------------------------------------------" - @cat $< + @-cat $< REPORT_DEPENDENCIES := $(LDIS) $(LLI) $(LLC) From gaeke at cs.uiuc.edu Wed Jun 25 13:02:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Jun 25 13:02:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/Printer.cpp Message-ID: <200306251801.NAA01699@neo.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: Printer.cpp updated: 1.37 -> 1.38 --- Log message: First draft of X86 LLC backend. This should be OK for small programs like Shootout, but it has some issues with bigger programs. Work in progress. --- Diffs of the changes: Index: llvm/lib/Target/X86/Printer.cpp diff -u llvm/lib/Target/X86/Printer.cpp:1.37 llvm/lib/Target/X86/Printer.cpp:1.38 --- llvm/lib/Target/X86/Printer.cpp:1.37 Thu Jun 19 14:58:32 2003 +++ llvm/lib/Target/X86/Printer.cpp Wed Jun 25 13:01:07 2003 @@ -14,24 +14,37 @@ #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineInstr.h" #include "Support/Statistic.h" +#include "Support/hash_map" +#include "llvm/Type.h" +#include "llvm/Constants.h" +#include "llvm/Assembly/Writer.h" +#include "llvm/DerivedTypes.h" +#include "llvm/SlotCalculator.h" +#include "Support/StringExtras.h" +#include "llvm/Module.h" namespace { struct Printer : public MachineFunctionPass { std::ostream &O; unsigned ConstIdx; Printer(std::ostream &o) : O(o), ConstIdx(0) {} + const TargetData *TD; virtual const char *getPassName() const { return "X86 Assembly Printer"; } - void printConstantPool(MachineConstantPool *MCP, const TargetData &TD); - bool runOnMachineFunction(MachineFunction &F); - + void printConstantPool(MachineConstantPool *MCP); + bool runOnMachineFunction(MachineFunction &F); + std::string ConstantExprToString(const ConstantExpr* CE); + std::string valToExprString(const Value* V); bool doInitialization(Module &M); bool doFinalization(Module &M); - + void PrintZeroBytesToPad(int numBytes); + void printConstantValueOnly(const Constant* CV, int numPadBytesAfter = 0); + void printSingleConstantValue(const Constant* CV); }; + std::map NumberForBB; } /// createX86CodePrinterPass - Print out the specified machine code function to @@ -42,31 +55,317 @@ return new Printer(O); } +// valToExprString - Helper function for ConstantExprToString(). +// Appends result to argument string S. +// +std::string Printer::valToExprString(const Value* V) { + std::string S; + bool failed = false; + if (const Constant* CV = dyn_cast(V)) { // symbolic or known + if (const ConstantBool *CB = dyn_cast(CV)) + S += std::string(CB == ConstantBool::True ? "1" : "0"); + else if (const ConstantSInt *CI = dyn_cast(CV)) + S += itostr(CI->getValue()); + else if (const ConstantUInt *CI = dyn_cast(CV)) + S += utostr(CI->getValue()); + else if (const ConstantFP *CFP = dyn_cast(CV)) + S += ftostr(CFP->getValue()); + else if (isa(CV)) + S += "0"; + else if (const ConstantPointerRef *CPR = dyn_cast(CV)) + S += valToExprString(CPR->getValue()); + else if (const ConstantExpr *CE = dyn_cast(CV)) + S += ConstantExprToString(CE); + else + failed = true; + } else if (const GlobalValue* GV = dyn_cast(V)) { + // S += getID(GV); + assert (0 && "getID not implemented"); + } + else + failed = true; + + if (failed) { + assert(0 && "Cannot convert value to string"); + S += ""; + } + return S; +} + +// ConstantExprToString() - Convert a ConstantExpr to an asm expression +// and return this as a string. +std::string Printer::ConstantExprToString(const ConstantExpr* CE) { + std::string S; + switch(CE->getOpcode()) { + case Instruction::GetElementPtr: + { // generate a symbolic expression for the byte address + const Value* ptrVal = CE->getOperand(0); + std::vector idxVec(CE->op_begin()+1, CE->op_end()); + S += "(" + valToExprString(ptrVal) + ") + (" + + utostr(TD->getIndexedOffset(ptrVal->getType(),idxVec)) + ")"; + break; + } + + case Instruction::Cast: + // Support only non-converting casts for now, i.e., a no-op. + // This assertion is not a complete check. + assert(TD->getTypeSize(CE->getType()) == + TD->getTypeSize(CE->getOperand(0)->getType())); + S += "(" + valToExprString(CE->getOperand(0)) + ")"; + break; + + case Instruction::Add: + S += "(" + valToExprString(CE->getOperand(0)) + ") + (" + + valToExprString(CE->getOperand(1)) + ")"; + break; + + default: + assert(0 && "Unsupported operator in ConstantExprToString()"); + break; + } + + return S; +} + +// Print a single constant value. +void +Printer::printSingleConstantValue(const Constant* CV) +{ + assert(CV->getType() != Type::VoidTy && + CV->getType() != Type::TypeTy && + CV->getType() != Type::LabelTy && + "Unexpected type for Constant"); + + assert((!isa(CV) && ! isa(CV)) + && "Aggregate types should be handled outside this function"); + + const Type *type = CV->getType(); + O << "\t"; + switch(type->getPrimitiveID()) + { + case Type::BoolTyID: case Type::UByteTyID: case Type::SByteTyID: + O << ".byte"; + break; + case Type::UShortTyID: case Type::ShortTyID: + O << ".word"; + break; + case Type::UIntTyID: case Type::IntTyID: case Type::PointerTyID: + O << ".long"; + break; + case Type::ULongTyID: case Type::LongTyID: + O << ".quad"; + break; + case Type::FloatTyID: + O << ".long"; + break; + case Type::DoubleTyID: + O << ".quad"; + break; + case Type::ArrayTyID: + if ((cast(type)->getElementType() == Type::UByteTy) || + (cast(type)->getElementType() == Type::SByteTy)) + O << ".string"; + else + assert (0 && "Can't handle printing this type of array"); + break; + default: + assert (0 && "Can't handle printing this type of thing"); + break; + } + O << "\t"; + + if (type->isPrimitiveType()) + { + if (type->isFloatingPoint()) { + // FP Constants are printed as integer constants to avoid losing + // precision... + double Val = cast(CV)->getValue(); + if (type == Type::FloatTy) { + float FVal = (float)Val; + char *ProxyPtr = (char*)&FVal; // Abide by C TBAA rules + O << *(unsigned int*)ProxyPtr; + } else if (type == Type::DoubleTy) { + char *ProxyPtr = (char*)&Val; // Abide by C TBAA rules + O << *(uint64_t*)ProxyPtr; + } else { + assert(0 && "Unknown floating point type!"); + } + + O << "\t# " << type->getDescription() << " value: " << Val << "\n"; + } else { + WriteAsOperand(O, CV, false, false) << "\n"; + } + } + else if (const ConstantPointerRef* CPR = dyn_cast(CV)) + { + // This is a constant address for a global variable or method. + // Use the name of the variable or method as the address value. + // O << getID(CPR->getValue()) << "\n"; + assert (0 && "getID not implemented"); + + } + else if (isa(CV)) + { + // Null pointer value + O << "0\n"; + } + else if (const ConstantExpr* CE = dyn_cast(CV)) + { + // Constant expression built from operators, constants, and + // symbolic addrs + O << ConstantExprToString(CE) << "\n"; + } + else + { + assert(0 && "Unknown elementary type for constant"); + } +} + +// Can we treat the specified array as a string? Only if it is an array of +// ubytes or non-negative sbytes. +// +static bool isStringCompatible(const ConstantArray *CVA) { + const Type *ETy = cast(CVA->getType())->getElementType(); + if (ETy == Type::UByteTy) return true; + if (ETy != Type::SByteTy) return false; + + for (unsigned i = 0; i < CVA->getNumOperands(); ++i) + if (cast(CVA->getOperand(i))->getValue() < 0) + return false; + + return true; +} + +// toOctal - Convert the low order bits of X into an octal letter +static inline char toOctal(int X) { + return (X&7)+'0'; +} + +// getAsCString - Return the specified array as a C compatible string, only if +// the predicate isStringCompatible is true. +// +static std::string getAsCString(const ConstantArray *CVA) { + assert(isStringCompatible(CVA) && "Array is not string compatible!"); + + std::string Result; + const Type *ETy = cast(CVA->getType())->getElementType(); + Result = "\""; + for (unsigned i = 0; i < CVA->getNumOperands(); ++i) { + unsigned char C = (ETy == Type::SByteTy) ? + (unsigned char)cast(CVA->getOperand(i))->getValue() : + (unsigned char)cast(CVA->getOperand(i))->getValue(); + + if (C == '"') { + Result += "\\\""; + } else if (C == '\\') { + Result += "\\\\"; + } else if (isprint(C)) { + Result += C; + } else { + switch(C) { + case '\a': Result += "\\a"; break; + case '\b': Result += "\\b"; break; + case '\f': Result += "\\f"; break; + case '\n': Result += "\\n"; break; + case '\r': Result += "\\r"; break; + case '\t': Result += "\\t"; break; + case '\v': Result += "\\v"; break; + default: + Result += '\\'; + Result += toOctal(C >> 6); + Result += toOctal(C >> 3); + Result += toOctal(C >> 0); + break; + } + } + } + Result += "\""; + return Result; +} + +// Print a constant value or values (it may be an aggregate). +// Uses printSingleConstantValue() to print each individual value. +void +Printer::printConstantValueOnly(const Constant* CV, + int numPadBytesAfter /* = 0 */) +{ + const ConstantArray *CVA = dyn_cast(CV); + + if (CVA && isStringCompatible(CVA)) + { // print the string alone and return + O << "\t" << ".string" << "\t" << getAsCString(CVA) << "\n"; + } + else if (CVA) + { // Not a string. Print the values in successive locations + const std::vector &constValues = CVA->getValues(); + for (unsigned i=0; i < constValues.size(); i++) + printConstantValueOnly(cast(constValues[i].get())); + } + else if (const ConstantStruct *CVS = dyn_cast(CV)) + { // Print the fields in successive locations. Pad to align if needed! + const StructLayout *cvsLayout = + TD->getStructLayout(CVS->getType()); + const std::vector& constValues = CVS->getValues(); + unsigned sizeSoFar = 0; + for (unsigned i=0, N = constValues.size(); i < N; i++) + { + const Constant* field = cast(constValues[i].get()); + + // Check if padding is needed and insert one or more 0s. + unsigned fieldSize = TD->getTypeSize(field->getType()); + int padSize = ((i == N-1? cvsLayout->StructSize + : cvsLayout->MemberOffsets[i+1]) + - cvsLayout->MemberOffsets[i]) - fieldSize; + sizeSoFar += (fieldSize + padSize); + + // Now print the actual field value + printConstantValueOnly(field, padSize); + } + assert(sizeSoFar == cvsLayout->StructSize && + "Layout of constant struct may be incorrect!"); + } + else + printSingleConstantValue(CV); + + if (numPadBytesAfter) { + unsigned numBytes = numPadBytesAfter; + for ( ; numBytes >= 8; numBytes -= 8) + printSingleConstantValue(Constant::getNullValue(Type::ULongTy)); + if (numBytes >= 4) + { + printSingleConstantValue(Constant::getNullValue(Type::UIntTy)); + numBytes -= 4; + } + while (numBytes--) + printSingleConstantValue(Constant::getNullValue(Type::UByteTy)); + } +} // printConstantPool - Print out any constants which have been spilled to // memory... -void Printer::printConstantPool(MachineConstantPool *MCP, const TargetData &TD){ +void Printer::printConstantPool(MachineConstantPool *MCP){ const std::vector &CP = MCP->getConstants(); if (CP.empty()) return; for (unsigned i = 0, e = CP.size(); i != e; ++i) { O << "\t.section .rodata\n"; - O << "\t.align " << (unsigned)TD.getTypeAlignment(CP[i]->getType()) << "\n"; + O << "\t.align " << (unsigned)TD->getTypeAlignment(CP[i]->getType()) << "\n"; O << ".CPI" << i+ConstIdx << ":\t\t\t\t\t#" << *CP[i] << "\n"; - O << "\t*Constant output not implemented yet!*\n\n"; + printConstantValueOnly (CP[i]); } ConstIdx += CP.size(); // Don't recycle constant pool index numbers } -/// runOnFunction - This uses the X86InstructionInfo::print method +/// runOnMachineFunction - This uses the X86InstructionInfo::print method /// to print assembly for each instruction. bool Printer::runOnMachineFunction(MachineFunction &MF) { static unsigned BBNumber = 0; const TargetMachine &TM = MF.getTarget(); const TargetInstrInfo &TII = TM.getInstrInfo(); + TD = &TM.getTargetData(); // Print out constants referenced by the function - printConstantPool(MF.getConstantPool(), TM.getTargetData()); + printConstantPool(MF.getConstantPool()); // Print out labels for the function. O << "\t.text\n"; @@ -75,11 +374,18 @@ O << "\t.type\t" << MF.getFunction()->getName() << ", @function\n"; O << MF.getFunction()->getName() << ":\n"; + NumberForBB.clear(); + for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); + I != E; ++I) { + NumberForBB[I->getBasicBlock()] = BBNumber++; + } + // Print out code for the function. for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); I != E; ++I) { // Print a label for the basic block. - O << ".BB" << BBNumber++ << ":\n"; + O << ".BB" << NumberForBB[I->getBasicBlock()] << ":\t# " + << I->getBasicBlock()->getName() << "\n"; for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end(); II != E; ++II) { // Print the assembly for the instruction. @@ -94,20 +400,20 @@ static bool isScale(const MachineOperand &MO) { return MO.isImmediate() && - (MO.getImmedValue() == 1 || MO.getImmedValue() == 2 || - MO.getImmedValue() == 4 || MO.getImmedValue() == 8); + (MO.getImmedValue() == 1 || MO.getImmedValue() == 2 || + MO.getImmedValue() == 4 || MO.getImmedValue() == 8); } static bool isMem(const MachineInstr *MI, unsigned Op) { if (MI->getOperand(Op).isFrameIndex()) return true; if (MI->getOperand(Op).isConstantPoolIndex()) return true; return Op+4 <= MI->getNumOperands() && - MI->getOperand(Op ).isRegister() &&isScale(MI->getOperand(Op+1)) && - MI->getOperand(Op+2).isRegister() &&MI->getOperand(Op+3).isImmediate(); + MI->getOperand(Op ).isRegister() &&isScale(MI->getOperand(Op+1)) && + MI->getOperand(Op+2).isRegister() &&MI->getOperand(Op+3).isImmediate(); } static void printOp(std::ostream &O, const MachineOperand &MO, - const MRegisterInfo &RI) { + const MRegisterInfo &RI, bool elideOffsetKeyword = false) { switch (MO.getType()) { case MachineOperand::MO_VirtualRegister: if (Value *V = MO.getVRegValueOrNull()) { @@ -127,29 +433,30 @@ O << (int)MO.getImmedValue(); return; case MachineOperand::MO_PCRelativeDisp: - O << MO.getVRegValue()->getName(); + O << ".BB" << NumberForBB[MO.getVRegValue()] << " # PC rel: " + << MO.getVRegValue()->getName(); return; case MachineOperand::MO_GlobalAddress: - O << MO.getGlobal()->getName(); + if (!elideOffsetKeyword) O << "OFFSET "; O << MO.getGlobal()->getName(); return; case MachineOperand::MO_ExternalSymbol: O << MO.getSymbolName(); return; default: - O << ""; return; + O << ""; return; } } static const std::string sizePtr(const TargetInstrDescriptor &Desc) { switch (Desc.TSFlags & X86II::ArgMask) { - default: assert(0 && "Unknown arg size!"); - case X86II::Arg8: return "BYTE PTR"; - case X86II::Arg16: return "WORD PTR"; - case X86II::Arg32: return "DWORD PTR"; - case X86II::Arg64: return "QWORD PTR"; - case X86II::ArgF32: return "DWORD PTR"; - case X86II::ArgF64: return "QWORD PTR"; - case X86II::ArgF80: return "XWORD PTR"; + default: assert(0 && "Unknown arg size!"); + case X86II::Arg8: return "BYTE PTR"; + case X86II::Arg16: return "WORD PTR"; + case X86II::Arg32: return "DWORD PTR"; + case X86II::Arg64: return "QWORD PTR"; + case X86II::ArgF32: return "DWORD PTR"; + case X86II::ArgF64: return "QWORD PTR"; + case X86II::ArgF80: return "XWORD PTR"; } } @@ -264,7 +571,7 @@ O << getName(MI->getOpcode()) << " "; if (MI->getNumOperands() == 1) { - printOp(O, MI->getOperand(0), RI); + printOp(O, MI->getOperand(0), RI, true); // Don't print "OFFSET"... } O << "\n"; return; @@ -417,7 +724,7 @@ MI->getOperand(1).isRegister() || MI->getOperand(1).isImmediate())&& "Bad MRMSxR format!"); assert((MI->getNumOperands() < 3 || - (MI->getOperand(1).isRegister() && MI->getOperand(2).isImmediate())) && + (MI->getOperand(1).isRegister() && MI->getOperand(2).isImmediate())) && "Bad MRMSxR format!"); if (MI->getNumOperands() > 1 && MI->getOperand(1).isRegister() && @@ -476,7 +783,24 @@ bool Printer::doFinalization(Module &M) { - // FIXME: We may have to print out constants here. + // Print out module-level global variables here. + for (Module::const_giterator I = M.gbegin(), E = M.gend(); I != E; ++I) { + if (I->hasInitializer()) { + Constant *C = I->getInitializer(); + O << "\t.data\n"; + O << "\t.globl " << I->getName() << "\n"; + O << "\t.type " << I->getName() << ", at object\n"; + O << "\t.size " << I->getName() << "," + << (unsigned)TD->getTypeSize(I->getType()) << "\n"; + O << "\t.align " << (unsigned)TD->getTypeAlignment(C->getType()) << "\n"; + O << I->getName() << ":\t\t\t\t\t#" << *C << "\n"; + printConstantValueOnly (C); + } else { + O << "\t.globl " << I->getName() << "\n"; + O << "\t.comm " << I->getName() << ", " + << (unsigned)TD->getTypeSize(I->getType()) << ", " + << (unsigned)TD->getTypeAlignment(I->getType()) << "\n"; + } + } return false; // success } - From criswell at choi.cs.uiuc.edu Wed Jun 25 13:44:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Wed Jun 25 13:44:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200306251843.h5PIhho20924@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.88.2.3 -> 1.88.2.4 --- Log message: Fixed the rules for linking optimized tools. We were orignally linking against some profile libraries, but now we link against the optimized libraries. --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.88.2.3 llvm/Makefile.common:1.88.2.4 --- llvm/Makefile.common:1.88.2.3 Tue Jun 24 15:36:04 2003 +++ llvm/Makefile.common Wed Jun 25 13:43:32 2003 @@ -560,7 +560,7 @@ LLVM_LIBS_OPTIONS_P := $(patsubst %.o, $(LLVMLIBPROFILESOURCE)/%.o,$(LLVM_LIBS_OPTIONS)) LIB_OPTS_G := $(LLVM_LIBS_OPTIONS_G) $(PROJ_LIBS_OPTIONS_G) -LIB_OPTS_O := $(LLVM_LIBS_OPTIONS_O) $(PROJ_LIBS_OPTIONS_P) +LIB_OPTS_O := $(LLVM_LIBS_OPTIONS_O) $(PROJ_LIBS_OPTIONS_O) LIB_OPTS_P := $(LLVM_LIBS_OPTIONS_P) $(PROJ_LIBS_OPTIONS_P) # USED_LIB_PATHS - Compute the path of the libraries used so that tools are From criswell at choi.cs.uiuc.edu Wed Jun 25 16:45:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Wed Jun 25 16:45:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200306252144.h5PLiJT31190@choi.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.12 -> 1.12.2.1 --- Log message: Added a requirements section so that people know what hardware and software they will need. Made more changes to reflect the new autoconf stuff. --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.12 llvm/www/docs/GettingStarted.html:1.12.2.1 --- llvm/www/docs/GettingStarted.html:1.12 Sun Jun 8 10:33:25 2003 +++ llvm/www/docs/GettingStarted.html Wed Jun 25 16:44:08 2003 @@ -19,6 +19,7 @@
  • Overview
  • Getting started with LLVM
      +
    1. Requirements
    2. Getting started quickly (a summary)
    3. Checkout LLVM from CVS
    4. Terminology and Notation @@ -66,6 +67,57 @@ + +

      Requirements

      + + + LLVM is known to work on the following platforms: +
        +
      • Linux/x86 +
      • Solaris/Sparc +
      + + Compiling LLVM requires that you have several different software packages + installed: +
        +
      • GCC +

        + The GNU Compiler Collection must be installed with C and C++ language + support. GCC 3.x is supported, although some effort has been made to + support GCC 2.96. +

        + +

        + Note that we currently do not support any other C++ compiler. +

        + +
      • GNU Make +

        + The LLVM build system relies upon GNU make extensions. Therefore, you + will need GNU Make (sometimes known as gmake) to build LLVM. +

        + +
      • Flex and Bison +

        + The LLVM source code is built using flex and bison. You will not be + able to configure and compile LLVM without them. +

        +
      + +

      + There are some additional tools that you may want to have when working with + LLVM: +

      + +
        +
      • GNU Autoconf and GNU M4 +

        + If you want to make changes to the autoconf scripts which configure LLVM + for compilation, you will need GNU autoconf, and consequently, GNU M4. + LLVM was built with autoconf 2.53, so that release and any later + releases should work. +

        +

      Getting Started Quickly (A Summary)

      @@ -77,9 +129,17 @@
    5. cd where-you-want-llvm-to-live
    6. cvs -d CVSROOTDIR checkout llvm
    7. cd llvm -
    8. Edit Makefile.config to set local paths. This includes - setting the install location of the C frontend, and the various paths - to the C and C++ compilers used to build LLVM itself. +
    9. Run configure to configure the Makefiles and header files. + Useful options include: +
        +
      • --with-objroot=directory +
        + Specifiy where object files should be placed during the build. + +
      • --with-llvmgccdir=directory +
        + Specifiy where the LLVM C frontend has been installed. +
    10. Set your LLVM_LIB_SEARCH_PATH environment variable.
    11. gmake -k |& tee gnumake.out    # this is csh or tcsh syntax @@ -95,10 +155,10 @@

      Terminology and Notation

      -

      Through this manual, the following names are used to denote paths +

      Throughout this manual, the following names are used to denote paths specific to the local system and working environment. These are not - environment variables you need to set, but just strings used in the rest - of this document below.. In any of the examples below, simply replace + environment variables you need to set but just strings used in the rest + of this document below. In any of the examples below, simply replace each of these names with the appropriate pathname on your local system. All these paths are absolute:

        @@ -109,7 +169,7 @@

        Before checking out the source code, you will need to know the path to - CVS repository containing LLVM source code (we'll call this + the CVS repository containing the LLVM source code (we'll call this CVSROOTDIR below). Ask the person responsible for your local LLVM installation to give you this path. @@ -128,46 +188,71 @@

        Local Configuration Options

        -

        The file llvm/Makefile.config - defines the following path variables, - which are specific to a particular installation of LLVM. - These should need to be modified only once after checking out a copy - of LLVM (if the default values do not already match your system): +

        Once checked out from the CVS repository, options and pathnames specific + to an installation of LLVM can be set via the configure script. + This script sets variables in llvm/Makefile.config and + llvm/include/Config/config.h. + +

        + The following environment variables are used by configure to + configure Makefile.config: +

          -

        • CXX = Path to C++ compiler to use. -

        • LLVM_OBJ_DIR = Path to the llvm directory where - object files should be placed. - (See the Section on - The location for LLVM object files - for more information.) -

        • LLVMGCCDIR = Path to the location of the LLVM front-end - binaries and associated libraries. -

        • PURIFY = Path to the purify program. +

        • CXX = Pathname of the C++ compiler to use. +

        • CC = Pathname of the C compiler to use.
        - In addition to settings in this file, you must set a + The following options can be used to set or enable LLVM specific options: + +
          +

        • --with-objroot=LLVM_OBJ_ROOT = + Path to the directory where + object files, libraries, and executables should be placed. + (See the Section on + The location for LLVM object files + for more information.) +

        • --with-llvmgccdir=LLVMGCCDIR = + Path to the location of the LLVM front-end + binaries and associated libraries. +

        • --enable-optimized = + Enables optimized compilation (debugging symbols are removed and GCC + optimization flags are enabled). +

        • --enable-profiling = + Enables profiling compilation (compiler flags needed to add profiling + data are enabled). +

        • --enable-verbose = + Enables verbose messages during the compile. +

        • --enable-jit = + Compile the Just In Time (JIT) functionality. This is not available + on all platforms. +
        + + In addition to running configure, you must set the LLVM_LIB_SEARCH_PATH environment variable in your startup scripts. This environment variable is used to locate "system" libraries like "-lc" and "-lm" when linking. This variable should be set to the absolute path for the bytecode-libs subdirectory of the C front-end - install. For example, + install. For example, LLVM_LIB_SEARCH_PATH is set to /home/vadve/lattner/local/x86/llvm-gcc/bytecode-libs for the X86 - version of the C front-end, on our research machines.

        + version of the C front-end on our research machines.

        The location for LLVM object files

        The LLVM make system sends most output files generated during the build - into the directory defined by the variable LLVM_OBJ_DIR in + into the directory defined by the variable OBJ_ROOT in llvm/Makefile.config. This can be either just your normal LLVM source tree or some other directory writable by you. You may wish to put object files on a different filesystem either to keep them from being backed up or to speed up local builds. -

        If you do not wish to use a different location for object files (building - into the source tree directly), just set this variable to ".".

        +

        If you wish to place output files into a separate directory, use the + --with-objroot=directory option of configure to + set the top level directory of where the object files will go. Otherwise, + leave this option unspecified, and configure will place files + within the LLVM source tree.

        Setting up your environment

        @@ -185,13 +270,13 @@ alias llvmgcc LLVMGCCDIR/bin/llvm-gcc # Make the LLVM tools easy to use... - setenv PATH LLVM_OBJ_DIR/llvm/tools/Debug:${PATH} + setenv PATH OBJ_ROOT/llvm/tools/Debug:${PATH} The llvmgcc alias is useful because the C compiler is not included in the CVS tree you just checked out. - +

        The other LLVM tools are part of the LLVM - source base, and built when compiling LLVM. They will be built into the + source base and are built when compiling LLVM. They will be built into the LLVM_OBJ_DIR/tools/Debug directory.

        @@ -199,13 +284,14 @@

        Every directory in the LLVM source tree includes a Makefile to - build it, and any subdirectories that it contains. These makefiles require + build it and any subdirectories that it contains. These makefiles require that you use gmake, instead of make to build them, but can otherwise be used freely. To build the entire LLVM system, just enter the top level llvm directory and type gmake. A few minutes later you will hopefully have a freshly compiled toolchain waiting for you - in llvm/tools/Debug. If you want to look at the libraries that - were compiled, look in llvm/lib/Debug.

        + in OBJ_ROOT/llvm/tools/Debug. If you want to look at the + libraries that + were compiled, look in OBJ_ROOT/llvm/lib/Debug.

        If you get an error talking about a /localhome directory, follow the instructions in the section about Setting Up Your @@ -238,8 +324,10 @@ directories - If you are building with the "BUILD_ROOT=." option enabled in the - Makefile.common file, most source directories will contain two + If you are building with the "OBJ_ROOT=." option enabled in the + Makefile.config file (i.e. you did not specify + --with-objroot when you ran configure), most source + directories will contain two directories, Depend and Debug. The Depend directory contains automatically generated dependance files which are used during compilation to make sure that source files get rebuilt if a header @@ -247,7 +335,7 @@ files, library files and executables that are used for building a debug enabled build. The Release directory is created to hold the same files when the ENABLE_OPTIMIZED=1 flag is passed to gmake, - causing an optimized built to be performed.

        + causing an optimized build to be performed.

        @@ -255,7 +343,7 @@ This directory contains public header files exported from the LLVM - library. The two main subdirectories of this directory are:

        + library. The three main subdirectories of this directory are:

        1. llvm/include/llvm - This directory contains all of the LLVM @@ -267,13 +355,20 @@ support libraries that are independant of LLVM, but are used by LLVM. For example, some C++ STL utilities and a Command Line option processing library. + +
        2. llvm/include/Config - This directory contains header files + configured by the configure script. They wrap "standard" UNIX + and C header files. Source code can include these header files which + automatically take care of the conditional #includes that the configure + script generates.

        llvm/lib

        - This directory contains most source files of LLVM system. In LLVM almost all + This directory contains most of the source files of the LLVM system. In + LLVM almost all code exists in libraries, making it very easy to share code among the different tools.

        @@ -362,7 +457,7 @@

        gccas
        This tool is invoked by the llvmgcc frontend as the "assembler" part of the compiler. This tool actually assembles LLVM assembly to LLVM bytecode, - performs a variety of optimizations, + performs a variety of optimizations, and outputs LLVM bytecode. Thus when you invoke llvmgcc -c x.c -o x.o, you are causing gccas to be run, which writes the x.o file (which is an LLVM bytecode file that can be From gaeke at cs.uiuc.edu Wed Jun 25 17:01:03 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Jun 25 17:01:03 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/Printer.cpp Message-ID: <200306252200.RAA04405@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: Printer.cpp updated: 1.38 -> 1.39 --- Log message: Integrate the C writer's name mangler. --- Diffs of the changes: Index: llvm/lib/Target/X86/Printer.cpp diff -u llvm/lib/Target/X86/Printer.cpp:1.38 llvm/lib/Target/X86/Printer.cpp:1.39 --- llvm/lib/Target/X86/Printer.cpp:1.38 Wed Jun 25 13:01:07 2003 +++ llvm/lib/Target/X86/Printer.cpp Wed Jun 25 17:00:39 2003 @@ -24,7 +24,11 @@ #include "llvm/Module.h" namespace { + + + std::set MangledGlobals; struct Printer : public MachineFunctionPass { + std::ostream &O; unsigned ConstIdx; Printer(std::ostream &o) : O(o), ConstIdx(0) {} @@ -55,6 +59,49 @@ return new Printer(O); } +// We dont want identifier names with ., space, - in them. +// So we replace them with _ +static std::string makeNameProper(std::string x) { + std::string tmp; + for (std::string::iterator sI = x.begin(), sEnd = x.end(); sI != sEnd; sI++) + switch (*sI) { + case '.': tmp += "d_"; break; + case ' ': tmp += "s_"; break; + case '-': tmp += "D_"; break; + default: tmp += *sI; + } + + return tmp; +} + +std::string getValueName(const Value *V) { + if (V->hasName()) { // Print out the label if it exists... + + // Name mangling occurs as follows: + // - If V is not a global, mangling always occurs. + // - Otherwise, mangling occurs when any of the following are true: + // 1) V has internal linkage + // 2) V's name would collide if it is not mangled. + // + + if(const GlobalValue* gv = dyn_cast(V)) { + if(!gv->hasInternalLinkage() && !MangledGlobals.count(gv)) { + // No internal linkage, name will not collide -> no mangling. + return makeNameProper(gv->getName()); + } + } + + // Non-global, or global with internal linkage / colliding name -> mangle. + return "l" + utostr(V->getType()->getUniqueID()) + "_" + + makeNameProper(V->getName()); + } + + static int Count = 0; + Count++; + return "ltmp_" + itostr(Count) + "_" + utostr(V->getType()->getUniqueID()); +} + + // valToExprString - Helper function for ConstantExprToString(). // Appends result to argument string S. // @@ -79,8 +126,7 @@ else failed = true; } else if (const GlobalValue* GV = dyn_cast(V)) { - // S += getID(GV); - assert (0 && "getID not implemented"); + S += getValueName(GV); } else failed = true; @@ -200,9 +246,7 @@ { // This is a constant address for a global variable or method. // Use the name of the variable or method as the address value. - // O << getID(CPR->getValue()) << "\n"; - assert (0 && "getID not implemented"); - + O << getValueName(CPR->getValue()) << "\n"; } else if (isa(CV)) { @@ -370,9 +414,9 @@ // Print out labels for the function. O << "\t.text\n"; O << "\t.align 16\n"; - O << "\t.globl\t" << MF.getFunction()->getName() << "\n"; - O << "\t.type\t" << MF.getFunction()->getName() << ", @function\n"; - O << MF.getFunction()->getName() << ":\n"; + O << "\t.globl\t" << getValueName(MF.getFunction()) << "\n"; + O << "\t.type\t" << getValueName(MF.getFunction()) << ", @function\n"; + O << getValueName(MF.getFunction()) << ":\n"; NumberForBB.clear(); for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); @@ -437,7 +481,7 @@ << MO.getVRegValue()->getName(); return; case MachineOperand::MO_GlobalAddress: - if (!elideOffsetKeyword) O << "OFFSET "; O << MO.getGlobal()->getName(); + if (!elideOffsetKeyword) O << "OFFSET "; O << getValueName(MO.getGlobal()); return; case MachineOperand::MO_ExternalSymbol: O << MO.getSymbolName(); @@ -778,6 +822,27 @@ // Tell gas we are outputting Intel syntax (not AT&T syntax) assembly, // with no % decorations on register names. O << "\t.intel_syntax noprefix\n"; + + // Ripped from CWriter: + // Calculate which global values have names that will collide when we throw + // away type information. + { // Scope to delete the FoundNames set when we are done with it... + std::set FoundNames; + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) + if (I->hasName()) // If the global has a name... + if (FoundNames.count(I->getName())) // And the name is already used + MangledGlobals.insert(I); // Mangle the name + else + FoundNames.insert(I->getName()); // Otherwise, keep track of name + + for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I) + if (I->hasName()) // If the global has a name... + if (FoundNames.count(I->getName())) // And the name is already used + MangledGlobals.insert(I); // Mangle the name + else + FoundNames.insert(I->getName()); // Otherwise, keep track of name + } + return false; // success } @@ -785,22 +850,24 @@ { // Print out module-level global variables here. for (Module::const_giterator I = M.gbegin(), E = M.gend(); I != E; ++I) { + std::string name(getValueName(I)); if (I->hasInitializer()) { Constant *C = I->getInitializer(); O << "\t.data\n"; - O << "\t.globl " << I->getName() << "\n"; - O << "\t.type " << I->getName() << ", at object\n"; - O << "\t.size " << I->getName() << "," + O << "\t.globl " << name << "\n"; + O << "\t.type " << name << ", at object\n"; + O << "\t.size " << name << "," << (unsigned)TD->getTypeSize(I->getType()) << "\n"; O << "\t.align " << (unsigned)TD->getTypeAlignment(C->getType()) << "\n"; - O << I->getName() << ":\t\t\t\t\t#" << *C << "\n"; + O << name << ":\t\t\t\t\t#" << *C << "\n"; printConstantValueOnly (C); } else { - O << "\t.globl " << I->getName() << "\n"; - O << "\t.comm " << I->getName() << ", " + O << "\t.globl " << name << "\n"; + O << "\t.comm " << name << ", " << (unsigned)TD->getTypeSize(I->getType()) << ", " << (unsigned)TD->getTypeAlignment(I->getType()) << "\n"; } } + MangledGlobals.clear(); return false; // success } From lattner at cs.uiuc.edu Wed Jun 25 23:21:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 25 23:21:00 2003 Subject: [llvm-commits] CVS: llvm/test/Libraries/crtend/crtend.c Message-ID: <200306260420.XAA13390@apoc.cs.uiuc.edu> Changes in directory llvm/test/Libraries/crtend: crtend.c updated: 1.1 -> 1.2 --- Log message: Don't register the destructors if the list is empty --- Diffs of the changes: Index: llvm/test/Libraries/crtend/crtend.c diff -u llvm/test/Libraries/crtend/crtend.c:1.1 llvm/test/Libraries/crtend/crtend.c:1.2 --- llvm/test/Libraries/crtend/crtend.c:1.1 Wed May 14 08:09:41 2003 +++ llvm/test/Libraries/crtend/crtend.c Wed Jun 25 23:20:38 2003 @@ -34,8 +34,12 @@ /* Loop over all of the constructor records, calling each function pointer. */ TorRec *R = __llvm_getGlobalCtors(); - if (atexit(run_destructors)) - abort(); /* Should be able to install ONE atexit handler! */ + /* Only register the global dtor handler if there is at least one global + * dtor! + */ + if (__llvm_getGlobalDtors()[0].FP) + if (atexit(run_destructors)) + abort(); /* Should be able to install ONE atexit handler! */ /* FIXME: This should sort the list by priority! */ for (; R->FP; ++R) From lattner at cs.uiuc.edu Wed Jun 25 23:33:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 25 23:33:00 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/gccld.cpp Message-ID: <200306260432.XAA13730@apoc.cs.uiuc.edu> Changes in directory llvm/tools/gccld: gccld.cpp updated: 1.35 -> 1.36 --- Log message: Move the instcombine pass before globaldce, so that if globals are made dead by instcombine, that they can be deleted. --- Diffs of the changes: Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.35 llvm/tools/gccld/gccld.cpp:1.36 --- llvm/tools/gccld/gccld.cpp:1.35 Thu Jun 19 12:03:51 2003 +++ llvm/tools/gccld/gccld.cpp Wed Jun 25 23:32:31 2003 @@ -400,14 +400,14 @@ // Passes.add(createDeadArgEliminationPass()); - // Now that we have optimized the program, discard unreachable functions... - // - Passes.add(createGlobalDCEPass()); - // The FuncResolve pass may leave cruft around if functions were prototyped // differently than they were defined. Remove this cruft. // Passes.add(createInstructionCombiningPass()); + + // Now that we have optimized the program, discard unreachable functions... + // + Passes.add(createGlobalDCEPass()); // Add the pass that writes bytecode to the output file... std::string RealBytecodeOutput = OutputFilename; From lattner at cs.uiuc.edu Thu Jun 26 00:07:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 26 00:07:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200306260506.AAA14775@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.93 -> 1.94 --- Log message: Add support for elimination of load instruction from global constants --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.93 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.94 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.93 Wed Jun 25 12:09:20 2003 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Jun 26 00:06:25 2003 @@ -22,6 +22,7 @@ #include "llvm/Constants.h" #include "llvm/ConstantHandling.h" #include "llvm/DerivedTypes.h" +#include "llvm/GlobalVariable.h" #include "llvm/Support/InstIterator.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Support/CallSite.h" @@ -79,6 +80,7 @@ Instruction *visitPHINode(PHINode &PN); Instruction *visitGetElementPtrInst(GetElementPtrInst &GEP); Instruction *visitAllocationInst(AllocationInst &AI); + Instruction *visitLoadInst(LoadInst &LI); Instruction *visitBranchInst(BranchInst &BI); // visitInstruction - Specify what to return for unhandled instructions... @@ -1260,6 +1262,52 @@ } return 0; } + +/// GetGEPGlobalInitializer - Given a constant, and a getelementptr +/// constantexpr, return the constant value being addressed by the constant +/// expression, or null if something is funny. +/// +static Constant *GetGEPGlobalInitializer(Constant *C, ConstantExpr *CE) { + if (CE->getOperand(1) != Constant::getNullValue(Type::LongTy)) + return 0; // Do not allow stepping over the value! + + // Loop over all of the operands, tracking down which value we are + // addressing... + for (unsigned i = 2, e = CE->getNumOperands(); i != e; ++i) + if (ConstantUInt *CU = dyn_cast(CE->getOperand(i))) { + ConstantStruct *CS = cast(C); + if (CU->getValue() >= CS->getValues().size()) return 0; + C = cast(CS->getValues()[CU->getValue()]); + } else if (ConstantSInt *CS = dyn_cast(CE->getOperand(i))) { + ConstantArray *CA = cast(C); + if ((uint64_t)CS->getValue() >= CA->getValues().size()) return 0; + C = cast(CA->getValues()[CS->getValue()]); + } else + return 0; + return C; +} + +Instruction *InstCombiner::visitLoadInst(LoadInst &LI) { + Value *Op = LI.getOperand(0); + if (ConstantPointerRef *CPR = dyn_cast(Op)) + Op = CPR->getValue(); + + // Instcombine load (constant global) into the value loaded... + if (GlobalVariable *GV = dyn_cast(Op)) + if (GV->isConstant()) + return ReplaceInstUsesWith(LI, GV->getInitializer()); + + // Instcombine load (constantexpr_GEP global, 0, ...) into the value loaded... + if (ConstantExpr *CE = dyn_cast(Op)) + if (CE->getOpcode() == Instruction::GetElementPtr) + if (ConstantPointerRef *G=dyn_cast(CE->getOperand(0))) + if (GlobalVariable *GV = dyn_cast(G->getValue())) + if (GV->isConstant()) + if (Constant *V = GetGEPGlobalInitializer(GV->getInitializer(), CE)) + return ReplaceInstUsesWith(LI, V); + return 0; +} + Instruction *InstCombiner::visitBranchInst(BranchInst &BI) { // Change br (not X), label True, label False to: br X, label False, True From lattner at cs.uiuc.edu Thu Jun 26 00:07:10 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 26 00:07:10 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/load.ll Message-ID: <200306260506.AAA14731@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: load.ll added (r1.1) --- Log message: add tests for elimination of loads --- Diffs of the changes: Index: llvm/test/Regression/Transforms/InstCombine/load.ll diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/load.ll:1.1 *** /dev/null Thu Jun 26 00:06:01 2003 --- llvm/test/Regression/Transforms/InstCombine/load.ll Thu Jun 26 00:05:51 2003 *************** *** 0 **** --- 1,29 ---- + ; This test makes sure that these instructions are properly eliminated. + ; + + ; RUN: if as < %s | opt -instcombine | dis | grep load + ; RUN: then exit 1 + ; RUN: else exit 0 + ; RUN: fi + + %X = constant int 42 + %Y = constant [2 x { int, float }] [ { int, float } { int 12, float 1.0 }, + { int, float } { int 37, float 1.2312 } ] + int %test1() { + %B = load int* %X + ret int %B + } + + float %test2() { + %A = getelementptr [2 x { int, float}]* %Y, long 0, long 1, ubyte 1 + %B = load float* %A + ret float %B + } + + int %test3() { + %A = getelementptr [2 x { int, float}]* %Y, long 0, long 0, ubyte 0 + %B = load int* %A + ret int %B + } + + From lattner at cs.uiuc.edu Thu Jun 26 00:23:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 26 00:23:01 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ConstantHandling.cpp Message-ID: <200306260522.AAA15542@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ConstantHandling.cpp updated: 1.31 -> 1.32 --- Log message: Implement more aggressive folding of constant GEP instructions --- Diffs of the changes: Index: llvm/lib/VMCore/ConstantHandling.cpp diff -u llvm/lib/VMCore/ConstantHandling.cpp:1.31 llvm/lib/VMCore/ConstantHandling.cpp:1.32 --- llvm/lib/VMCore/ConstantHandling.cpp:1.31 Tue May 27 14:16:07 2003 +++ llvm/lib/VMCore/ConstantHandling.cpp Thu Jun 26 00:22:45 2003 @@ -141,12 +141,30 @@ // FIXME: Implement folding of GEP constant exprs the same as instcombine does - // Implement folding of: - // int* getelementptr ([2 x int]* cast ([3 x int]* %X to [2 x int]*), - // long 0, long 0) - // To: int* getelementptr ([3 x int]* %X, long 0, long 0) - // - if (const ConstantExpr *CE = dyn_cast(C)) + if (const ConstantExpr *CE = dyn_cast(C)) { + // Implement folding of: + // void ()** getelementptr (%struct..TorRec* getelementptr + // ([N x %struct..TorRec]* %llvm.global_dtors, long 0, long 0), + // long 0, ubyte 1) + // Into: + // %struct..TorRec* getelementptr ([N x %struct..TorRec]* + // %llvm.global_dtors, long 0, long 0, ubyte 1) + // + if (CE->getOpcode() == Instruction::GetElementPtr) + if (IdxList[0] == Constant::getNullValue(Type::LongTy)) { + std::vector NewIndices; + NewIndices.reserve(IdxList.size() + CE->getNumOperands()); + for (unsigned i = 1, e = CE->getNumOperands(); i != e; ++i) + NewIndices.push_back(cast(CE->getOperand(i))); + NewIndices.insert(NewIndices.end(), IdxList.begin()+1, IdxList.end()); + return ConstantExpr::getGetElementPtr(CE->getOperand(0), NewIndices); + } + + // Implement folding of: + // int* getelementptr ([2 x int]* cast ([3 x int]* %X to [2 x int]*), + // long 0, long 0) + // To: int* getelementptr ([3 x int]* %X, long 0, long 0) + // if (CE->getOpcode() == Instruction::Cast && IdxList.size() > 1 && IdxList[0]->isNullValue()) if (const PointerType *SPT = @@ -157,6 +175,7 @@ if (CAT->getElementType() == SAT->getElementType()) return ConstantExpr::getGetElementPtr( (Constant*)CE->getOperand(0), IdxList); + } return 0; } From lattner at cs.uiuc.edu Thu Jun 26 00:29:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 26 00:29:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile.programs Message-ID: <200306260528.AAA15987@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile.programs updated: 1.60 -> 1.61 --- Log message: Add dependency on GCCLD --- Diffs of the changes: Index: llvm/test/Programs/Makefile.programs diff -u llvm/test/Programs/Makefile.programs:1.60 llvm/test/Programs/Makefile.programs:1.61 --- llvm/test/Programs/Makefile.programs:1.60 Sun Jun 22 15:21:29 2003 +++ llvm/test/Programs/Makefile.programs Thu Jun 26 00:28:23 2003 @@ -176,10 +176,10 @@ # Link the program to the libraries it uses, then perform postlink # optimization... $(PROGRAMS_TO_TEST:%=Output/%.llvm.bc): \ -Output/%.llvm.bc: Output/%.linked.bc +Output/%.llvm.bc: Output/%.linked.bc $(LGCCLDPROG) $(LGCCLD) $(STATS) $< -lgcc -lc $(LIBS) crtend.o -o Output/$*.llvm $(PROGRAMS_TO_TEST:%=Output/%.llvm): \ -Output/%.llvm: Output/%.linked.bc +Output/%.llvm: Output/%.linked.bc $(LGCCLDPROG) $(LGCCLD) $(STATS) $< -lgcc -lc $(LIBS) crtend.o -o Output/$*.llvm # Rule to get the tracing version of the llvm.bc file for tracing: From lattner at cs.uiuc.edu Thu Jun 26 00:29:08 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 26 00:29:08 2003 Subject: [llvm-commits] CVS: llvm/test/Makefile.tests Message-ID: <200306260528.AAA15879@apoc.cs.uiuc.edu> Changes in directory llvm/test: Makefile.tests updated: 1.65 -> 1.66 --- Log message: New variable which is just the GCCLD tool --- Diffs of the changes: Index: llvm/test/Makefile.tests diff -u llvm/test/Makefile.tests:1.65 llvm/test/Makefile.tests:1.66 --- llvm/test/Makefile.tests:1.65 Wed Jun 18 14:39:06 2003 +++ llvm/test/Makefile.tests Thu Jun 26 00:28:00 2003 @@ -43,6 +43,7 @@ LAS = $(TOOLS)/as LGCCAS = $(TOOLS)/gccas LGCCLD = $(TOOLS)/gccld -L$(LLVMGCCDIR)/lib/gcc-lib/$(LLVMGCCARCH) -L$(LLVMGCCDIR)/lib +LGCCLDPROG = $(TOOLS)/gccld LDIS = $(TOOLS)/dis LOPT = $(TOOLS)/opt LLINK = $(TOOLS)/link From lattner at cs.uiuc.edu Thu Jun 26 00:31:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 26 00:31:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/Internalize.cpp Message-ID: <200306260530.AAA16245@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: Internalize.cpp updated: 1.16 -> 1.17 --- Log message: When internalizing global ctor/dtor list, also mark it constant. This is gross, but until DSA is working all of the time and is totally reliable, we do this. --- Diffs of the changes: Index: llvm/lib/Transforms/IPO/Internalize.cpp diff -u llvm/lib/Transforms/IPO/Internalize.cpp:1.16 llvm/lib/Transforms/IPO/Internalize.cpp:1.17 --- llvm/lib/Transforms/IPO/Internalize.cpp:1.16 Thu May 22 15:27:13 2003 +++ llvm/lib/Transforms/IPO/Internalize.cpp Thu Jun 26 00:30:40 2003 @@ -87,6 +87,14 @@ for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I) if (!I->isExternal() && !I->hasInternalLinkage() && !ExternalNames.count(I->getName())) { + // Special case handling of the global ctor and dtor list. When we + // internalize it, we mark it constant, which allows elimination of + // the list if it's empty. + // + if (I->hasAppendingLinkage() && (I->getName() == "llvm.global_ctors"|| + I->getName() == "llvm.global_dtors")) + I->setConstant(true); + I->setLinkage(GlobalValue::InternalLinkage); Changed = true; ++NumGlobals; From lattner at cs.uiuc.edu Thu Jun 26 00:31:06 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 26 00:31:06 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/gccld.cpp Message-ID: <200306260530.AAA16234@apoc.cs.uiuc.edu> Changes in directory llvm/tools/gccld: gccld.cpp updated: 1.36 -> 1.37 --- Log message: Run the simplify CFG pass after instcombine which has the effect of deleting ALL of the global ctor/dtor stuff if it is not used! --- Diffs of the changes: Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.36 llvm/tools/gccld/gccld.cpp:1.37 --- llvm/tools/gccld/gccld.cpp:1.36 Wed Jun 25 23:32:31 2003 +++ llvm/tools/gccld/gccld.cpp Thu Jun 26 00:29:50 2003 @@ -405,6 +405,10 @@ // Passes.add(createInstructionCombiningPass()); + // Delete basic blocks, which optimization passes may have killed... + // + Passes.add(createCFGSimplificationPass()); + // Now that we have optimized the program, discard unreachable functions... // Passes.add(createGlobalDCEPass()); From lattner at cs.uiuc.edu Thu Jun 26 00:42:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 26 00:42:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalDCE.cpp Message-ID: <200306260541.AAA17393@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: GlobalDCE.cpp updated: 1.23 -> 1.24 --- Log message: Add support to globaldce for deleting dead function prototypes --- Diffs of the changes: Index: llvm/lib/Transforms/IPO/GlobalDCE.cpp diff -u llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.23 llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.24 --- llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.23 Sun Oct 13 12:12:47 2002 +++ llvm/lib/Transforms/IPO/GlobalDCE.cpp Thu Jun 26 00:41:18 2003 @@ -46,12 +46,18 @@ // Nothing to do if no unreachable functions have been found... if (FunctionsToDelete.empty()) return false; - // Unreachables functions have been found and should have no references to + // Unreachable functions have been found and should have no references to // them, delete them now. // for (std::vector::iterator I = FunctionsToDelete.begin(), E = FunctionsToDelete.end(); I != E; ++I) delete CallGraph.removeFunctionFromModule(*I); + + // Walk the function list, removing prototypes for functions which are not + // used. + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) + if (I->use_size() == 0 && I->isExternal()) + delete CallGraph.removeFunctionFromModule(I); return true; } From lattner at cs.uiuc.edu Thu Jun 26 09:57:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 26 09:57:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/C++Frontend/ConstructorDestructorAttributes.c Message-ID: <200306261456.JAA21028@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/C++Frontend: ConstructorDestructorAttributes.c added (r1.1) --- Log message: Add a testcase to ensure that ctor/dtor attributes work in C --- Diffs of the changes: Index: llvm/test/Regression/C++Frontend/ConstructorDestructorAttributes.c diff -c /dev/null llvm/test/Regression/C++Frontend/ConstructorDestructorAttributes.c:1.1 *** /dev/null Thu Jun 26 09:56:47 2003 --- llvm/test/Regression/C++Frontend/ConstructorDestructorAttributes.c Thu Jun 26 09:56:36 2003 *************** *** 0 **** --- 1,14 ---- + #include + + void ctor() __attribute__((constructor)); + + void ctor() { + printf("Create!\n"); + } + void dtor() __attribute__((destructor)); + + void dtor() { + printf("Create!\n"); + } + + int main() { return 0; } From criswell at choi.cs.uiuc.edu Thu Jun 26 10:52:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Thu Jun 26 10:52:01 2003 Subject: [llvm-commits] CVS: llvm/samples/README sample.tar Message-ID: <200306261551.h5QFpcf31919@choi.cs.uiuc.edu> Changes in directory llvm/samples: README added (r1.1.2.1) sample.tar added (r1.1.2.1) --- Log message: Add a sample project tree as a tar archive. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Thu Jun 26 10:52:06 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Thu Jun 26 10:52:06 2003 Subject: [llvm-commits] CVS: llvm/samples/ Message-ID: <200306261551.h5QFpB231900@choi.cs.uiuc.edu> Changes in directory llvm/samples: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/samples added to the repository --> Using per-directory sticky tag `autoconf' --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Thu Jun 26 10:55:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Thu Jun 26 10:55:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200306261554.h5QFs6Z31939@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.88.2.4 -> 1.88.2.5 --- Log message: Fixed the rules for building dynamic objects. This involved making each shell command its own line (since the $VERB was causing /bin/sh grief). Also modified the makefile so that the target all builds a dynamically linked library if SHARED_LIBRARY is defined. This fixes a problems where recursive builds didn't build the library. Fixed the distclean target so that it cleans LLVM proper instead of your projects directory. --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.88.2.4 llvm/Makefile.common:1.88.2.5 --- llvm/Makefile.common:1.88.2.4 Wed Jun 25 13:43:32 2003 +++ llvm/Makefile.common Thu Jun 26 10:53:56 2003 @@ -130,7 +130,7 @@ ifdef SHARED_LIBRARY # if SHARED_LIBRARY is specified, the default is to build the dynamic lib -dynamic :: +all:: dynamic endif # Default Rule: Make sure it's also a :: rule @@ -467,35 +467,35 @@ # Rules for building dynamically linked libraries. # $(LIBNAME_O): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir - @echo ======= Linking $(LIBRARYNAME) release library ======= - $(VERB) $(Link) -o $*.la $(LObjectsO) $(LibSubDirs) $(LibLinkOpts); \ + @echo ======= Linking $(LIBRARYNAME) dynamic release library ======= + $(VERB) $(Link) -o $*.la $(LObjectsO) $(LibSubDirs) $(LibLinkOpts); $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); $(LIBNAME_P): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir - @echo ======= Linking $(LIBRARYNAME) profile library ======= - $(VERB) $(Link) -o $*.la $(LObjectsP) $(LibSubDirs) $(LibLinkOpts); \ + @echo ======= Linking $(LIBRARYNAME) dynamic profile library ======= + $(VERB) $(Link) -o $*.la $(LObjectsP) $(LibSubDirs) $(LibLinkOpts); $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); $(LIBNAME_G): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir - @echo ======= Linking $(LIBRARYNAME) debug library ======= - $(VERB) $(Link) -o $*.la $(LObjectsG) $(LibSubDirs) $(LibLinkOpts); \ + @echo ======= Linking $(LIBRARYNAME) dynamic debug library ======= + $(VERB) $(Link) -o $*.la $(LObjectsG) $(LibSubDirs) $(LibLinkOpts); $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); # # Rules for building static archive libraries. # $(LIBNAME_AO): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir - @echo ======= Linking $(LIBRARYNAME) release library ======= + @echo ======= Linking $(LIBRARYNAME) archive release library ======= @$(RM) -f $@ $(VERB) $(Link) -03 -o $@ $(LObjectsO) $(LibSubDirs) -static $(LIBNAME_AP): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir - @echo ======= Linking $(LIBRARYNAME) profile library ======= + @echo ======= Linking $(LIBRARYNAME) archive profile library ======= @$(RM) -f $@ $(VERB) $(Link) -03 $(PROFILE) -o $@ $(LObjectsP) $(LibSubDirs) -static $(LIBNAME_AG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir - @echo ======= Linking $(LIBRARYNAME) debug library ======= + @echo ======= Linking $(LIBRARYNAME) archive debug library ======= @$(RM) -f $@ $(VERB) $(Link) -g $(STRIP) -o $@ $(LObjectsG) $(LibSubDirs) -static @@ -712,10 +712,10 @@ $(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT) distclean:: clean - $(VERB) $(RM) -rf $(LEVEL)/Makefile.config \ - $(LEVEL)/include/Config/config.h \ - $(LEVEL)/autom4te.cache \ - $(LEVEL)/config.log + $(VERB) (cd $(LLVM_SRC_ROOT); $(RM) -rf $(LEVEL)/Makefile.config \ + $(LEVEL)/include/Config/config.h \ + $(LEVEL)/autom4te.cache \ + $(LEVEL)/config.log) ########################################################################### # C/C++ Dependencies From criswell at choi.cs.uiuc.edu Thu Jun 26 10:56:02 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Thu Jun 26 10:56:02 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200306261555.h5QFt1a31966@choi.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.12.2.1 -> 1.12.2.2 --- Log message: Fixed some small typos. Added a section on disk usage requirements. --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.12.2.1 llvm/www/docs/GettingStarted.html:1.12.2.2 --- llvm/www/docs/GettingStarted.html:1.12.2.1 Wed Jun 25 16:44:08 2003 +++ llvm/www/docs/GettingStarted.html Thu Jun 26 10:54:51 2003 @@ -20,6 +20,10 @@
      • Getting started with LLVM
        1. Requirements +
            +
          1. Hardware +
          2. Software +
        2. Getting started quickly (a summary)
        3. Checkout LLVM from CVS
        4. Terminology and Notation @@ -71,14 +75,39 @@

          Requirements

          + +

          Hardware

          + LLVM is known to work on the following platforms:
            -
          • Linux/x86 -
          • Solaris/Sparc +
          • Linux on x86 +
              +
            • Approximately 700 MB of Free Disk Space +
                +
              • Source code: 30 MB +
              • Object code: 670 MB +
              +
            +
          • Solaris on Sparc +
              +
            • Approximately 1.3 GB of Free Disk Space +
                +
              • Source code: 30 MB +
              • Object code: 1000 MB +
              +
          + LLVM may compile on other platforms. While the LLVM utilities should work, + they will only generate Sparc or x86 machine code. + + +

          Software

          + +

          Compiling LLVM requires that you have several different software packages installed: +

          • GCC

            @@ -93,7 +122,7 @@

          • GNU Make

            - The LLVM build system relies upon GNU make extensions. Therefore, you + The LLVM build system relies upon GNU Make extensions. Therefore, you will need GNU Make (sometimes known as gmake) to build LLVM.

            @@ -115,7 +144,7 @@ If you want to make changes to the autoconf scripts which configure LLVM for compilation, you will need GNU autoconf, and consequently, GNU M4. LLVM was built with autoconf 2.53, so that release and any later - releases should work. + release should work.

          From brukman at cs.uiuc.edu Thu Jun 26 11:17:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Jun 26 11:17:00 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200306261616.LAA04412@zion.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.12.2.2 -> 1.12.2.3 --- Log message: 1000 MB + 30 MB = 1.03 GB, not 1.3 --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.12.2.2 llvm/www/docs/GettingStarted.html:1.12.2.3 --- llvm/www/docs/GettingStarted.html:1.12.2.2 Thu Jun 26 10:54:51 2003 +++ llvm/www/docs/GettingStarted.html Thu Jun 26 11:15:54 2003 @@ -90,7 +90,7 @@
    12. Solaris on Sparc