[llvm-commits] CVS: llvm/tools/bugpoint/CrashDebugger.cpp ExtractFunction.cpp Makefile SystemUtils.cpp

John Criswell criswell at choi.cs.uiuc.edu
Thu Jun 26 16:42:48 PDT 2003


Changes in directory llvm/tools/bugpoint:

CrashDebugger.cpp updated: 1.10 -> 1.10.2.1
ExtractFunction.cpp updated: 1.9 -> 1.9.2.1
Makefile updated: 1.3.2.1 -> 1.3.2.2
SystemUtils.cpp updated: 1.3.2.1 -> 1.3.2.2

---
Log message:

Merged with mainline on Thursday, June 26, 2003.


---
Diffs of the changes:

Index: llvm/tools/bugpoint/CrashDebugger.cpp
diff -u llvm/tools/bugpoint/CrashDebugger.cpp:1.10 llvm/tools/bugpoint/CrashDebugger.cpp:1.10.2.1
--- llvm/tools/bugpoint/CrashDebugger.cpp:1.10	Sun Jun  1 23:54:29 2003
+++ llvm/tools/bugpoint/CrashDebugger.cpp	Thu Jun 26 16:35:58 2003
@@ -360,20 +360,18 @@
   } while (Simplification);
 
   // Try to clean up the testcase by running funcresolve and globaldce...
-  if (AnyReduction) {
-    std::cout << "\n*** Attempting to perform final cleanups: ";
-    Module *M = performFinalCleanups();
-    std::swap(Program, M);
+  std::cout << "\n*** Attempting to perform final cleanups: ";
+  Module *M = performFinalCleanups();
+  std::swap(Program, M);
             
-    // Find out if the pass still crashes on the cleaned up program...
-    if (runPasses(PassesToRun)) {
-      // Yup, it does, keep the reduced version...
-      delete M;
-      AnyReduction = true;
-    } else {
-      delete Program;   // Otherwise, restore the original module...
-      Program = M;
-    }
+  // Find out if the pass still crashes on the cleaned up program...
+  if (runPasses(PassesToRun)) {
+    // Yup, it does, keep the reduced version...
+    delete M;
+    AnyReduction = true;
+  } else {
+    delete Program;   // Otherwise, restore the original module...
+    Program = M;
   }
 
   if (AnyReduction)


Index: llvm/tools/bugpoint/ExtractFunction.cpp
diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.9 llvm/tools/bugpoint/ExtractFunction.cpp:1.9.2.1
--- llvm/tools/bugpoint/ExtractFunction.cpp:1.9	Wed May 21 15:38:59 2003
+++ llvm/tools/bugpoint/ExtractFunction.cpp	Thu Jun 26 16:35:58 2003
@@ -97,6 +97,7 @@
   CleanupPasses.add(createFunctionResolvingPass());
   CleanupPasses.add(createGlobalDCEPass());
   CleanupPasses.add(createDeadTypeEliminationPass());
+  CleanupPasses.add(createDeadArgEliminationPass(true));
   CleanupPasses.add(createVerifierPass());
   CleanupPasses.run(*M);
   return M;


Index: llvm/tools/bugpoint/Makefile
diff -u llvm/tools/bugpoint/Makefile:1.3.2.1 llvm/tools/bugpoint/Makefile:1.3.2.2
--- llvm/tools/bugpoint/Makefile:1.3.2.1	Mon Jun 23 14:04:49 2003
+++ llvm/tools/bugpoint/Makefile	Thu Jun 26 16:35:58 2003
@@ -8,4 +8,6 @@
 USEDLIBS = ipo scalaropts analysis $(OPTLIBS) $(ANALIBS) \
            transformutils asmparser bcreader bcwriter vmcore support
 
+TOOLLINKOPTS = $(PLATFORMLIBDL)
+
 include $(LEVEL)/Makefile.common


Index: llvm/tools/bugpoint/SystemUtils.cpp
diff -u llvm/tools/bugpoint/SystemUtils.cpp:1.3.2.1 llvm/tools/bugpoint/SystemUtils.cpp:1.3.2.2
--- llvm/tools/bugpoint/SystemUtils.cpp:1.3.2.1	Mon Jun 23 14:04:49 2003
+++ llvm/tools/bugpoint/SystemUtils.cpp	Thu Jun 26 16:35:58 2003
@@ -11,12 +11,12 @@
 #include <iostream>
 #include <cstdlib>
 #include "Config/alloca.h"
-#include <sys/types.h>
-#include <sys/stat.h>
+#include "Config/sys/types.h"
+#include "Config/sys/stat.h"
 #include "Config/fcntl.h"
-#include <sys/wait.h>
+#include "Config/sys/wait.h"
 #include "Config/unistd.h"
-#include <errno.h>
+#include "Config/errno.h"
 
 /// removeFile - Delete the specified file
 ///
@@ -33,7 +33,7 @@
     return FilenameBase;    // Couldn't open the file? Use it!
 
   // Create a pattern for mkstemp...
-  char *FNBuffer = (char*)alloca(FilenameBase.size()+8);
+  char *FNBuffer = new char[FilenameBase.size()+8];
   strcpy(FNBuffer, FilenameBase.c_str());
   strcpy(FNBuffer+FilenameBase.size(), "-XXXXXX");
 
@@ -48,7 +48,9 @@
   // We don't need to hold the temp file descriptor... we will trust that noone
   // will overwrite/delete the file while we are working on it...
   close(TempFD);
-  return FNBuffer;
+  std::string Result(FNBuffer);
+  delete[] FNBuffer;
+  return Result;
 }
 
 /// isExecutableFile - This function returns true if the filename specified





More information about the llvm-commits mailing list