Commit Graph

41 Commits

Author SHA1 Message Date
Reid Spencer 08b4bd7496 Allow compilers that can't distinguish between a class instantiation and
the declaration of a function to compile this.

llvm-svn: 19073
2004-12-20 19:16:12 +00:00
Reid Spencer 584cb0a8c1 For PR351:
* removeFile() -> sys::Path::destroyFile()
* remove extraneous toString() calls
* convert local variables representing path names from std::string to
  sys::Path
* Use sys::Path objects with FileRemove instead of std::string
* Use sys::Path methods for construction of path names

llvm-svn: 19001
2004-12-16 23:04:20 +00:00
Reid Spencer 0ebb926c0a LinkModules is now in the Linker class
llvm-svn: 18863
2004-12-13 03:01:03 +00:00
Reid Spencer 16c3bb3198 Linker.h has a new home.
llvm-svn: 17801
2004-11-14 23:00:08 +00:00
Reid Spencer 7c16caa336 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner 4e0969b500 Finally give bugpoint -timeout support!
llvm-svn: 15163
2004-07-24 07:53:26 +00:00
Misha Brukman 6aa3c83f8d * Convert "\n" -> '\n'
* Print out another '\n' after printing out program execution status
* Make sure code wraps at 80 cols

llvm-svn: 15123
2004-07-23 01:30:49 +00:00
Reid Spencer f0ebb25d2b Add #include <iostream> since Value.h does not include it any more.
llvm-svn: 14623
2004-07-04 12:20:55 +00:00
Misha Brukman 28ee8f0f30 Linker.h moved to include/llvm/Support
llvm-svn: 14351
2004-06-23 17:33:09 +00:00
Misha Brukman 827c985aae Wrap at 80 cols.
llvm-svn: 12701
2004-04-06 17:04:30 +00:00
Chris Lattner fd72bed301 Refactor and clean up a bunch more code. No major functionality changes.
* Make several methods of bugdriver global functions (ParseInputFile, PrintFunctionList)
 * Make PrintFunctionList truncate the output after 10 entries, like the crash debugger
   did.  This allows code sharing.
 * Add a couple of methods to BugDriver that allows us to eliminate some friends
 * Improve comments in ExtractFunction.cpp
 * Make classes that used to be friends up bugdriver now live in anon namespaces
 * Rip a bunch of functionality in the miscompilation tester into a new
   TestMergedProgram function for future code sharing.
 * Fix a bug in the miscompilation tester induced in my last checkin

llvm-svn: 12393
2004-03-14 20:50:42 +00:00
Chris Lattner 567543f09e Refactor all of the "splitting a module into two pieces" code to avoid
code duplication.  Also, don't use ReduceMiscompilingFunctions::TestFuncs
to print out the final message.

llvm-svn: 12387
2004-03-14 19:27:19 +00:00
Chris Lattner f98cc27056 Format a bit more nicely
llvm-svn: 11651
2004-02-20 05:56:48 +00:00
Chris Lattner 5e9868a77b Be a bit more robust. Explicitly check for a code generator crash.
llvm-svn: 11624
2004-02-19 17:03:49 +00:00
Alkis Evlogimenos 3562c2dd9f Make ToolExecutionError inherit std::exception and implement its
interface: getMessage() is gone, use what() instead.

llvm-svn: 11621
2004-02-19 07:39:26 +00:00
Chris Lattner 327019b495 Cleanup and simplify manipulation of the program, eliminate the need for so
many 'friends' of bugdriver.

llvm-svn: 11603
2004-02-18 21:24:48 +00:00
Chris Lattner ead1dff00b Add a stub for debugging code generator crashes
llvm-svn: 11602
2004-02-18 21:02:04 +00:00
Chris Lattner 61dc9419e0 ctor arguments changed order
llvm-svn: 11595
2004-02-18 20:22:25 +00:00
Chris Lattner d69c7bdc74 This class got moved to FileUtilities.h
llvm-svn: 11583
2004-02-18 17:17:10 +00:00
Chris Lattner 2f1aa118a4 finegrainify namespacification
llvm-svn: 10839
2004-01-14 03:38:37 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner ebec8030d6 fix file headers
llvm-svn: 9293
2003-10-20 17:57:13 +00:00
John Criswell 09344dcf97 Added copyright header to all C++ source files.
llvm-svn: 9291
2003-10-20 17:47:21 +00:00
Brian Gaeke adbbfebfae Flush output after writing out the list of function names.
llvm-svn: 9138
2003-10-15 20:42:48 +00:00
Chris Lattner 2ed0642a95 Eliminate the bugpoint -mode option, by making bugpoint automatically infer the root of all of your problems
llvm-svn: 9115
2003-10-14 20:52:55 +00:00
Chris Lattner 6ca0b8738a Unbreak code generator debug mode
llvm-svn: 9106
2003-10-13 21:04:26 +00:00
Chris Lattner 8552e7c6df Use new method
llvm-svn: 8573
2003-09-17 05:00:07 +00:00
Chris Lattner d1123fde11 Kill warning
llvm-svn: 8056
2003-08-22 18:57:43 +00:00
Misha Brukman 188bf100aa Squash the warning that `Result' may not be initialized on all code paths.
llvm-svn: 8042
2003-08-22 03:35:24 +00:00
Misha Brukman 1b7a238f3f File-related functions moved to FileUtilities.h .
llvm-svn: 7696
2003-08-07 21:42:28 +00:00
Misha Brukman 0c2305b110 Re-grouped and alphabetized headers for easier reading and cleaner style.
llvm-svn: 7689
2003-08-07 21:19:30 +00:00
Misha Brukman e722e4ea49 Moved SystemUtils.h to include/Support and SystemUtils.cpp to lib/Support.
llvm-svn: 7687
2003-08-07 21:04:42 +00:00
Misha Brukman 0fd3172754 Made a bunch of cleanups, as per Chris' recommendations:
* Removed unused global and member variables
* Fixed comments (CodeGeneratorBug.cpp)
* Check for possibly failing GCC::create() and CBE::create()
* Remove generated files after diffing the output (e.g., shared object)
* Instead of using std::for_each, use explicit loops as std::for_each may
  duplicate the functor, and ours carries state
* Changed member var from cl::opt<std::string> to just std::string
* Fixed doxygen comments
* Fixed string comparisons to use [ str.empty() ] instead of [ str == "" ]
* Cache instances of CBE and GCC in BugDriver across compilations and executions
  while testing tools.

llvm-svn: 7302
2003-07-24 21:59:10 +00:00
Misha Brukman d792c9bb46 Major addition to bugpoint: ability to debug code generators (LLC and LLI).
The C backend is assumed correct and is used to generate shared objects to be
loaded by the other two code generators.

LLC debugging should be functional now, LLI needs a few more additions to work,
the major one is renaming of external functions to call the JIT lazy function
resolver.

Bugpoint now has a command-line switch -mode with options 'compile' and
'codegen' to debug appropriate portions of tools.

ExecutionDriver.cpp: Added implementations of AbstractInterpreter for LLC and
GCC, broke out common code within other tools, and added ability to generate C
code with CBE individually, without executing the program, and the GCC tool can
generate executables shared objects or executables.

If no reference output is specified to Bugpoint, it will be generated with CBE,
because it is already assumed to be correct for the purposes of debugging using
this method. As a result, many functions now accept as an optional parameter a
shared object to be loaded in, if specified.

llvm-svn: 7293
2003-07-24 18:17:43 +00:00
Brian Gaeke 61a05da4d5 Clarify BugDriver.cpp:BugDriver::ParseInputFile()'s return values in its
explanatory comment.

llvm-svn: 6308
2003-05-23 05:34:32 +00:00
Misha Brukman f3d3bcb485 The Grammar Police is out on patrol.
llvm-svn: 5985
2003-05-03 02:16:43 +00:00
Chris Lattner c3380918a5 Make sure that deleted functions have external linkage
llvm-svn: 5912
2003-04-24 22:53:01 +00:00
Chris Lattner 39388ca08e Move function from Miscompilation.cpp
llvm-svn: 5908
2003-04-24 22:23:34 +00:00
Chris Lattner 16a413103c Implement support for bugpoint to identify which FUNCTION an optimization
is miscompiling.

llvm-svn: 5893
2003-04-24 17:02:17 +00:00
Chris Lattner d4e0474dcf Implement the start of the miscompilation detection stuff
llvm-svn: 5119
2002-12-23 23:49:59 +00:00
Chris Lattner 73a6bdd958 Initial checkin of bugpoint
llvm-svn: 4789
2002-11-20 22:28:10 +00:00