From alkis at cs.uiuc.edu Mon Mar 7 04:01:52 2005 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Mon, 7 Mar 2005 04:01:52 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Makefile.test Message-ID: <200503071001.EAA08935@zion.cs.uiuc.edu> Changes in directory llvm-java/test: Makefile.test updated: 1.43 -> 1.44 --- Log message: Pass reference output to bugpoint. --- Diffs of the changes: (+1 -1) Makefile.test | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-java/test/Makefile.test diff -u llvm-java/test/Makefile.test:1.43 llvm-java/test/Makefile.test:1.44 --- llvm-java/test/Makefile.test:1.43 Sun Feb 27 05:38:07 2005 +++ llvm-java/test/Makefile.test Mon Mar 7 04:01:40 2005 @@ -113,7 +113,7 @@ $(LBUGPOINT) $< -run-llc -output=$*.out-nat %.bugpoint.gccld: %.raw.llvm.bc %.out-nat - $(LBUGPOINT) $< $(GCCLD_PASS_ARGS) + $(LBUGPOINT) $< $(GCCLD_PASS_ARGS) -output=$*.out-nat all-local:: $(JIT_DIFFS) $(LLC_DIFFS) From jeffc at jolt-lang.org Mon Mar 7 10:41:25 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 Mar 2005 10:41:25 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/memory.c sym_tab.c Message-ID: <200503071641.KAA11816@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator: memory.c updated: 1.1 -> 1.2 sym_tab.c updated: 1.1 -> 1.2 --- Log message: Fix compilation errors on FreeBSD. --- Diffs of the changes: (+2 -2) memory.c | 2 +- sym_tab.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/memory.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/memory.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/memory.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/memory.c:1.1 Tue Oct 5 16:08:40 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/memory.c Mon Mar 7 10:41:13 2005 @@ -6,7 +6,7 @@ /* machine. */ #include "boolean.h" -#include +#include #include #include #include "constants.h" Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/sym_tab.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/sym_tab.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/sym_tab.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/sym_tab.c:1.1 Tue Oct 5 16:08:40 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/simulator/sym_tab.c Mon Mar 7 10:41:13 2005 @@ -7,7 +7,7 @@ #include "sym_tab.h" #include #include -#include +#include /* -------------------------------- INIT_SYM_TAB --------------------------- */ /* Initialize the symbol table TABLE. */ From jeffc at jolt-lang.org Mon Mar 7 10:41:25 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 Mar 2005 10:41:25 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Olden/voronoi/newvor.c Message-ID: <200503071641.KAA11820@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Olden/voronoi: newvor.c updated: 1.7 -> 1.8 --- Log message: Fix compilation errors on FreeBSD. --- Diffs of the changes: (+0 -1) newvor.c | 1 - 1 files changed, 1 deletion(-) Index: llvm-test/MultiSource/Benchmarks/Olden/voronoi/newvor.c diff -u llvm-test/MultiSource/Benchmarks/Olden/voronoi/newvor.c:1.7 llvm-test/MultiSource/Benchmarks/Olden/voronoi/newvor.c:1.8 --- llvm-test/MultiSource/Benchmarks/Olden/voronoi/newvor.c:1.7 Mon Nov 15 14:54:09 2004 +++ llvm-test/MultiSource/Benchmarks/Olden/voronoi/newvor.c Mon Mar 7 10:41:13 2005 @@ -2,7 +2,6 @@ #include #include -#include #include "defines.h" VERTEX_PTR *vp ; From jeffc at jolt-lang.org Mon Mar 7 10:41:25 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 Mar 2005 10:41:25 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/assem.c buffer.c code.c convert.c scan_line.c sym_tab.c Message-ID: <200503071641.KAA11834@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler: assem.c updated: 1.1 -> 1.2 buffer.c updated: 1.1 -> 1.2 code.c updated: 1.1 -> 1.2 convert.c updated: 1.1 -> 1.2 scan_line.c updated: 1.1 -> 1.2 sym_tab.c updated: 1.1 -> 1.2 --- Log message: Fix compilation errors on FreeBSD. --- Diffs of the changes: (+5 -6) assem.c | 1 - buffer.c | 2 +- code.c | 2 +- convert.c | 2 +- scan_line.c | 2 +- sym_tab.c | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/assem.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/assem.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/assem.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/assem.c:1.1 Tue Oct 5 13:24:16 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/assem.c Mon Mar 7 10:41:13 2005 @@ -11,7 +11,6 @@ #include #include -#include #include #include "constants.h" #include "pass1.h" Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/buffer.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/buffer.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/buffer.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/buffer.c:1.1 Tue Oct 5 13:24:16 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/buffer.c Mon Mar 7 10:41:13 2005 @@ -13,7 +13,7 @@ #include #include -#include +#include /* Constants used to determine if being used to store modify records or */ /* error messages. */ Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/code.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/code.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/code.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/code.c:1.1 Tue Oct 5 13:24:16 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/code.c Mon Mar 7 10:41:13 2005 @@ -10,7 +10,7 @@ /* and this does (most of) the code generation. */ #include -#include +#include #include #include #include "pass1.h" Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/convert.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/convert.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/convert.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/convert.c:1.1 Tue Oct 5 13:24:16 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/convert.c Mon Mar 7 10:41:13 2005 @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include "sym_tab.h" #include "constants.h" #include "scan_line.h" Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/scan_line.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/scan_line.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/scan_line.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/scan_line.c:1.1 Tue Oct 5 13:24:16 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/scan_line.c Mon Mar 7 10:41:13 2005 @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include "stringI.h" #include "assem.h" #include "buffer.h" Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/sym_tab.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/sym_tab.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/sym_tab.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/sym_tab.c:1.1 Tue Oct 5 13:24:16 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/assembler/sym_tab.c Mon Mar 7 10:41:13 2005 @@ -7,7 +7,7 @@ #include "sym_tab.h" #include #include -#include +#include /* -------------------------------- INIT_SYM_TAB --------------------------- */ /* Initialize the symbol table TABLE. */ From jeffc at jolt-lang.org Mon Mar 7 10:41:25 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 Mar 2005 10:41:25 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp Message-ID: <200503071641.KAA11838@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Applications/hexxagon: hexxagonmove.cpp updated: 1.1 -> 1.2 --- Log message: Fix compilation errors on FreeBSD. --- Diffs of the changes: (+12 -1) hexxagonmove.cpp | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletion(-) Index: llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp diff -u llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp:1.1 llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp:1.2 --- llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp:1.1 Fri Sep 10 09:25:53 2004 +++ llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp Mon Mar 7 10:41:13 2005 @@ -23,9 +23,13 @@ #include "hexxagonboard.h" #include "hexxagonmove.h" -#include #include #include +#ifdef __FreeBSD__ +#include +#else +#include +#endif #include using namespace std; @@ -83,10 +87,17 @@ int getTime() { +#ifdef __FreeBSD__ + struct timeval tv; + + gettimeofday(&tv, NULL); + return tv.tv_sec * 1000 + tv.tv_usec / 1000; +#else struct timeb tb; ftime(&tb); return (tb.time * 1000) + tb.millitm; +#endif } HexxagonMove *HexxagonMoveList::getMove(int i) From jeffc at jolt-lang.org Mon Mar 7 10:41:25 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 Mar 2005 10:41:25 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/load.c memory.c sym_tab.c Message-ID: <200503071641.KAA11846@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/loader: load.c updated: 1.1 -> 1.2 memory.c updated: 1.1 -> 1.2 sym_tab.c updated: 1.1 -> 1.2 --- Log message: Fix compilation errors on FreeBSD. --- Diffs of the changes: (+3 -3) load.c | 2 +- memory.c | 2 +- sym_tab.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/load.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/load.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/load.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/load.c:1.1 Tue Oct 5 16:11:49 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/load.c Mon Mar 7 10:41:13 2005 @@ -9,7 +9,7 @@ /* stringI.o print.o -g -lm */ #include -#include +#include #include #include "constants.h" #include "sym_tab.h" Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/memory.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/memory.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/memory.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/memory.c:1.1 Tue Oct 5 16:11:49 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/memory.c Mon Mar 7 10:41:13 2005 @@ -6,7 +6,7 @@ /* machine. */ #include "boolean.h" -#include +#include #include #include #include "constants.h" Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/sym_tab.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/sym_tab.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/sym_tab.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/sym_tab.c:1.1 Tue Oct 5 16:11:49 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/loader/sym_tab.c Mon Mar 7 10:41:13 2005 @@ -7,7 +7,7 @@ #include "sym_tab.h" #include #include -#include +#include /* -------------------------------- INIT_SYM_TAB --------------------------- */ /* Initialize the symbol table TABLE. */ From jeffc at jolt-lang.org Mon Mar 7 10:41:25 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 Mar 2005 10:41:25 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/cdecl/cdecl.c Message-ID: <200503071641.KAA11850@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/cdecl: cdecl.c updated: 1.2 -> 1.3 --- Log message: Fix compilation errors on FreeBSD. --- Diffs of the changes: (+3 -3) cdecl.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/cdecl/cdecl.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/cdecl/cdecl.c:1.2 llvm-test/MultiSource/Benchmarks/Prolangs-C/cdecl/cdecl.c:1.3 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/cdecl/cdecl.c:1.2 Thu Dec 9 18:18:23 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/cdecl/cdecl.c Mon Mar 7 10:41:13 2005 @@ -115,7 +115,7 @@ void docast(char*, char*, char*, char*); void dodexplain(char*, char*, char*, char*); void docexplain(char*, char*, char*, char*); - void setprogname(char *); + void setprogname(const char *); int dotmpfile(int, char**), dofileargs(int, char**); #else char *ds(), *cat(), *visible(); @@ -155,7 +155,7 @@ int OnATty = 0; /* stdin is coming from a terminal */ int Interactive = 0; /* -i, overrides OnATty */ int KeywordName = 0; /* $0 is a keyword (declare, explain, cast) */ -char *progname = "cdecl"; /* $0 */ +const char *progname = "cdecl"; /* $0 */ #if dodebug int DebugFlag = 0; /* -d, output debugging trace info */ @@ -616,7 +616,7 @@ /* Save away the name of the program from argv[0] */ void setprogname(argv0) -char *argv0; +const char *argv0; { #ifdef DOS char *dot; From lattner at cs.uiuc.edu Mon Mar 7 14:31:07 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 7 Mar 2005 14:31:07 -0600 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200503072031.j27KV75V002674@apoc.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.87 -> 1.88 --- Log message: fix typeo that Gabor Greif noticed! --- Diffs of the changes: (+3 -3) LangRef.html | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.87 llvm/docs/LangRef.html:1.88 --- llvm/docs/LangRef.html:1.87 Mon Feb 28 13:47:14 2005 +++ llvm/docs/LangRef.html Mon Mar 7 14:30:51 2005 @@ -2451,7 +2451,7 @@

Note that calling this intrinsic does not prevent function inlining or other -aggressive transformations, so the value returned may not that of the obvious +aggressive transformations, so the value returned may not be that of the obvious source-language caller.

@@ -2495,7 +2495,7 @@

Note that calling this intrinsic does not prevent function inlining or other -aggressive transformations, so the value returned may not that of the obvious +aggressive transformations, so the value returned may not be that of the obvious source-language caller.

@@ -2971,7 +2971,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2005/02/28 19:47:14 $ + Last modified: $Date: 2005/03/07 20:30:51 $ From lattner at cs.uiuc.edu Mon Mar 7 14:31:51 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 7 Mar 2005 14:31:51 -0600 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200503072031.j27KVpo1002727@apoc.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.88 -> 1.89 --- Log message: fix another typo --- Diffs of the changes: (+2 -2) LangRef.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.88 llvm/docs/LangRef.html:1.89 --- llvm/docs/LangRef.html:1.88 Mon Mar 7 14:30:51 2005 +++ llvm/docs/LangRef.html Mon Mar 7 14:31:38 2005 @@ -2530,7 +2530,7 @@ address is the address to be prefetched, rw is the specifier determining if the fetch should be for a read (0) or write (1), and locality is a temporal locality specifier ranging from (0) - no -locality, to (3) - exteremely local keep in cache. The rw and +locality, to (3) - extremely local keep in cache. The rw and locality arguments must be constant integers.

@@ -2971,7 +2971,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2005/03/07 20:30:51 $ + Last modified: $Date: 2005/03/07 20:31:38 $ From lattner at cs.uiuc.edu Mon Mar 7 14:36:01 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 7 Mar 2005 14:36:01 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Type.h Instruction.h Message-ID: <200503072036.j27Ka1V0002843@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: Type.h updated: 1.73 -> 1.74 Instruction.h updated: 1.65 -> 1.66 --- Log message: Fix problems compiling with G++ 4.x.x with -pedantic. Thanks to Vladimir Merzliakov for the patch! --- Diffs of the changes: (+5 -5) Instruction.h | 8 ++++---- Type.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/include/llvm/Type.h diff -u llvm/include/llvm/Type.h:1.73 llvm/include/llvm/Type.h:1.74 --- llvm/include/llvm/Type.h:1.73 Tue Mar 1 21:43:55 2005 +++ llvm/include/llvm/Type.h Mon Mar 7 14:35:45 2005 @@ -78,7 +78,7 @@ NumTypeIDs, // Must remain as last defined ID LastPrimitiveTyID = LabelTyID, - FirstDerivedTyID = FunctionTyID, + FirstDerivedTyID = FunctionTyID }; private: Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.65 llvm/include/llvm/Instruction.h:1.66 --- llvm/include/llvm/Instruction.h:1.65 Sat Mar 5 13:51:20 2005 +++ llvm/include/llvm/Instruction.h Mon Mar 7 14:35:45 2005 @@ -163,28 +163,28 @@ enum TermOps { // These terminate basic blocks #define FIRST_TERM_INST(N) TermOpsBegin = N, #define HANDLE_TERM_INST(N, OPC, CLASS) OPC = N, -#define LAST_TERM_INST(N) TermOpsEnd = N+1, +#define LAST_TERM_INST(N) TermOpsEnd = N+1 #include "llvm/Instruction.def" }; enum BinaryOps { #define FIRST_BINARY_INST(N) BinaryOpsBegin = N, #define HANDLE_BINARY_INST(N, OPC, CLASS) OPC = N, -#define LAST_BINARY_INST(N) BinaryOpsEnd = N+1, +#define LAST_BINARY_INST(N) BinaryOpsEnd = N+1 #include "llvm/Instruction.def" }; enum MemoryOps { #define FIRST_MEMORY_INST(N) MemoryOpsBegin = N, #define HANDLE_MEMORY_INST(N, OPC, CLASS) OPC = N, -#define LAST_MEMORY_INST(N) MemoryOpsEnd = N+1, +#define LAST_MEMORY_INST(N) MemoryOpsEnd = N+1 #include "llvm/Instruction.def" }; enum OtherOps { #define FIRST_OTHER_INST(N) OtherOpsBegin = N, #define HANDLE_OTHER_INST(N, OPC, CLASS) OPC = N, -#define LAST_OTHER_INST(N) OtherOpsEnd = N+1, +#define LAST_OTHER_INST(N) OtherOpsEnd = N+1 #include "llvm/Instruction.def" }; }; From lattner at cs.uiuc.edu Mon Mar 7 16:14:15 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 7 Mar 2005 16:14:15 -0600 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200503072214.j27MEFBx013784@apoc.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.89 -> 1.90 --- Log message: Various cleanups and clarifications, thanks to Gabor Greif for contributing this patch! --- Diffs of the changes: (+9 -6) LangRef.html | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.89 llvm/docs/LangRef.html:1.90 --- llvm/docs/LangRef.html:1.89 Mon Mar 7 14:31:38 2005 +++ llvm/docs/LangRef.html Mon Mar 7 16:13:59 2005 @@ -476,7 +476,7 @@

LLVM functions are identified by their name and type signature. Hence, two functions with the same name but different parameter lists or return values are -considered different functions, and LLVM will resolves references to each +considered different functions, and LLVM will resolve references to each appropriately.

@@ -503,7 +503,7 @@

The primitive types are the fundamental building blocks of the LLVM -system. The current set of primitive types are as follows:

+system. The current set of primitive types is as follows:

@@ -839,14 +839,17 @@
+

Aggregate constants arise from aggregation of simple constants +and smaller aggregate constants.

Structure constants
Structure constants are represented with notation similar to structure type definitions (a comma separated list of elements, surrounded by braces - ({})). For example: "{ int 4, float 17.0 }". Structure - constants must have structure type, and the number and + ({})). For example: "{ int 4, float 17.0, int* %G }", + where "%G" is declared as "%G = external global int". Structure constants + must have structure type, and the number and types of elements must match those specified by the type.
@@ -1834,7 +1837,7 @@ the LLVM code for the given testcase is equivalent to:

-  int* "foo"(%ST* %s) {
+  int* %foo(%ST* %s) {
     %t1 = getelementptr %ST* %s, int 1                        ; yields %ST*:%t1
     %t2 = getelementptr %ST* %t1, int 0, uint 2               ; yields %RT*:%t2
     %t3 = getelementptr %RT* %t2, int 0, uint 1               ; yields [10 x [20 x int]]*:%t3
@@ -2971,7 +2974,7 @@
 
   Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2005/03/07 20:31:38 $ + Last modified: $Date: 2005/03/07 22:13:59 $ From brukman at cs.uiuc.edu Mon Mar 7 18:26:19 2005 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon, 7 Mar 2005 18:26:19 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200503080026.SAA03505@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.228 -> 1.229 --- Log message: Single characters should be printed out as chars, not strings. --- Diffs of the changes: (+2 -2) Writer.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.228 llvm/lib/Target/CBackend/Writer.cpp:1.229 --- llvm/lib/Target/CBackend/Writer.cpp:1.228 Sat Mar 5 20:28:23 2005 +++ llvm/lib/Target/CBackend/Writer.cpp Mon Mar 7 18:26:08 2005 @@ -1683,7 +1683,7 @@ writeOperand(I.getOperand(0)); if (I.isVolatile()) - Out << ")"; + Out << ')'; } void CWriter::visitStoreInst(StoreInst &I) { @@ -1694,7 +1694,7 @@ Out << " volatile*)"; } writeOperand(I.getPointerOperand()); - if (I.isVolatile()) Out << ")"; + if (I.isVolatile()) Out << ')'; Out << " = "; writeOperand(I.getOperand(0)); } From jeffc at jolt-lang.org Mon Mar 7 21:57:16 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 Mar 2005 21:57:16 -0600 Subject: [llvm-commits] CVS: llvm/docs/GettingStartedVS.html Message-ID: <200503080357.VAA06957@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStartedVS.html updated: 1.3 -> 1.4 --- Log message: Clarify inability to generate assembly, and note that VC++ Express works. --- Diffs of the changes: (+6 -4) GettingStartedVS.html | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) Index: llvm/docs/GettingStartedVS.html diff -u llvm/docs/GettingStartedVS.html:1.3 llvm/docs/GettingStartedVS.html:1.4 --- llvm/docs/GettingStartedVS.html:1.3 Tue Feb 1 23:46:20 2005 +++ llvm/docs/GettingStartedVS.html Mon Mar 7 21:56:50 2005 @@ -50,8 +50,9 @@

The Visual Studio port at this time is experimental. It is suitable for use only if you are writing your own compiler front end or otherwise have a need to dynamically generate machine code. The JIT and interpreter are - functional, but it is currently not possible to directly generate an - executable file. You can do so indirectly by using the C back end.

+ functional, but it is currently not possible to generate assembly code which + is then assembled into an executable. You can indirectly create executables + by using the C back end.

To emphasize, there is no C/C++ front end currently available. llvm-gcc is based on GCC, which cannot be bootstrapped using VC++. @@ -166,7 +167,8 @@

You will need Visual Studio .NET 2003. Earlier versions cannot open the solution/project files. The VS 2005 beta can, but will migrate these files to its own format in the process. While it should work with the VS 2005 - beta, there are no guarantees and there is no support for it at this time.

+ beta, there are no guarantees and there is no support for it at this time. + It has been reported that VC++ Express also works.

You will also need several open source packages: bison, flex, and sed. These must be installed in llvm/win32/tools. These can be found at @@ -352,7 +354,7 @@ Jeff Cohen
The LLVM Compiler Infrastructure
- Last modified: $Date: 2005/02/02 05:46:20 $ + Last modified: $Date: 2005/03/08 03:56:50 $ From jeffc at jolt-lang.org Tue Mar 8 09:51:19 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Tue, 8 Mar 2005 09:51:19 -0600 Subject: [llvm-commits] CVS: llvm-test/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c Message-ID: <200503081551.JAA07863@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/Regression/C: 2004-08-12-InlinerAndAllocas.c updated: 1.1 -> 1.2 --- Log message: More FreeBSD fixes for llvm-test. --- Diffs of the changes: (+4 -0) 2004-08-12-InlinerAndAllocas.c | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm-test/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c diff -u llvm-test/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c:1.1 llvm-test/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c:1.2 --- llvm-test/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c:1.1 Thu Aug 12 00:27:09 2004 +++ llvm-test/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c Tue Mar 8 09:51:08 2005 @@ -1,7 +1,11 @@ // A compiler cannot inline Callee into main unless it is prepared to reclaim // the stack memory allocated in it. +#ifdef __FreeBSD__ +#include +#else #include +#endif #include static int Callee(int i) { From lattner at cs.uiuc.edu Tue Mar 8 10:19:18 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 8 Mar 2005 10:19:18 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll Message-ID: <200503081619.j28GJIAQ025357@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/CBackend: 2005-03-08-RecursiveTypeCrash.ll added (r1.1) --- Log message: new testcase that crashes the CBE. --- Diffs of the changes: (+5 -0) 2005-03-08-RecursiveTypeCrash.ll | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/test/Regression/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll diff -c /dev/null llvm/test/Regression/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll:1.1 *** /dev/null Tue Mar 8 10:19:12 2005 --- llvm/test/Regression/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll Tue Mar 8 10:19:02 2005 *************** *** 0 **** --- 1,5 ---- + ; RUN: llvm-as < %s | llc -march=c + + %JNIEnv = type %struct.JNINa* + %struct.JNINa = type { sbyte*, sbyte*, sbyte*, void (%JNIEnv*)* } + From lattner at cs.uiuc.edu Tue Mar 8 10:20:12 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 8 Mar 2005 10:20:12 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200503081620.j28GKCAT025380@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.229 -> 1.230 --- Log message: Make sure to remove all dead type names from the symbol table, not just struct types. This fixes Regression/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll, a crash on Java output that Alkis reported. --- Diffs of the changes: (+8 -9) Writer.cpp | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.229 llvm/lib/Target/CBackend/Writer.cpp:1.230 --- llvm/lib/Target/CBackend/Writer.cpp:1.229 Mon Mar 7 18:26:08 2005 +++ llvm/lib/Target/CBackend/Writer.cpp Tue Mar 8 10:19:59 2005 @@ -227,20 +227,19 @@ std::set UT = getAnalysis().getTypes(); // Loop over the module symbol table, removing types from UT that are - // already named, and removing names for structure types that are not used. + // already named, and removing names for types that are not used. // SymbolTable &MST = M.getSymbolTable(); for (SymbolTable::type_iterator TI = MST.type_begin(), TE = MST.type_end(); TI != TE; ) { SymbolTable::type_iterator I = TI++; - if (const StructType *STy = dyn_cast(I->second)) { - // If this is not used, remove it from the symbol table. - std::set::iterator UTI = UT.find(STy); - if (UTI == UT.end()) - MST.remove(I); - else - UT.erase(UTI); - } + + // If this is not used, remove it from the symbol table. + std::set::iterator UTI = UT.find(I->second); + if (UTI == UT.end()) + MST.remove(I); + else + UT.erase(UTI); // Only keep one name for this type. } // UT now contains types that are not named. Loop over it, naming From reid at x10sys.com Tue Mar 8 11:02:16 2005 From: reid at x10sys.com (Reid Spencer) Date: Tue, 8 Mar 2005 11:02:16 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp Message-ID: <200503081702.LAA08312@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86AsmPrinter.cpp updated: 1.132 -> 1.133 --- Log message: Patch to make assembly output compatible with mingw compilation (identical to cygwin) --- Diffs of the changes: (+3 -2) X86AsmPrinter.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.132 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.133 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.132 Sat Jan 22 21:52:14 2005 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Tue Mar 8 11:02:05 2005 @@ -84,9 +84,10 @@ forCygwin = false; const std::string& TT = M.getTargetTriple(); if (TT.length() > 5) - forCygwin = TT.find("cygwin") != std::string::npos; + forCygwin = TT.find("cygwin") != std::string::npos || + TT.find("mingw") != std::string::npos; else if (TT.empty()) { -#ifdef __CYGWIN__ +#if defined(__CYGWIN__) || defined(__MINGW32__) forCygwin = true; #else forCygwin = false; From lattner at persephone.cs.uiuc.edu Tue Mar 8 16:33:42 2005 From: lattner at persephone.cs.uiuc.edu (Chris Lattner) Date: Tue, 8 Mar 2005 16:33:42 -0600 (CST) Subject: [llvm-commits] CVS: llvm-test/External/SPEC/CINT95/130.li/Makefile Message-ID: <20050308223342.9F3A0B26520@persephone.cs.uiuc.edu> Changes in directory llvm-test/External/SPEC/CINT95/130.li: Makefile updated: 1.4 -> 1.5 --- Log message: Make this build on darwin, whose ctype.h defines isnumber, which conflicts with a source function. --- Diffs of the changes: (+1 -0) Makefile | 1 + 1 files changed, 1 insertion Index: llvm-test/External/SPEC/CINT95/130.li/Makefile diff -u llvm-test/External/SPEC/CINT95/130.li/Makefile:1.4 llvm-test/External/SPEC/CINT95/130.li/Makefile:1.5 --- llvm-test/External/SPEC/CINT95/130.li/Makefile:1.4 Mon Sep 6 23:18:02 2004 +++ llvm-test/External/SPEC/CINT95/130.li/Makefile Tue Mar 8 16:33:22 2005 @@ -1,5 +1,6 @@ LEVEL = ../../../.. include ../../Makefile.spec95 +CPPFLAGS += -Disnumber=isnumber_renamed REQUIRES_EH_SUPPORT = 1 STDIN_FILENAME := $(RUN_TYPE).lsp STDOUT_FILENAME := $(RUN_TYPE).out From lattner at persephone.cs.uiuc.edu Tue Mar 8 16:44:18 2005 From: lattner at persephone.cs.uiuc.edu (Chris Lattner) Date: Tue, 8 Mar 2005 16:44:18 -0600 (CST) Subject: [llvm-commits] CVS: llvm-test/External/SPEC/CINT2000/254.gap/Makefile Message-ID: <20050308224418.A90F4B26640@persephone.cs.uiuc.edu> Changes in directory llvm-test/External/SPEC/CINT2000/254.gap: Makefile updated: 1.6 -> 1.7 --- Log message: apply magic to get this to build on darwin --- Diffs of the changes: (+7 -1) Makefile | 8 +++++++- 1 files changed, 7 insertions, 1 deletion Index: llvm-test/External/SPEC/CINT2000/254.gap/Makefile diff -u llvm-test/External/SPEC/CINT2000/254.gap/Makefile:1.6 llvm-test/External/SPEC/CINT2000/254.gap/Makefile:1.7 --- llvm-test/External/SPEC/CINT2000/254.gap/Makefile:1.6 Mon Sep 6 23:18:02 2004 +++ llvm-test/External/SPEC/CINT2000/254.gap/Makefile Tue Mar 8 16:43:50 2005 @@ -5,8 +5,14 @@ # We need to include unistd.h because something with Fedora Core 1 is broken, # and we need the sysconf() macros. -CPPFLAGS = -include unistd.h -DSYS_IS_USG -DSYS_HAS_CALLOC_PROTO -DSYS_HAS_IOCTL_PROTO -DSYS_HAS_TIME_PROTO -DSYS_HAS_READ_PROTO +CPPFLAGS = -include unistd.h -DSYS_HAS_CALLOC_PROTO -DSYS_HAS_IOCTL_PROTO -DSYS_HAS_TIME_PROTO -DSYS_HAS_READ_PROTO include ../../Makefile.spec2000 ifeq ($(ARCH),Sparc) CPPFLAGS+= -DSPEC_CPU2000_LP64 +endif + +ifeq ($(OS),Darwin) +CPPFLAGS += -DSYS_IS_BSD +else +CPPFLAGS += -DSYS_IS_USG endif From lattner at cs.uiuc.edu Tue Mar 8 16:53:25 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 8 Mar 2005 16:53:25 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Message-ID: <200503082253.j28MrPvR001778@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelSimple.cpp updated: 1.121 -> 1.122 --- Log message: Fix a crash handling 'undef bool', fixing an llc crash on 186.crafty --- Diffs of the changes: (+1 -1) PPC32ISelSimple.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.121 llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.122 --- llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.121 Fri Jan 14 14:22:02 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Tue Mar 8 16:53:09 2005 @@ -612,7 +612,7 @@ Constant *C, unsigned R) { if (isa(C)) { BuildMI(*MBB, IP, PPC::IMPLICIT_DEF, 0, R); - if (getClass(C->getType()) == cLong) + if (getClassB(C->getType()) == cLong) BuildMI(*MBB, IP, PPC::IMPLICIT_DEF, 0, R+1); return; } From lattner at cs.uiuc.edu Tue Mar 8 16:58:48 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 8 Mar 2005 16:58:48 -0600 Subject: [llvm-commits] CVS: llvm-test/Makefile.tests Makefile.rules Message-ID: <200503082258.j28MwmRE002419@apoc.cs.uiuc.edu> Changes in directory llvm-test: Makefile.tests updated: 1.4 -> 1.5 Makefile.rules updated: 1.7 -> 1.8 --- Log message: Turn off warnings for programs in llvm-test. We are aware of the fact that they are gross and crufty, they should not need to match the standards of the main LLVM codebase. --- Diffs of the changes: (+3 -3) Makefile.rules | 2 +- Makefile.tests | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm-test/Makefile.tests diff -u llvm-test/Makefile.tests:1.4 llvm-test/Makefile.tests:1.5 --- llvm-test/Makefile.tests:1.4 Fri Jan 21 14:34:00 2005 +++ llvm-test/Makefile.tests Tue Mar 8 16:58:33 2005 @@ -34,8 +34,8 @@ .PRECIOUS: Output/%.llvm.bc .PRECIOUS: Output/%.llvm -LCCFLAGS += -O2 -Wall -LCXXFLAGS += -O2 -Wall +LCCFLAGS += -O2 +LCXXFLAGS += -O2 LLCFLAGS = FAILURE = $(LLVM_SRC_ROOT)/test/Failure.sh TESTRUNR = @echo Running test: $<; \ Index: llvm-test/Makefile.rules diff -u llvm-test/Makefile.rules:1.7 llvm-test/Makefile.rules:1.8 --- llvm-test/Makefile.rules:1.7 Fri Jan 21 14:34:00 2005 +++ llvm-test/Makefile.rules Tue Mar 8 16:58:33 2005 @@ -308,7 +308,7 @@ # Pull in limit macros from stdint.h, even in C++: CPPFLAGS += -D__STDC_LIMIT_MACROS -CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused +CompileCommonOpts := CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions # From lattner at cs.uiuc.edu Tue Mar 8 21:31:19 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 8 Mar 2005 21:31:19 -0600 Subject: [llvm-commits] CVS: llvm/lib/Support/ToolRunner.cpp Message-ID: <200503090331.j293VJkr003553@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Support: ToolRunner.cpp updated: 1.39 -> 1.40 --- Log message: get bugpoint working on ia64, by building .so's with -fpic. :) --- Diffs of the changes: (+4 -0) ToolRunner.cpp | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/Support/ToolRunner.cpp diff -u llvm/lib/Support/ToolRunner.cpp:1.39 llvm/lib/Support/ToolRunner.cpp:1.40 --- llvm/lib/Support/ToolRunner.cpp:1.39 Sat Feb 26 22:32:35 2005 +++ llvm/lib/Support/ToolRunner.cpp Tue Mar 8 21:31:02 2005 @@ -450,6 +450,10 @@ #else "-shared", // `-shared' for Linux/X86, maybe others #endif + +#if defined(__ia64__) + "-fPIC", // IA64 requires shared objs to contain PIC +#endif "-o", OutputFile.c_str(), // Output to the right filename... "-O2", // Optimize the program a bit... 0 From lattner at cs.uiuc.edu Tue Mar 8 23:34:39 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 8 Mar 2005 23:34:39 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/ScalarEvolution.h Message-ID: <200503090534.j295YdiI004716@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: ScalarEvolution.h updated: 1.8 -> 1.9 --- Log message: export two methods --- Diffs of the changes: (+10 -0) ScalarEvolution.h | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/include/llvm/Analysis/ScalarEvolution.h diff -u llvm/include/llvm/Analysis/ScalarEvolution.h:1.8 llvm/include/llvm/Analysis/ScalarEvolution.h:1.9 --- llvm/include/llvm/Analysis/ScalarEvolution.h:1.8 Sat Feb 12 22:34:51 2005 +++ llvm/include/llvm/Analysis/ScalarEvolution.h Tue Mar 8 23:34:23 2005 @@ -54,6 +54,16 @@ public: SCEV(unsigned SCEVTy) : SCEVType(SCEVTy), RefCount(0) {} + /// getNegativeSCEV - Return the SCEV object corresponding to -V. + /// + static SCEVHandle getNegativeSCEV(const SCEVHandle &V); + + /// getMinusSCEV - Return LHS-RHS. + /// + static SCEVHandle getMinusSCEV(const SCEVHandle &LHS, + const SCEVHandle &RHS); + + unsigned getSCEVType() const { return SCEVType; } /// getValueRange - Return the tightest constant bounds that this value is From lattner at cs.uiuc.edu Tue Mar 8 23:34:54 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 8 Mar 2005 23:34:54 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp Message-ID: <200503090534.j295Ys75004728@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ScalarEvolution.cpp updated: 1.35 -> 1.36 --- Log message: Export two methods for getting -X and A-B. --- Diffs of the changes: (+11 -10) ScalarEvolution.cpp | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.35 llvm/lib/Analysis/ScalarEvolution.cpp:1.36 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.35 Sat Feb 26 17:36:45 2005 +++ llvm/lib/Analysis/ScalarEvolution.cpp Tue Mar 8 23:34:41 2005 @@ -480,7 +480,7 @@ /// getNegativeSCEV - Return a SCEV corresponding to -V = -1*V /// -static SCEVHandle getNegativeSCEV(const SCEVHandle &V) { +SCEVHandle SCEV::getNegativeSCEV(const SCEVHandle &V) { if (SCEVConstant *VC = dyn_cast(V)) return SCEVUnknown::get(ConstantExpr::getNeg(VC->getValue())); @@ -489,9 +489,9 @@ /// getMinusSCEV - Return a SCEV corresponding to LHS - RHS. /// -static SCEVHandle getMinusSCEV(const SCEVHandle &LHS, const SCEVHandle &RHS) { +SCEVHandle SCEV::getMinusSCEV(const SCEVHandle &LHS, const SCEVHandle &RHS) { // X - Y --> X + -Y - return SCEVAddExpr::get(LHS, getNegativeSCEV(RHS)); + return SCEVAddExpr::get(LHS, SCEV::getNegativeSCEV(RHS)); } @@ -514,7 +514,7 @@ SCEVHandle Result = V; for (unsigned i = 1; i != NumSteps; ++i) - Result = SCEVMulExpr::get(Result, getMinusSCEV(V, + Result = SCEVMulExpr::get(Result, SCEV::getMinusSCEV(V, SCEVUnknown::getIntegerSCEV(i, Ty))); return Result; } @@ -984,7 +984,7 @@ if (RHSC->getValue()->equalsInt(1)) return LHS; // X /u 1 --> x if (RHSC->getValue()->isAllOnesValue()) - return getNegativeSCEV(LHS); // X /u -1 --> -x + return SCEV::getNegativeSCEV(LHS); // X /u -1 --> -x if (SCEVConstant *LHSC = dyn_cast(LHS)) { Constant *LHSCV = LHSC->getValue(); @@ -1340,7 +1340,8 @@ break; case Instruction::Sub: - return getMinusSCEV(getSCEV(I->getOperand(0)), getSCEV(I->getOperand(1))); + return SCEV::getMinusSCEV(getSCEV(I->getOperand(0)), + getSCEV(I->getOperand(1))); case Instruction::Shl: // Turn shift left of a constant amount into a multiply. @@ -1504,14 +1505,14 @@ case Instruction::SetNE: // while (X != Y) // Convert to: while (X-Y != 0) if (LHS->getType()->isInteger()) { - SCEVHandle TC = HowFarToZero(getMinusSCEV(LHS, RHS), L); + SCEVHandle TC = HowFarToZero(SCEV::getMinusSCEV(LHS, RHS), L); if (!isa(TC)) return TC; } break; case Instruction::SetEQ: // Convert to: while (X-Y == 0) // while (X == Y) if (LHS->getType()->isInteger()) { - SCEVHandle TC = HowFarToNonZero(getMinusSCEV(LHS, RHS), L); + SCEVHandle TC = HowFarToNonZero(SCEV::getMinusSCEV(LHS, RHS), L); if (!isa(TC)) return TC; } break; @@ -2083,7 +2084,7 @@ // FIXME: We should add DivExpr and RemExpr operations to our AST. if (SCEVConstant *StepC = dyn_cast(Step)) { if (StepC->getValue()->equalsInt(1)) // N % 1 == 0 - return getNegativeSCEV(Start); // 0 - Start/1 == -Start + return SCEV::getNegativeSCEV(Start); // 0 - Start/1 == -Start if (StepC->getValue()->isAllOnesValue()) // N % -1 == 0 return Start; // 0 - Start/-1 == Start @@ -2229,7 +2230,7 @@ // terms of figuring out when zero is crossed, instead of when // Range.getUpper() is crossed. std::vector NewOps(op_begin(), op_end()); - NewOps[0] = getNegativeSCEV(SCEVUnknown::get(Range.getUpper())); + NewOps[0] = SCEV::getNegativeSCEV(SCEVUnknown::get(Range.getUpper())); SCEVHandle NewAddRec = SCEVAddRecExpr::get(NewOps, getLoop()); // Next, solve the constructed addrec From lattner at cs.uiuc.edu Tue Mar 8 23:35:29 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 8 Mar 2005 23:35:29 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/InstVisitor.h Message-ID: <200503090535.j295ZTmT004744@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: InstVisitor.h updated: 1.33 -> 1.34 --- Log message: Use static_cast and #include Instructions.h --- Diffs of the changes: (+10 -6) InstVisitor.h | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) Index: llvm/include/llvm/Support/InstVisitor.h diff -u llvm/include/llvm/Support/InstVisitor.h:1.33 llvm/include/llvm/Support/InstVisitor.h:1.34 --- llvm/include/llvm/Support/InstVisitor.h:1.33 Tue Nov 16 00:58:55 2004 +++ llvm/include/llvm/Support/InstVisitor.h Tue Mar 8 23:35:16 2005 @@ -51,6 +51,7 @@ #define LLVM_SUPPORT_INSTVISITOR_H #include "llvm/Function.h" +#include "llvm/Instructions.h" #include "llvm/Module.h" namespace llvm { @@ -66,7 +67,8 @@ class AllocationInst; #define DELEGATE(CLASS_TO_VISIT) \ - return ((SubClass*)this)->visit##CLASS_TO_VISIT((CLASS_TO_VISIT&)I) + return static_cast(this)-> \ + visit##CLASS_TO_VISIT(static_cast(I)) template @@ -81,21 +83,21 @@ template void visit(Iterator Start, Iterator End) { while (Start != End) - ((SubClass*)this)->visit(*Start++); + static_cast(this)->visit(*Start++); } // Define visitors for functions and basic blocks... // void visit(Module &M) { - ((SubClass*)this)->visitModule(M); + static_cast(this)->visitModule(M); visit(M.begin(), M.end()); } void visit(Function &F) { - ((SubClass*)this)->visitFunction(F); + static_cast(this)->visitFunction(F); visit(F.begin(), F.end()); } void visit(BasicBlock &BB) { - ((SubClass*)this)->visitBasicBlock(BB); + static_cast(this)->visitBasicBlock(BB); visit(BB.begin(), BB.end()); } @@ -113,7 +115,9 @@ abort(); // Build the switch statement using the Instruction.def file... #define HANDLE_INST(NUM, OPCODE, CLASS) \ - case Instruction::OPCODE:return ((SubClass*)this)->visit##OPCODE((CLASS&)I); + case Instruction::OPCODE: return \ + static_cast(this)-> \ + visit##OPCODE(static_cast(I)); #include "llvm/Instruction.def" } } From reid at x10sys.com Wed Mar 9 09:19:52 2005 From: reid at x10sys.com (Reid Spencer) Date: Wed, 9 Mar 2005 09:19:52 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp Message-ID: <200503091519.JAA32124@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Constants.cpp updated: 1.123 -> 1.124 --- Log message: Fix a typo in an assertion comment. Patch contributed by Vladimir Merzliakov. --- Diffs of the changes: (+1 -1) Constants.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.123 llvm/lib/VMCore/Constants.cpp:1.124 --- llvm/lib/VMCore/Constants.cpp:1.123 Sat Mar 5 13:51:50 2005 +++ llvm/lib/VMCore/Constants.cpp Wed Mar 9 09:19:41 2005 @@ -221,7 +221,7 @@ ConstantSInt::ConstantSInt(const Type *Ty, int64_t V) : ConstantInt(Ty, V) { assert(Ty->isInteger() && Ty->isSigned() && - "Illegal type for unsigned integer constant!"); + "Illegal type for signed integer constant!"); assert(isValueValidForType(Ty, V) && "Value too large for type!"); } From lattner at cs.uiuc.edu Wed Mar 9 10:29:38 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 9 Mar 2005 10:29:38 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll Message-ID: <200503091629.j29GTc6t009530@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis/BasicAA: 2005-03-09-BrokenBasicAA.ll added (r1.1) --- Log message: new testcase for a -basicaa bug that Alkis found with Java. --- Diffs of the changes: (+14 -0) 2005-03-09-BrokenBasicAA.ll | 14 ++++++++++++++ 1 files changed, 14 insertions(+) Index: llvm/test/Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll diff -c /dev/null llvm/test/Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll:1.1 *** /dev/null Wed Mar 9 10:29:32 2005 --- llvm/test/Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll Wed Mar 9 10:29:22 2005 *************** *** 0 **** --- 1,14 ---- + ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'load int\* %A' + + declare double* %useit(int*) + + int %foo(uint %Amt) { + %A = malloc int, uint %Amt + %P = call double* %useit(int* %A) + + %X = load int* %A + store double 0.0, double* %P + %Y = load int* %A + %Z = sub int %X, %Y + ret int %Z + } From lattner at cs.uiuc.edu Wed Mar 9 10:30:05 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 9 Mar 2005 10:30:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp Message-ID: <200503091630.j29GU5gX009811@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: BasicAliasAnalysis.cpp updated: 1.64 -> 1.65 --- Log message: Fix Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll, a miscompilation that Alkis found with Java, thanks Alkis! --- Diffs of the changes: (+6 -2) BasicAliasAnalysis.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.64 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.65 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.64 Sat Jan 8 16:01:16 2005 +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Wed Mar 9 10:29:52 2005 @@ -307,7 +307,9 @@ if (!isa(O1) && isa(V2)) return NoAlias; // Unique values don't alias null - if (isa(O1) || isa(O1)) + if (isa(O1) || + (isa(O1) && + !cast(O1)->isArrayAllocation())) if (cast(O1->getType())->getElementType()->isSized()) { // If the size of the other access is larger than the total size of the // global/alloca/malloc, it cannot be accessing the global (it's @@ -323,7 +325,9 @@ if (!isa(O2) && isa(V1)) return NoAlias; // Unique values don't alias null - if (isa(O2) || isa(O2)) + if (isa(O2) || + (isa(O2) && + !cast(O2)->isArrayAllocation())) if (cast(O2->getType())->getElementType()->isSized()) { // If the size of the other access is larger than the total size of the // global/alloca/malloc, it cannot be accessing the object (it's From lattner at cs.uiuc.edu Wed Mar 9 10:34:00 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 9 Mar 2005 10:34:00 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/runtime/FreeListAllocator/Makefile Message-ID: <200503091634.j29GY0so014703@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/runtime/FreeListAllocator: Makefile updated: 1.2 -> 1.3 --- Log message: this breaks the build --- Diffs of the changes: (+0 -3) Makefile | 3 --- 1 files changed, 3 deletions(-) Index: llvm-poolalloc/runtime/FreeListAllocator/Makefile diff -u llvm-poolalloc/runtime/FreeListAllocator/Makefile:1.2 llvm-poolalloc/runtime/FreeListAllocator/Makefile:1.3 --- llvm-poolalloc/runtime/FreeListAllocator/Makefile:1.2 Tue Nov 11 11:33:49 2003 +++ llvm-poolalloc/runtime/FreeListAllocator/Makefile Wed Mar 9 10:33:47 2005 @@ -4,6 +4,3 @@ LIBRARYNAME=poolalloc_fl_rt include $(LEVEL)/Makefile.common - -# Always build optimized and debug versions -all:: $(LIBNAME_OBJO) $(LIBNAME_OBJG) From lattner at cs.uiuc.edu Wed Mar 9 11:34:44 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 9 Mar 2005 11:34:44 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Type.cpp Message-ID: <200503091734.j29HYi92026549@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Type.cpp updated: 1.122 -> 1.123 --- Log message: correct the computation of the isAbstract bit for types. --- Diffs of the changes: (+8 -3) Type.cpp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.122 llvm/lib/VMCore/Type.cpp:1.123 --- llvm/lib/VMCore/Type.cpp:1.122 Tue Mar 1 21:54:43 2005 +++ llvm/lib/VMCore/Type.cpp Wed Mar 9 11:34:27 2005 @@ -481,8 +481,6 @@ // PromoteAbstractToConcrete - This is a recursive function that walks a type // graph calculating whether or not a type is abstract. // -// This method returns true if the type is found to still be abstract. -// void Type::PromoteAbstractToConcrete() { if (!isAbstract()) return; @@ -505,7 +503,10 @@ for (Type::subtype_iterator CI = SCC[i]->subtype_begin(), E = SCC[i]->subtype_end(); CI != E; ++CI) if ((*CI)->isAbstract()) - return; // Not going to be concrete, sorry. + // If the child type is in our SCC, it doesn't make the entire SCC + // abstract unless there is a non-SCC abstract type. + if (std::find(SCC.begin(), SCC.end(), *CI) == SCC.end()) + return; // Not going to be concrete, sorry. // Okay, we just discovered this whole SCC is now concrete, mark it as // such! @@ -513,6 +514,10 @@ assert(SCC[i]->isAbstract() && "Why are we processing concrete types?"); SCC[i]->setAbstract(false); + } + + for (unsigned i = 0, e = SCC.size(); i != e; ++i) { + assert(!SCC[i]->isAbstract() && "Concrete type became abstract?"); // The type just became concrete, notify all users! cast(SCC[i])->notifyUsesThatTypeBecameConcrete(); } From lattner at cs.uiuc.edu Wed Mar 9 12:37:28 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 9 Mar 2005 12:37:28 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200503091837.j29IbSuq027293@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.51 -> 1.52 --- Log message: constant fold FP_ROUND_INREG, ZERO_EXTEND_INREG, and SIGN_EXTEND_INREG This allows the alpha backend to compile: bool %test(uint %P) { %c = seteq uint %P, 0 ret bool %c } into: test: ldgp $29, 0($27) ZAP $16,240,$0 CMPEQ $0,0,$0 AND $0,1,$0 ret $31,($26),1 instead of: test: ldgp $29, 0($27) ZAP $16,240,$0 ldiq $1,0 ZAP $1,240,$1 CMPEQ $0,$1,$0 AND $0,1,$0 ret $31,($26),1 ... and fixes PR534: http://llvm.cs.uiuc.edu/PR534 . --- Diffs of the changes: (+12 -0) SelectionDAG.cpp | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.51 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.52 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.51 Thu Feb 17 14:17:32 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Mar 9 12:37:12 2005 @@ -946,6 +946,9 @@ "Cannot FP_ROUND_INREG integer types"); if (EVT == VT) return N1; // Not actually rounding assert(EVT < VT && "Not rounding down!"); + + if (isa(N1)) + return getNode(ISD::FP_EXTEND, VT, getNode(ISD::FP_ROUND, EVT, N1)); break; case ISD::ZERO_EXTEND_INREG: case ISD::SIGN_EXTEND_INREG: @@ -955,6 +958,15 @@ if (EVT == VT) return N1; // Not actually extending assert(EVT < VT && "Not extending!"); + // Extending a constant? Just return the constant. + if (ConstantSDNode *N1C = dyn_cast(N1.Val)) { + SDOperand Tmp = getNode(ISD::TRUNCATE, EVT, N1); + if (N1.getOpcode() == ISD::ZERO_EXTEND_INREG) + return getNode(ISD::ZERO_EXTEND, VT, Tmp); + else + return getNode(ISD::SIGN_EXTEND, VT, Tmp); + } + // If we are sign extending an extension, use the original source. if (N1.getOpcode() == ISD::ZERO_EXTEND_INREG || N1.getOpcode() == ISD::SIGN_EXTEND_INREG) { From alenhar2 at cs.uiuc.edu Wed Mar 9 14:48:52 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 9 Mar 2005 14:48:52 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaInstrInfo.td Message-ID: <200503092048.OAA06418@cypher.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaInstrInfo.td updated: 1.29 -> 1.30 --- Log message: minor correction for Register that isn't used --- Diffs of the changes: (+2 -2) AlphaInstrInfo.td | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.29 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.30 --- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.29 Fri Mar 4 14:09:23 2005 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Wed Mar 9 14:48:23 2005 @@ -53,10 +53,10 @@ let isReturn = 1, isTerminator = 1 in def RETURN : PseudoInstAlpha<(ops ), "ret $$31,($$26),1">; //Return from subroutine -let Uses = [R28, R29] in +let Uses = [R29], Defs = [R28] in def LOAD_IMM : PseudoInstAlpha<(ops GPRC:$RC, s64imm:$IMM), "ldiq $RC,$IMM">; //Load Immediate Quadword -let Uses = [R29, R28] in { +let Uses = [R29], Defs = [R28] in { def LOAD_ADDR : PseudoInstAlpha<(ops GPRC:$RA, s64imm:$DISP), "lda $RA,$DISP">; //Load address def LDQ_SYM : PseudoInstAlpha<(ops GPRC:$RA, s64imm:$DISP), "ldq $RA,$DISP">; //Load quadword def LDS_SYM : PseudoInstAlpha<(ops GPRC:$RA, s64imm:$DISP), "lds $RA,$DISP">; //Load float From lattner at cs.uiuc.edu Wed Mar 9 17:05:35 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 9 Mar 2005 17:05:35 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp LiveIntervalAnalysis.h Message-ID: <200503092305.j29N5ZRk029965@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.134 -> 1.135 LiveIntervalAnalysis.h updated: 1.44 -> 1.45 --- Log message: Allow the live interval analysis pass to be a bit more aggressive about numbering values in live ranges for physical registers. The alpha backend currently generates code that looks like this: vreg = preg ... preg = vreg use preg ... preg = vreg use preg etc. Because vreg contains the value of preg coming in, each of the copies back into preg contain that initial value as well. In the case of the Alpha, this allows this testcase: void "foo"(int %blah) { store int 5, int *%MyVar store int 12, int* %MyVar2 ret void } to compile to: foo: ldgp $29, 0($27) ldiq $0,5 stl $0,MyVar ldiq $0,12 stl $0,MyVar2 ret $31,($26),1 instead of: foo: ldgp $29, 0($27) bis $29,$29,$0 ldiq $1,5 bis $0,$0,$29 stl $1,MyVar ldiq $1,12 bis $0,$0,$29 stl $1,MyVar2 ret $31,($26),1 This does not seem to have any noticable effect on X86 code. This fixes PR535: http://llvm.cs.uiuc.edu/PR535 . --- Diffs of the changes: (+62 -10) LiveIntervalAnalysis.cpp | 60 +++++++++++++++++++++++++++++++++++++++++------ LiveIntervalAnalysis.h | 12 +++++++-- 2 files changed, 62 insertions(+), 10 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.134 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.135 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.134 Sat Jan 8 13:54:59 2005 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Mar 9 17:05:19 2005 @@ -58,6 +58,8 @@ EnableJoining("join-liveintervals", cl::desc("Join compatible live intervals"), cl::init(true)); + cl::opt + DisableHack("disable-hack"); }; void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const @@ -86,6 +88,7 @@ mf_ = &fn; tm_ = &fn.getTarget(); mri_ = tm_->getRegisterInfo(); + tii_ = tm_->getInstrInfo(); lv_ = &getAnalysis(); allocatableRegs_ = mri_->getAllocatableSet(fn); r2rMap_.grow(mf_->getSSARegMap()->getLastVirtReg()); @@ -120,7 +123,6 @@ // perform a final pass over the instructions and compute spill // weights, coalesce virtual registers and remove identity moves const LoopInfo& loopInfo = getAnalysis(); - const TargetInstrInfo& tii = *tm_->getInstrInfo(); for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end(); mbbi != mbbe; ++mbbi) { @@ -131,7 +133,7 @@ mii != mie; ) { // if the move will be an identity move delete it unsigned srcReg, dstReg, RegRep; - if (tii.isMoveInstr(*mii, srcReg, dstReg) && + if (tii_->isMoveInstr(*mii, srcReg, dstReg) && (RegRep = rep(srcReg)) == rep(dstReg)) { // remove from def list LiveInterval &interval = getOrCreateInterval(RegRep); @@ -444,7 +446,8 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock *MBB, MachineBasicBlock::iterator mi, - LiveInterval& interval) + LiveInterval& interval, + unsigned SrcReg, unsigned DestReg) { // A physical register cannot be live across basic block, so its // lifetime must end somewhere in its defining basic block. @@ -486,6 +489,45 @@ exit: assert(start < end && "did not find end of interval?"); + + // Finally, if this is defining a new range for the physical register, and if + // that physreg is just a copy from a vreg, and if THAT vreg was a copy from + // the physreg, then the new fragment has the same value as the one copied + // into the vreg. + if (interval.reg == DestReg && !interval.empty() && + MRegisterInfo::isVirtualRegister(SrcReg) && !DisableHack) { + + // Get the live interval for the vreg, see if it is defined by a copy. + LiveInterval &SrcInterval = getOrCreateInterval(SrcReg); + + if (SrcInterval.containsOneValue()) { + assert(!SrcInterval.empty() && "Can't contain a value and be empty!"); + + // Get the first index of the first range. Though the interval may have + // multiple liveranges in it, we only check the first. + unsigned StartIdx = SrcInterval.begin()->start; + MachineInstr *SrcDefMI = getInstructionFromIndex(StartIdx); + + // Check to see if the vreg was defined by a copy instruction, and that + // the source was this physreg. + unsigned VRegSrcSrc, VRegSrcDest; + if (tii_->isMoveInstr(*SrcDefMI, VRegSrcSrc, VRegSrcDest) && + SrcReg == VRegSrcDest && VRegSrcSrc == DestReg) { + // Okay, now we know that the vreg was defined by a copy from this + // physreg. Find the value number being copied and use it as the value + // for this range. + const LiveRange *DefRange = interval.getLiveRangeContaining(StartIdx-1); + if (DefRange) { + LiveRange LR(start, end, DefRange->ValId); + interval.addRange(LR); + DEBUG(std::cerr << " +" << LR << '\n'); + return; + } + } + } + } + + LiveRange LR(start, end, interval.getNextValue()); interval.addRange(LR); DEBUG(std::cerr << " +" << LR << '\n'); @@ -497,9 +539,14 @@ if (MRegisterInfo::isVirtualRegister(reg)) handleVirtualRegisterDef(MBB, MI, getOrCreateInterval(reg)); else if (allocatableRegs_[reg]) { - handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(reg)); + unsigned SrcReg = 0, DestReg = 0; + bool IsMove = tii_->isMoveInstr(*MI, SrcReg, DestReg); + + handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(reg), + SrcReg, DestReg); for (const unsigned* AS = mri_->getAliasSet(reg); *AS; ++AS) - handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(*AS)); + handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(*AS), + SrcReg, DestReg); } } @@ -541,7 +588,6 @@ void LiveIntervals::joinIntervalsInMachineBB(MachineBasicBlock *MBB) { DEBUG(std::cerr << ((Value*)MBB->getBasicBlock())->getName() << ":\n"); - const TargetInstrInfo &TII = *tm_->getInstrInfo(); for (MachineBasicBlock::iterator mi = MBB->begin(), mie = MBB->end(); mi != mie; ++mi) { @@ -551,7 +597,7 @@ // physical registers since we do not have liveness information // on not allocatable physical registers unsigned regA, regB; - if (TII.isMoveInstr(*mi, regA, regB) && + if (tii_->isMoveInstr(*mi, regA, regB) && (MRegisterInfo::isVirtualRegister(regA) || allocatableRegs_[regA]) && (MRegisterInfo::isVirtualRegister(regB) || allocatableRegs_[regB])) { Index: llvm/lib/CodeGen/LiveIntervalAnalysis.h diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.h:1.44 llvm/lib/CodeGen/LiveIntervalAnalysis.h:1.45 --- llvm/lib/CodeGen/LiveIntervalAnalysis.h:1.44 Mon Dec 6 22:03:45 2004 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.h Wed Mar 9 17:05:19 2005 @@ -28,12 +28,14 @@ class LiveVariables; class MRegisterInfo; + class TargetInstrInfo; class VirtRegMap; class LiveIntervals : public MachineFunctionPass { MachineFunction* mf_; const TargetMachine* tm_; const MRegisterInfo* mri_; + const TargetInstrInfo* tii_; LiveVariables* lv_; typedef std::map Mi2IndexMap; @@ -154,11 +156,15 @@ MachineBasicBlock::iterator mi, LiveInterval& interval); - /// handlePhysicalRegisterDef - update intervals for a - /// physical register def + /// handlePhysicalRegisterDef - update intervals for a physical register + /// def. If the defining instruction is a move instruction, SrcReg will be + /// the input register, and DestReg will be the result. Note that Interval + /// may not match DestReg (it might be an alias instead). + /// void handlePhysicalRegisterDef(MachineBasicBlock* mbb, MachineBasicBlock::iterator mi, - LiveInterval& interval); + LiveInterval& interval, + unsigned SrcReg, unsigned DestReg); /// Return true if the two specified registers belong to different /// register classes. The registers may be either phys or virt regs. From lattner at cs.uiuc.edu Wed Mar 9 17:14:44 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 9 Mar 2005 17:14:44 -0600 Subject: [llvm-commits] CVS: llvm-www/header.incl Message-ID: <200503092314.j29NEiaq030035@apoc.cs.uiuc.edu> Changes in directory llvm-www: header.incl updated: 1.35 -> 1.36 --- Log message: add link to testresults list --- Diffs of the changes: (+1 -1) header.incl | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/header.incl diff -u llvm-www/header.incl:1.35 llvm-www/header.incl:1.36 --- llvm-www/header.incl:1.35 Fri Feb 18 09:54:32 2005 +++ llvm-www/header.incl Wed Mar 9 17:14:31 2005 @@ -81,7 +81,7 @@ LLVM-dev
LLVM-bugs
LLVM-commits - + LLVM-testresults

IRC Channel:
From lattner at cs.uiuc.edu Wed Mar 9 17:17:56 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 9 Mar 2005 17:17:56 -0600 Subject: [llvm-commits] CVS: llvm-www/testresults/index.html Message-ID: <200503092317.j29NHuDh030071@apoc.cs.uiuc.edu> Changes in directory llvm-www/testresults: index.html updated: 1.29 -> 1.30 --- Log message: add a link to the llvm-testresults list. --- Diffs of the changes: (+9 -3) index.html | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) Index: llvm-www/testresults/index.html diff -u llvm-www/testresults/index.html:1.29 llvm-www/testresults/index.html:1.30 --- llvm-www/testresults/index.html:1.29 Sun Feb 27 21:21:45 2005 +++ llvm-www/testresults/index.html Wed Mar 9 17:17:43 2005 @@ -12,7 +12,13 @@ break test cases. This is intended to track, over time, the CVS repository, test suite conformance, and performance of code generated by the compiler.

-

X86

+

+Note that the results of these testers are summarized and sent to the llvm-testresults +mailing list. +

+ +

X86

    @@ -32,14 +38,14 @@ (Single Pentium M @ 2.3GHz) -- release build
-

PowerPC

+

PowerPC

  1. Mac OS X 10.3 "Panther" on PowerPC G5 (dual 1.8Ghz CPU) -- debug build
-

Sparc V9

+

Sparc V9

  1. SunOS 5.8 on Sun Fire V240 (dual 1Ghz CPU) -- debug From alenhar2 at cs.uiuc.edu Thu Mar 10 09:25:54 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Thu, 10 Mar 2005 09:25:54 -0600 Subject: [llvm-commits] CVS: llvm-www/testresults/index.html Message-ID: <200503101525.j2AFPsiS004423@apoc.cs.uiuc.edu> Changes in directory llvm-www/testresults: index.html updated: 1.30 -> 1.31 --- Log message: fix bold --- Diffs of the changes: (+1 -1) index.html | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/testresults/index.html diff -u llvm-www/testresults/index.html:1.30 llvm-www/testresults/index.html:1.31 --- llvm-www/testresults/index.html:1.30 Wed Mar 9 17:17:43 2005 +++ llvm-www/testresults/index.html Thu Mar 10 09:25:38 2005 @@ -52,7 +52,7 @@ build
-

Alpha

+

Alpha

  1. Linux (Single 21164 EV56 500 MHz) -- release From lattner at cs.uiuc.edu Thu Mar 10 09:58:59 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 09:58:59 -0600 Subject: [llvm-commits] CVS: llvm-www/testresults/index.html Message-ID: <200503101558.j2AFwxks004590@apoc.cs.uiuc.edu> Changes in directory llvm-www/testresults: index.html updated: 1.31 -> 1.32 --- Log message: link to the archives, not the overview page --- Diffs of the changes: (+1 -1) index.html | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/testresults/index.html diff -u llvm-www/testresults/index.html:1.31 llvm-www/testresults/index.html:1.32 --- llvm-www/testresults/index.html:1.31 Thu Mar 10 09:25:38 2005 +++ llvm-www/testresults/index.html Thu Mar 10 09:58:43 2005 @@ -14,7 +14,7 @@

    Note that the results of these testers are summarized and sent to the llvm-testresults +href="http://mail.cs.uiuc.edu/pipermail/llvm-testresults/">llvm-testresults mailing list.

    From lattner at cs.uiuc.edu Thu Mar 10 10:27:05 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 10:27:05 -0600 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200503101627.j2AGR5vs004760@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.90 -> 1.91 --- Log message: Improve formatting of the sent mail for the dj test results. --- Diffs of the changes: (+15 -4) NightlyTest.pl | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.90 llvm/utils/NightlyTest.pl:1.91 --- llvm/utils/NightlyTest.pl:1.90 Sun Feb 13 10:08:30 2005 +++ llvm/utils/NightlyTest.pl Thu Mar 10 10:26:50 2005 @@ -198,9 +198,11 @@ my @lines; my $firstline; $/ = "\n"; #Make sure we're going line at a time. + + print "Dejagnu test results:\n"; + if (open SRCHFILE, $filename) { # Process test results - push(@lines,"

    UNEXPECTED TEST RESULTS

    1. \n"); my $first_list = 1; my $should_break = 1; my $nocopy = 0; @@ -211,20 +213,30 @@ if ( m/^XPASS:/ || m/^FAIL:/ ) { $nocopy = 0; if ( $first_list ) { + push(@lines,"

      UNEXPECTED TEST RESULTS

      1. \n"); $first_list = 0; $should_break = 1; push(@lines,"$_
        \n"); + print " $_\n"; } else { push(@lines,"
      2. $_
        \n"); + print " $_\n"; } } elsif ( m/Summary/ ) { - if ( $first_list ) { push(@lines,"PERFECT!"); } - push(@lines,"

      STATISTICS

      \n");
      +          if ( $first_list ) {
      +	    push(@lines,"PERFECT!"); 
      +	    print "  PERFECT!\n";
      +	  } else {
      +	    push(@lines, "
    \n"); + } + push(@lines,"

    STATISTICS

    \n");
    +	  print "\nSTATISTICS:\n";
               $should_break = 0;
               $nocopy = 0;
               $readingsum = 1;
             } elsif ( $readingsum ) {
               push(@lines,"$_\n");
    +	  print "$_\n";
             }
           }
         }
    @@ -446,7 +458,6 @@
       CopyFile("test/testrun.sum", $DejagnuSum);
     
       $DejagnuTestResults = GetDejagnuTestResults($DejagnuSum, $DejagnuLog);
    -  print $DejagnuTestResults;
     
     } else {
       $DejagnuTestResults = "Skipped by user choice.";
    
    
    
    
    
    From brukman at cs.uiuc.edu  Thu Mar 10 10:32:44 2005
    From: brukman at cs.uiuc.edu (Misha Brukman)
    Date: Thu, 10 Mar 2005 10:32:44 -0600
    Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl 
    Message-ID: <200503101632.KAA16525@zion.cs.uiuc.edu>
    
    
    
    Changes in directory llvm/utils:
    
    NightlyTest.pl updated: 1.91 -> 1.92
    ---
    Log message:
    
    Replace tabs with spaces, separate function arguments with a space
    
    
    ---
    Diffs of the changes:  (+12 -12)
    
     NightlyTest.pl |   24 ++++++++++++------------
     1 files changed, 12 insertions(+), 12 deletions(-)
    
    
    Index: llvm/utils/NightlyTest.pl
    diff -u llvm/utils/NightlyTest.pl:1.91 llvm/utils/NightlyTest.pl:1.92
    --- llvm/utils/NightlyTest.pl:1.91	Thu Mar 10 10:26:50 2005
    +++ llvm/utils/NightlyTest.pl	Thu Mar 10 10:32:33 2005
    @@ -213,30 +213,30 @@
             if ( m/^XPASS:/ || m/^FAIL:/ ) {
               $nocopy = 0;
               if ( $first_list ) {
    -            push(@lines,"

    UNEXPECTED TEST RESULTS

    1. \n"); + push(@lines, "

      UNEXPECTED TEST RESULTS

      1. \n"); $first_list = 0; $should_break = 1; - push(@lines,"$_
        \n"); + push(@lines, "$_
        \n"); print " $_\n"; } else { - push(@lines,"
      2. $_
        \n"); + push(@lines, "
      3. $_
        \n"); print " $_\n"; } } elsif ( m/Summary/ ) { if ( $first_list ) { - push(@lines,"PERFECT!"); - print " PERFECT!\n"; - } else { - push(@lines, "
      \n"); - } - push(@lines,"

      STATISTICS

      \n");
      -	  print "\nSTATISTICS:\n";
      +            push(@lines, "PERFECT!"); 
      +            print "  PERFECT!\n";
      +          } else {
      +            push(@lines, "
    \n"); + } + push(@lines, "

    STATISTICS

    \n");
    +          print "\nSTATISTICS:\n";
               $should_break = 0;
               $nocopy = 0;
               $readingsum = 1;
             } elsif ( $readingsum ) {
               push(@lines,"$_\n");
    -	  print "$_\n";
    +          print "$_\n";
             }
           }
         }
    @@ -244,7 +244,7 @@
       push(@lines, "
    \n"); close SRCHFILE; - my $content = join("", at lines); + my $content = join("", @lines); return "$content
\n"; } From lattner at cs.uiuc.edu Thu Mar 10 12:57:02 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 12:57:02 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/README Message-ID: <200503101857.j2AIv2cp006016@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc: README updated: 1.3 -> 1.4 --- Log message: update this. --- Diffs of the changes: (+0 -14) README | 14 -------------- 1 files changed, 14 deletions(-) Index: llvm-poolalloc/README diff -u llvm-poolalloc/README:1.3 llvm-poolalloc/README:1.4 --- llvm-poolalloc/README:1.3 Tue Aug 12 14:46:14 2003 +++ llvm-poolalloc/README Thu Mar 10 12:56:46 2005 @@ -58,20 +58,6 @@ This will generate a bytecode file that can be executed. -CHANGES: -======== -This pre-release has the following changes: - - - Pool Allocator Optimization pass is now separate from LLVM and - compiled into a shared object. The LLVM utilities do not need to be - recompiled when the pool allocator code is changed. - - Correctly handles indirect calls. - - Correctly handles globals. - - Accepts partially pool allocatable programs. - - Fixed a large number of bugs. - - Tested on a number of benchmarks including Olden, Ptrdist, and a few - SPEC codes. - BUGS: ===== Please see our website for information on how to report bugs From lattner at cs.uiuc.edu Thu Mar 10 13:01:25 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 13:01:25 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/runtime/PtrCompAllocator/Makefile PtrCompAllocator.cpp PtrCompAllocator.h Message-ID: <200503101901.j2AJ1PmU006155@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/runtime/PtrCompAllocator: Makefile (r1.2) removed PtrCompAllocator.cpp (r1.6) removed PtrCompAllocator.h (r1.4) removed --- Log message: this is obsolete, and is being removed. --- Diffs of the changes: (+0 -0) 0 files changed From lattner at cs.uiuc.edu Thu Mar 10 13:01:45 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 13:01:45 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/runtime/Makefile Message-ID: <200503101901.j2AJ1jjP006172@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/runtime: Makefile updated: 1.5 -> 1.6 --- Log message: Remove dead directory --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-poolalloc/runtime/Makefile diff -u llvm-poolalloc/runtime/Makefile:1.5 llvm-poolalloc/runtime/Makefile:1.6 --- llvm-poolalloc/runtime/Makefile:1.5 Tue Feb 22 13:35:20 2005 +++ llvm-poolalloc/runtime/Makefile Thu Mar 10 13:01:32 2005 @@ -6,6 +6,6 @@ # # List all of the subdirectories that we will compile. # -DIRS=PoolAllocator FreeListAllocator FL2Allocator PtrCompAllocator +DIRS=PoolAllocator FreeListAllocator FL2Allocator include $(LEVEL)/Makefile.common From alenhar2 at cs.uiuc.edu Thu Mar 10 13:02:15 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Thu, 10 Mar 2005 13:02:15 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp Message-ID: <200503101902.j2AJ2FA7006219@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaAsmPrinter.cpp updated: 1.7 -> 1.8 --- Log message: some typoes and .bss isn't liked, at all --- Diffs of the changes: (+4 -4) AlphaAsmPrinter.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.7 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.8 --- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.7 Fri Feb 25 16:55:15 2005 +++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp Thu Mar 10 13:02:02 2005 @@ -126,7 +126,7 @@ } case MachineOperand::MO_ConstantPoolIndex: - O << "$CPI" << CurrentFnName << "_" << MO.getConstantPoolIndex(); + O << "CPI" << CurrentFnName << "_" << MO.getConstantPoolIndex(); return; case MachineOperand::MO_ExternalSymbol: @@ -211,7 +211,7 @@ for (unsigned i = 0, e = CP.size(); i != e; ++i) { O << "\t.section\t.rodata\n"; emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType())); - O << "$CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t" << CommentString + O << "CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t" << CommentString << *CP[i] << "\n"; emitGlobalConstant(CP[i]); } @@ -279,12 +279,12 @@ // FALL THROUGH case GlobalValue::InternalLinkage: if (C->isNullValue()) - SwitchSection(O, CurSection, ".bss"); + SwitchSection(O, CurSection, ".data"); //was .bss else SwitchSection(O, CurSection, ".data"); break; case GlobalValue::GhostLinkage: - std::cerr << "GhostLinkage cannot appear in X86AsmPrinter!\n"; + std::cerr << "GhostLinkage cannot appear in AlphaAsmPrinter!\n"; abort(); } From lattner at cs.uiuc.edu Thu Mar 10 13:04:02 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 13:04:02 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/runtime/FreeListAllocator/README.txt Message-ID: <200503101904.j2AJ42xA006282@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/runtime/FreeListAllocator: README.txt added (r1.1) --- Log message: Add note --- Diffs of the changes: (+3 -0) README.txt | 3 +++ 1 files changed, 3 insertions(+) Index: llvm-poolalloc/runtime/FreeListAllocator/README.txt diff -c /dev/null llvm-poolalloc/runtime/FreeListAllocator/README.txt:1.1 *** /dev/null Thu Mar 10 13:03:59 2005 --- llvm-poolalloc/runtime/FreeListAllocator/README.txt Thu Mar 10 13:03:49 2005 *************** *** 0 **** --- 1,3 ---- + This implementation of the pool allocator runtime library is not used, + and is kept for historical reasons. Please use the FL2 allocator + instead. From lattner at cs.uiuc.edu Thu Mar 10 13:06:09 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 13:06:09 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp Message-ID: <200503101906.j2AJ69OV006751@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/runtime/FL2Allocator: FreeListAllocator.cpp updated: 1.42 -> 1.43 --- Log message: track peak heap more accurately --- Diffs of the changes: (+2 -2) FreeListAllocator.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp diff -u llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp:1.42 llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp:1.43 --- llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp:1.42 Sat Mar 5 00:02:04 2005 +++ llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp Thu Mar 10 13:05:53 2005 @@ -529,7 +529,7 @@ NumBytes = (NumBytes & ~(Alignment-1)) - sizeof(FreedNodeHeader); // Truncate - DO_IF_PNP(CurHeapSize += NumBytes); + DO_IF_PNP(CurHeapSize += (NumBytes + sizeof(NodeHeader))); DO_IF_PNP(if (CurHeapSize > MaxHeapSize) MaxHeapSize = CurHeapSize); DO_IF_PNP(++Pool->NumObjects); @@ -671,7 +671,7 @@ if (Size == ~1U) goto LargeArrayCase; DO_IF_TRACE(fprintf(stderr, "%d bytes\n", Size)); - DO_IF_PNP(CurHeapSize -= Size); + DO_IF_PNP(CurHeapSize -= (Size + sizeof(NodeHeader))); // If the node immediately after this one is also free, merge it into node. FreedNodeHeader *NextFNH; From lattner at cs.uiuc.edu Thu Mar 10 13:09:47 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 13:09:47 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/runtime/README.txt Message-ID: <200503101909.j2AJ9lfW006838@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/runtime: README.txt added (r1.1) --- Log message: note the status --- Diffs of the changes: (+15 -0) README.txt | 15 +++++++++++++++ 1 files changed, 15 insertions(+) Index: llvm-poolalloc/runtime/README.txt diff -c /dev/null llvm-poolalloc/runtime/README.txt:1.1 *** /dev/null Thu Mar 10 13:09:42 2005 --- llvm-poolalloc/runtime/README.txt Thu Mar 10 13:09:32 2005 *************** *** 0 **** --- 1,15 ---- + //===---------------------------------------------------------------------===// + This directory contains the pool allocator runtime library implementations. + + The only fully maintained runtime library implementation is in the FL2Allocator + directory. This supports the pool allocator, the bump pointer optimization, + and the pointer compression runtime. + + The implementation is the FreeListAllocator directory is much slower than + the FL2Allocator and has not been updated. + + The implementation in the PoolAllocator directory is also probably out of date, + and is much slower than FL2, but is used by the SAFECode project, which cannot + allow pool metadata to be stored intermixed with program data. + + From lattner at cs.uiuc.edu Thu Mar 10 13:13:10 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 13:13:10 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp Message-ID: <200503101913.j2AJDAaw007801@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/runtime/FL2Allocator: PoolAllocator.cpp updated: 1.43 -> 1.44 --- Log message: update to reflect file rename --- Diffs of the changes: (+1 -1) PoolAllocator.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp diff -u llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp:1.43 llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp:1.44 --- llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp:1.43 Thu Mar 10 13:05:53 2005 +++ llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp Thu Mar 10 13:12:57 2005 @@ -1,4 +1,4 @@ -//===- FreeListAllocator.cpp - Simple linked-list based pool allocator ----===// +//===- PoolAllocator.cpp - Simple free-list based pool allocator ----------===// // // The LLVM Compiler Infrastructure // From lattner at cs.uiuc.edu Thu Mar 10 13:28:24 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 13:28:24 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/include/poolalloc/MMAPSupport.h Message-ID: <200503101928.j2AJSOfH010260@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/include/poolalloc: MMAPSupport.h added (r1.1) --- Log message: initial implementation of this header to abstract stuff out of the runtime libs. --- Diffs of the changes: (+58 -0) MMAPSupport.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 58 insertions(+) Index: llvm-poolalloc/include/poolalloc/MMAPSupport.h diff -c /dev/null llvm-poolalloc/include/poolalloc/MMAPSupport.h:1.1 *** /dev/null Thu Mar 10 13:28:18 2005 --- llvm-poolalloc/include/poolalloc/MMAPSupport.h Thu Mar 10 13:28:08 2005 *************** *** 0 **** --- 1,58 ---- + //===- MMAPSupport.h - mmap portability wrappers ----------------*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file allows clients to use some functionality of mmap efficiently and + // portably. This is used for the pool allocator runtime implementations. + // + //===----------------------------------------------------------------------===// + + /// FIXME: This isn't installed, add copies of the configure checks to the pool + /// allocator project configure script. + #include "llvm/Config/config.h" + #include + #include + + #ifdef HAVE_FCNTL_H + #include + #endif + + #ifdef HAVE_SYS_MMAN_H + #include + #endif + + #ifdef HAVE_SYS_STAT_H + #include + #endif + + #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS) + #define MAP_ANONYMOUS MAP_ANON + #endif /* defined(MAP_ANON) && !defined(MAP_ANONYMOUS) */ + + static void *AllocateSpaceWithMMAP(size_t Size, bool UseNoReserve = false) { + // NOTE: this assumes Size is a multiple of the page size. + int FD = -1; + #ifdef NEED_DEV_ZERO_FOR_MMAP + static int DevZeroFD = open("/dev/zero", O_RDWR); + if (DevZeroFD == -1) { + perror("Can't open /dev/zero device"); + abort(); + } + FD = zero_fd; + #endif + + int Flags = MAP_PRIVATE | MAP_ANONYMOUS; + #ifdef MMAP_NORESERVE + if (UseNoReserve) + Flags |= MMAP_NORESERVE; + #endif + + void *Mem = ::mmap(0, Size, PROT_READ|PROT_WRITE, Flags, FD, 0); + assert(Mem != MAP_FAILED && "couldn't get space!"); + return Mem; + } From lattner at cs.uiuc.edu Thu Mar 10 13:28:44 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 13:28:44 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/runtime/FreeListAllocator/PageManager.cpp Message-ID: <200503101928.j2AJSi4m010276@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/runtime/FreeListAllocator: PageManager.cpp updated: 1.10 -> 1.11 --- Log message: remove a bunch of mmap details to an autoconf'd header. --- Diffs of the changes: (+3 -34) PageManager.cpp | 37 +++---------------------------------- 1 files changed, 3 insertions(+), 34 deletions(-) Index: llvm-poolalloc/runtime/FreeListAllocator/PageManager.cpp diff -u llvm-poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.10 llvm-poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.11 --- llvm-poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.10 Sun Jan 30 10:38:07 2005 +++ llvm-poolalloc/runtime/FreeListAllocator/PageManager.cpp Thu Mar 10 13:28:31 2005 @@ -16,9 +16,8 @@ #define _POSIX_MAPPED_FILES #endif #include -#include +#include "poolalloc/MMAPSupport.h" #include "poolalloc/Support/MallocAllocator.h" -#include #include #include @@ -41,42 +40,13 @@ // any other Page Manager functions are called. // unsigned int InitializePageManager() { - if (!PageSize) - { + if (!PageSize) { PageSize = sysconf(_SC_PAGESIZE); FreePages = 0; } return PageSize; } -#if !USE_MEMALIGN -void *GetPages(unsigned NumPages) { -#if defined(i386) || defined(__i386__) || defined(__x86__) - /* Linux and *BSD tend to have these flags named differently. */ -#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS) -# define MAP_ANONYMOUS MAP_ANON -#endif /* defined(MAP_ANON) && !defined(MAP_ANONYMOUS) */ -#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9) - /* nothing */ -#else - std::cerr << "This architecture is not supported by the pool allocator!\n"; - abort(); -#endif - -#if defined(__linux__) -#define fd 0 -#else -#define fd -1 -#endif - - void *pa = mmap(0, NumPages*PageSize, PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANONYMOUS, fd, 0); - assert(pa != MAP_FAILED && "MMAP FAILED!"); - return pa; -} -#endif - - /// /// Function: AllocatePage () /// @@ -100,7 +70,7 @@ // Allocate several pages, and put the extras on the freelist... unsigned NumToAllocate = 8; - char *Ptr = (char*)GetPages(NumToAllocate); + char *Ptr = (char*)AllocateSpaceWithMMAP(PageSize*NumToAllocate); if (!FreePages) { // Avoid using operator new! @@ -123,6 +93,5 @@ #else assert(FreePages && "No pages allocated!"); FreePages->push_back(Page); - //munmap(Page, 1); #endif } From lattner at cs.uiuc.edu Thu Mar 10 13:29:00 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 13:29:00 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp Message-ID: <200503101929.j2AJT0Di010290@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/runtime/FL2Allocator: PoolAllocator.cpp updated: 1.44 -> 1.45 --- Log message: remove non-portable mmap stuff to an autoconf'd header. --- Diffs of the changes: (+4 -6) PoolAllocator.cpp | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) Index: llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp diff -u llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp:1.44 llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp:1.45 --- llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp:1.44 Thu Mar 10 13:12:57 2005 +++ llvm-poolalloc/runtime/FL2Allocator/PoolAllocator.cpp Thu Mar 10 13:28:47 2005 @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "PoolAllocator.h" +#include "poolalloc/MMAPSupport.h" #include #include #include @@ -833,7 +834,7 @@ // around the normal pool routines. //===----------------------------------------------------------------------===// -#include +// For now, use address space reservation of 256MB. #define POOLSIZE (256*1024*1024) // Pools - When we are done with a pool, don't munmap it, keep it around for @@ -849,7 +850,7 @@ // allocation), because code may want to eagerly copy the pool base into a // register. - // If we already have a pool mmap'd, reuse it. + // If we already have a pool mapped, reuse it. for (unsigned i = 0; i != 4; ++i) if (Pools[i]) { Pool->Slabs = Pools[i]; @@ -857,13 +858,10 @@ break; } - - if (Pool->Slabs == 0) { // Didn't find an existing pool, create one. Pool->Slabs = (PoolSlab*) - mmap(0, POOLSIZE, PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0); + AllocateSpaceWithMMAP(POOLSIZE, true); DO_IF_TRACE(fprintf(stderr, "RESERVED ADDR SPACE: %p -> %p\n", Pool->Slabs, (char*)Pool->Slabs+POOLSIZE)); } From lattner at cs.uiuc.edu Thu Mar 10 13:31:41 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 13:31:41 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/runtime/PoolAllocator/PageManager.cpp Message-ID: <200503101931.j2AJVf0x010756@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/runtime/PoolAllocator: PageManager.cpp updated: 1.11 -> 1.12 --- Log message: switch to use MMAPSupport.h --- Diffs of the changes: (+3 -33) PageManager.cpp | 36 +++--------------------------------- 1 files changed, 3 insertions(+), 33 deletions(-) Index: llvm-poolalloc/runtime/PoolAllocator/PageManager.cpp diff -u llvm-poolalloc/runtime/PoolAllocator/PageManager.cpp:1.11 llvm-poolalloc/runtime/PoolAllocator/PageManager.cpp:1.12 --- llvm-poolalloc/runtime/PoolAllocator/PageManager.cpp:1.11 Sun Jan 30 10:37:36 2005 +++ llvm-poolalloc/runtime/PoolAllocator/PageManager.cpp Thu Mar 10 13:31:26 2005 @@ -16,9 +16,8 @@ #define _POSIX_MAPPED_FILES #endif #include -#include +#include "poolalloc/MMAPSupport.h" #include "poolalloc/Support/MallocAllocator.h" -#include #include #include @@ -32,33 +31,6 @@ if (!PageSize) PageSize = sysconf(_SC_PAGESIZE); } -#if !USE_MEMALIGN -static void *GetPages(unsigned NumPages) { -#if defined(i386) || defined(__i386__) || defined(__x86__) - /* Linux and *BSD tend to have these flags named differently. */ -#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS) -# define MAP_ANONYMOUS MAP_ANON -#endif /* defined(MAP_ANON) && !defined(MAP_ANONYMOUS) */ -#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9) - /* nothing */ -#else - std::cerr << "This architecture is not supported by the pool allocator!\n"; - abort(); -#endif - -#if defined(__linux__) -#define fd 0 -#else -#define fd -1 -#endif - - void *pa = mmap(0, NumPages*PageSize, PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANONYMOUS, fd, 0); - assert(pa != MAP_FAILED && "MMAP FAILED!"); - return pa; -} -#endif - // Explicitly use the malloc allocator here, to avoid depending on the C++ // runtime library. typedef std::vector > FreePagesListType; @@ -94,8 +66,7 @@ // Allocate several pages, and put the extras on the freelist... unsigned NumToAllocate = 8; - char *Ptr = (char*)GetPages(NumToAllocate); - + char *Ptr = (char*)AllocateSpaceWithMMAP(NumToAllocate*PageSize); for (unsigned i = 1; i != NumToAllocate; ++i) FPL.push_back(Ptr+i*PageSize); return Ptr; @@ -104,7 +75,7 @@ void *AllocateNPages(unsigned Num) { if (Num <= 1) return AllocatePage(); - return GetPages(Num); + return AllocateSpaceWithMMAP(Num*PageSize); } /// FreePage - This function returns the specified page to the pagemanager for @@ -115,6 +86,5 @@ #else FreePagesListType &FPL = getFreePageList(); FPL.push_back(Page); - //munmap(Page, 1); #endif } From lattner at cs.uiuc.edu Thu Mar 10 14:09:05 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 14:09:05 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Message-ID: <200503102009.j2AK95aw011623@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: TransformFunctionBody.cpp updated: 1.37 -> 1.38 --- Log message: This code is not safe, remove it. --- Diffs of the changes: (+0 -14) TransformFunctionBody.cpp | 14 -------------- 1 files changed, 14 deletions(-) Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.37 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.38 --- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.37 Sun Feb 27 16:32:04 2005 +++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Thu Mar 10 14:08:49 2005 @@ -381,20 +381,6 @@ Function *CF = CS.getCalledFunction(); Instruction *TheCall = CS.getInstruction(); - // optimization for function pointers that are basically gotten from a cast - // with only one use and constant expressions with casts in them - if (!CF) { - Value *CV = CS.getCalledValue(); - if (CastInst* CastI = dyn_cast(CV)) { - if (isa(CastI->getOperand(0)) && - CastI->getOperand(0)->getType() == CastI->getType()) - CF = dyn_cast(CastI->getOperand(0)); - } else if (ConstantExpr *CE = dyn_cast(CV)) { - if (CE->getOpcode() == Instruction::Cast) - CF = dyn_cast(CE->getOperand(0)); - } - } - // If this function is one of the memory manipulating functions built into // libc, emulate it with pool calls as appropriate. if (CF && CF->isExternal()) From alenhar2 at cs.uiuc.edu Thu Mar 10 14:15:25 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Thu, 10 Mar 2005 14:15:25 -0600 Subject: [llvm-commits] CVS: llvm/lib/Support/ToolRunner.cpp Message-ID: <200503102015.j2AKFPID011709@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Support: ToolRunner.cpp updated: 1.40 -> 1.41 --- Log message: yay for camel_cvs diff --- Diffs of the changes: (+1 -1) ToolRunner.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Support/ToolRunner.cpp diff -u llvm/lib/Support/ToolRunner.cpp:1.40 llvm/lib/Support/ToolRunner.cpp:1.41 --- llvm/lib/Support/ToolRunner.cpp:1.40 Tue Mar 8 21:31:02 2005 +++ llvm/lib/Support/ToolRunner.cpp Thu Mar 10 14:15:09 2005 @@ -451,7 +451,7 @@ "-shared", // `-shared' for Linux/X86, maybe others #endif -#if defined(__ia64__) +#if defined(__ia64__) || defined(__alpha__) "-fPIC", // IA64 requires shared objs to contain PIC #endif "-o", OutputFile.c_str(), // Output to the right filename... From criswell at cs.uiuc.edu Thu Mar 10 14:48:19 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 10 Mar 2005 14:48:19 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/include/poolalloc/Config/ Message-ID: <200503102048.OAA06242@niobe.cs.uiuc.edu> Changes in directory llvm-poolalloc/include/poolalloc/Config: --- Log message: Directory /home/vadve/shared/PublicCVS/llvm-poolalloc/include/poolalloc/Config added to the repository --- Diffs of the changes: (+0 -0) 0 files changed From criswell at cs.uiuc.edu Thu Mar 10 14:49:52 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 10 Mar 2005 14:49:52 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/autoconf/aclocal.m4 configure.ac Message-ID: <200503102049.OAA06279@niobe.cs.uiuc.edu> Changes in directory llvm-poolalloc/autoconf: aclocal.m4 updated: 1.2 -> 1.3 configure.ac updated: 1.6 -> 1.7 --- Log message: Added support for checking for mmap() functionality and a few miscellaneous header files. --- Diffs of the changes: (+28 -0) aclocal.m4 | 21 +++++++++++++++++++++ configure.ac | 7 +++++++ 2 files changed, 28 insertions(+) Index: llvm-poolalloc/autoconf/aclocal.m4 diff -u llvm-poolalloc/autoconf/aclocal.m4:1.2 llvm-poolalloc/autoconf/aclocal.m4:1.3 --- llvm-poolalloc/autoconf/aclocal.m4:1.2 Tue Sep 30 11:31:25 2003 +++ llvm-poolalloc/autoconf/aclocal.m4 Thu Mar 10 14:49:36 2005 @@ -6165,4 +6165,25 @@ [AC_CONFIG_COMMANDS($1,${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/$1 $1,${srcdir}/autoconf/mkinstalldirs `dirname $1`) ]) +# +# When allocating RWX memory, check whether we need to use /dev/zero +# as the file descriptor or not. +# +# Note: +# Originally from llvm/autoconf/m4/need_dev_zero_for_mmap.m4, written by +# Reid Spencer. +# +AC_DEFUN([AC_NEED_DEV_ZERO_FOR_MMAP], +[AC_CACHE_CHECK([if /dev/zero is needed for mmap], +ac_cv_need_dev_zero_for_mmap, +[if test "$llvm_cv_os_type" = "Interix" ; then + ac_cv_need_dev_zero_for_mmap=yes + else + ac_cv_need_dev_zero_for_mmap=no + fi +]) +if test "$ac_cv_need_dev_zero_for_mmap" = yes; then + AC_DEFINE([NEED_DEV_ZERO_FOR_MMAP],[1], + [Define if /dev/zero should be used when mapping RWX memory, or undefine if its not necessary]) +fi]) Index: llvm-poolalloc/autoconf/configure.ac diff -u llvm-poolalloc/autoconf/configure.ac:1.6 llvm-poolalloc/autoconf/configure.ac:1.7 --- llvm-poolalloc/autoconf/configure.ac:1.6 Thu Apr 1 13:14:31 2004 +++ llvm-poolalloc/autoconf/configure.ac Thu Mar 10 14:49:36 2005 @@ -59,6 +59,9 @@ dnl * So, we'll be gracious, give it a chance, and try to go on without dnl * them. dnl ************************************************************************** +AC_HEADER_MMAP_ANONYMOUS +AC_HEADER_STAT +AC_CHECK_HEADERS([fcntl.h sys/mman.h]) dnl ************************************************************************** dnl * Checks for typedefs, structures, and compiler characteristics. @@ -67,6 +70,9 @@ dnl ************************************************************************** dnl * Checks for library functions. dnl ************************************************************************** +AC_FUNC_MMAP +AC_FUNC_MMAP_FILE +AC_NEED_DEV_ZERO_FOR_MMAP dnl ************************************************************************** dnl * Enable various compile-time options @@ -85,4 +91,5 @@ dnl ************************************************************************** dnl * Create the output files dnl ************************************************************************** +AC_CONFIG_HEADERS(include/poolalloc/Config/config.h) AC_OUTPUT(Makefile.common) From criswell at cs.uiuc.edu Thu Mar 10 14:49:53 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 10 Mar 2005 14:49:53 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/include/poolalloc/MMAPSupport.h Message-ID: <200503102049.OAA06283@niobe.cs.uiuc.edu> Changes in directory llvm-poolalloc/include/poolalloc: MMAPSupport.h updated: 1.1 -> 1.2 --- Log message: Added support for checking for mmap() functionality and a few miscellaneous header files. --- Diffs of the changes: (+1 -3) MMAPSupport.h | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm-poolalloc/include/poolalloc/MMAPSupport.h diff -u llvm-poolalloc/include/poolalloc/MMAPSupport.h:1.1 llvm-poolalloc/include/poolalloc/MMAPSupport.h:1.2 --- llvm-poolalloc/include/poolalloc/MMAPSupport.h:1.1 Thu Mar 10 13:28:08 2005 +++ llvm-poolalloc/include/poolalloc/MMAPSupport.h Thu Mar 10 14:49:39 2005 @@ -12,9 +12,7 @@ // //===----------------------------------------------------------------------===// -/// FIXME: This isn't installed, add copies of the configure checks to the pool -/// allocator project configure script. -#include "llvm/Config/config.h" +#include "poolalloc/Config/config.h" #include #include From criswell at cs.uiuc.edu Thu Mar 10 14:50:11 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 10 Mar 2005 14:50:11 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/configure Message-ID: <200503102050.OAA06295@niobe.cs.uiuc.edu> Changes in directory llvm-poolalloc: configure updated: 1.7 -> 1.8 --- Log message: Added support for checking for mmap() functionality and a few miscellaneous header files. --- Diffs of the changes: (+2556 -156) configure | 2712 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 2556 insertions(+), 156 deletions(-) Index: llvm-poolalloc/configure diff -u llvm-poolalloc/configure:1.7 llvm-poolalloc/configure:1.8 --- llvm-poolalloc/configure:1.7 Thu Apr 1 13:14:30 2004 +++ llvm-poolalloc/configure Thu Mar 10 14:49:28 2005 @@ -273,7 +273,44 @@ PACKAGE_BUGREPORT='llvmbugs at cs.uiuc.edu' ac_unique_file=""Makefile.common.in"" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_SRC LLVM_OBJ LIBOBJS LTLIBOBJS' +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP MMAP_FILE LLVM_SRC LLVM_OBJ LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -714,6 +751,26 @@ ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -789,6 +846,18 @@ --with-llvmsrc Location of LLVM Source Code --with-llvmobj Location of LLVM Object Code +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + Report bugs to . _ACEOF fi @@ -1272,193 +1341,2285 @@ +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - - - -# Check whether --with-llvmsrc or --without-llvmsrc was given. -if test "${with_llvmsrc+set}" = set; then - withval="$with_llvmsrc" - LLVM_SRC=$withval - +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - LLVM_SRC=`cd ${srcdir}/../..; pwd` + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -fi; + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -# Check whether --with-llvmobj or --without-llvmobj was given. -if test "${with_llvmobj+set}" = set; then - withval="$with_llvmobj" - LLVM_OBJ=$withval +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - LLVM_OBJ=`cd ../..; pwd` + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -fi; +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi - ac_config_files="$ac_config_files Makefile.common" -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi -_ACEOF +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi -rm -f confcache +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + test -n "$ac_ct_CC" && break done -LIBOBJS=$ac_libobjs -LTLIBOBJS=$ac_ltlibobjs + CC=$ac_ct_CC +fi +fi -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +int +main () +{ -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } fi -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (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 + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +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); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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 + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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 + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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 + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for MAP_ANONYMOUS vs. MAP_ANON" >&5 +echo $ECHO_N "checking for MAP_ANONYMOUS vs. MAP_ANON... $ECHO_C" >&6 +if test "${ac_cv_header_mmap_anon+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + #include +int +main () +{ +mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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_header_mmap_anon=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_mmap_anon=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +echo "$as_me:$LINENO: result: $ac_cv_header_mmap_anon" >&5 +echo "${ECHO_T}$ac_cv_header_mmap_anon" >&6 +if test "$ac_cv_header_mmap_anon" = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP_ANONYMOUS 1 +_ACEOF + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 +echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6 +if test "${ac_cv_header_stat_broken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +#if defined(S_ISBLK) && defined(S_IFDIR) +# if S_ISBLK (S_IFDIR) +You lose. +# endif +#endif + +#if defined(S_ISBLK) && defined(S_IFCHR) +# if S_ISBLK (S_IFCHR) +You lose. +# endif +#endif + +#if defined(S_ISLNK) && defined(S_IFREG) +# if S_ISLNK (S_IFREG) +You lose. +# endif +#endif + +#if defined(S_ISSOCK) && defined(S_IFREG) +# if S_ISSOCK (S_IFREG) +You lose. +# endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "You lose" >/dev/null 2>&1; then + ac_cv_header_stat_broken=yes +else + ac_cv_header_stat_broken=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 +echo "${ECHO_T}$ac_cv_header_stat_broken" >&6 +if test $ac_cv_header_stat_broken = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STAT_MACROS_BROKEN 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f 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='./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 + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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 + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +for ac_header in fcntl.h sys/mman.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf at gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf at gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + +for ac_header in stdlib.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf at gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf at gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_func in getpagesize +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* 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 $ac_func (); +/* 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_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + 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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !STDC_HEADERS && !HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#if !HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# if !HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# if HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + exit (1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + exit (1); + if (write (fd, data, pagesize) != pagesize) + exit (1); + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + exit (1); + data2 = (char *) malloc (2 * pagesize); + if (!data2) + exit (1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit (1); + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + exit (1); + if (read (fd, data3, pagesize) != pagesize) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit (1); + close (fd); + exit (0); +} +_ACEOF +rm -f 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='./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_mmap_fixed_mapped=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF + +fi +rm -f conftest.mmap + +echo "$as_me:$LINENO: checking for mmap of files" >&5 +echo $ECHO_N "checking for mmap of files... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_file+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_MMAN_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef HAVE_FCNTL_H +#include +#endif + + int fd; + int main () { + fd = creat ("foo",0777); fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); unlink ("foo"); return (fd != MAP_FAILED);} +_ACEOF +rm -f 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='./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_mmap_file=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_mmap_file=no +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_file" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_file" >&6 +if test "$ac_cv_func_mmap_file" = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP_FILE 1 +_ACEOF + + MMAP_FILE=yes + +fi + +echo "$as_me:$LINENO: checking if /dev/zero is needed for mmap" >&5 +echo $ECHO_N "checking if /dev/zero is needed for mmap... $ECHO_C" >&6 +if test "${ac_cv_need_dev_zero_for_mmap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$llvm_cv_os_type" = "Interix" ; then + ac_cv_need_dev_zero_for_mmap=yes + else + ac_cv_need_dev_zero_for_mmap=no + fi + +fi +echo "$as_me:$LINENO: result: $ac_cv_need_dev_zero_for_mmap" >&5 +echo "${ECHO_T}$ac_cv_need_dev_zero_for_mmap" >&6 +if test "$ac_cv_need_dev_zero_for_mmap" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_DEV_ZERO_FOR_MMAP 1 +_ACEOF + +fi + + + + +# Check whether --with-llvmsrc or --without-llvmsrc was given. +if test "${with_llvmsrc+set}" = set; then + withval="$with_llvmsrc" + LLVM_SRC=$withval + +else + LLVM_SRC=`cd ${srcdir}/../..; pwd` + +fi; + + +# Check whether --with-llvmobj or --without-llvmobj was given. +if test "${with_llvmobj+set}" = set; then + withval="$with_llvmobj" + LLVM_OBJ=$withval + +else + LLVM_OBJ=`cd ../..; pwd` + +fi; + + ac_config_headers="$ac_config_headers include/poolalloc/Config/config.h" + + ac_config_files="$ac_config_files Makefile.common" +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -1737,10 +3898,15 @@ --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files +Configuration headers: +$config_headers + Configuration commands: $config_commands @@ -1883,6 +4049,7 @@ "test/TEST.perf.Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/TEST.perf.Makefile" ;; "test/TEST.p4perf.Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/TEST.p4perf.Makefile" ;; "test/TEST.strace.Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/TEST.strace.Makefile" ;; + "include/poolalloc/Config/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/poolalloc/Config/config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; @@ -1895,6 +4062,7 @@ # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi @@ -1967,6 +4135,16 @@ s, at ECHO_N@,$ECHO_N,;t t s, at ECHO_T@,$ECHO_T,;t t s, at LIBS@,$LIBS,;t t +s, at CC@,$CC,;t t +s, at CFLAGS@,$CFLAGS,;t t +s, at LDFLAGS@,$LDFLAGS,;t t +s, at CPPFLAGS@,$CPPFLAGS,;t t +s, at ac_ct_CC@,$ac_ct_CC,;t t +s, at EXEEXT@,$EXEEXT,;t t +s, at OBJEXT@,$OBJEXT,;t t +s, at CPP@,$CPP,;t t +s, at EGREP@,$EGREP,;t t +s, at MMAP_FILE@,$MMAP_FILE,;t t s, at LLVM_SRC@,$LLVM_SRC,;t t s, at LLVM_OBJ@,$LLVM_OBJ,;t t s, at LIBOBJS@,$LIBOBJS,;t t @@ -2174,6 +4352,228 @@ cat >>$CONFIG_STATUS <<\_ACEOF # +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue From criswell at cs.uiuc.edu Thu Mar 10 14:49:55 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 10 Mar 2005 14:49:55 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/include/poolalloc/Config/config.h.in Message-ID: <200503102049.OAA06287@niobe.cs.uiuc.edu> Changes in directory llvm-poolalloc/include/poolalloc/Config: config.h.in added (r1.1) --- Log message: Added support for checking for mmap() functionality and a few miscellaneous header files. --- Diffs of the changes: (+465 -0) config.h.in | 465 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 465 insertions(+) Index: llvm-poolalloc/include/poolalloc/Config/config.h.in diff -c /dev/null llvm-poolalloc/include/poolalloc/Config/config.h.in:1.1 *** /dev/null Thu Mar 10 14:49:52 2005 --- llvm-poolalloc/include/poolalloc/Config/config.h.in Thu Mar 10 14:49:41 2005 *************** *** 0 **** --- 1,465 ---- + /* include/poolalloc/Config/config.h.in. Generated from autoconf/configure.ac by autoheader. */ + + /* Define if dlopen(0) will open the symbols of the program */ + #undef CAN_DLOPEN_SELF + + /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ + #undef CRAY_STACKSEG_END + + /* Define to 1 if using `alloca.c'. */ + #undef C_ALLOCA + + /* Define to 1 if you have `alloca', as a function or macro. */ + #undef HAVE_ALLOCA + + /* Define to 1 if you have and it should be used (not on Ultrix). + */ + #undef HAVE_ALLOCA_H + + /* Define to 1 if you have the `argz_append' function. */ + #undef HAVE_ARGZ_APPEND + + /* Define to 1 if you have the `argz_create_sep' function. */ + #undef HAVE_ARGZ_CREATE_SEP + + /* Define to 1 if you have the header file. */ + #undef HAVE_ARGZ_H + + /* Define to 1 if you have the `argz_insert' function. */ + #undef HAVE_ARGZ_INSERT + + /* Define to 1 if you have the `argz_next' function. */ + #undef HAVE_ARGZ_NEXT + + /* Define to 1 if you have the `argz_stringify' function. */ + #undef HAVE_ARGZ_STRINGIFY + + /* Define to 1 if you have the header file. */ + #undef HAVE_ASSERT_H + + /* Define to 1 if you have the `backtrace' function. */ + #undef HAVE_BACKTRACE + + /* Define to 1 if you have the `bcopy' function. */ + #undef HAVE_BCOPY + + /* Does not have bi-directional iterator */ + #undef HAVE_BI_ITERATOR + + /* Define to 1 if you have the `closedir' function. */ + #undef HAVE_CLOSEDIR + + /* Define to 1 if you have the header file. */ + #undef HAVE_CTYPE_H + + /* Define to 1 if you have the header file, and it defines `DIR'. + */ + #undef HAVE_DIRENT_H + + /* Define if you have the GNU dld library. */ + #undef HAVE_DLD + + /* Define to 1 if you have the header file. */ + #undef HAVE_DLD_H + + /* Define to 1 if you have the `dlerror' function. */ + #undef HAVE_DLERROR + + /* Define to 1 if you have the header file. */ + #undef HAVE_DLFCN_H + + /* Define if dlopen() is available on this platform. */ + #undef HAVE_DLOPEN + + /* Define to 1 if you have the header file. */ + #undef HAVE_DL_H + + /* Define if you have the _dyld_func_lookup function. */ + #undef HAVE_DYLD + + /* Define to 1 if you have the header file. */ + #undef HAVE_ERRNO_H + + /* Define to 1 if the system has the type `error_t'. */ + #undef HAVE_ERROR_T + + /* Define to 1 if you have the header file. */ + #undef HAVE_EXECINFO_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_FCNTL_H + + /* Set to 1 if the finite function is found in */ + #undef HAVE_FINITE_IN_IEEEFP_H + + /* Does not have forward iterator */ + #undef HAVE_FWD_ITERATOR + + /* Define to 1 if you have the `getcwd' function. */ + #undef HAVE_GETCWD + + /* Define to 1 if you have the `getpagesize' function. */ + #undef HAVE_GETPAGESIZE + + /* Define to 1 if you have the `getrusage' function. */ + #undef HAVE_GETRUSAGE + + /* Define to 1 if you have the `gettimeofday' function. */ + #undef HAVE_GETTIMEOFDAY + + /* Does not have */ + #undef HAVE_GLOBAL_HASH_MAP + + /* Does not have hash_set in global namespace */ + #undef HAVE_GLOBAL_HASH_SET + + /* Does not have ext/hash_map */ + #undef HAVE_GNU_EXT_HASH_MAP + + /* Does not have hash_set in gnu namespace */ + #undef HAVE_GNU_EXT_HASH_SET + + /* Define to 1 if you have the `index' function. */ + #undef HAVE_INDEX + + /* Define to 1 if the system has the type `int64_t'. */ + #undef HAVE_INT64_T + + /* Define to 1 if you have the header file. */ + #undef HAVE_INTTYPES_H + + /* Define to 1 if you have the `isatty' function. */ + #undef HAVE_ISATTY + + /* Set to 1 if the isinf function is found in */ + #undef HAVE_ISINF_IN_CMATH + + /* Set to 1 if the isinf function is found in */ + #undef HAVE_ISINF_IN_MATH_H + + /* Set to 1 if the isnan function is found in */ + #undef HAVE_ISNAN_IN_CMATH + + /* Set to 1 if the isnan function is found in */ + #undef HAVE_ISNAN_IN_MATH_H + + /* Define if you have the libdl library or equivalent. */ + #undef HAVE_LIBDL + + /* Define to 1 if you have the `elf' library (-lelf). */ + #undef HAVE_LIBELF + + /* Define to 1 if you have the header file. */ + #undef HAVE_LIMITS_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_LINK_H + + /* Define if you can use -Wl,-R. to pass -R. to the linker, in order to add + the current directory to the dynamic linker search path. */ + #undef HAVE_LINK_R + + /* Define if lt_dlopen() is available on this platform */ + #undef HAVE_LT_DLOPEN + + /* Define to 1 if you have the header file. */ + #undef HAVE_MACH_O_DYLD_H + + /* Define if mallinfo() is available on this platform. */ + #undef HAVE_MALLINFO + + /* Define to 1 if you have the header file. */ + #undef HAVE_MALLOC_H + + /* Define to 1 if you have the `memcpy' function. */ + #undef HAVE_MEMCPY + + /* Define to 1 if you have the `memmove' function. */ + #undef HAVE_MEMMOVE + + /* Define to 1 if you have the header file. */ + #undef HAVE_MEMORY_H + + /* Define to 1 if you have the `mkdtemp' function. */ + #undef HAVE_MKDTEMP + + /* Define to 1 if you have the `mkstemp' function. */ + #undef HAVE_MKSTEMP + + /* Define to 1 if you have the `mktemp' function. */ + #undef HAVE_MKTEMP + + /* Define to 1 if you have a working `mmap' system call. */ + #undef HAVE_MMAP + + /* Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if + it uses MAP_ANON */ + #undef HAVE_MMAP_ANONYMOUS + + /* Define if mmap() can map files into memory */ + #undef HAVE_MMAP_FILE + + /* define if the compiler implements namespaces */ + #undef HAVE_NAMESPACES + + /* Define to 1 if you have the header file, and it defines `DIR'. */ + #undef HAVE_NDIR_H + + /* Define to 1 if you have the `opendir' function. */ + #undef HAVE_OPENDIR + + /* Define if libtool can extract symbol lists from object files. */ + #undef HAVE_PRELOADED_SYMBOLS + + /* Define to have the %a format string */ + #undef HAVE_PRINTF_A + + /* Have pthread_mutex_lock */ + #undef HAVE_PTHREAD_MUTEX_LOCK + + /* Define to 1 if srand48/lrand48/drand48 exist in */ + #undef HAVE_RAND48 + + /* Define to 1 if you have the `readdir' function. */ + #undef HAVE_READDIR + + /* Define to 1 if you have the `realpath' function. */ + #undef HAVE_REALPATH + + /* Define to 1 if you have the `rindex' function. */ + #undef HAVE_RINDEX + + /* Define to 1 if you have the header file. */ + #undef HAVE_RW_STDEX_HASH_MAP_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_RW_STDEX_HASH_SET_H + + /* Define to 1 if you have the `sbrk' function. */ + #undef HAVE_SBRK + + /* Define to 1 if you have the `setrlimit' function. */ + #undef HAVE_SETRLIMIT + + /* Define if you have the shl_load function. */ + #undef HAVE_SHL_LOAD + + /* Define to 1 if you have the header file. */ + #undef HAVE_SIGNAL_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STDINT_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STDIO_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STDLIB_H + + /* Does not have ext/hash_map> */ + #undef HAVE_STD_EXT_HASH_MAP + + /* Does not have hash_set in std namespace */ + #undef HAVE_STD_EXT_HASH_SET + + /* Set to 1 if the std::isinf function is found in */ + #undef HAVE_STD_ISINF_IN_CMATH + + /* Set to 1 if the std::isnan function is found in */ + #undef HAVE_STD_ISNAN_IN_CMATH + + /* Does not have std namespace iterator */ + #undef HAVE_STD_ITERATOR + + /* Define to 1 if you have the `strchr' function. */ + #undef HAVE_STRCHR + + /* Define to 1 if you have the `strcmp' function. */ + #undef HAVE_STRCMP + + /* Define to 1 if you have the `strdup' function. */ + #undef HAVE_STRDUP + + /* Define to 1 if you have the `strerror' function. */ + #undef HAVE_STRERROR + + /* Define to 1 if you have the `strerror_r' function. */ + #undef HAVE_STRERROR_R + + /* Define to 1 if you have the header file. */ + #undef HAVE_STRINGS_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STRING_H + + /* Define to 1 if you have the `strrchr' function. */ + #undef HAVE_STRRCHR + + /* Define to 1 if you have the `strtoll' function. */ + #undef HAVE_STRTOLL + + /* Define to 1 if you have the `strtoq' function. */ + #undef HAVE_STRTOQ + + /* Define to 1 if you have the `sysconf' function. */ + #undef HAVE_SYSCONF + + /* Define to 1 if you have the header file, and it defines `DIR'. + */ + #undef HAVE_SYS_DIR_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_DL_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_MMAN_H + + /* Define to 1 if you have the header file, and it defines `DIR'. + */ + #undef HAVE_SYS_NDIR_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_PARAM_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_RESOURCE_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_STAT_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_TIME_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_TYPES_H + + /* Define to 1 if you have that is POSIX.1 compatible. */ + #undef HAVE_SYS_WAIT_H + + /* Define to 1 if the system has the type `uint64_t'. */ + #undef HAVE_UINT64_T + + /* Define to 1 if you have the header file. */ + #undef HAVE_UNISTD_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_UTIME_H + + /* Define to 1 if the system has the type `u_int64_t'. */ + #undef HAVE_U_INT64_T + + /* Define to 1 if you have the header file. */ + #undef HAVE_WINDOWS_H + + /* Installation directory for binary executables */ + #undef LLVM_BINDIR + + /* Time at which LLVM was configured */ + #undef LLVM_CONFIGTIME + + /* Installation directory for documentation */ + #undef LLVM_DATADIR + + /* Installation directory for config files */ + #undef LLVM_ETCDIR + + /* Installation directory for include files */ + #undef LLVM_INCLUDEDIR + + /* Installation directory for .info files */ + #undef LLVM_INFODIR + + /* Installation directory for libraries */ + #undef LLVM_LIBDIR + + /* Installation directory for man pages */ + #undef LLVM_MANDIR + + /* Define if this is Unixish platform */ + #undef LLVM_ON_UNIX + + /* Define if this is Win32ish platform */ + #undef LLVM_ON_WIN32 + + /* Installation prefix directory */ + #undef LLVM_PREFIX + + /* Define if the OS needs help to load dependent libraries for dlopen(). */ + #undef LTDL_DLOPEN_DEPLIBS + + /* Define to the sub-directory in which libtool stores uninstalled libraries. + */ + #undef LTDL_OBJDIR + + /* Define to the name of the environment variable that determines the dynamic + library search path. */ + #undef LTDL_SHLIBPATH_VAR + + /* Define to the extension used for shared libraries, say, ".so". */ + #undef LTDL_SHLIB_EXT + + /* Define to the system default library search path. */ + #undef LTDL_SYSSEARCHPATH + + /* Define if /dev/zero should be used when mapping RWX memory, or undefine if + its not necessary */ + #undef NEED_DEV_ZERO_FOR_MMAP + + /* Define if dlsym() requires a leading underscore in symbol names. */ + #undef NEED_USCORE + + /* Define to the address where bug reports for this package should be sent. */ + #undef PACKAGE_BUGREPORT + + /* Define to the full name of this package. */ + #undef PACKAGE_NAME + + /* Define to the full name and version of this package. */ + #undef PACKAGE_STRING + + /* Define to the one symbol short name of this package. */ + #undef PACKAGE_TARNAME + + /* Define to the version of this package. */ + #undef PACKAGE_VERSION + + /* Define as the return type of signal handlers (`int' or `void'). */ + #undef RETSIGTYPE + + /* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ + #undef STACK_DIRECTION + + /* Define to 1 if the `S_IS*' macros in do not work properly. */ + #undef STAT_MACROS_BROKEN + + /* Define to 1 if you have the ANSI C header files. */ + #undef STDC_HEADERS + + /* Define to 1 if you can safely include both and . */ + #undef TIME_WITH_SYS_TIME + + /* Define to 1 if your declares `struct tm'. */ + #undef TM_IN_SYS_TIME + + /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ + #undef YYTEXT_POINTER + + /* Define to empty if `const' does not conform to ANSI C. */ + #undef const + + /* Define to a type to use for `error_t' if it is not otherwise available. */ + #undef error_t + + /* Define to `int' if does not define. */ + #undef pid_t + + /* Define to `unsigned' if does not define. */ + #undef size_t From lattner at cs.uiuc.edu Thu Mar 10 14:56:06 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 14:56:06 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200503102056.j2AKu6cX012607@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.52 -> 1.53 --- Log message: Fix a bug where we would incorrectly do a sign ext instead of a zero ext because we were checking the wrong thing. Thanks to andrew for pointing this out! --- Diffs of the changes: (+1 -1) SelectionDAG.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.52 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.53 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.52 Wed Mar 9 12:37:12 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Mar 10 14:55:51 2005 @@ -961,7 +961,7 @@ // Extending a constant? Just return the constant. if (ConstantSDNode *N1C = dyn_cast(N1.Val)) { SDOperand Tmp = getNode(ISD::TRUNCATE, EVT, N1); - if (N1.getOpcode() == ISD::ZERO_EXTEND_INREG) + if (Opcode == ISD::ZERO_EXTEND_INREG) return getNode(ISD::ZERO_EXTEND, VT, Tmp); else return getNode(ISD::SIGN_EXTEND, VT, Tmp); From lattner at cs.uiuc.edu Thu Mar 10 15:00:05 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 15:00:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200503102100.j2AL05C4012922@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.135 -> 1.136 --- Log message: I didn't mean to check this in. :( --- Diffs of the changes: (+1 -3) LiveIntervalAnalysis.cpp | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.135 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.136 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.135 Wed Mar 9 17:05:19 2005 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Thu Mar 10 14:59:51 2005 @@ -58,8 +58,6 @@ EnableJoining("join-liveintervals", cl::desc("Join compatible live intervals"), cl::init(true)); - cl::opt - DisableHack("disable-hack"); }; void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const @@ -495,7 +493,7 @@ // the physreg, then the new fragment has the same value as the one copied // into the vreg. if (interval.reg == DestReg && !interval.empty() && - MRegisterInfo::isVirtualRegister(SrcReg) && !DisableHack) { + MRegisterInfo::isVirtualRegister(SrcReg)) { // Get the live interval for the vreg, see if it is defined by a copy. LiveInterval &SrcInterval = getOrCreateInterval(SrcReg); From brukman at cs.uiuc.edu Thu Mar 10 16:52:10 2005 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu, 10 Mar 2005 16:52:10 -0600 Subject: [llvm-commits] CVS: llvm/docs/TestingGuide.html Message-ID: <200503102252.QAA00920@zion.cs.uiuc.edu> Changes in directory llvm/docs: TestingGuide.html updated: 1.24 -> 1.25 --- Log message: * Add directions to send output of nightly test script to llvm-testresults at cs * Use the doc_code class to nightly test script example * Enclose file names in tags * Achieve compliance with HTML-4.01 Strict --- Diffs of the changes: (+24 -18) TestingGuide.html | 42 ++++++++++++++++++++++++------------------ 1 files changed, 24 insertions(+), 18 deletions(-) Index: llvm/docs/TestingGuide.html diff -u llvm/docs/TestingGuide.html:1.24 llvm/docs/TestingGuide.html:1.25 --- llvm/docs/TestingGuide.html:1.24 Wed Dec 22 00:45:24 2004 +++ llvm/docs/TestingGuide.html Thu Mar 10 16:51:59 2005 @@ -116,7 +116,9 @@
 % gmake -C llvm/test TESTSUITE=Regression/Transforms
 
-
Note: If you are running the tests with objdir != subdir you must have run the complete testsuite before you can specify a subdirectory.
+ +

Note: If you are running the tests with objdir != subdir you must +have run the complete testsuite before you can specify a subdirectory.

To run the comprehensive test suite (tests that compile and execute whole programs), run the llvm-test tests:

@@ -284,7 +286,8 @@

There are a couple patterns within a RUN line that the llvm-runtest procedure looks for and replaces with the appropriate syntax:

-
    + +
    %p
    The path to the source directory. This is for locating any supporting files that are not generated by the test, but used by @@ -304,7 +307,7 @@
    %llvmgcc
    Full path to the llvm-gcc executable.
    %llvmgxx
    Full path to the llvm-g++ executable.
    -
+

There are also several scripts in the llvm/test/Scripts directory that you might find useful when writing RUN lines.

@@ -467,18 +470,21 @@ and then delete the checked out tree. This tester is designed to ensure that programs don't break as well as keep track of LLVM's progress over time.

-

-If you'd like to set up an instance of the nightly tester to run on your -machine, take a look at the comments at the top of the utils/NightlyTester.pl -file. We usually run it from a crontab entry that looks ilke this: -

+

If you'd like to set up an instance of the nightly tester to run on your +machine, take a look at the comments at the top of the +utils/NightlyTester.pl file. We usually run it from a crontab entry +that looks ilke this:

+
-5 3 * * *  $HOME/llvm/utils/NightlyTest.pl -parallel -enable-linscan ...CVSREPOSTORY... $HOME/buildtest-X86 $HOME/cvs/testresults-X86
+5 3 * * *  $HOME/llvm/utils/NightlyTest.pl -parallel $CVSROOT $HOME/buildtest-X86 $HOME/cvs/testresults-X86
 
+

Or, you can create a shell script to encapsulate the running of the script. -The optimized x86 Linux nightly test is run from just such a script: +The optimized x86 Linux nightly test is run from just such a script:

+ +
 #!/bin/bash
 BASE=/proj/work/llvm/nightlytest
@@ -490,15 +496,15 @@
 export LD_LIBRARY_PATH=/proj/install/lib
 cd $BASE
 cp /proj/work/llvm/llvm/utils/NightlyTest.pl .
-nice ./NightlyTest.pl -nice -release -verbose -parallel -enable-linscan -noexternals
+nice ./NightlyTest.pl -nice -release -verbose -parallel -enable-linscan -noexternals 2>&1 > output.log
+mail -s 'X86 nightly tester results' llvm-testresults at cs.uiuc.edu < output.log
 
+
+ +

Take a look at the NightlyTest.pl file to see what all of the flags +and strings do. If you start running the nightly tests, please let us know and +we'll link your page to the global tester page. Thanks!

-

-Take a look at the NightlyTest.pl file to see what all of the flags and -strings do. If you start running the nightly tests, please let us know and -we'll link your page to the global tester page. Thanks! -

-
@@ -512,7 +518,7 @@ John T. Criswell
The LLVM Compiler Infrastructure
- Last modified: $Date: 2004/12/22 06:45:24 $ + Last modified: $Date: 2005/03/10 22:51:59 $ From brukman at cs.uiuc.edu Thu Mar 10 18:00:44 2005 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu, 10 Mar 2005 18:00:44 -0600 Subject: [llvm-commits] CVS: llvm/docs/CommandLine.html Message-ID: <200503110000.SAA01590@zion.cs.uiuc.edu> Changes in directory llvm/docs: CommandLine.html updated: 1.31 -> 1.32 --- Log message: Sprinkle code examples and command-line interaction examples with some style --- Diffs of the changes: (+97 -95) CommandLine.html | 192 +++++++++++++++++++++++++++---------------------------- 1 files changed, 97 insertions(+), 95 deletions(-) Index: llvm/docs/CommandLine.html diff -u llvm/docs/CommandLine.html:1.31 llvm/docs/CommandLine.html:1.32 --- llvm/docs/CommandLine.html:1.31 Wed Feb 9 16:49:05 2005 +++ llvm/docs/CommandLine.html Thu Mar 10 18:00:33 2005 @@ -192,19 +192,19 @@

To start out, you need to include the CommandLine header file into your program:

-
+
   #include "Support/CommandLine.h"
-
+

Additionally, you need to add this as the first line of your main program:

-
+
 int main(int argc, char **argv) {
   cl::ParseCommandLineOptions(argc, argv);
   ...
 }
-
+

... which actually parses the arguments and fills in the variable declarations.

@@ -220,9 +220,9 @@ represented like this:

-
+
 cl::opt<string> OutputFilename("o", cl::desc("Specify output filename"), cl::value_desc("filename"));
-
+

This declares a global variable "OutputFilename" that is used to capture the result of the "o" argument (first parameter). We specify @@ -235,25 +235,25 @@ to output for the "--help" option. In this case, we get a line that looks like this:

-
+
 USAGE: compiler [options]
 
 OPTIONS:
   -help             - display available options (--help-hidden for more)
   -o <filename>     - Specify output filename
-
+

Because we specified that the command line option should parse using the string data type, the variable declared is automatically usable as a real string in all contexts that a normal C++ string object may be used. For example:

-
+
   ...
   ofstream Output(OutputFilename.c_str());
   if (Out.good()) ...
   ...
-
+

There are many different options that you can use to customize the command line option handling library, but the above example shows the general interface @@ -270,9 +270,9 @@ These positional arguments are filled with command line parameters that are not in option form. We use this feature like this:

-
+
 cl::opt<string> InputFilename(cl::Positional, cl::desc("<input file>"), cl::init("-"));
-
+

This declaration indicates that the first positional argument should be treated as the input filename. Here we use the cl::Required flag, and we could eliminate the cl::init modifier, like this:

-
+
 cl::opt<string> InputFilename(cl::Positional, cl::desc("<input file>"), cl::Required);
-
+

Again, the CommandLine library does not require the options to be specified in any particular order, so the above declaration is equivalent to:

-
+
 cl::opt<string> InputFilename(cl::Positional, cl::Required, cl::desc("<input file>"));
-
+

By simply adding the cl::Required flag, the CommandLine library will automatically issue an error if the argument is not @@ -304,13 +304,13 @@ adding one of the declarations above, the --help option synopsis is now extended to:

-
+
 USAGE: compiler [options] <input file>
 
 OPTIONS:
   -help             - display available options (--help-hidden for more)
   -o <filename>     - Specify output filename
-
+

... indicating that an input filename is expected.

@@ -329,11 +329,11 @@ compatibility with some of our users. We can support these by declaring options of boolean type like this:

-
+
 cl::opt<bool> Force ("f", cl::desc("Overwrite output files"));
 cl::opt<bool> Quiet ("quiet", cl::desc("Don't print informational messages"));
 cl::opt<bool> Quiet2("q", cl::desc("Don't print informational messages"), cl::Hidden);
-
+

This does what you would expect: it declares three boolean variables ("Force", "Quiet", and "Quiet2") to recognize these @@ -351,12 +351,12 @@ "true" or "false" to be specified, allowing any of the following inputs:

-
+
  compiler -f          # No value, 'Force' == true
  compiler -f=true     # Value specified, 'Force' == true
  compiler -f=TRUE     # Value specified, 'Force' == true
  compiler -f=FALSE    # Value specified, 'Force' == false
-
+

... you get the idea. The bool parser just turns the string values into boolean values, and rejects things like 'compiler @@ -367,7 +367,7 @@

With the declarations above, "compiler --help" emits this:

-
+
 USAGE: compiler [options] <input file>
 
 OPTIONS:
@@ -375,11 +375,11 @@
   -o     - Override output filename
   -quiet - Don't print informational messages
   -help  - display available options (--help-hidden for more)
-
+

and "opt --help-hidden" prints this:

-
+
 USAGE: compiler [options] <input file>
 
 OPTIONS:
@@ -388,7 +388,7 @@
   -q     - Don't print informational messages
   -quiet - Don't print informational messages
   -help  - display available options (--help-hidden for more)
-
+

This brief example has shown you how to use the 'cl::opt' class to parse simple scalar command line @@ -408,22 +408,22 @@

So far, the example works well, except for the fact that we need to check the quiet condition like this now:

-
+
 ...
   if (!Quiet && !Quiet2) printInformationalMessage(...);
 ...
-
+

... which is a real pain! Instead of defining two values for the same condition, we can use the "cl::alias" class to make the "-q" option an alias for the "-quiet" option, instead of providing a value itself:

-
+
 cl::opt<bool> Force ("f", cl::desc("Overwrite output files"));
 cl::opt<bool> Quiet ("quiet", cl::desc("Don't print informational messages"));
 cl::alias     QuietA("q", cl::desc("Alias for -quiet"), cl::aliasopt(Quiet));
-
+

The third line (which is the only one we modified from above) defines a "-q alias that updates the "Quiet" variable (as specified by @@ -436,11 +436,11 @@

Now the application code can simply use:

-
+
 ...
   if (!Quiet) printInformationalMessage(...);
 ...
-
+

... which is much nicer! The "cl::alias" can be used to specify an alternative name for any variable type, and has many @@ -486,7 +486,7 @@ CommandLine library fill it in with the appropriate level directly, which is used like this:

-
+
 enum OptLevel {
   g, O1, O2, O3
 };
@@ -502,7 +502,7 @@
 ...
   if (OptimizationLevel >= O2) doPartialRedundancyElimination(...);
 ...
-
+

This declaration defines a variable "OptimizationLevel" of the "OptLevel" enum type. This variable can be assigned any of the values @@ -514,7 +514,7 @@ command line arguments matched the enum values. With this option added, our help output now is:

-
+
 USAGE: compiler [options] <input file>
 
 OPTIONS:
@@ -527,14 +527,14 @@
   -help         - display available options (--help-hidden for more)
   -o <filename> - Specify output filename
   -quiet        - Don't print informational messages
-
+

In this case, it is sort of awkward that flag names correspond directly to enum names, because we probably don't want a enum definition named "g" in our program. Because of this, we can alternatively write this example like this:

-
+
 enum OptLevel {
   Debug, O1, O2, O3
 };
@@ -550,7 +550,7 @@
 ...
   if (OptimizationLevel == Debug) outputDebugInfo(...);
 ...
-
+

By using the "clEnumValN" macro instead of "clEnumVal", we can directly specify the name that the flag should get. In general a direct @@ -575,7 +575,7 @@ our optimization level flags, but we also specify an option name. For this case, the code looks like this:

-
+
 enum DebugLev {
   nodebuginfo, quick, detailed
 };
@@ -587,14 +587,14 @@
      clEnumVal(quick,               "enable quick debug information"),
      clEnumVal(detailed,            "enable detailed debug information"),
     clEnumValEnd));
-
+

This definition defines an enumerated command line variable of type "enum DebugLev", which works exactly the same way as before. The difference here is just the interface exposed to the user of your program and the help output by the "--help" option:

-
+
 USAGE: compiler [options] <input file>
 
 OPTIONS:
@@ -611,7 +611,7 @@
   -help         - display available options (--help-hidden for more)
   -o <filename> - Specify output filename
   -quiet        - Don't print informational messages
-
+

Again, the only structural difference between the debug level declaration and the optimization level declaration is that the debug level declaration includes @@ -637,16 +637,16 @@ template is for. First, start by defining an enum of the optimizations that you would like to perform:

-
+
 enum Opts {
   // 'inline' is a C++ keyword, so name it 'inlining'
   dce, constprop, inlining, strip
 };
-
+

Then define your "cl::list" variable:

-
+
 cl::list<Opts> OptimizationList(cl::desc("Available Optimizations:"),
   cl::values(
     clEnumVal(dce               , "Dead Code Elimination"),
@@ -654,17 +654,17 @@
    clEnumValN(inlining, "inline", "Procedure Integration"),
     clEnumVal(strip             , "Strip Symbols"),
   clEnumValEnd));
-
+

This defines a variable that is conceptually of the type "std::vector<enum Opts>". Thus, you can access it with standard vector methods:

-
+
   for (unsigned i = 0; i != OptimizationList.size(); ++i)
     switch (OptimizationList[i])
        ...
-
+

... to iterate through the list of options specified.

@@ -676,11 +676,11 @@ linker, for example, the linker takes several '.o' files, and needs to capture them into a list. This is naturally specified as:

-
+
 ...
 cl::list<std::string> InputFilenames(cl::Positional, cl::desc("<Input files>"), cl::OneOrMore);
 ...
-
+

This variable works just like a "vector<string>" object. As such, accessing the list is simple, just like above. In this example, we used @@ -709,17 +709,17 @@ information for your program, allowing you to include any additional information that you want. For example:

-
+
 int main(int argc, char **argv) {
   cl::ParseCommandLineOptions(argc, argv, " CommandLine compiler example\n\n"
                               "  This program blah blah blah...\n");
   ...
 }
-
+
-

Would yield the help output:

+

would yield the help output:

-
+
 OVERVIEW: CommandLine compiler example
 
   This program blah blah blah...
@@ -730,7 +730,7 @@
   ...
   -help             - display available options (--help-hidden for more)
   -o <filename>     - Specify output filename
-
+
@@ -764,20 +764,20 @@ through (which defaults to standard input if a filename is not specified). Using the CommandLine library, this would be specified as:

-
+
 cl::opt<string> Regex   (cl::Positional, cl::desc("<regular expression>"), cl::Required);
 cl::opt<string> Filename(cl::Positional, cl::desc("<input file>"), cl::init("-"));
-
+

Given these two option declarations, the --help output for our grep replacement would look like this:

-
+
 USAGE: spiffygrep [options] <regular expression> <input file>
 
 OPTIONS:
   -help - display available options (--help-hidden for more)
-
+

... and the resultant program could be used just like the standard grep tool.

@@ -804,7 +804,7 @@ named '-foo', and will fail (and single quotes will not save you). Note that the system grep has the same problem:

-
+
   $ spiffygrep '-foo' test.txt
   Unknown command line argument '-foo'.  Try: spiffygrep --help'
 
@@ -813,7 +813,7 @@
   grep: illegal option -- o
   grep: illegal option -- o
   Usage: grep -hblcnsviw pattern file . . .
-
+

The solution for this problem is the same for both your tool and the system version: use the '--' marker. When the user specifies '--' on @@ -821,10 +821,10 @@ '--' should be treated as positional arguments, not options. Thus, we can use it like this:

-
+
   $ spiffygrep -- -foo test.txt
     ...output...
-
+
@@ -847,7 +847,9 @@ cl::list::getPosition(optnum) method. This method returns the absolute position (as found on the command line) of the optnum item in the cl::list.

-

The idiom for usage is like this:


+  

The idiom for usage is like this:

+ +
   static cl::list<std::string> Files(cl::Positional, cl::OneOrMore);
   static cl::listlt;std::string> Libraries("l", cl::ZeroOrMore);
 
@@ -877,8 +879,8 @@
       else
         break; // we're done with the list
     }
-  }
-  

+ }
+

Note that, for compatibility reasons, the cl::opt also supports an unsigned getPosition() option that will provide the absolute position of that option. You can apply the same approach as above with a @@ -906,23 +908,23 @@ shell command line option processor, but are not interpreted as options to the shell itself. Using the CommandLine library, we would specify this as:

-
+
 cl::opt<string> Script(cl::Positional, cl::desc("<input script>"), cl::init("-"));
 cl::list<string>  Argv(cl::ConsumeAfter, cl::desc("<program arguments>..."));
 cl::opt<bool>    Trace("x", cl::desc("Enable trace output"));
-
+

which automatically provides the help output:

-
+
 USAGE: spiffysh [options] <input script> <program arguments>...
 
 OPTIONS:
   -help - display available options (--help-hidden for more)
   -x    - Enable trace output
-
+
-

At runtime, if we run our new shell replacement as 'spiffysh -x test.sh +

At runtime, if we run our new shell replacement as `spiffysh -x test.sh -a -x -y bar', the Trace variable will be set to true, the Script variable will be set to "test.sh", and the Argv list will contain ["-a", "-x", "-y", "bar"], because they @@ -1308,7 +1310,7 @@ input option into (potentially multiple) prefix and grouping options. The strategy basically looks like this:

-

parse(string OrigInput) { +

parse(string OrigInput) {
  1. string input = OrigInput; @@ -1324,10 +1326,10 @@   while (!isOption(input) && !input.empty()) input.pop_back();
    }
  2. if (!OrigInput.empty()) error();
  3. -

}

+
@@ -1452,13 +1454,13 @@ can take up to three arguments (all except for the first have default values though):

-
+
 namespace cl {
   template <class DataType, bool ExternalStorage = false,
             class ParserClass = parser<DataType> >
   class opt;
 }
-
+

The first template argument specifies what underlying data type the command line argument is, and is used to select a default parser implementation. The @@ -1486,13 +1488,13 @@ line options. It too is a templated class which can take up to three arguments:

-
+
 namespace cl {
   template <class DataType, class Storage = bool,
             class ParserClass = parser<DataType> >
   class list;
 }
-
+

This class works the exact same as the cl::opt class, except that the second argument is @@ -1512,11 +1514,11 @@

The cl::alias class is a nontemplated class that is used to form aliases for other arguments.

-
+
 namespace cl {
   class alias;
 }
-
+

The cl::aliasopt attribute should be used to specify which option this is an alias for. Alias arguments default to @@ -1535,22 +1537,22 @@

The cl::extrahelp class is a nontemplated class that allows extra help text to be printed out for the --help option.

-
+
 namespace cl {
   struct extrahelp;
 }
-
+

To use the extrahelp, simply construct one with a const char* parameter to the constructor. The text passed to the constructor will be printed at the bottom of the help message, verbatim. Note that multiple -cl::extrahelp can be used but this practice is discouraged. If +cl::extrahelp can be used, but this practice is discouraged. If your tool needs to print additional help information, put all that help into a single cl::extrahelp instance.

For example:

-
+
   cl::extrahelp("\nADDITIONAL HELP:\n\n  This is the extra help\n");
-
+
@@ -1677,13 +1679,13 @@

To start out, we declare our new FileSizeParser class:

-
+
 struct FileSizeParser : public cl::basic_parser<unsigned> {
   // parse - Return true on error.
   bool parse(cl::Option &O, const char *ArgName, const std::string &ArgValue,
              unsigned &Val);
 };
-
+

Our new class inherits from the cl::basic_parser template class to fill in the default, boiler plate, code for us. We give it the data type that @@ -1699,7 +1701,7 @@ Otherwise it should return false and set 'Val' to the parsed value. In our example, we implement parse as:

-
+
 bool FileSizeParser::parse(cl::Option &O, const char *ArgName,
                            const std::string &Arg, unsigned &Val) {
   const char *ArgStart = Arg.c_str();
@@ -1725,7 +1727,7 @@
     }
   }
 }
-
+

This function implements a very simple parser for the kinds of strings we are interested in. Although it has some holes (it allows "123KKK" for @@ -1734,25 +1736,25 @@ true) in order to get a nice error message (shown below). Now that we have our parser class, we can use it like this:

-
+
 static cl::opt<unsigned, false, FileSizeParser>
 MFS("max-file-size", cl::desc("Maximum file size to accept"),
     cl::value_desc("size"));
-
+

Which adds this to the output of our program:

-
+
 OPTIONS:
   -help                 - display available options (--help-hidden for more)
   ...
   -max-file-size=<size> - Maximum file size to accept
-
+

And we can test that our parse works correctly now (the test program just prints out the max-file-size argument value):

-
+
 $ ./test
 MFS: 0
 $ ./test -max-file-size=123MB
@@ -1761,7 +1763,7 @@
 MFS: 3221225472
 $ ./test -max-file-size=dog
 -max-file-size option: 'dog' value invalid for file size argument!
-
+

It looks like it works. The error message that we get is nice and helpful, and we seem to accept reasonable file sizes. This wraps up the "custom parser" @@ -1810,7 +1812,7 @@ Chris Lattner
LLVM Compiler Infrastructure
- Last modified: $Date: 2005/02/09 22:49:05 $ + Last modified: $Date: 2005/03/11 00:00:33 $ From lattner at cs.uiuc.edu Thu Mar 10 18:01:12 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 10 Mar 2005 18:01:12 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/EquivClassGraphs.h PoolAllocate.cpp Message-ID: <200503110001.j2B01CBm013695@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: EquivClassGraphs.h updated: 1.13 -> 1.14 PoolAllocate.cpp updated: 1.106 -> 1.107 --- Log message: Fix some crashes noted by John Mellor-Crummey's group. --- Diffs of the changes: (+11 -3) EquivClassGraphs.h | 6 ++++++ PoolAllocate.cpp | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) Index: llvm-poolalloc/lib/PoolAllocate/EquivClassGraphs.h diff -u llvm-poolalloc/lib/PoolAllocate/EquivClassGraphs.h:1.13 llvm-poolalloc/lib/PoolAllocate/EquivClassGraphs.h:1.14 --- llvm-poolalloc/lib/PoolAllocate/EquivClassGraphs.h:1.13 Tue Nov 2 11:51:11 2004 +++ llvm-poolalloc/lib/PoolAllocate/EquivClassGraphs.h Thu Mar 10 18:00:56 2005 @@ -71,6 +71,12 @@ return *I->second; } + /// ContainsDSGraphFor - Return true if we have a graph for the specified + /// function. + bool ContainsDSGraphFor(const Function &F) const { + return DSInfo.find(&F) != DSInfo.end(); + } + /// getSomeCalleeForCallSite - Return any one callee function at /// a call site. /// Index: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.106 llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.107 --- llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.106 Sun Feb 27 16:30:33 2005 +++ llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp Thu Mar 10 18:00:56 2005 @@ -87,7 +87,7 @@ // Loop over the functions in the original program finding the pool desc. // arguments necessary for each function that is indirectly callable. for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isExternal()) + if (!I->isExternal() && ECGraphs->ContainsDSGraphFor(*I)) FindFunctionPoolArgs(*I); std::map FuncMap; @@ -98,7 +98,8 @@ // its clone. std::set ClonedFunctions; for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isExternal() && !ClonedFunctions.count(I)) + if (!I->isExternal() && !ClonedFunctions.count(I) && + ECGraphs->ContainsDSGraphFor(*I)) if (Function *Clone = MakeFunctionClone(*I)) { FuncMap[I] = Clone; ClonedFunctions.insert(Clone); @@ -107,7 +108,8 @@ // Now that all call targets are available, rewrite the function bodies of the // clones. for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isExternal() && !ClonedFunctions.count(I)) { + if (!I->isExternal() && !ClonedFunctions.count(I) && + ECGraphs->ContainsDSGraphFor(*I)) { std::map::iterator FI = FuncMap.find(I); ProcessFunctionBody(*I, FI != FuncMap.end() ? *FI->second : *I); } From natebegeman at mac.com Thu Mar 10 21:59:04 2005 From: natebegeman at mac.com (Nate Begeman) Date: Thu, 10 Mar 2005 21:59:04 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200503110359.VAA04094@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.306 -> 1.307 --- Log message: Add SelectionDAG library to PPC JIT so that lli will link when PPC32ISelPattern.cpp is present. --- Diffs of the changes: (+1 -1) Makefile.rules | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.306 llvm/Makefile.rules:1.307 --- llvm/Makefile.rules:1.306 Tue Mar 1 10:27:06 2005 +++ llvm/Makefile.rules Thu Mar 10 21:58:53 2005 @@ -845,7 +845,7 @@ # What the PowerPC JIT requires ifdef ENABLE_PPC_JIT - JIT_LIBS += LLVMPowerPC + JIT_LIBS += LLVMPowerPC LLVMSelectionDAG endif LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts LLVMAnalysis.a LLVMTransformUtils.a \ From brukman at cs.uiuc.edu Thu Mar 10 22:15:29 2005 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu, 10 Mar 2005 22:15:29 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200503110415.WAA10654@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.307 -> 1.308 --- Log message: * Remove extraneous spaces * Convert some tabs to spaces --- Diffs of the changes: (+6 -6) Makefile.rules | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.307 llvm/Makefile.rules:1.308 --- llvm/Makefile.rules:1.307 Thu Mar 10 21:58:53 2005 +++ llvm/Makefile.rules Thu Mar 10 22:15:18 2005 @@ -818,7 +818,7 @@ # What the X86 JIT requires ifdef ENABLE_X86_JIT - JIT_LIBS += LLVMX86 LLVMSelectionDAG + JIT_LIBS += LLVMX86 LLVMSelectionDAG endif # You can enable the SparcV9 JIT on a non-SparcV9 host by setting the flag @@ -832,8 +832,8 @@ ifdef ENABLE_SPARCV9_JIT JIT_LIBS += LLVMSparcV9 LLVMSparcV9ModuloSched LLVMSparcV9InstrSched \ LLVMSparcV9LiveVar LLVMInstrumentation.a LLVMProfilePaths \ - LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \ - LLVMDataStructure.a LLVMSparcV9RegAlloc + LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \ + LLVMDataStructure.a LLVMSparcV9RegAlloc endif # You can enable the PowerPC JIT on a non-PowerPC host by setting the flag @@ -845,12 +845,12 @@ # What the PowerPC JIT requires ifdef ENABLE_PPC_JIT - JIT_LIBS += LLVMPowerPC LLVMSelectionDAG + JIT_LIBS += LLVMPowerPC LLVMSelectionDAG endif LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts LLVMAnalysis.a LLVMTransformUtils.a \ - LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \ - LLVMSystem.a $(PLATFORMLIBDL) + LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \ + LLVMSystem.a $(PLATFORMLIBDL) endif #--------------------------------------------------------- From lattner at cs.uiuc.edu Fri Mar 11 00:12:43 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 11 Mar 2005 00:12:43 -0600 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c Message-ID: <200503110612.j2B6ChGc019654@apoc.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-expand.c updated: 1.89 -> 1.90 --- Log message: Correctly transform __builtin_prefetch into llvm.prefetch. --- Diffs of the changes: (+66 -4) llvm-expand.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 66 insertions(+), 4 deletions(-) Index: llvm-gcc/gcc/llvm-expand.c diff -u llvm-gcc/gcc/llvm-expand.c:1.89 llvm-gcc/gcc/llvm-expand.c:1.90 --- llvm-gcc/gcc/llvm-expand.c:1.89 Sun Feb 27 13:28:51 2005 +++ llvm-gcc/gcc/llvm-expand.c Fri Mar 11 00:12:27 2005 @@ -4525,6 +4525,70 @@ return D2V(TheCall); } +static void llvm_expand_builtin_prefetch(llvm_function *Fn, tree arglist) { + llvm_value *Ptr; + llvm_value *arg1 = llvm_constant_uint_0, *arg2 = llvm_constant_uint_0; + static llvm_function *llvm_prefetch = 0; + llvm_instruction *Call; + + if (llvm_prefetch == 0) { + llvm_type *FnTy = llvm_type_create_function(3, VoidTy); + FnTy->Elements[1] = VoidPtrTy; + FnTy->Elements[2] = UIntTy; + FnTy->Elements[3] = UIntTy; + FnTy = llvm_type_get_cannonical_function(FnTy); + llvm_prefetch = CreateIntrinsicFnWithType("llvm.prefetch", FnTy); + } + + arglist = TREE_OPERAND(arglist, 1); + + /* Check and expand the pointer argument. */ + if (TREE_CODE(TREE_TYPE(TREE_VALUE(arglist))) != POINTER_TYPE) { + error("invalid first argument to `__builtin_prefetch'"); + return; + } + Ptr = llvm_expand_expr(Fn, TREE_VALUE(arglist), 0); + Ptr = cast_if_type_not_equal(Fn, Ptr, VoidPtrTy); + + /* Arguments 1 and 2 are optional; argument 1 (read/write) defaults to zero + * (read) and argument 2 (locality) defaults to 3 (high degree of locality). + */ + arglist = TREE_CHAIN(arglist); + if (arglist) { + tree tmp = TREE_VALUE(arglist); + if (TREE_CODE(tmp) != INTEGER_CST) { + error ("second arg to `__builtin_prefetch' must be a constant"); + return; + } else if ((unsigned)TREE_INT_CST_LOW(tmp) > 1) { + /* Argument 1 must be either zero or one. */ + warning("invalid second arg to __builtin_prefetch; using zero"); + } else { + arg1 = llvm_expand_expr(Fn, tmp, 0); + arg1 = cast_if_type_not_equal(Fn, arg1, UIntTy); + } + arglist = TREE_CHAIN(arglist); + if (arglist) { + tmp = TREE_VALUE(arglist); + if (TREE_CODE(tmp) != INTEGER_CST) { + error ("third arg to `__builtin_prefetch' must be a constant"); + return; + } else if ((unsigned)TREE_INT_CST_LOW(tmp) > 3) { + /* Argument 2 must be 0, 1, 2, or 3. */ + warning ("invalid third arg to __builtin_prefetch; using zero"); + } else { + arg2 = llvm_expand_expr(Fn, tmp, 0); + arg2 = cast_if_type_not_equal(Fn, arg2, UIntTy); + } + } + } + + Call = llvm_instruction_new(VoidTy, "", O_Call, 4); + Call->Operands[0] = G2V(llvm_prefetch); + Call->Operands[1] = Ptr; + Call->Operands[2] = arg1; + Call->Operands[3] = arg2; + append_inst(Fn, Call); +} /* llvm_expand_builtin - This is patterned off of expand_builtin. */ static llvm_value *llvm_expand_builtin(llvm_function *Fn, tree exp, @@ -4995,11 +5059,9 @@ if (arglist == NULL_TREE || TREE_CHAIN (arglist) == NULL_TREE) return 0; return llvm_expand_expr(Fn, TREE_VALUE (arglist), DestLoc); -#if 0 case BUILT_IN_PREFETCH: - expand_builtin_prefetch (arglist); - return const0_rtx; -#endif + llvm_expand_builtin_prefetch(Fn, exp); + return 0; default: /* just do library call, if unknown builtin */ if (!DECL_ASSEMBLER_NAME_SET_P (fndecl)) error ("built-in function `%s' not currently supported", From lattner at cs.uiuc.edu Fri Mar 11 00:14:36 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 11 Mar 2005 00:14:36 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2005-03-11-Prefetch.c Message-ID: <200503110614.j2B6Ea5c019718@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2005-03-11-Prefetch.c added (r1.1) --- Log message: new testcase for __builtin_prefetch support. --- Diffs of the changes: (+6 -0) 2005-03-11-Prefetch.c | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/test/Regression/CFrontend/2005-03-11-Prefetch.c diff -c /dev/null llvm/test/Regression/CFrontend/2005-03-11-Prefetch.c:1.1 *** /dev/null Fri Mar 11 00:14:33 2005 --- llvm/test/Regression/CFrontend/2005-03-11-Prefetch.c Fri Mar 11 00:14:23 2005 *************** *** 0 **** --- 1,6 ---- + // RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | grep llvm.prefetch + + void foo(int *P) { + __builtin_prefetch(P); + __builtin_prefetch(P, 1); + } From lattner at cs.uiuc.edu Fri Mar 11 00:16:42 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 11 Mar 2005 00:16:42 -0600 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200503110616.j2B6GgnG019753@apoc.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.304 -> 1.305 --- Log message: prefetch is now supported. --- Diffs of the changes: (+5 -2) ReleaseNotes.html | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.304 llvm/docs/ReleaseNotes.html:1.305 --- llvm/docs/ReleaseNotes.html:1.304 Mon Feb 28 10:52:28 2005 +++ llvm/docs/ReleaseNotes.html Fri Mar 11 00:16:26 2005 @@ -99,6 +99,8 @@

  1. LLVM can now create native shared libraries with 'llvm-gcc ... -shared -Wl,-native' (or with -Wl,-native-cbe).
  2. +
  3. LLVM now supports a new "llvm.prefetch + " intrinsic, and llvm-gcc now supports __builtin_prefetch.
@@ -386,7 +388,8 @@ __builtin_types_compatible_p, __builtin_choose_expr, __builtin_constant_p, and __builtin_expect (currently ignored). We also support builtins for ISO C99 floating - point comparison macros (e.g., __builtin_islessequal). + point comparison macros (e.g., __builtin_islessequal), and + __builtin_prefetch.

The following extensions are known to be supported:

@@ -594,7 +597,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
- Last modified: $Date: 2005/02/28 16:52:28 $ + Last modified: $Date: 2005/03/11 06:16:26 $ From alenhar2 at cs.uiuc.edu Fri Mar 11 11:48:31 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 11 Mar 2005 11:48:31 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelPattern.cpp AlphaInstrInfo.td Message-ID: <200503111748.LAA08071@cypher.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaISelPattern.cpp updated: 1.60 -> 1.61 AlphaInstrInfo.td updated: 1.30 -> 1.31 --- Log message: remove a pseudo instruction and improve inline constant generation --- Diffs of the changes: (+29 -6) AlphaISelPattern.cpp | 32 +++++++++++++++++++++++++++++--- AlphaInstrInfo.td | 3 --- 2 files changed, 29 insertions(+), 6 deletions(-) Index: llvm/lib/Target/Alpha/AlphaISelPattern.cpp diff -u llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.60 llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.61 --- llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.60 Fri Mar 4 14:09:23 2005 +++ llvm/lib/Target/Alpha/AlphaISelPattern.cpp Fri Mar 11 11:48:04 2005 @@ -326,6 +326,25 @@ }; } +//These describe LDAx +static const int64_t IMM_LOW = 0xffffffffffff8000LL; +static const int IMM_HIGH = 0x0000000000007fffLL; +static const int IMM_MULT = 65536; + +static long getUpper16(long l) +{ + long y = l / IMM_MULT; + if (l % IMM_MULT > IMM_HIGH) + ++y; + return y; +} + +static long getLower16(long l) +{ + long h = getUpper16(l); + return l - h * IMM_MULT; +} + static unsigned GetSymVersion(unsigned opcode) { switch (opcode) { @@ -1447,9 +1466,16 @@ case ISD::Constant: { - unsigned long val = cast(N)->getValue(); - if (val < 32000 && (long)val > -32000) - BuildMI(BB, Alpha::LOAD_IMM, 1, Result).addImm((long)val); + int64_t val = (long)cast(N)->getValue(); + if (val <= IMM_HIGH && val >= IMM_LOW) { + BuildMI(BB, Alpha::LDA, 2, Result).addImm(val).addReg(Alpha::R31); + } + else if (val <= (int64_t)IMM_HIGH + (int64_t)IMM_HIGH * (int64_t)IMM_MULT && + val >= (int64_t)IMM_LOW + (int64_t)IMM_LOW * (int64_t)IMM_MULT) { + Tmp1 = MakeReg(MVT::i64); + BuildMI(BB, Alpha::LDAH, 2, Tmp1).addImm(getUpper16(val)).addReg(Alpha::R31); + BuildMI(BB, Alpha::LDA, 2, Result).addImm(getLower16(val)).addReg(Tmp1); + } else { MachineConstantPool *CP = BB->getParent()->getConstantPool(); ConstantUInt *C = ConstantUInt::get(Type::getPrimitiveType(Type::ULongTyID) , val); Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.30 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.31 --- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.30 Wed Mar 9 14:48:23 2005 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Fri Mar 11 11:48:05 2005 @@ -53,9 +53,6 @@ let isReturn = 1, isTerminator = 1 in def RETURN : PseudoInstAlpha<(ops ), "ret $$31,($$26),1">; //Return from subroutine -let Uses = [R29], Defs = [R28] in - def LOAD_IMM : PseudoInstAlpha<(ops GPRC:$RC, s64imm:$IMM), "ldiq $RC,$IMM">; //Load Immediate Quadword - let Uses = [R29], Defs = [R28] in { def LOAD_ADDR : PseudoInstAlpha<(ops GPRC:$RA, s64imm:$DISP), "lda $RA,$DISP">; //Load address def LDQ_SYM : PseudoInstAlpha<(ops GPRC:$RA, s64imm:$DISP), "ldq $RA,$DISP">; //Load quadword From brukman at cs.uiuc.edu Fri Mar 11 13:45:28 2005 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 11 Mar 2005 13:45:28 -0600 Subject: [llvm-commits] CVS: llvm-www/header.incl Message-ID: <200503111945.NAA09647@zion.cs.uiuc.edu> Changes in directory llvm-www: header.incl updated: 1.36 -> 1.37 --- Log message: Add a link to the Open Projects page --- Diffs of the changes: (+1 -0) header.incl | 1 + 1 files changed, 1 insertion(+) Index: llvm-www/header.incl diff -u llvm-www/header.incl:1.36 llvm-www/header.incl:1.37 --- llvm-www/header.incl:1.36 Wed Mar 9 17:14:31 2005 +++ llvm-www/header.incl Fri Mar 11 13:45:17 2005 @@ -28,6 +28,7 @@ Publications
LLVM Projects
Current Work
+Open Projects
LLVM People
Bug Database
From lattner at cs.uiuc.edu Fri Mar 11 14:17:20 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 11 Mar 2005 14:17:20 -0600 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200503112017.j2BKHKq5022064@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.92 -> 1.93 --- Log message: Fix computation of compiled objects, contributed by Vladimir Merzliakov! --- Diffs of the changes: (+1 -1) NightlyTest.pl | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.92 llvm/utils/NightlyTest.pl:1.93 --- llvm/utils/NightlyTest.pl:1.92 Thu Mar 10 10:32:33 2005 +++ llvm/utils/NightlyTest.pl Fri Mar 11 14:17:04 2005 @@ -414,7 +414,7 @@ my @Linked = split '\n', `grep Linking $BuildLog`; my $NumExecutables = scalar(grep(/executable/, @Linked)); my $NumLibraries = scalar(grep(!/executable/, @Linked)); -my $NumObjects = `grep '^Compiling' $BuildLog | wc -l` + 0; +my $NumObjects = `grep ']\: Compiling ' $BuildLog | wc -l` + 0; my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog"; my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$BuildLog"; From brukman at cs.uiuc.edu Fri Mar 11 15:18:07 2005 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 11 Mar 2005 15:18:07 -0600 Subject: [llvm-commits] CVS: llvm-www/OpenProjects.html Message-ID: <200503112118.PAA10387@zion.cs.uiuc.edu> Changes in directory llvm-www: OpenProjects.html updated: 1.1 -> 1.2 --- Log message: * LLVM prefetch support has been committed * Link to Chris' list of LLVM core extensions --- Diffs of the changes: (+3 -6) OpenProjects.html | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) Index: llvm-www/OpenProjects.html diff -u llvm-www/OpenProjects.html:1.1 llvm-www/OpenProjects.html:1.2 --- llvm-www/OpenProjects.html:1.1 Fri Jan 7 12:55:28 2005 +++ llvm-www/OpenProjects.html Fri Mar 11 15:17:56 2005 @@ -136,11 +136,8 @@
    -
  1. Add support for platform-independent prefetch support. The GCC prefetch project page - has a good survey of the prefetching capabilities of a variety of modern - processors.
  2. - +
  3. Many proposed extensions and +improvements to LLVM core are awaiting design and implementation.
@@ -373,7 +370,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> LLVM Compiler Infrastructure
- Last modified: $Date: 2005/01/07 18:55:28 $ + Last modified: $Date: 2005/03/11 21:17:56 $ From lattner at cs.uiuc.edu Fri Mar 11 15:18:15 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 11 Mar 2005 15:18:15 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Debugger/funccall.ll Message-ID: <200503112118.j2BLIFuq022285@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Debugger: funccall.ll updated: 1.8 -> 1.9 --- Log message: this passes on darwin --- Diffs of the changes: (+1 -1) funccall.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Regression/Debugger/funccall.ll diff -u llvm/test/Regression/Debugger/funccall.ll:1.8 llvm/test/Regression/Debugger/funccall.ll:1.9 --- llvm/test/Regression/Debugger/funccall.ll:1.8 Mon Dec 6 16:05:02 2004 +++ llvm/test/Regression/Debugger/funccall.ll Fri Mar 11 15:18:00 2005 @@ -1,4 +1,4 @@ -;; XFAIL: darwin,sun +;; XFAIL: sun ;; RUN: echo create > %t.commands ;; RUN: echo s >> %t.commands ;; RUN: echo s >> %t.commands From brukman at cs.uiuc.edu Fri Mar 11 15:18:29 2005 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 11 Mar 2005 15:18:29 -0600 Subject: [llvm-commits] CVS: llvm/docs/CompilerWriterInfo.html Message-ID: <200503112118.PAA10531@zion.cs.uiuc.edu> Changes in directory llvm/docs: CompilerWriterInfo.html updated: 1.2 -> 1.3 --- Log message: Move link to GCC prefetch info here, since it's gone from Open Projects page --- Diffs of the changes: (+6 -3) CompilerWriterInfo.html | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: llvm/docs/CompilerWriterInfo.html diff -u llvm/docs/CompilerWriterInfo.html:1.2 llvm/docs/CompilerWriterInfo.html:1.3 --- llvm/docs/CompilerWriterInfo.html:1.2 Fri Jan 7 19:11:15 2005 +++ llvm/docs/CompilerWriterInfo.html Fri Mar 11 15:18:18 2005 @@ -31,7 +31,7 @@
  • Linux
  • OS X
  • -
  • Binary File Formats
  • +
  • Miscellaneous resources
  • @@ -216,13 +216,16 @@
    - + @@ -236,7 +239,7 @@ Misha Brukman
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2005/01/08 01:11:15 $ + Last modified: $Date: 2005/03/11 21:18:18 $ From lattner at cs.uiuc.edu Fri Mar 11 21:43:54 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 11 Mar 2005 21:43:54 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Debugger/funccall.ll Message-ID: <200503120343.j2C3hsQk023562@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Debugger: funccall.ll updated: 1.9 -> 1.10 --- Log message: this doesn't fail on the suns either! --- Diffs of the changes: (+0 -1) funccall.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Regression/Debugger/funccall.ll diff -u llvm/test/Regression/Debugger/funccall.ll:1.9 llvm/test/Regression/Debugger/funccall.ll:1.10 --- llvm/test/Regression/Debugger/funccall.ll:1.9 Fri Mar 11 15:18:00 2005 +++ llvm/test/Regression/Debugger/funccall.ll Fri Mar 11 21:43:38 2005 @@ -1,4 +1,3 @@ -;; XFAIL: sun ;; RUN: echo create > %t.commands ;; RUN: echo s >> %t.commands ;; RUN: echo s >> %t.commands From alkis at cs.uiuc.edu Sat Mar 12 02:30:08 2005 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 12 Mar 2005 02:30:08 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Makefile.test Message-ID: <200503120830.CAA14000@zion.cs.uiuc.edu> Changes in directory llvm-java/test: Makefile.test updated: 1.44 -> 1.45 --- Log message: llc executables are precious too :-) --- Diffs of the changes: (+1 -1) Makefile.test | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-java/test/Makefile.test diff -u llvm-java/test/Makefile.test:1.44 llvm-java/test/Makefile.test:1.45 --- llvm-java/test/Makefile.test:1.44 Mon Mar 7 04:01:40 2005 +++ llvm-java/test/Makefile.test Sat Mar 12 02:29:57 2005 @@ -15,7 +15,7 @@ # we don't want these files to be deleted by make, even if they are # intermediate results -.PRECIOUS: %.linked.bc %.raw.bc %.ll %.llvm.bc +.PRECIOUS: %.linked.bc %.raw.bc %.ll %.llvm.bc %.llc # rule to link bytecode with runtime %.llvm %.llvm.bc: %.linked.bc $(LibDir)/libjrt.bca $(EXTRA_OBJS) $(LOPT) From lattner at cs.uiuc.edu Sat Mar 12 05:32:43 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 12 Mar 2005 05:32:43 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/Macroscopic/ Message-ID: <200503121132.j2CBWh2S025261@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/Macroscopic: --- Log message: Directory /home/vadve/shared/PublicCVS/llvm-poolalloc/lib/Macroscopic added to the repository --- Diffs of the changes: (+0 -0) 0 files changed From lattner at cs.uiuc.edu Sat Mar 12 05:37:41 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 12 Mar 2005 05:37:41 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/Macroscopic/README.txt Message-ID: <200503121137.j2CBbffP025287@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/Macroscopic: README.txt added (r1.1) --- Log message: add note --- Diffs of the changes: (+5 -0) README.txt | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm-poolalloc/lib/Macroscopic/README.txt diff -c /dev/null llvm-poolalloc/lib/Macroscopic/README.txt:1.1 *** /dev/null Sat Mar 12 05:37:35 2005 --- llvm-poolalloc/lib/Macroscopic/README.txt Sat Mar 12 05:37:25 2005 *************** *** 0 **** --- 1,5 ---- + //===- llvm-poolalloc/lib/Macroscopic -------------------------------------===// + + This directory contains an experimental implementation of several ideas for + Macroscopic analyses and transformations, which may eventually include + reimplementation of the pool allocator and other passes. From lattner at cs.uiuc.edu Sat Mar 12 05:51:46 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 12 Mar 2005 05:51:46 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Message-ID: <200503121151.j2CBpkvE025970@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: EquivClassGraphs.cpp updated: 1.19 -> 1.20 --- Log message: Move this from the pool allocator project to here, where it logically belongs. --- Diffs of the changes: (+1 -1) EquivClassGraphs.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp diff -u llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.19 llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.20 --- llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.19 Sun Jan 30 17:51:25 2005 +++ llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Sat Mar 12 05:51:30 2005 @@ -15,7 +15,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "ECGraphs" -#include "EquivClassGraphs.h" +#include "llvm/Analysis/DataStructure/EquivClassGraphs.h" #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Analysis/DataStructure/DSGraph.h" From lattner at cs.uiuc.edu Sat Mar 12 05:53:35 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 12 Mar 2005 05:53:35 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp Message-ID: <200503121153.j2CBrZfc026132@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: PointerCompress.cpp updated: 1.51 -> 1.52 --- Log message: disable something that breaks some programs --- Diffs of the changes: (+2 -2) PointerCompress.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.51 llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.52 --- llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.51 Sat Mar 5 00:35:30 2005 +++ llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp Sat Mar 12 05:53:23 2005 @@ -229,8 +229,8 @@ if (const PointerType *PTY = dyn_cast(OrigTy)) { // Okay, we have a pointer. Check to see if the node pointed to is actually // compressed! - DSNode *PointeeNode = getNode()->getLink(NodeOffset).getNode(); - if (PointeeNode && Nodes.count(PointeeNode)) + //DSNode *PointeeNode = getNode()->getLink(NodeOffset).getNode(); + //if (PointeeNode && Nodes.count(PointeeNode)) return MEMUINTTYPE; // Otherwise, it points to a non-compressed node. return OrigTy; From lattner at cs.uiuc.edu Sat Mar 12 05:53:44 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 12 Mar 2005 05:53:44 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp EquivClassGraphs.h Message-ID: <200503121153.j2CBriYW026223@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: EquivClassGraphs.cpp (r1.19) removed EquivClassGraphs.h (r1.14) removed --- Log message: Move these files to the main LLVM project --- Diffs of the changes: (+0 -0) 0 files changed From lattner at cs.uiuc.edu Sat Mar 12 05:55:41 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 12 Mar 2005 05:55:41 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp PoolAllocate.cpp TransformFunctionBody.cpp Message-ID: <200503121155.j2CBtf2V027173@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: PointerCompress.cpp updated: 1.52 -> 1.53 PoolAllocate.cpp updated: 1.107 -> 1.108 TransformFunctionBody.cpp updated: 1.38 -> 1.39 --- Log message: EquivClassGraph is really part of DSA, move it there. --- Diffs of the changes: (+4 -4) PointerCompress.cpp | 2 +- PoolAllocate.cpp | 2 +- TransformFunctionBody.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) Index: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.52 llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.53 --- llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.52 Sat Mar 12 05:53:23 2005 +++ llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp Sat Mar 12 05:55:30 2005 @@ -12,12 +12,12 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "pointercompress" -#include "EquivClassGraphs.h" #include "PoolAllocate.h" #include "Heuristic.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/Module.h" +#include "llvm/Analysis/DataStructure/EquivClassGraphs.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/CommandLine.h" Index: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.107 llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.108 --- llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.107 Thu Mar 10 18:00:56 2005 +++ llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp Sat Mar 12 05:55:30 2005 @@ -14,7 +14,6 @@ #define DEBUG_TYPE "poolalloc" #include "PoolAllocate.h" -#include "EquivClassGraphs.h" #include "Heuristic.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" @@ -23,6 +22,7 @@ #include "llvm/Constants.h" #include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Analysis/DataStructure/DSGraph.h" +#include "llvm/Analysis/DataStructure/EquivClassGraphs.h" #include "llvm/Support/CFG.h" #include "llvm/Target/TargetData.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.38 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.39 --- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.38 Thu Mar 10 14:08:49 2005 +++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Sat Mar 12 05:55:30 2005 @@ -12,10 +12,10 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "PoolAllocator" -#include "EquivClassGraphs.h" #include "PoolAllocate.h" -#include "llvm/Analysis/DataStructure//DataStructure.h" +#include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Analysis/DataStructure/DSGraph.h" +#include "llvm/Analysis/DataStructure/EquivClassGraphs.h" #include "llvm/Module.h" #include "llvm/DerivedTypes.h" #include "llvm/Constants.h" From lattner at cs.uiuc.edu Sat Mar 12 06:08:56 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 12 Mar 2005 06:08:56 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h Message-ID: <200503121208.j2CC8uiK027317@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis/DataStructure: EquivClassGraphs.h updated: 1.14 -> 1.15 --- Log message: remove this from the PA namespace, leaving it in the llvm ns --- Diffs of the changes: (+2 -7) EquivClassGraphs.h | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) Index: llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h diff -u llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h:1.14 llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h:1.15 --- llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h:1.14 Thu Mar 10 18:00:56 2005 +++ llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h Sat Mar 12 06:08:44 2005 @@ -23,11 +23,9 @@ #include namespace llvm { + class Module; + class Function; -class Module; -class Function; - -namespace PA { /// EquivClassGraphs - This is the same as the complete bottom-up graphs, but /// with functions partitioned into equivalence classes and a single merged /// DS graph for all functions in an equivalence class. After this merging, @@ -106,7 +104,4 @@ DSGraph &getOrCreateGraph(Function &F); }; - -}; // end PA namespace - }; // end llvm namespace From lattner at cs.uiuc.edu Sat Mar 12 06:09:03 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 12 Mar 2005 06:09:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Message-ID: <200503121209.j2CC93BA027436@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: EquivClassGraphs.cpp updated: 1.20 -> 1.21 --- Log message: remove this from the PA namespace, leaving it in the llvm ns --- Diffs of the changes: (+7 -8) EquivClassGraphs.cpp | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) Index: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp diff -u llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.20 llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.21 --- llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.20 Sat Mar 12 05:51:30 2005 +++ llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Sat Mar 12 06:08:52 2005 @@ -29,7 +29,7 @@ using namespace llvm; namespace { - RegisterAnalysis X("equivdatastructure", + RegisterAnalysis X("equivdatastructure", "Equivalence-class Bottom-up Data Structure Analysis"); Statistic<> NumEquivBUInlines("equivdatastructures", "Number of graphs inlined"); @@ -58,8 +58,7 @@ // getSomeCalleeForCallSite - Return any one callee function at a call site. // -Function *PA::EquivClassGraphs:: -getSomeCalleeForCallSite(const CallSite &CS) const { +Function *EquivClassGraphs:: getSomeCalleeForCallSite(const CallSite &CS) const{ Function *thisFunc = CS.getCaller(); assert(thisFunc && "getSomeCalleeForCallSite(): Not a valid call site?"); DSGraph &DSG = getDSGraph(*thisFunc); @@ -72,7 +71,7 @@ // runOnModule - Calculate the bottom up data structure graphs for each function // in the program. // -bool PA::EquivClassGraphs::runOnModule(Module &M) { +bool EquivClassGraphs::runOnModule(Module &M) { CBU = &getAnalysis(); DEBUG(CheckAllGraphs(&M, *CBU)); @@ -112,7 +111,7 @@ // calls to functions. If a call site can invoke any functions [F1, F2... FN], // unify the N functions together in the FuncECs set. // -void PA::EquivClassGraphs::buildIndirectFunctionSets(Module &M) { +void EquivClassGraphs::buildIndirectFunctionSets(Module &M) { const ActualCalleesTy& AC = CBU->getActualCallees(); // Loop over all of the indirect calls in the program. If a call site can @@ -252,7 +251,7 @@ } -DSGraph &PA::EquivClassGraphs::getOrCreateGraph(Function &F) { +DSGraph &EquivClassGraphs::getOrCreateGraph(Function &F) { // Has the graph already been created? DSGraph *&Graph = DSInfo[&F]; if (Graph) return *Graph; @@ -277,7 +276,7 @@ } -unsigned PA::EquivClassGraphs:: +unsigned EquivClassGraphs:: processSCC(DSGraph &FG, std::vector &Stack, unsigned &NextID, std::map &ValMap) { std::map::iterator It = ValMap.lower_bound(&FG); @@ -347,7 +346,7 @@ /// processGraph - Process the CBU graphs for the program in bottom-up order on /// the SCC of the __ACTUAL__ call graph. This builds final folded CBU graphs. -void PA::EquivClassGraphs::processGraph(DSGraph &G) { +void EquivClassGraphs::processGraph(DSGraph &G) { DEBUG(std::cerr << " ProcessGraph for function " << G.getFunctionNames() << "\n"); From lattner at cs.uiuc.edu Sat Mar 12 06:11:04 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 12 Mar 2005 06:11:04 -0600 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp PoolAllocate.h Message-ID: <200503121211.j2CCB4bS028451@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: PointerCompress.cpp updated: 1.53 -> 1.54 PoolAllocate.h updated: 1.44 -> 1.45 --- Log message: Move EquivClassGraphs out of llvm::PA into the llvm ns --- Diffs of the changes: (+6 -6) PointerCompress.cpp | 6 +++--- PoolAllocate.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) Index: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.53 llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.54 --- llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.53 Sat Mar 12 05:55:30 2005 +++ llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp Sat Mar 12 06:10:52 2005 @@ -88,7 +88,7 @@ /// data structures to reduce the size of pointers in the program. class PointerCompress : public ModulePass { PoolAllocate *PoolAlloc; - PA::EquivClassGraphs *ECG; + EquivClassGraphs *ECG; /// ClonedFunctionMap - Every time we clone a function to compress its /// arguments, keep track of the clone and which arguments are compressed. @@ -1039,7 +1039,7 @@ AU.addRequired(); // Need information from DSA. - AU.addRequired(); + AU.addRequired(); } /// PoolIsCompressible - Return true if we can pointer compress this node. @@ -1418,7 +1418,7 @@ bool PointerCompress::runOnModule(Module &M) { PoolAlloc = &getAnalysis(); - ECG = &getAnalysis(); + ECG = &getAnalysis(); if (SmallIntCompress) MEMUINTTYPE = Type::UShortTy; Index: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h diff -u llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h:1.44 llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h:1.45 --- llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h:1.44 Sun Feb 27 15:32:27 2005 +++ llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h Sat Mar 12 06:10:52 2005 @@ -31,10 +31,10 @@ class DSGraph; class Type; class AllocaInst; +class EquivClassGraphs; namespace PA { - class EquivClassGraphs; class Heuristic; /// FuncInfo - Represent the pool allocation information for one function in @@ -104,7 +104,7 @@ bool PassAllArguments; Module *CurModule; - PA::EquivClassGraphs *ECGraphs; + EquivClassGraphs *ECGraphs; std::map FunctionInfo; std::map CloneToOrigMap; @@ -129,7 +129,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const; - PA::EquivClassGraphs &getECGraphs() const { return *ECGraphs; } + EquivClassGraphs &getECGraphs() const { return *ECGraphs; } /// getOrigFunctionFromClone - Given a pointer to a function that was cloned /// from another function, return the original function. If the argument From lattner at cs.uiuc.edu Sat Mar 12 08:58:44 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 12 Mar 2005 08:58:44 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200503121458.j2CEwisn006400@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.195 -> 1.196 --- Log message: make sure to mark nodes returned from functions as incomplete --- Diffs of the changes: (+1 -0) DataStructure.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.195 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.196 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.195 Sun Feb 27 00:15:51 2005 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sat Mar 12 08:58:28 2005 @@ -1489,6 +1489,7 @@ for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) if (isPointerType(I->getType())) markIncompleteNode(getNodeForValue(I).getNode()); + markIncompleteNode(FI->second.getNode()); } // Mark stuff passed into functions calls as being incomplete. From alenhar2 at cs.uiuc.edu Sat Mar 12 18:43:35 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Sat, 12 Mar 2005 18:43:35 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp Message-ID: <200503130043.j2D0hZPB018384@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaRegisterInfo.cpp updated: 1.16 -> 1.17 --- Log message: Should fix mesa --- Diffs of the changes: (+1 -1) AlphaRegisterInfo.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.16 llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.17 --- llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.16 Sat Mar 5 11:47:38 2005 +++ llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp Sat Mar 12 18:43:20 2005 @@ -196,7 +196,7 @@ //insert the new MachineInstr* nMI=BuildMI(Alpha::LDAH, 2, Alpha::R28) .addImm(getUpper16(Offset)).addReg(FP ? Alpha::R15 : Alpha::R30); - MBB.insert(--II, nMI); + MBB.insert(II, nMI); } else { MI.SetMachineOperandConst(i, MachineOperand::MO_SignExtendedImmed, Offset); } From lattner at cs.uiuc.edu Sun Mar 13 13:04:20 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 13 Mar 2005 13:04:20 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetData.h Message-ID: <200503131904.j2DJ4Kqt013754@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetData.h updated: 1.28 -> 1.29 --- Log message: add a helper method --- Diffs of the changes: (+5 -0) TargetData.h | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/include/llvm/Target/TargetData.h diff -u llvm/include/llvm/Target/TargetData.h:1.28 llvm/include/llvm/Target/TargetData.h:1.29 --- llvm/include/llvm/Target/TargetData.h:1.28 Wed Oct 27 11:14:51 2004 +++ llvm/include/llvm/Target/TargetData.h Sun Mar 13 13:04:04 2005 @@ -119,6 +119,11 @@ std::vector MemberOffsets; uint64_t StructSize; unsigned StructAlignment; + + /// getElementContainingOffset - Given a valid offset into the structure, + /// return the structure index that contains it. + unsigned getElementContainingOffset(uint64_t Offset) const; + private: friend class TargetData; // Only TargetData can create this class StructLayout(const StructType *ST, const TargetData &TD); From lattner at cs.uiuc.edu Sun Mar 13 13:04:54 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 13 Mar 2005 13:04:54 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetData.cpp Message-ID: <200503131904.j2DJ4sTH013771@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetData.cpp updated: 1.54 -> 1.55 --- Log message: add a StructLayout::getElementContainingOffset method. --- Diffs of the changes: (+17 -0) TargetData.cpp | 17 +++++++++++++++++ 1 files changed, 17 insertions(+) Index: llvm/lib/Target/TargetData.cpp diff -u llvm/lib/Target/TargetData.cpp:1.54 llvm/lib/Target/TargetData.cpp:1.55 --- llvm/lib/Target/TargetData.cpp:1.54 Wed Dec 1 11:14:28 2004 +++ llvm/lib/Target/TargetData.cpp Sun Mar 13 13:04:41 2005 @@ -22,6 +22,7 @@ #include "llvm/Constants.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/MathExtras.h" +#include using namespace llvm; // Handle the Pass registration stuff necessary to use TargetData's. @@ -71,6 +72,22 @@ StructSize = (StructSize/StructAlignment + 1) * StructAlignment; } + +/// getElementContainingOffset - Given a valid offset into the structure, +/// return the structure index that contains it. +unsigned StructLayout::getElementContainingOffset(uint64_t Offset) const { + std::vector::const_iterator SI = + std::upper_bound(MemberOffsets.begin(), MemberOffsets.end(), + Offset); + assert(SI != MemberOffsets.begin() && "Offset not in structure type!"); + --SI; + assert(*SI <= Offset && "upper_bound didn't work"); + assert((SI == MemberOffsets.begin() || *(SI-1) < Offset) && + (SI+1 == MemberOffsets.end() || *(SI+1) > Offset) && + "Upper bound didn't work!"); + return SI-MemberOffsets.begin(); +} + //===----------------------------------------------------------------------===// // TargetData Class Implementation //===----------------------------------------------------------------------===// From lattner at cs.uiuc.edu Sun Mar 13 13:05:18 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 13 Mar 2005 13:05:18 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200503131905.j2DJ5Iiu013786@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.196 -> 1.197 --- Log message: Replace linear search with logrithmic one. --- Diffs of the changes: (+1 -4) DataStructure.cpp | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.196 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.197 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.196 Sat Mar 12 08:58:28 2005 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sun Mar 13 13:05:05 2005 @@ -443,10 +443,7 @@ case Type::StructTyID: { const StructType *STy = cast(SubType); const StructLayout &SL = *TD.getStructLayout(STy); - - unsigned i = 0, e = SL.MemberOffsets.size(); - for (; i+1 < e && SL.MemberOffsets[i+1] <= Offset-O; ++i) - /* empty */; + unsigned i = SL.getElementContainingOffset(Offset-O); // The offset we are looking for must be in the i'th element... SubType = STy->getElementType(i); From lattner at cs.uiuc.edu Sun Mar 13 13:50:55 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 13 Mar 2005 13:50:55 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h Message-ID: <200503131950.j2DJot1m016740@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis/DataStructure: EquivClassGraphs.h updated: 1.15 -> 1.16 --- Log message: Add support for printing EQ graphs --- Diffs of the changes: (+8 -0) EquivClassGraphs.h | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h diff -u llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h:1.15 llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h:1.16 --- llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h:1.15 Sat Mar 12 06:08:44 2005 +++ llvm/include/llvm/Analysis/DataStructure/EquivClassGraphs.h Sun Mar 13 13:50:40 2005 @@ -58,6 +58,10 @@ /// virtual bool runOnModule(Module &M); + /// print - Print out the analysis results... + /// + void print(std::ostream &O, const Module *M) const; + /// getDSGraph - Return the data structure graph for the specified function. /// This returns the folded graph. The folded graph is the same as the CBU /// graph iff the function is in a singleton equivalence class AND all its @@ -69,6 +73,10 @@ return *I->second; } + bool hasGraph(const Function &F) const { + return DSInfo.find(&F) != DSInfo.end(); + } + /// ContainsDSGraphFor - Return true if we have a graph for the specified /// function. bool ContainsDSGraphFor(const Function &F) const { From lattner at cs.uiuc.edu Sun Mar 13 13:51:37 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 13 Mar 2005 13:51:37 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Printer.cpp Message-ID: <200503131951.j2DJpbpu016760@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: EquivClassGraphs.cpp updated: 1.21 -> 1.22 Printer.cpp updated: 1.75 -> 1.76 --- Log message: ADd support for printing eqgraphs. --- Diffs of the changes: (+8 -2) EquivClassGraphs.cpp | 4 ++-- Printer.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) Index: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp diff -u llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.21 llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.22 --- llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.21 Sat Mar 12 06:08:52 2005 +++ llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Sun Mar 13 13:51:24 2005 @@ -29,7 +29,7 @@ using namespace llvm; namespace { - RegisterAnalysis X("equivdatastructure", + RegisterAnalysis X("eqdatastructure", "Equivalence-class Bottom-up Data Structure Analysis"); Statistic<> NumEquivBUInlines("equivdatastructures", "Number of graphs inlined"); @@ -58,7 +58,7 @@ // getSomeCalleeForCallSite - Return any one callee function at a call site. // -Function *EquivClassGraphs:: getSomeCalleeForCallSite(const CallSite &CS) const{ +Function *EquivClassGraphs::getSomeCalleeForCallSite(const CallSite &CS) const{ Function *thisFunc = CS.getCaller(); assert(thisFunc && "getSomeCalleeForCallSite(): Not a valid call site?"); DSGraph &DSG = getDSGraph(*thisFunc); Index: llvm/lib/Analysis/DataStructure/Printer.cpp diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.75 llvm/lib/Analysis/DataStructure/Printer.cpp:1.76 --- llvm/lib/Analysis/DataStructure/Printer.cpp:1.75 Tue Feb 1 13:10:48 2005 +++ llvm/lib/Analysis/DataStructure/Printer.cpp Sun Mar 13 13:51:24 2005 @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/DataStructure/DataStructure.h" +#include "llvm/Analysis/DataStructure/EquivClassGraphs.h" #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/Analysis/DataStructure/DSGraphTraits.h" #include "llvm/Module.h" @@ -333,3 +334,8 @@ } +void EquivClassGraphs::print(std::ostream &O, const Module *M) const { + if (DontPrintAnything) return; + printCollection(*this, O, M, "eq."); +} + From lattner at cs.uiuc.edu Sun Mar 13 14:15:22 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 13 Mar 2005 14:15:22 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp CompleteBottomUp.cpp EquivClassGraphs.cpp Message-ID: <200503132015.j2DKFMhn017755@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.93 -> 1.94 CompleteBottomUp.cpp updated: 1.17 -> 1.18 EquivClassGraphs.cpp updated: 1.22 -> 1.23 --- Log message: After finishing BU analysis, move all global variables from the globals graph into main and mark them complete. --- Diffs of the changes: (+71 -6) BottomUpClosure.cpp | 21 +++++++++++++++++++++ CompleteBottomUp.cpp | 29 ++++++++++++++++++++++++++--- EquivClassGraphs.cpp | 27 ++++++++++++++++++++++++--- 3 files changed, 71 insertions(+), 6 deletions(-) Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.93 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.94 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.93 Mon Feb 7 10:09:15 2005 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Sun Mar 13 14:15:06 2005 @@ -81,6 +81,27 @@ // GlobalsGraph->removeTriviallyDeadNodes(); GlobalsGraph->maskIncompleteMarkers(); + + // Merge the globals variables (not the calls) from the globals graph back + // into the main function's graph so that the main function contains all of + // the information about global pools and GV usage in the program. + if (MainFunc) { + DSGraph &MainGraph = getOrCreateGraph(MainFunc); + const DSGraph &GG = *MainGraph.getGlobalsGraph(); + ReachabilityCloner RC(MainGraph, GG, + DSGraph::DontCloneCallNodes | + DSGraph::DontCloneAuxCallNodes); + + // Clone the global nodes into this graph. + for (DSScalarMap::global_iterator I = GG.getScalarMap().global_begin(), + E = GG.getScalarMap().global_end(); I != E; ++I) + if (isa(*I)) + RC.getClonedNH(GG.getNodeForValue(*I)); + + MainGraph.markIncompleteNodes(DSGraph::MarkFormalArgs | + DSGraph::IgnoreGlobals); + } + return false; } Index: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp diff -u llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.17 llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.18 --- llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.17 Sun Jan 30 18:10:58 2005 +++ llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp Sun Mar 13 14:15:06 2005 @@ -76,9 +76,10 @@ hash_map ValMap; unsigned NextID = 1; - if (Function *Main = M.getMainFunction()) { - if (!Main->isExternal()) - calculateSCCGraphs(getOrCreateGraph(*Main), Stack, NextID, ValMap); + Function *MainFunc = M.getMainFunction(); + if (MainFunc) { + if (!MainFunc->isExternal()) + calculateSCCGraphs(getOrCreateGraph(*MainFunc), Stack, NextID, ValMap); } else { std::cerr << "CBU-DSA: No 'main' function found!\n"; } @@ -88,6 +89,28 @@ calculateSCCGraphs(getOrCreateGraph(*I), Stack, NextID, ValMap); GlobalsGraph->removeTriviallyDeadNodes(); + + + // Merge the globals variables (not the calls) from the globals graph back + // into the main function's graph so that the main function contains all of + // the information about global pools and GV usage in the program. + if (MainFunc) { + DSGraph &MainGraph = getOrCreateGraph(*MainFunc); + const DSGraph &GG = *MainGraph.getGlobalsGraph(); + ReachabilityCloner RC(MainGraph, GG, + DSGraph::DontCloneCallNodes | + DSGraph::DontCloneAuxCallNodes); + + // Clone the global nodes into this graph. + for (DSScalarMap::global_iterator I = GG.getScalarMap().global_begin(), + E = GG.getScalarMap().global_end(); I != E; ++I) + if (isa(*I)) + RC.getClonedNH(GG.getNodeForValue(*I)); + + MainGraph.markIncompleteNodes(DSGraph::MarkFormalArgs | + DSGraph::IgnoreGlobals); + } + return false; } Index: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp diff -u llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.22 llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.23 --- llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.22 Sun Mar 13 13:51:24 2005 +++ llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Sun Mar 13 14:15:06 2005 @@ -89,9 +89,9 @@ std::map ValMap; unsigned NextID = 1; - if (Function *Main = M.getMainFunction()) { - if (!Main->isExternal()) - processSCC(getOrCreateGraph(*Main), Stack, NextID, ValMap); + Function *MainFunc = M.getMainFunction(); + if (MainFunc && !MainFunc->isExternal()) { + processSCC(getOrCreateGraph(*MainFunc), Stack, NextID, ValMap); } else { std::cerr << "Fold Graphs: No 'main' function found!\n"; } @@ -103,6 +103,27 @@ DEBUG(CheckAllGraphs(&M, *this)); getGlobalsGraph().removeTriviallyDeadNodes(); + + // Merge the globals variables (not the calls) from the globals graph back + // into the main function's graph so that the main function contains all of + // the information about global pools and GV usage in the program. + if (MainFunc) { + DSGraph &MainGraph = getOrCreateGraph(*MainFunc); + const DSGraph &GG = *MainGraph.getGlobalsGraph(); + ReachabilityCloner RC(MainGraph, GG, + DSGraph::DontCloneCallNodes | + DSGraph::DontCloneAuxCallNodes); + + // Clone the global nodes into this graph. + for (DSScalarMap::global_iterator I = GG.getScalarMap().global_begin(), + E = GG.getScalarMap().global_end(); I != E; ++I) + if (isa(*I)) + RC.getClonedNH(GG.getNodeForValue(*I)); + + MainGraph.markIncompleteNodes(DSGraph::MarkFormalArgs | + DSGraph::IgnoreGlobals); + } + return false; } From lattner at cs.uiuc.edu Sun Mar 13 14:22:26 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 13 Mar 2005 14:22:26 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200503132022.j2DKMQjQ018252@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.197 -> 1.198 --- Log message: The incoming arguments to main (the argv list) are not complete! --- Diffs of the changes: (+3 -4) DataStructure.cpp | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.197 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.198 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.197 Sun Mar 13 13:05:05 2005 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sun Mar 13 14:22:10 2005 @@ -1482,10 +1482,9 @@ for (ReturnNodesTy::iterator FI = ReturnNodes.begin(), E =ReturnNodes.end(); FI != E; ++FI) { Function &F = *FI->first; - if (F.getName() != "main") - for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) - if (isPointerType(I->getType())) - markIncompleteNode(getNodeForValue(I).getNode()); + for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) + if (isPointerType(I->getType())) + markIncompleteNode(getNodeForValue(I).getNode()); markIncompleteNode(FI->second.getNode()); } From lattner at cs.uiuc.edu Sun Mar 13 14:32:42 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 13 Mar 2005 14:32:42 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp CompleteBottomUp.cpp EquivClassGraphs.cpp Message-ID: <200503132032.j2DKWgJN018854@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.94 -> 1.95 CompleteBottomUp.cpp updated: 1.18 -> 1.19 EquivClassGraphs.cpp updated: 1.23 -> 1.24 --- Log message: Make sure to remove incomplete markers before we add to them! :) --- Diffs of the changes: (+3 -0) BottomUpClosure.cpp | 1 + CompleteBottomUp.cpp | 1 + EquivClassGraphs.cpp | 1 + 3 files changed, 3 insertions(+) Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.94 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.95 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.94 Sun Mar 13 14:15:06 2005 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Sun Mar 13 14:32:26 2005 @@ -98,6 +98,7 @@ if (isa(*I)) RC.getClonedNH(GG.getNodeForValue(*I)); + MainGraph.maskIncompleteMarkers(); MainGraph.markIncompleteNodes(DSGraph::MarkFormalArgs | DSGraph::IgnoreGlobals); } Index: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp diff -u llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.18 llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.19 --- llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.18 Sun Mar 13 14:15:06 2005 +++ llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp Sun Mar 13 14:32:26 2005 @@ -107,6 +107,7 @@ if (isa(*I)) RC.getClonedNH(GG.getNodeForValue(*I)); + MainGraph.maskIncompleteMarkers(); MainGraph.markIncompleteNodes(DSGraph::MarkFormalArgs | DSGraph::IgnoreGlobals); } Index: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp diff -u llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.23 llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.24 --- llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.23 Sun Mar 13 14:15:06 2005 +++ llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Sun Mar 13 14:32:26 2005 @@ -120,6 +120,7 @@ if (isa(*I)) RC.getClonedNH(GG.getNodeForValue(*I)); + MainGraph.maskIncompleteMarkers(); MainGraph.markIncompleteNodes(DSGraph::MarkFormalArgs | DSGraph::IgnoreGlobals); } From lattner at cs.uiuc.edu Sun Mar 13 14:36:15 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 13 Mar 2005 14:36:15 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200503132036.j2DKaFxD019130@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.198 -> 1.199 --- Log message: regardless of whether or not the client things we should mark globals incomplete, ALWAYS mark them incomplete if they are external! --- Diffs of the changes: (+7 -7) DataStructure.cpp | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.198 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.199 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.198 Sun Mar 13 14:22:10 2005 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sun Mar 13 14:36:01 2005 @@ -1498,13 +1498,13 @@ E = AuxFunctionCalls.end(); I != E; ++I) markIncomplete(*I); - // Mark all global nodes as incomplete... - if ((Flags & DSGraph::IgnoreGlobals) == 0) - for (DSScalarMap::global_iterator I = ScalarMap.global_begin(), - E = ScalarMap.global_end(); I != E; ++I) - if (GlobalVariable *GV = dyn_cast(*I)) - if (!GV->isConstant() || !GV->hasInitializer()) - markIncompleteNode(ScalarMap[GV].getNode()); + // Mark all global nodes as incomplete. + for (DSScalarMap::global_iterator I = ScalarMap.global_begin(), + E = ScalarMap.global_end(); I != E; ++I) + if (GlobalVariable *GV = dyn_cast(*I)) + if (!GV->hasInitializer() || // Always mark external globals incomp. + (!GV->isConstant() && (Flags & DSGraph::IgnoreGlobals) == 0)) + markIncompleteNode(ScalarMap[GV].getNode()); } static inline void killIfUselessEdge(DSNodeHandle &Edge) {