summaryrefslogtreecommitdiff
path: root/tools/bugpoint/CodeGeneratorBug.cpp
Commit message (Collapse)AuthorAge
* 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
* Give correct command line for making a shared objectChris Lattner2003-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7929 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that "newmain" gets names for its argumentsChris Lattner2003-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7927 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix messageChris Lattner2003-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7926 91177308-0d34-0410-b5e6-96231b3b80d8
* File-related functions moved to FileUtilities.h .Misha Brukman2003-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7696 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
* Fixed path for SystemUtils.h and a few code cleanups.Misha Brukman2003-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7688 91177308-0d34-0410-b5e6-96231b3b80d8
* Print accurate run instructions for when testing LLCChris Lattner2003-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7554 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix problem I introduced in bugpoint with the cleanup functionsChris Lattner2003-08-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7549 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
* Don't emit modules with lots of cruft hanging off of them.Chris Lattner2003-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7478 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore intrinsic functions -- don't mangle their names or rewrite calls to them.Misha Brukman2003-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7438 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGeneratorBug.cpp:Misha Brukman2003-07-30
| | | | | | | | | | | | | | | | | * Temporarily externing InputArgv to print it out for the benefit of LLI command needed to reproduce the result. * Print out the list of functions currently being tested * ListReducer now returns a bool if there was a failure, so test for it ListReducer.h: * Handle the case where there is no problem by returning true if failure is found. Also correctly handles the case when there is only 1 pass/function. Miscompilation.cpp: * ListReducer now returns a bool if there was a failure, so test for it git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7434 91177308-0d34-0410-b5e6-96231b3b80d8
* * Disambiguate symbols before we start splitting module by functionsMisha Brukman2003-07-29
| | | | | | | | * Moved DisambiguateGlobalSymbols() out of the ReduceMisCodegenFunctions class * Added an assert to have a cleaner exit if `main' is not found in the module git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7380 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented cleanups as suggested by Chris:Misha Brukman2003-07-28
| | | | | | | | | | | | | | | | | | | | * Use Module::getNamedFunction() to delete "main" instead of using a loop * Compare function pointers instead of function names to determine equivalence * Simplified creation of a 2-element vector containing zeroes * Manually performed LICM on code * Added an abort() in case a function we're considering occurs in something that is not an instruction * Use DEBUG() around code sections instead of just in a statement in a loop, because GCC's DCE may not be good enough to completely remove it in a release build * Print out a command that can be directly copied-and-pasted to re-execute * Instead of just checking if a symbol begins with a dot and fixing it accordingly, use Mangler and fix all the problems (invalid chars in C symbol names) entirely * The new `main' function has external linkage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7371 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