summaryrefslogtreecommitdiff
path: root/tools/bugpoint/ExecutionDriver.cpp
Commit message (Collapse)AuthorAge
* Finally give bugpoint -timeout support!Chris Lattner2004-07-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15163 91177308-0d34-0410-b5e6-96231b3b80d8
* * Convert "\n" -> '\n'Misha Brukman2004-07-23
| | | | | | | | * Print out another '\n' after printing out program execution status * Make sure code wraps at 80 cols git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15123 91177308-0d34-0410-b5e6-96231b3b80d8
* These files don't need to include <iostream> since they include ↵Brian Gaeke2004-07-21
| | | | | | "Support/Debug.h". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15089 91177308-0d34-0410-b5e6-96231b3b80d8
* IA64 compatChris Lattner2004-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14867 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new commandline flag to allow us to call bugpoint like this:Chris Lattner2004-05-06
| | | | | | | | | bugpoint ... --tool-args -enable-correct-eh-support -regalloc=linearscan --args -- -foo So that tool-args option gets the -enable-correct-eh-support -regalloc=linearscan flags instead of bugpoint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13389 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a really old commentChris Lattner2004-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13385 91177308-0d34-0410-b5e6-96231b3b80d8
* Add --tool-args flag which lets you pass arguments to llc or lli.Brian Gaeke2004-05-04
| | | | | | | This is intended to address Bug 40. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13358 91177308-0d34-0410-b5e6-96231b3b80d8
* * Reorder #includesMisha Brukman2004-04-19
| | | | | | | * Wrap a long line git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13061 91177308-0d34-0410-b5e6-96231b3b80d8
* If the program returns a non-zero exit value, don't leave files layingChris Lattner2004-04-02
| | | | | | | around git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12603 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new method for use by the code generator crash debugger.Chris Lattner2004-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11613 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the executeProgram method exception safe, not leaving around bytecodeChris Lattner2004-02-18
| | | | | | | files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11607 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comments, if we are running with the CBE, make sure the InterpreterChris Lattner2004-02-18
| | | | | | | variable and the CBE variable are pointer equal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11599 91177308-0d34-0410-b5e6-96231b3b80d8
* Add check-exit-code option, defaulting to true.Brian Gaeke2004-02-11
| | | | | | | | | | | | | | | | Add ProgramExitedNonzero argument to executeProgram(), and make it tell its caller whether the program exited nonzero. Move executeProgramWithCBE() out of line, to ExecutionDriver.cpp, and remove its extra arguments which are always defaulted. Make it turn off check-exit-code if the program exits nonzero while generating a reference output. Make diffProgram() assume that any nonzero exit code is a failure, if check-exit-code is turned on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11325 91177308-0d34-0410-b5e6-96231b3b80d8
* finegrainify namespacificationChris Lattner2004-01-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10839 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the first FIXME in this file: automatically pick a "good"Brian Gaeke2003-10-21
| | | | | | | | interpreter by default, by picking the first one that works from a hard-coded list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9337 91177308-0d34-0410-b5e6-96231b3b80d8
* fix file headersChris Lattner2003-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9293 91177308-0d34-0410-b5e6-96231b3b80d8
* Added copyright header to all C++ source files.John Criswell2003-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9291 91177308-0d34-0410-b5e6-96231b3b80d8
* Ok, return an explicit path to the shared object, unbreaking code generatorChris Lattner2003-10-19
| | | | | | | debugging with the JIT git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9273 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't leave a trail of bugpoint-execution-output-* breadcrumbs all over the ↵Chris Lattner2003-10-18
| | | | | | place git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9242 91177308-0d34-0410-b5e6-96231b3b80d8
* Change run-lli -> run-intChris Lattner2003-10-18
| | | | | | | Many people associate lli with the jit, so we don't want to suprise them git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9238 91177308-0d34-0410-b5e6-96231b3b80d8
* Default to using the CBE instead of the Interpreter if no -run-* option is ↵Chris Lattner2003-10-18
| | | | | | specified git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9237 91177308-0d34-0410-b5e6-96231b3b80d8
* add support forloading additional .so files on the command lineChris Lattner2003-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9131 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the execute methods to take the shared object filename by const ↵Chris Lattner2003-10-14
| | | | | | | | | reference. Other adjustments to work with the new ToolRunner interfaces git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9130 91177308-0d34-0410-b5e6-96231b3b80d8
* The return value of compileSharedObject was never used. Return the sharedChris Lattner2003-10-14
| | | | | | | object's name instead git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9120 91177308-0d34-0410-b5e6-96231b3b80d8
* This header file moved. Thanks to Bill and Nightly tester for noticingChris Lattner2003-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8920 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the newly abstracted interface for running our tools and gcc.Misha Brukman2003-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8756 91177308-0d34-0410-b5e6-96231b3b80d8
* Renaming `dis' -> `llvm-dis'.Misha Brukman2003-08-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8197 91177308-0d34-0410-b5e6-96231b3b80d8
* no-strict-aliasing reduxChris Lattner2003-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7965 91177308-0d34-0410-b5e6-96231b3b80d8
* The CBE generates code which violates the TBAA rules of C, thus we must disableChris Lattner2003-08-18
| | | | | | | optimizations based on these rules. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7964 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-grouped and alphabetized headers for easier reading and cleaner style.Misha Brukman2003-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7689 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved SystemUtils.h to include/Support and SystemUtils.cpp to lib/Support.Misha Brukman2003-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7687 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to flush the output stream so that we get incremental updatesChris Lattner2003-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7555 91177308-0d34-0410-b5e6-96231b3b80d8
* DEBUG got moved to Debug.hChris Lattner2003-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7491 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new FileUtilities library to do diff'ing of filesChris Lattner2003-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7484 91177308-0d34-0410-b5e6-96231b3b80d8
* * Moved InputArgv out of anonymous scope to be extern'd in another file.Misha Brukman2003-07-30
| | | | | | | | * Added DEBUG() statements to print out parameters passed to executing programs * Actually ADD parameters to a program running via the JIT (using vector<char*>) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7433 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved definition of InputArgv into ExecutionDriver.cpp -- it is only used there.Misha Brukman2003-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7427 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a vector<char*> instead of char*[] so that we can add arbitrary number ofMisha Brukman2003-07-30
| | | | | | | | parameters, such as command-line arguments that the executing program gets via bugpoint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7423 91177308-0d34-0410-b5e6-96231b3b80d8
* BugDriver.h:Misha Brukman2003-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Added method to query if BugDriver is executing the JIT currently. This provides the ability in adding code that is conditionally executed in codegen debugging phase. CodeGeneratorBug.cpp: * Delete test functions from the Safe module * Code conditionally added when debugging the JIT: use the lazy resolver function added to Emitter.cpp to get function pointer by name. When compiled into an .so, this is the only way to get a pointer to an external function * Added a symbol disambiguator which will keep symbols uniquely named across modules * Delete generated files by default * The function `main' *must* stay in the .bc file for the JIT, but that prevents debugging it alone. This patch makes the old `main' become `old_main' and adds a new function named `main' which just calls the original with the same parameters, thereby keeping functionality the same. ExecutionDriver.cpp: * Returned to getting unique filenames * Simplified code choosing between using and not using shared library option git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7364 91177308-0d34-0410-b5e6-96231b3b80d8
* Made a bunch of cleanups, as per Chris' recommendations:Misha Brukman2003-07-24
| | | | | | | | | | | | | | | | | * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7302 91177308-0d34-0410-b5e6-96231b3b80d8
* Major addition to bugpoint: ability to debug code generators (LLC and LLI).Misha Brukman2003-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7293 91177308-0d34-0410-b5e6-96231b3b80d8
* Make a comment more accurateChris Lattner2003-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5991 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for debugging miscompilations with the use of the JIT or CBE!Chris Lattner2003-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5990 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for bugpoint to identify which FUNCTION an optimizationChris Lattner2003-04-24
| | | | | | | is miscompiling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5893 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow specifying an input file for the program being executedChris Lattner2003-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5888 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix compilation on GCC 3.2Chris Lattner2002-12-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5136 91177308-0d34-0410-b5e6-96231b3b80d8
* New files for miscompilation detectionChris Lattner2002-12-23
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5120 91177308-0d34-0410-b5e6-96231b3b80d8