summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/BugDriver.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Factor some of the constants+context related code out into a separate ↵Owen Anderson2009-08-041-1/+1
| | | | | | | | header, to make LLVMContextImpl.h not hideous. Also, fix some MSVC compile errors. llvm-svn: 78115
* Convert more tools code from cerr and cout to errs() and outs().Dan Gohman2009-07-161-1/+1
| | | | llvm-svn: 76070
* Make the use of const with respect to LLVMContext sane. Hopefully this is ↵Owen Anderson2009-07-011-4/+4
| | | | | | | | the last time, for the moment, that I will need to make far-reaching changes. llvm-svn: 74655
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-011-4/+5
| | | | llvm-svn: 74640
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-2/+6
| | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
* Use CloneModule's ValueMap in more places, instead of lookingDan Gohman2009-04-221-1/+4
| | | | | | up functions by name. llvm-svn: 69805
* Generalize bugpoint's concept of a "safe" backend, and add optionsDan Gohman2008-12-081-5/+5
| | | | | | | | | | | | | | to allow the "safe" backend to be run with a different path, and/or with different command-line options. This enables the following use cases: - bugpoint llc against an llc command from a different build - bugpoint llc against the same llc with different command-line options - and more... Also, document the existing "custom" interpreter options. llvm-svn: 60681
* remove attributions from tools.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45421
* Allow the block extractor take to take a list of basic blocks to not extractNick Lewycky2007-11-141-3/+6
| | | | | | | | | from a file containing Function/BasicBlock pairings. This is not safe against anonymous or abnormally-named Funcs or BBs. Make bugpoint use this interface to pass the BBs list to the child bugpoint. llvm-svn: 44101
* Pretty straightforward replacement of "bytecode" by "bitcode"Gabor Greif2007-07-041-11/+11
| | | | | | performed on tools/ first, in order not to cause lethal damage llvm-svn: 37877
* Add possibility to set memory limit for binaries run via libSystem. ThisAnton Korobeynikov2007-02-161-1/+2
| | | | | | is especially needed for bugpoint. This partly implements PR688 llvm-svn: 34349
* Fix for PR960. Improves bugpoint so that it removes global variableBill Wendling2006-10-251-0/+5
| | | | | | | initializers as well. This is only a first pass. It can be slow because it clones the module for each pass. An obvious improvement is not to do that. llvm-svn: 31182
* Add a new -cbe-bug mode, which works just like -run-llc, except that it usesChris Lattner2006-09-151-2/+1
| | | | | | LLC as the reference compiler to reduce testcases for bugs in GCC. llvm-svn: 30400
* fit in 80 colsChris Lattner2006-08-171-1/+2
| | | | llvm-svn: 29754
* This commit adds a new feature called find-bugs. The find-bugs option can be ↵Patrick Jenkins2006-08-151-2/+21
| | | | | | invoked on a .bc file from the command like with -find-bugs and a list of passes you wish to test. This procedure takes the set of optimization passes the user specifies, randomizes the passes, runs the passes on the specified .bc file, compiles the program, and finally runs the program checking its output vs the .bc file with no optimizations. This process repeats until either the user kills bugpoint or an error occurs in the optimizations, program complitation, or the running of the program. If an error occurs, bugpoint attempts to diagnose the error by eliminating passes that are not at fault and code that is not needed. llvm-svn: 29703
* Teach bugpoint to kill optimization passes that run over the timeout limit,Chris Lattner2006-06-131-1/+2
| | | | | | | which allows it to debug optimizer infinite loops. This patch is contributed by Nick Lewycky, thanks! llvm-svn: 28763
* For PR351:Reid Spencer2005-12-221-2/+7
| | | | | | | | | | | | Generally, remove use of fork/exec from bugpoint in favor of the portable sys::Program::ExecuteAndWait method. This change requires two new options to bugpoint to tell it that it is running in "child" mode. In this mode, it reads its input and runs the passes. The result code signals to the parent instance of bugpoint what happened (success, fail, crash). This change should make bugpoint usable on Win32 systems. llvm-svn: 24961
* When the user hits ctrl-c, bugpoint should attempt to stop reduction asChris Lattner2005-08-021-0/+4
| | | | | | | quickly as possible and output what it has so far. If they hit it twice, bugpoint is killed. llvm-svn: 22579
* Eliminate tabs and trailing spacesJeff Cohen2005-04-221-2/+2
| | | | llvm-svn: 21441
* Remove trailing whitespaceMisha Brukman2005-04-221-4/+4
| | | | llvm-svn: 21428
* Implement basic block extraction for the miscompilation debugger. This ↵Chris Lattner2004-05-111-0/+9
| | | | | | | | | | | | | | | | 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 :) llvm-svn: 13471
* Merge the code generator miscompilation code into the optimizer miscompilationChris Lattner2004-04-051-0/+10
| | | | | | | code. This "instantly" gives us loop-extractor power to assist with the debugment of our nasty codegen issues. :) llvm-svn: 12678
* Make a method publicChris Lattner2004-04-051-1/+2
| | | | llvm-svn: 12677
* Add a new "AutoDebugCrashes" optionChris Lattner2004-03-141-2/+5
| | | | llvm-svn: 12396
* Add new methodChris Lattner2004-03-141-0/+5
| | | | llvm-svn: 12394
* Refactor and clean up a bunch more code. No major functionality changes.Chris Lattner2004-03-141-20/+27
| | | | | | | | | | | | | | * 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
* Add a method to extract a loopChris Lattner2004-03-141-0/+5
| | | | llvm-svn: 12391
* Refactor all of the "splitting a module into two pieces" code to avoidChris Lattner2004-03-141-0/+5
| | | | | | | code duplication. Also, don't use ReduceMiscompilingFunctions::TestFuncs to print out the final message. llvm-svn: 12387
* Add a new method for use by the code generator crash debugger.Chris Lattner2004-02-181-0/+6
| | | | llvm-svn: 11613
* Make more stuff public. Make the instruction argument toChris Lattner2004-02-181-20/+20
| | | | | | deleteInstructionFromProgram be const llvm-svn: 11606
* make a bunch of methods publicChris Lattner2004-02-181-26/+25
| | | | llvm-svn: 11605
* A couple of minor cleanups: don't forward declare private classes, put privateChris Lattner2004-02-181-2/+0
| | | | | | classes in an anon namespace llvm-svn: 11604
* Cleanup and simplify manipulation of the program, eliminate the need for soChris Lattner2004-02-181-3/+18
| | | | | | many 'friends' of bugdriver. llvm-svn: 11603
* Add a stub for debugging code generator crashesChris Lattner2004-02-181-4/+9
| | | | llvm-svn: 11602
* Update comments, if we are running with the CBE, make sure the InterpreterChris Lattner2004-02-181-3/+6
| | | | | | variable and the CBE variable are pointer equal. llvm-svn: 11599
* Add check-exit-code option, defaulting to true.Brian Gaeke2004-02-111-7/+3
| | | | | | | | | | | | | | | 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. llvm-svn: 11325
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | llvm-svn: 9903
* I hate it when bugpoint is all ready to give me a bytecode file, then crashesChris Lattner2003-11-051-2/+2
| | | | | | | | | | | 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). llvm-svn: 9743
* Simplify the performFinalCleanups interfaceChris Lattner2003-11-051-4/+4
| | | | llvm-svn: 9740
* fix file headersChris Lattner2003-10-201-1/+0
| | | | llvm-svn: 9293
* Added copyright header to all C++ source files.John Criswell2003-10-201-0/+8
| | | | llvm-svn: 9291
* Be more helpful if a pass fails while chasing down a miscompilationChris Lattner2003-10-171-0/+3
| | | | llvm-svn: 9214
* Change the execute methods to take the shared object filename by const ↵Chris Lattner2003-10-141-5/+9
| | | | | | | | reference. Other adjustments to work with the new ToolRunner interfaces llvm-svn: 9130
* The return value of compileSharedObject was never used. Return the sharedChris Lattner2003-10-141-2/+2
| | | | | | object's name instead llvm-svn: 9120
* If we're debugging the SimplifyCFG pass, we _REALLY_ don't want to use it forChris Lattner2003-08-051-0/+2
| | | | | | narrowing, no matter what. llvm-svn: 7596
* Parameterize the performFinalCleanups a bitChris Lattner2003-08-011-2/+3
| | | | llvm-svn: 7477
* Added comment to function isExecutingJIT()Misha Brukman2003-07-281-0/+2
| | | | llvm-svn: 7370
* BugDriver.h:Misha Brukman2003-07-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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 llvm-svn: 7364
* Made a bunch of cleanups, as per Chris' recommendations:Misha Brukman2003-07-241-2/+7
| | | | | | | | | | | | | | | | * 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
* Major addition to bugpoint: ability to debug code generators (LLC and LLI).Misha Brukman2003-07-241-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud