[llvm-commits] CVS: llvm/tools/bugpoint/BugDriver.cpp

2006-08-18 Thread Reid Spencer


Changes in directory llvm/tools/bugpoint:

BugDriver.cpp updated: 1.47 -> 1.48
---
Log message:

For PR797: http://llvm.org/PR797 :
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR 
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.


---
Diffs of the changes:  (+4 -9)

 BugDriver.cpp |   13 -
 1 files changed, 4 insertions(+), 9 deletions(-)


Index: llvm/tools/bugpoint/BugDriver.cpp
diff -u llvm/tools/bugpoint/BugDriver.cpp:1.47 
llvm/tools/bugpoint/BugDriver.cpp:1.48
--- llvm/tools/bugpoint/BugDriver.cpp:1.47  Tue Aug 15 11:40:49 2006
+++ llvm/tools/bugpoint/BugDriver.cpp   Fri Aug 18 03:43:06 2006
@@ -73,15 +73,10 @@
 /// return it, or return null if not possible.
 ///
 Module *llvm::ParseInputFile(const std::string &InputFilename) {
-  Module *Result = 0;
-  try {
-Result = ParseBytecodeFile(InputFilename);
-if (!Result && !(Result = ParseAssemblyFile(InputFilename))){
-  std::cerr << "bugpoint: could not read input file '"
-<< InputFilename << "'!\n";
-}
-  } catch (const ParseException &E) {
-std::cerr << "bugpoint: " << E.getMessage() << '\n';
+  ParseError Err;
+  Module *Result = ParseBytecodeFile(InputFilename);
+  if (!Result && !(Result = ParseAssemblyFile(InputFilename,&Err))) {
+std::cerr << "bugpoint: " << Err.getMessage() << "\n"; 
 Result = 0;
   }
   return Result;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/opt/opt.cpp

2006-08-18 Thread Reid Spencer


Changes in directory llvm/tools/opt:

opt.cpp updated: 1.111 -> 1.112
---
Log message:

For PR797: http://llvm.org/PR797 :
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR 
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.


---
Diffs of the changes:  (+5 -9)

 opt.cpp |   14 +-
 1 files changed, 5 insertions(+), 9 deletions(-)


Index: llvm/tools/opt/opt.cpp
diff -u llvm/tools/opt/opt.cpp:1.111 llvm/tools/opt/opt.cpp:1.112
--- llvm/tools/opt/opt.cpp:1.111Fri Aug 18 01:34:30 2006
+++ llvm/tools/opt/opt.cpp  Fri Aug 18 03:43:06 2006
@@ -169,17 +169,13 @@
 
 if (AnalyzeOnly) {
   Module *CurMod = 0;
-  try {
 #if 0
-TimeRegion RegionTimer(BytecodeLoadTimer);
+  TimeRegion RegionTimer(BytecodeLoadTimer);
 #endif
-CurMod = ParseBytecodeFile(InputFilename);
-if (!CurMod && !(CurMod = ParseAssemblyFile(InputFilename))){
-  std::cerr << argv[0] << ": input file didn't read correctly.\n";
-  return 1;
-}
-  } catch (const ParseException &E) {
-std::cerr << argv[0] << ": " << E.getMessage() << "\n";
+  CurMod = ParseBytecodeFile(InputFilename);
+  ParseError Err;
+  if (!CurMod && !(CurMod = ParseAssemblyFile(InputFilename,&Err))){
+std::cerr << argv[0] << ": " << Err.getMessage() << "\n"; 
 return 1;
   }
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-as/llvm-as.cpp

2006-08-18 Thread Reid Spencer


Changes in directory llvm/tools/llvm-as:

llvm-as.cpp updated: 1.46 -> 1.47
---
Log message:

For PR797: http://llvm.org/PR797 :
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR 
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.


---
Diffs of the changes:  (+3 -5)

 llvm-as.cpp |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)


Index: llvm/tools/llvm-as/llvm-as.cpp
diff -u llvm/tools/llvm-as/llvm-as.cpp:1.46 llvm/tools/llvm-as/llvm-as.cpp:1.47
--- llvm/tools/llvm-as/llvm-as.cpp:1.46 Thu Jul  6 13:01:01 2006
+++ llvm/tools/llvm-as/llvm-as.cpp  Fri Aug 18 03:43:06 2006
@@ -57,9 +57,10 @@
   std::ostream *Out = 0;
   try {
 // Parse the file now...
-std::auto_ptr M(ParseAssemblyFile(InputFilename));
+ParseError Err;
+std::auto_ptr M(ParseAssemblyFile(InputFilename,&Err));
 if (M.get() == 0) {
-  std::cerr << argv[0] << ": assembly didn't read correctly.\n";
+  std::cerr << argv[0] << ": " << Err.getMessage() << "\n"; 
   return 1;
 }
 
@@ -129,9 +130,6 @@
 if (Force || !CheckBytecodeOutputToConsole(Out,true)) {
   WriteBytecodeToFile(M.get(), *Out, !NoCompress);
 }
-  } catch (const ParseException &E) {
-std::cerr << argv[0] << ": " << E.getMessage() << "\n";
-exitCode = 1;
   } catch (const std::string& msg) {
 std::cerr << argv[0] << ": " << msg << "\n";
 exitCode = 1;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/Assembly/Parser.h

2006-08-18 Thread Reid Spencer


Changes in directory llvm/include/llvm/Assembly:

Parser.h updated: 1.12 -> 1.13
---
Log message:

For PR797: http://llvm.org/PR797 :
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR 
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.


---
Diffs of the changes:  (+35 -17)

 Parser.h |   52 +++-
 1 files changed, 35 insertions(+), 17 deletions(-)


Index: llvm/include/llvm/Assembly/Parser.h
diff -u llvm/include/llvm/Assembly/Parser.h:1.12 
llvm/include/llvm/Assembly/Parser.h:1.13
--- llvm/include/llvm/Assembly/Parser.h:1.12Thu May 19 22:25:29 2005
+++ llvm/include/llvm/Assembly/Parser.h Fri Aug 18 03:43:06 2006
@@ -19,30 +19,45 @@
 namespace llvm {
 
 class Module;
-class ParseException;
+class ParseError;
 
 
-// The useful interface defined by this file... Parse an ascii file, and return
-// the internal representation in a nice slice'n'dice'able representation.  
Note
-// that this does not verify that the generated LLVM is valid, so you should 
run
-// the verifier after parsing the file to check that it's ok.
-//
-Module *ParseAssemblyFile(const std::string &Filename);// throw 
(ParseException)
-Module *ParseAssemblyString(const char * AsmString, Module * M);// throw 
(ParseException)
+/// This function is the main interface to the LLVM Assembly Parse. It parses 
+/// an ascii file that (presumably) contains LLVM Assembly code. It returns a
+/// Module (intermediate representation) with the corresponding features. Note
+/// that this does not verify that the generated Module is valid, so you should
+/// run the verifier after parsing the file to check that it is okay.
+/// @brief Parse LLVM Assembly from a file
+Module *ParseAssemblyFile(
+  const std::string &Filename, ///< The name of the file to parse
+  ParseError* Error = 0///< If not null, an object to return errors in.
+);
+
+/// The function is a secondary interface to the LLVM Assembly Parse. It 
parses 
+/// an ascii string that (presumably) contains LLVM Assembly code. It returns a
+/// Module (intermediate representation) with the corresponding features. Note
+/// that this does not verify that the generated Module is valid, so you should
+/// run the verifier after parsing the file to check that it is okay.
+/// @brief Parse LLVM Assembly from a string
+Module *ParseAssemblyString(
+  const char * AsmString, ///< The string containing assembly
+  Module * M, ///< A module to add the assembly too.
+  ParseError* Error = 0   ///< If not null, an object to return errors in.
+);
 
 
//======
 //  Helper Classes
 
//======
 
-// ParseException - For when an exceptional event is generated by the parser.
-// This class lets you print out the exception message
-//
-class ParseException {
+/// An instance of this class can be passed to ParseAssemblyFile or 
+/// ParseAssemblyString functions in order to capture error information from
+/// the parser.  It provides a standard way to print out the error message
+/// including the file name and line number where the error occurred.
+/// @brief An LLVM Assembly Parsing Error Object
+class ParseError {
 public:
-  ParseException(const std::string &filename, const std::string &message,
- int LineNo = -1, int ColNo = -1);
-
-  ParseException(const ParseException &E);
+  ParseError() : Filename("unknown"), Message("none"), LineNo(0), ColumnNo(0) 
{}
+  ParseError(const ParseError &E);
 
   // getMessage - Return the message passed in at construction time plus extra
   // information extracted from the options used to parse with...
@@ -57,6 +72,9 @@
 return Filename;
   }
 
+  void setError(const std::string &filename, const std::string &message,
+ int LineNo = -1, int ColNo = -1);
+
   // getErrorLocation - Return the line and column number of the error in the
   // input source file.  The source filename can be derived from the
   // ParserOptions in effect.  If positional information is not applicable,
@@ -71,7 +89,7 @@
   std::string Message;
   int LineNo, ColumnNo;   // -1 if not relevant
 
-  ParseException &operator=(const ParseException &E); // objects by reference
+  ParseError &operator=(const ParseError &E); // objects by reference
 };
 
 } // End llvm namespace



___
llvm-commits mailin

[llvm-commits] CVS: llvm/tools/gccas/gccas.cpp

2006-08-18 Thread Reid Spencer


Changes in directory llvm/tools/gccas:

gccas.cpp updated: 1.117 -> 1.118
---
Log message:

For PR797: http://llvm.org/PR797 :
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR 
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.


---
Diffs of the changes:  (+3 -10)

 gccas.cpp |   13 +++--
 1 files changed, 3 insertions(+), 10 deletions(-)


Index: llvm/tools/gccas/gccas.cpp
diff -u llvm/tools/gccas/gccas.cpp:1.117 llvm/tools/gccas/gccas.cpp:1.118
--- llvm/tools/gccas/gccas.cpp:1.117Mon Jul  3 11:46:03 2006
+++ llvm/tools/gccas/gccas.cpp  Fri Aug 18 03:43:06 2006
@@ -137,17 +137,10 @@
 " llvm .s -> .o assembler for GCC\n");
 sys::PrintStackTraceOnErrorSignal();
 
-std::auto_ptr M;
-try {
-  // Parse the file now...
-  M.reset(ParseAssemblyFile(InputFilename));
-} catch (const ParseException &E) {
-  std::cerr << argv[0] << ": " << E.getMessage() << "\n";
-  return 1;
-}
-
+ParseError Err;
+std::auto_ptr M(ParseAssemblyFile(InputFilename,&Err));
 if (M.get() == 0) {
-  std::cerr << argv[0] << ": assembly didn't read correctly.\n";
+  std::cerr << argv[0] << ": " << Err.getMessage() << "\n"; 
   return 1;
 }
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/projects/Stacker/tools/stkrc/st

2006-08-18 Thread Reid Spencer


Changes in directory llvm/projects/Stacker/tools/stkrc:

st updated: 1.2 -> 1.3
---
Log message:

Drop the -s2048 option, it is specified incorrectly and the correct
specification can't be handled by llvmc (= confuses it)


---
Diffs of the changes:  (+2 -2)

 st |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/projects/Stacker/tools/stkrc/st
diff -u llvm/projects/Stacker/tools/stkrc/st:1.2 
llvm/projects/Stacker/tools/stkrc/st:1.3
--- llvm/projects/Stacker/tools/stkrc/st:1.2Wed May 18 20:05:02 2005
+++ llvm/projects/Stacker/tools/stkrc/stFri Aug 18 04:00:22 2006
@@ -25,7 +25,7 @@
 
   # To compile stacker source, we just run the stacker
   # compiler with a default stack size of 2048 entries.
-  translator.command=%bindir%/stkrc -s2048 %in% -f -o %out% %opt% \
+  translator.command=%bindir%/stkrc %in% -f -o %out% %opt% \
 %time% %stats% %args%
 
   # stkrc doesn't preprocess but we set this to true so
@@ -43,7 +43,7 @@
 ##
   
   # For optimization, we use the LLVM "opt" program
-  optimizer.command=%bindir%/stkrc -s2048 %in% -f -o %out% %opt% \
+  optimizer.command=%bindir%/stkrc %in% -f -o %out% %opt% \
 %time% %stats% %args%
 
   optimizer.required = yes



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp

2006-08-18 Thread Reid Spencer


Changes in directory llvm/lib/Transforms/Scalar:

IndVarSimplify.cpp updated: 1.88 -> 1.89
---
Log message:

Fix a grammaro in a comment.


---
Diffs of the changes:  (+1 -1)

 IndVarSimplify.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.88 
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.89
--- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.88  Fri Jul 14 13:49:15 2006
+++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp   Fri Aug 18 04:01:07 2006
@@ -11,7 +11,7 @@
 // computations derived from them) into simpler forms suitable for subsequent
 // analysis and transformation.
 //
-// This transformation make the following changes to each loop with an
+// This transformation makes the following changes to each loop with an
 // identifiable induction variable:
 //   1. All loops are transformed to have a SINGLE canonical induction variable
 //  which starts at zero and steps by one.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/Makefile.rules

2006-08-18 Thread Reid Spencer


Changes in directory llvm:

Makefile.rules updated: 1.393 -> 1.394
---
Log message:

For PR797: http://llvm.org/PR797 :
1. Actually turn on -fno-exceptions in libraries that do not have the
   REQUIRES_EH option in their Makefile. The following library file size 
   savings were made (DEBUG):
  libLLVMDataStructure.a  525K
  libLLVMCore.a   380K
  libLLVMCodeGen.a350K
  libLLVMTransformUtils.a 305K
  libLLVMScalarOpts.a 270K
  libLLVMAnalysis.a   247K
  libLLVMSelectionDAG.a   233K
  libLLVMipo.a175K
  LLVMX86.o   123K
  LLVMPPC.o81K
  libLLVMipa.a 17K
 TOTAL  2,706K
  Note that the savings is actually a little larger than this because
  I didn't count any of the libraries that had small changes.

2. Remove REQUIRES_EH from the AsmParser library as it is now exception
   free. This resulted in a nearly 78K drop in the size of the debug
   library for AsmParser.


---
Diffs of the changes:  (+5 -0)

 Makefile.rules |5 +
 1 files changed, 5 insertions(+)


Index: llvm/Makefile.rules
diff -u llvm/Makefile.rules:1.393 llvm/Makefile.rules:1.394
--- llvm/Makefile.rules:1.393   Mon Aug  7 18:12:15 2006
+++ llvm/Makefile.rules Fri Aug 18 04:30:03 2006
@@ -249,6 +249,11 @@
   C.Flags   += -D_DEBUG
 endif
 
+# IF REQUIRES_EH=1 is specified then don't disable exceptions
+ifndef REQUIRES_EH
+  CXX.Flags += -fno-exceptions
+endif
+
 CXX.Flags += $(CXXFLAGS)
 C.Flags   += $(CFLAGS)
 CPP.BaseFlags += $(CPPFLAGS)



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/AsmParser/Makefile

2006-08-18 Thread Reid Spencer


Changes in directory llvm/lib/AsmParser:

Makefile updated: 1.12 -> 1.13
---
Log message:

For PR797: http://llvm.org/PR797 :
1. Actually turn on -fno-exceptions in libraries that do not have the
   REQUIRES_EH option in their Makefile. The following library file size 
   savings were made (DEBUG):
  libLLVMDataStructure.a  525K
  libLLVMCore.a   380K
  libLLVMCodeGen.a350K
  libLLVMTransformUtils.a 305K
  libLLVMScalarOpts.a 270K
  libLLVMAnalysis.a   247K
  libLLVMSelectionDAG.a   233K
  libLLVMipo.a175K
  LLVMX86.o   123K
  LLVMPPC.o81K
  libLLVMipa.a 17K
 TOTAL  2,706K
  Note that the savings is actually a little larger than this because
  I didn't count any of the libraries that had small changes.

2. Remove REQUIRES_EH from the AsmParser library as it is now exception
   free. This resulted in a nearly 78K drop in the size of the debug
   library for AsmParser.


---
Diffs of the changes:  (+0 -1)

 Makefile |1 -
 1 files changed, 1 deletion(-)


Index: llvm/lib/AsmParser/Makefile
diff -u llvm/lib/AsmParser/Makefile:1.12 llvm/lib/AsmParser/Makefile:1.13
--- llvm/lib/AsmParser/Makefile:1.12Fri Jul  7 11:44:31 2006
+++ llvm/lib/AsmParser/Makefile Fri Aug 18 04:30:03 2006
@@ -10,7 +10,6 @@
 LEVEL = ../..
 LIBRARYNAME := LLVMAsmParser
 BUILD_ARCHIVE = 1
-REQUIRES_EH := 1
 EXTRA_DIST := Lexer.cpp.cvs Lexer.l.cvs \
   llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/projects/Stacker/tools/stkrc/stkrc.cpp

2006-08-18 Thread Reid Spencer


Changes in directory llvm/projects/Stacker/tools/stkrc:

stkrc.cpp updated: 1.10 -> 1.11
---
Log message:

For PR797: http://llvm.org/PR797 :
Update to reflect ParseException becoming ParseError (from Parser.h)


---
Diffs of the changes:  (+1 -1)

 stkrc.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/projects/Stacker/tools/stkrc/stkrc.cpp
diff -u llvm/projects/Stacker/tools/stkrc/stkrc.cpp:1.10 
llvm/projects/Stacker/tools/stkrc/stkrc.cpp:1.11
--- llvm/projects/Stacker/tools/stkrc/stkrc.cpp:1.10Sat Apr 23 16:26:10 2005
+++ llvm/projects/Stacker/tools/stkrc/stkrc.cpp Fri Aug 18 04:07:54 2006
@@ -164,7 +164,7 @@
   }
 
   WriteBytecodeToFile(M.get(), *Out);
-} catch (const ParseException &E) {
+} catch (const ParseError &E) {
   std::cerr << argv[0] << ": " << E.getMessage() << "\n";
   return 1;
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp StackerCompiler.h

2006-08-18 Thread Reid Spencer


Changes in directory llvm/projects/Stacker/lib/compiler:

StackerCompiler.cpp updated: 1.17 -> 1.18
StackerCompiler.h updated: 1.7 -> 1.8
---
Log message:

For PR797: http://llvm.org/PR797 :
Update to reflect ParseException becoming ParseError (from Parser.h)


---
Diffs of the changes:  (+6 -3)

 StackerCompiler.cpp |5 +++--
 StackerCompiler.h   |4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)


Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp
diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.17 
llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18
--- llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.17 Fri Jun 16 
13:23:49 2006
+++ llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp  Fri Aug 18 
04:07:54 2006
@@ -110,8 +110,9 @@
 
 if (F == 0)
 {
-throw ParseException(filename,
-"Could not open file '" + filename + "'");
+  ParseError Err;
+  Err.setError(filename, "Could not open file '" + filename + "'");
+  throw Err;
 }
 }
 


Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.h
diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.h:1.7 
llvm/projects/Stacker/lib/compiler/StackerCompiler.h:1.8
--- llvm/projects/Stacker/lib/compiler/StackerCompiler.h:1.7Sat Apr 23 
16:26:10 2005
+++ llvm/projects/Stacker/lib/compiler/StackerCompiler.hFri Aug 18 
04:07:54 2006
@@ -158,7 +158,9 @@
 {
   if (line == -1) line = Stackerlineno;
   // TODO: column number in exception
-  throw ParseException(TheInstance->CurFilename, message, line);
+  ParseError Err;
+  Err.setError(TheInstance->CurFilename, message, line);
+  throw Err;
 }
 private:
 /// @brief Generate code to increment the stack index



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/Makefile.rules

2006-08-18 Thread Chris Lattner

On Aug 18, 2006, at 2:30 AM, Reid Spencer wrote:


For PR797: http://llvm.org/PR797 :
1. Actually turn on -fno-exceptions in libraries that do not have the
   REQUIRES_EH option in their Makefile. The following library file  
size

   savings were made (DEBUG):


Very cool, but... is this safe?  If libsystem throws an exception,  
then everything between it and the tool that finally catches the  
exception have to be compiled with EH support on...


-Chris
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/Makefile.rules

2006-08-18 Thread Reid Spencer
Hmm .. didn't think of that, but it passed all the tests. All the tools
still have top level exception handlers so its not like we'd generate an
unexpected_exception error. Some memory cleanup could be missed, but the
process is going to exit anyway. Temporary files that need to be cleaned
up are generally done in the tool's code, so that should be okay. What
else could go wrong?

Reid.

On Fri, 2006-08-18 at 09:35 -0700, Chris Lattner wrote:
> On Aug 18, 2006, at 2:30 AM, Reid Spencer wrote:
> 
> > For PR797: http://llvm.org/PR797 :
> > 1. Actually turn on -fno-exceptions in libraries that do not have the
> >REQUIRES_EH option in their Makefile. The following library file  
> > size
> >savings were made (DEBUG):
> 
> Very cool, but... is this safe?  If libsystem throws an exception,  
> then everything between it and the tool that finally catches the  
> exception have to be compiled with EH support on...
> 
> -Chris


signature.asc
Description: This is a digitally signed message part
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/Makefile.rules

2006-08-18 Thread Chris Lattner

On Aug 18, 2006, at 9:55 AM, Reid Spencer wrote:
Hmm .. didn't think of that, but it passed all the tests. All the  
tools
still have top level exception handlers so its not like we'd  
generate an
unexpected_exception error. Some memory cleanup could be missed,  
but the
process is going to exit anyway. Temporary files that need to be  
cleaned

up are generally done in the tool's code, so that should be okay. What
else could go wrong?


Consider:

"main" has a catch block, which prints an error message and exits.   
main calls foo.


"foo" is compiled without exception info, foo calls some llvm::sys  
function 'X' that can throw.


"X" throws an exception on some error.

We'd expect the exception to end up in main, an error printed, then  
the process exited.  However, because "foo" has no unwind info, the  
unwinder will abort the process when it gets to the X frame.


I think the simplest thing to do is to eliminate throws from leaf  
code like libsystem etc.  Tools like bugpoint can continue to use EH  
for as long as we think is reasonable, but the libraries that are  
called into by other code should be EH free.


-Chris



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/Makefile.rules

2006-08-18 Thread Reid Spencer
On Fri, 2006-08-18 at 10:04 -0700, Chris Lattner wrote:
> On Aug 18, 2006, at 9:55 AM, Reid Spencer wrote:
> > Hmm .. didn't think of that, but it passed all the tests. All the  
> > tools
> > still have top level exception handlers so its not like we'd  
> > generate an
> > unexpected_exception error. Some memory cleanup could be missed,  
> > but the
> > process is going to exit anyway. Temporary files that need to be  
> > cleaned
> > up are generally done in the tool's code, so that should be okay. What
> > else could go wrong?
> 
> Consider:
> 
> "main" has a catch block, which prints an error message and exits.   
> main calls foo.
> 
> "foo" is compiled without exception info, foo calls some llvm::sys  
> function 'X' that can throw.
> 
> "X" throws an exception on some error.
> 
> We'd expect the exception to end up in main, an error printed, then  
> the process exited.  However, because "foo" has no unwind info, the  
> unwinder will abort the process when it gets to the X frame.

I was under the impression that those stack frames would just get
bypassed. However, I wrote a little test program to simulate the
situation and got:

terminate called after throwing an instance of 'std::string'
Aborted

So, I'll back out the change until we get LLVM completely EH free in
low-level libraries.

> 
> I think the simplest thing to do is to eliminate throws from leaf  
> code like libsystem etc.  Tools like bugpoint can continue to use EH  
> for as long as we think is reasonable, but the libraries that are  
> called into by other code should be EH free.

Yes, that's the entire point of PR797. I was just trying to be
incremental about it.

Reid.


signature.asc
Description: This is a digitally signed message part
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/Makefile.rules

2006-08-18 Thread Reid Spencer


Changes in directory llvm:

Makefile.rules updated: 1.394 -> 1.395
---
Log message:

To avoid errors where a non-exception .o is on the stack between a throw
and a handler, which would produce errors like:
  terminate called after throwing an instance of 'std::string'
we must comment out setting -fno-exceptions until PR797: http://llvm.org/PR797  
is completely
fixed. Once libraries like lib/System and lib/Support are exception free,
we can turn it back on.


---
Diffs of the changes:  (+5 -5)

 Makefile.rules |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/Makefile.rules
diff -u llvm/Makefile.rules:1.394 llvm/Makefile.rules:1.395
--- llvm/Makefile.rules:1.394   Fri Aug 18 04:30:03 2006
+++ llvm/Makefile.rules Fri Aug 18 12:22:07 2006
@@ -206,6 +206,11 @@
   OPTIMIZE_OPTION := -O2
 endif
 
+# IF REQUIRES_EH=1 is specified then don't disable exceptions
+#ifndef REQUIRES_EH
+#  CXX.Flags += -fno-exceptions
+#endif
+
 ifdef ENABLE_PROFILING
   BuildMode := Profile
   CXX.Flags := $(OPTIMIZE_OPTION) -pg -g
@@ -249,11 +254,6 @@
   C.Flags   += -D_DEBUG
 endif
 
-# IF REQUIRES_EH=1 is specified then don't disable exceptions
-ifndef REQUIRES_EH
-  CXX.Flags += -fno-exceptions
-endif
-
 CXX.Flags += $(CXXFLAGS)
 C.Flags   += $(CFLAGS)
 CPP.BaseFlags += $(CPPFLAGS)



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/Makefile.rules

2006-08-18 Thread Chris Lattner

We'd expect the exception to end up in main, an error printed, then
the process exited.  However, because "foo" has no unwind info, the
unwinder will abort the process when it gets to the X frame.


I was under the impression that those stack frames would just get
bypassed. However, I wrote a little test program to simulate the
situation and got:

terminate called after throwing an instance of 'std::string'
Aborted


Yep, the problem is that unwind info is needed to restore callee  
saved registers, etc.  This is why the -fexceptions switch is needed  
with C code if you want to unwind across C frames.



So, I'll back out the change until we get LLVM completely EH free in
low-level libraries.


Ok, thanks.


I think the simplest thing to do is to eliminate throws from leaf
code like libsystem etc.  Tools like bugpoint can continue to use EH
for as long as we think is reasonable, but the libraries that are
called into by other code should be EH free.


Yes, that's the entire point of PR797. I was just trying to be
incremental about it.


Ok, thanks!

-Chris
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y

2006-08-18 Thread Chris Lattner


Changes in directory llvm/lib/AsmParser:

llvmAsmParser.y updated: 1.257 -> 1.258
---
Log message:

trivial optimization


---
Diffs of the changes:  (+4 -1)

 llvmAsmParser.y |5 -
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.257 
llvm/lib/AsmParser/llvmAsmParser.y:1.258
--- llvm/lib/AsmParser/llvmAsmParser.y:1.257Fri Aug 18 12:32:55 2006
+++ llvm/lib/AsmParser/llvmAsmParser.y  Fri Aug 18 12:34:24 2006
@@ -714,7 +714,10 @@
 /// thus we can complete the cycle.
 ///
 static PATypeHolder HandleUpRefs(const Type *ty) {
-  if (!ty->isAbstract()) return ty;
+  // If Ty isn't abstract, or if there are no up-references in it, then there 
is
+  // nothing to resolve here.
+  if (!ty->isAbstract() || UpRefs.empty()) return ty;
+  
   PATypeHolder Ty(ty);
   UR_OUT("Type '" << Ty->getDescription() <<
  "' newly formed.  Resolving upreferences.\n" <<



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/utils/NewNightlyTest.pl

2006-08-18 Thread Patrick Jenkins


Changes in directory llvm/utils:

NewNightlyTest.pl updated: 1.54 -> 1.55
---
Log message:

These changes reflect the changes in the database for how tests are stored
and bring the handing of dejagnu tests into compliance with this new scheme.


---
Diffs of the changes:  (+26 -51)

 NewNightlyTest.pl |   77 ++
 1 files changed, 26 insertions(+), 51 deletions(-)


Index: llvm/utils/NewNightlyTest.pl
diff -u llvm/utils/NewNightlyTest.pl:1.54 llvm/utils/NewNightlyTest.pl:1.55
--- llvm/utils/NewNightlyTest.pl:1.54   Thu Aug 17 17:11:03 2006
+++ llvm/utils/NewNightlyTest.plFri Aug 18 13:00:21 2006
@@ -365,64 +365,39 @@
 }
 
 #~
+#
+# This function is meant to read in the dejagnu sum file and 
+# return a string with only the results (i.e. PASS/FAIL/XPASS/
+# XFAIL).
+#
 #~
 sub GetDejagnuTestResults { # (filename, log)
-  my ($filename, $DejagnuLog) = @_;
-  my @lines;
-  my $firstline;
-  $/ = "\n"; #Make sure we're going line at a time.
-
-  if( $VERBOSE) { print "DEJAGNU TEST RESULTS:\n"; }
-
-  if (open SRCHFILE, $filename) {
-# Process test results
-my $first_list = 1;
-my $should_break = 1;
-my $nocopy = 0;
-my $readingsum = 0;
-while (  ) {
-if ( length($_) > 1 ) {
-chomp($_);
-if ( m/^XPASS:/ || m/^FAIL:/ ) {
-$nocopy = 0;
-if ( $first_list ) {
-push(@lines, "UNEXPECTED TEST RESULTS\n");
-$first_list = 0;
-$should_break = 1;
-push(@lines, "$_\n");
-if( $VERBOSE) { print "  $_\n"; }
-} else {
-push(@lines, "$_\n");
-if( $VERBOSE) { print "  $_\n"; }
+my ($filename, $DejagnuLog) = @_;
+my @lines;
+$/ = "\n"; #Make sure we're going line at a time.
+
+if( $VERBOSE) { print "DEJAGNU TEST RESULTS:\n"; }
+
+if (open SRCHFILE, $filename) {
+# Process test results
+while (  ) {
+if ( length($_) > 1 ) {
+chomp($_);
+if ( m/^PASS:/ || m/^XPASS:/ ||
+ m/^FAIL:/ || m/^XFAIL:/) {
+push(@lines, "$_");
 }
-} #elsif ( m/Summary/ ) {
-#if ( $first_list ) {
-#   push(@lines, "PERFECT!");
-#   print "  PERFECT!\n";
-#} else {
-#   push(@lines, "\n");
-#}
-#push(@lines, "STATISTICS\n");
-#print "\nDEJAGNU STATISTICS:\n";
-#$should_break = 0;
-#$nocopy = 0;
-#$readingsum = 1;
-#} 
-elsif ( $readingsum ) {
-push(@lines,"$_\n");
-if( $VERBOSE) { print "  $_\n"; }
 }
-
 }
 }
-  }
-  close SRCHFILE;
+close SRCHFILE;
 
-  my $content = join("", @lines);
-  return $content;
+my $content = join("\n", @lines);
+return $content;
 }
 
 
+
 #~
 #
 # This function acts as a mini web browswer submitting data
@@ -716,7 +691,7 @@
 # Running dejagnu tests
 #
 ##
-my $DejangnuTestResults; # String containing the results of the dejagnu
+my $DejangnuTestResults=""; # String containing the results of the dejagnu
 my $dejagnu_output = "$DejagnuTestsLog";
 if (!$NODEJAGNU) {
   if($VERBOSE) { 
@@ -1032,8 +1007,8 @@
   'all_tests' => $dejagnu_test_list,
   'new_tests' => "",
   'removed_tests' => "",
-  'dejagnutests_log' => $dejagnutests_log,
-  'dejagnutests_sum' => $dejagnutests_sum,
+  'dejagnutests_results' => $DejagnuTestResults,
+  'dejagnutests_log' => $dejagnulog_full,
   'starttime' => $starttime,
   'endtime' => $endtime,
   'o_file_sizes' => $o_file_sizes,



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi

2006-08-18 Thread Patrick Jenkins


Changes in directory nightlytest-serverside:

NightlyTestAccept.cgi updated: 1.48 -> 1.49
---
Log message:

These changes correctly place dejagnu test results into the database.


---
Diffs of the changes:  (+12 -15)

 NightlyTestAccept.cgi |   27 ---
 1 files changed, 12 insertions(+), 15 deletions(-)


Index: nightlytest-serverside/NightlyTestAccept.cgi
diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.48 
nightlytest-serverside/NightlyTestAccept.cgi:1.49
--- nightlytest-serverside/NightlyTestAccept.cgi:1.48   Thu Aug 17 17:14:05 2006
+++ nightlytest-serverside/NightlyTestAccept.cgiFri Aug 18 13:02:45 2006
@@ -448,15 +448,14 @@
$build_log="" unless $build_log;
 my @BUILD_LOG = split $spliton, $build_log;
 
+my $dejagnutests_results=param('dejagnutests_results');
+   $dejagnutests_results="" unless $dejagnutests_results;
+my @DEJAGNUTESTS_RESULTS = split $spliton, $dejagnutests_results;
+
 my $dejagnutests_log=param('dejagnutests_log');
$dejagnutests_log="" unless $dejagnutests_log;
 my @DEJAGNUTESTS_LOG = split $spliton, $dejagnutests_log;
 
-
-my $dejagnutests_sum=param('dejagnutests_sum');
-   $dejagnutests_sum="" unless $dejagnutests_sum;
-my @DEJAGNUTESTS_SUM = split $spliton, $dejagnutests_sum;
-
 my $singlesource_tests = param('singlesource_programstable');
 $singlesource_tests="" unless $singlesource_tests;
 my @SINGLESOURCE_TESTS =split $spliton, $singlesource_tests;
@@ -655,7 +654,7 @@
 #
 

 @ALL_TESTS= split "\n", $all_tests;
-foreach $x (@ALL_TESTS){
+foreach my $x (@ALL_TESTS){
   if($x =~ m/(TEST-)?(PASS|XFAIL|FAIL):\s(.+?)\s(.+)/){
 $query="INSERT INTO tests ( program, result, measure, night) 
VALUES(\"$4\", \'$2\', \"$3\", $night_id)";
 my $d = $dbh->prepare($query);
@@ -666,6 +665,13 @@
   }
 }
 
+foreach my $x (@DEJAGNUTESTS_RESULTS){
+  if($x =~ m/^(PASS|XFAIL|FAIL):\s(.+?)/){
+   $query="INSERT INTO tests ( program, result, measure, night) 
VALUES(\"$2\", \'$1\', \"dejagnu\", $night_id)";
+my $d = $dbh->prepare($query);
+$d->execute;
+  }
+}
 
 

 #
@@ -883,15 +889,6 @@
 my $build_file = "$db_date-Build-Log.txt";
 my $o_file= "$db_date-O-files.txt";
 my $a_file= "$db_date-A-files.txt";
-#my $dejagnu_testrun_log_file = "Dejagnu-testrun.log";
-#my $dejagnu_testrun_sum_file = "Dejagnu-testrun.sum";
-#my $dejagnu_tests_file = "DejagnuTests-Log.txt";
-#my $warnings_fie = "Warnings.txt";
-
-
 WriteFile "$build_file", $build_log;
 WriteFile "$o_file", $o_file_size;
 WriteFile "$a_file", $a_file_size;
-#WriteFile "$this_days_logs/$dejagnu_testrun_log_file",$dejagnutests_log;
-#WriteFile "$this_days_logs/$dejagnu_testrun_sum_file",$dejagnutests_sum;
-#WriteFile "$this_days_logs/$warnings_file",$buildwarnings;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: nightlytest-serverside/fulltest.php NightlyTester.php

2006-08-18 Thread Patrick Jenkins


Changes in directory nightlytest-serverside:

fulltest.php updated: 1.13 -> 1.14
NightlyTester.php updated: 1.16 -> 1.17
---
Log message:

Made several changes that should cut down on php error messages that
appear in the httpd/error_log.



---
Diffs of the changes:  (+7 -3)

 NightlyTester.php |8 ++--
 fulltest.php  |2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)


Index: nightlytest-serverside/fulltest.php
diff -u nightlytest-serverside/fulltest.php:1.13 
nightlytest-serverside/fulltest.php:1.14
--- nightlytest-serverside/fulltest.php:1.13Thu Aug 17 22:50:18 2006
+++ nightlytest-serverside/fulltest.php Fri Aug 18 13:52:08 2006
@@ -566,7 +566,7 @@
 
 $today_results = GetDayResults($today_row['id'], $category_array, $mysql_link);
 if(isset($yesterday_row['id'])){
-  $yesterday_results = GetDayResults($yesterday_row['id'], 
$category_print_array, $mysql_link);
+  $yesterday_results = GetDayResults($yesterday_row['id'], $category_array, 
$mysql_link);
   $percent_difference = CalculateChangeBetweenDays($yesterday_results, 
$today_results,.2);  
 }
 /** external table **/


Index: nightlytest-serverside/NightlyTester.php
diff -u nightlytest-serverside/NightlyTester.php:1.16 
nightlytest-serverside/NightlyTester.php:1.17
--- nightlytest-serverside/NightlyTester.php:1.16   Thu Aug 17 22:50:18 2006
+++ nightlytest-serverside/NightlyTester.phpFri Aug 18 13:52:08 2006
@@ -262,11 +262,15 @@
   $cur_sum=0;
   $prev_sum=0;
   $old_sum=0;
+  $prev_diff=0;
+  $prev_delta=0;
+  $old_diff=0;
+  $old_delta=0;
 
   foreach (array_keys($cur_data) as $file){
 $cur_sum+=$cur_data["$file"];
 
-if(isset($prev_night["$file"]) && isset($cur_night["$file"])) {
+if(isset($prev_data["$file"]) && isset($cur_data["$file"])) {
   $prev_delta= ( $cur_data["$file"] - $prev_data["$file"] );
   $prev_diff = (($cur_data["$file"] - $prev_data["$file"]) / 
$prev_data["$file"] ) * 100;
   $prev_sum+=$prev_data["$file"];
@@ -274,7 +278,7 @@
   $prev_diff="-";
 }
 
-if(isset($old_night["$file"]) && isset($cur_data["$file"])){
+if(isset($old_data["$file"]) && isset($cur_data["$file"])){
   $old_delta= ( $cur_data["$file"] - $old_data["$file"] );
   $old_diff = (($cur_data["$file"] - $old_data["$file"]) / 
$old_data["$file"] ) * 100;
   $old_sum+=$old_data["$file"];



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php

2006-08-18 Thread Patrick Jenkins


Changes in directory nightlytest-serverside:

ProgramResults.php updated: 1.6 -> 1.7
---
Log message:

Fixed a special case error in ProgramResults.php where if you tried to 
display the first test a machine submitted the results page would give you 
an error.



---
Diffs of the changes:  (+31 -15)

 ProgramResults.php |   46 +++---
 1 files changed, 31 insertions(+), 15 deletions(-)


Index: nightlytest-serverside/ProgramResults.php
diff -u nightlytest-serverside/ProgramResults.php:1.6 
nightlytest-serverside/ProgramResults.php:1.7
--- nightlytest-serverside/ProgramResults.php:1.6   Thu Aug 17 22:50:18 2006
+++ nightlytest-serverside/ProgramResults.php   Fri Aug 18 14:18:42 2006
@@ -402,7 +402,7 @@
 mysql_free_result($program_query);
   }
   else{
-$query = "SELECT * FROM tests WHERE night=$night_id AND result=\"FAIL\"";
+$query = "SELECT * FROM tests WHERE night=$night_id AND result=\"FAIL\" 
AND measure=\"dejagnu\"";
 $program_query = mysql_query($query) or die (mysql_error());
 while($row = mysql_fetch_array($program_query)){
   $result.="{$row['measure']} - {$row['program']}\n";
@@ -419,25 +419,29 @@
  * in their own table as oppoesd in the night table.
  */
 function getNewTests($cur_id, $prev_id, $mysql_link){
+  if(strcmp($prev_id, "")===0 || strcmp($cur_id, "")===0){
+return "";
+  }
+
   $result="";
   if($cur_id<684){
 $query = "SELECT new_tests FROM night WHERE id = $cur_id";
 $program_query = mysql_query($query) or die (mysql_error());
 $row = mysql_fetch_array($program_query);
-$result= $row['unexpfail_tests'];
+$result= $row['new_tests'];
 $result=preg_replace("/\n/","\n",$result);
 mysql_free_result($program_query);
   }
   else{
 $test_hash=array();
-$query = "SELECT * FROM tests WHERE night=$prev_id";
+$query = "SELECT * FROM tests WHERE night=$prev_id and 
measure!=\"dejagnu\"";
 $program_query = mysql_query($query) or die (mysql_error());
 while($row = mysql_fetch_array($program_query)){
   $test_hash["{$row['measure']} - {$row['program']}"]=1;
 }
 mysql_free_result($program_query);
 
-$query = "SELECT * FROM tests WHERE night=$cur_id";
+$query = "SELECT * FROM tests WHERE night=$cur_id and 
measure!=\"dejagnu\"";
 $program_query = mysql_query($query) or die (mysql_error());
 while($row = mysql_fetch_array($program_query)){
   if( !isset($test_hash["{$row['measure']} - {$row['program']}"])){
@@ -456,25 +460,29 @@
  * in their own table as oppoesd in the night table.
  */
 function getRemovedTests($cur_id, $prev_id, $mysql_link){
+  if(strcmp($prev_id, "")===0 || strcmp($cur_id, "")===0){
+return "";
+  }
+
   $result="";
   if($cur_id<684){
 $query = "SELECT removed_tests FROM night WHERE id = $cur_id";
 $program_query = mysql_query($query) or die (mysql_error());
 $row = mysql_fetch_array($program_query);
-$result= $row['unexpfail_tests'];
+$result= $row['removed_tests'];
 $result=preg_replace("/\n/","\n",$result);
 mysql_free_result($program_query);
   }
   else{
 $test_hash=array();
-$query = "SELECT * FROM tests WHERE night=$cur_id";
+$query = "SELECT * FROM tests WHERE night=$cur_id and 
measure!=\"dejagnu\"";
 $program_query = mysql_query($query) or die (mysql_error());
 while($row = mysql_fetch_array($program_query)){
   $test_hash["{$row['measure']} - {$row['program']}"]=1;
 }
 mysql_free_result($program_query);
 
-$query = "SELECT * FROM tests WHERE night=$prev_id";
+$query = "SELECT * FROM tests WHERE night=$prev_id  and 
measure!=\"dejagnu\"";
 $program_query = mysql_query($query) or die (mysql_error());
 while($row = mysql_fetch_array($program_query)){
   if( !isset($test_hash["{$row['measure']} - {$row['program']}"])){
@@ -493,18 +501,22 @@
  * in their own table as oppoesd in the night table.
  */
 function getFixedTests($cur_id, $prev_id, $mysql_link){
+  if(strcmp($prev_id, "")===0 || strcmp($cur_id, "")===0){
+return "";
+  }
+  
   $result="";
   if($cur_id<684){
-$query = "SELECT removed_tests FROM night WHERE id = $cur_id";
+$query = "SELECT newly_passing_tests FROM night WHERE id = $cur_id";
 $program_query = mysql_query($query) or die (mysql_error());
 $row = mysql_fetch_array($program_query);
-$result= $row['unexpfail_tests'];
+$result= $row['newly_passing_tests'];
 $result=preg_replace("/\n/","\n",$result);
 mysql_free_result($program_query);
   }
   else{
 $test_hash=array();
-$query = "SELECT * FROM tests WHERE night=$cur_id";
+$query = "SELECT * FROM tests WHERE night=$cur_id and 
measure!=\"dejagnu\"";
 $program_query = mysql_query($query) or die (mysql_error());
 while($row = mysql_fetch_array($program_query)){
   if(strcmp("{$row['result']}", "PASS")===0){
@@ -513,7 +525,7 @@
 }
 mysql_free_result($program_query);
 
-$query = "SELECT * FROM tests WHERE

[llvm-commits] CVS: llvm/include/llvm/IntrinsicsPowerPC.td

2006-08-18 Thread Chris Lattner


Changes in directory llvm/include/llvm:

IntrinsicsPowerPC.td updated: 1.25 -> 1.26
---
Log message:

vpkuwus didn't work, due to this typo


---
Diffs of the changes:  (+1 -1)

 IntrinsicsPowerPC.td |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/IntrinsicsPowerPC.td
diff -u llvm/include/llvm/IntrinsicsPowerPC.td:1.25 
llvm/include/llvm/IntrinsicsPowerPC.td:1.26
--- llvm/include/llvm/IntrinsicsPowerPC.td:1.25 Tue Jun  6 16:28:46 2006
+++ llvm/include/llvm/IntrinsicsPowerPC.td  Fri Aug 18 14:25:35 2006
@@ -371,7 +371,7 @@
   [IntrNoMem]>;
   // vpkuwum is lowered to a shuffle.
   def int_ppc_altivec_vpkuwus : GCCBuiltin<"__builtin_altivec_vpkuwus">,
-Intrinsic<[llvm_v16i8_ty, llvm_v4i32_ty, llvm_v4i32_ty],
+Intrinsic<[llvm_v8i16_ty, llvm_v4i32_ty, llvm_v4i32_ty],
   [IntrNoMem]>;
 
   // Unpacks.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi

2006-08-18 Thread Patrick Jenkins


Changes in directory nightlytest-serverside:

NightlyTestAccept.cgi updated: 1.49 -> 1.50
---
Log message:

Tacked on 8 lines at the end to print out and keep a record of what
test machines are sending us. this will be useful in diagnosing what is 
happing on their ends.




---
Diffs of the changes:  (+9 -0)

 NightlyTestAccept.cgi |9 +
 1 files changed, 9 insertions(+)


Index: nightlytest-serverside/NightlyTestAccept.cgi
diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.49 
nightlytest-serverside/NightlyTestAccept.cgi:1.50
--- nightlytest-serverside/NightlyTestAccept.cgi:1.49   Fri Aug 18 13:02:45 2006
+++ nightlytest-serverside/NightlyTestAccept.cgiFri Aug 18 16:28:37 2006
@@ -892,3 +892,12 @@
 WriteFile "$build_file", $build_log;
 WriteFile "$o_file", $o_file_size;
 WriteFile "$a_file", $a_file_size;
+
+$sentdata="";
[EMAIL PROTECTED] = param();
+foreach my $x (@param_names){
+   my $value=param($x);
+   $sentdata.="$x  =>  $value}\n";
+}
+my $sent_file = "$db_date-senddata.txt";
+WriteFile "$sentdata", $sent_file;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi

2006-08-18 Thread Patrick Jenkins


Changes in directory nightlytest-serverside:

NightlyTestAccept.cgi updated: 1.50 -> 1.51
---
Log message:

Changed the regular expression that parses the dejagnu test results.



---
Diffs of the changes:  (+1 -1)

 NightlyTestAccept.cgi |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: nightlytest-serverside/NightlyTestAccept.cgi
diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.50 
nightlytest-serverside/NightlyTestAccept.cgi:1.51
--- nightlytest-serverside/NightlyTestAccept.cgi:1.50   Fri Aug 18 16:28:37 2006
+++ nightlytest-serverside/NightlyTestAccept.cgiFri Aug 18 16:33:10 2006
@@ -666,7 +666,7 @@
 }
 
 foreach my $x (@DEJAGNUTESTS_RESULTS){
-  if($x =~ m/^(PASS|XFAIL|FAIL):\s(.+?)/){
+  if($x =~ m/^(PASS|XFAIL|FAIL):\s(.+)/){
$query="INSERT INTO tests ( program, result, measure, night) 
VALUES(\"$2\", \'$1\', \"dejagnu\", $night_id)";
 my $d = $dbh->prepare($query);
 $d->execute;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi

2006-08-18 Thread Patrick Jenkins


Changes in directory nightlytest-serverside:

NightlyTestAccept.cgi updated: 1.51 -> 1.52
---
Log message:

Fixed the call to function WriteFile for writing out what test machines
submit.


---
Diffs of the changes:  (+1 -1)

 NightlyTestAccept.cgi |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: nightlytest-serverside/NightlyTestAccept.cgi
diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.51 
nightlytest-serverside/NightlyTestAccept.cgi:1.52
--- nightlytest-serverside/NightlyTestAccept.cgi:1.51   Fri Aug 18 16:33:10 2006
+++ nightlytest-serverside/NightlyTestAccept.cgiFri Aug 18 16:40:04 2006
@@ -900,4 +900,4 @@
$sentdata.="$x  =>  $value}\n";
 }
 my $sent_file = "$db_date-senddata.txt";
-WriteFile "$sentdata", $sent_file;
+WriteFile $sent_file, $sentdata;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits