summaryrefslogtreecommitdiff
path: root/tools/bugpoint/BugDriver.h
Commit message (Collapse)AuthorAge
...
* Implement basic block extraction for the miscompilation debugger. This ↵Chris Lattner2004-05-11
| | | | | | | | | | | | | | | | | still needs two things: the FIXME in ExtractBlocks needs to be implemented, and the basic block extractor itself needs to have enough bugs fixed for this to be more or less useful. Until the time that this is generally useful, it is hidden behind the new bugpoint -enable-block-extraction option. I hope to get the FIXME done tonight. Also of note, this patch adds a -extract-bbs option to bugpoint which can be used to debug the block extractor. (hint hint Misha :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13471 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge the code generator miscompilation code into the optimizer miscompilationChris Lattner2004-04-05
| | | | | | | | code. This "instantly" gives us loop-extractor power to assist with the debugment of our nasty codegen issues. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12678 91177308-0d34-0410-b5e6-96231b3b80d8
* Make a method publicChris Lattner2004-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12677 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new "AutoDebugCrashes" optionChris Lattner2004-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12396 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new methodChris Lattner2004-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12394 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor and clean up a bunch more code. No major functionality changes.Chris Lattner2004-03-14
| | | | | | | | | | | | | | | * 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12393 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a method to extract a loopChris Lattner2004-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12391 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor all of the "splitting a module into two pieces" code to avoidChris Lattner2004-03-14
| | | | | | | | code duplication. Also, don't use ReduceMiscompilingFunctions::TestFuncs to print out the final message. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12387 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 more stuff public. Make the instruction argument toChris Lattner2004-02-18
| | | | | | | deleteInstructionFromProgram be const git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11606 91177308-0d34-0410-b5e6-96231b3b80d8
* make a bunch of methods publicChris Lattner2004-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11605 91177308-0d34-0410-b5e6-96231b3b80d8
* A couple of minor cleanups: don't forward declare private classes, put privateChris Lattner2004-02-18
| | | | | | | classes in an anon namespace git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11604 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup and simplify manipulation of the program, eliminate the need for soChris Lattner2004-02-18
| | | | | | | many 'friends' of bugdriver. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11603 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a stub for debugging code generator crashesChris Lattner2004-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11602 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
* 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
* I hate it when bugpoint is all ready to give me a bytecode file, then crashesChris Lattner2003-11-05
| | | | | | | | | | | | in final cleanups. Then you had to run the whole mess again with -disable-final-cleanups. This makes bugpoint run the cleanups in a protected environment so that if they crash, bugpoint itself doesn't crash. This makes things much happier, implements a FIXME, and gets rid of YABPO (yet another bugpoint option). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9743 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the performFinalCleanups interfaceChris Lattner2003-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9740 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
* Be more helpful if a pass fails while chasing down a miscompilationChris Lattner2003-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9214 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
* If we're debugging the SimplifyCFG pass, we _REALLY_ don't want to use it forChris Lattner2003-08-05
| | | | | | | narrowing, no matter what. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7596 91177308-0d34-0410-b5e6-96231b3b80d8
* Parameterize the performFinalCleanups a bitChris Lattner2003-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7477 91177308-0d34-0410-b5e6-96231b3b80d8
* Added comment to function isExecutingJIT()Misha Brukman2003-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7370 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
* Speed up convergence significantly and also reduce the size of testcases by ↵Chris Lattner2003-04-24
| | | | | | making large portions of a function's CFG dead at a time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5915 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead functionsChris Lattner2003-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5913 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the list reducer to improve convergence speed and to support crashes thatChris Lattner2003-04-24
| | | | | | | only occur when multiple passes interact or when multiple functions exist in a module git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5911 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
* * Reduce the number of useless bytecode files produced by bugpoint.Chris Lattner2003-02-28
| | | | | | | | - This also speeds it up as the bytecode writer isn't terribly fast. * Add a new cleanup pass after everything else to run -funcresolve -globaldce git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5668 91177308-0d34-0410-b5e6-96231b3b80d8
* Make bugpoint *much* more powerful, giving it the capability to delete ↵Chris Lattner2003-01-23
| | | | | | | | | instructions out of a large function to reduce it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5408 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the start of the miscompilation detection stuffChris Lattner2002-12-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5119 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of bugpointChris Lattner2002-11-20
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4789 91177308-0d34-0410-b5e6-96231b3b80d8