summaryrefslogtreecommitdiff
path: root/tools/bugpoint/BugDriver.h
Commit message (Collapse)AuthorAge
* Fix bugpoint execution/reference output file nameHal Finkel2013-06-28
| | | | | | | | | sys::fs::unique_file will now loop infinitely if provided with a file name without '%' characters and the input file already exists. As a result, bugpoint cannot use a fixed file name for the execution output (including the reference output). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185166 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in tools/bugpoint/Miscompilation.cpp.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184193 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for tools/...Chandler Carruth2012-12-04
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169252 91177308-0d34-0410-b5e6-96231b3b80d8
* Be more consistent in using ValueToValueMapTy.Rafael Espindola2010-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116387 91177308-0d34-0410-b5e6-96231b3b80d8
* Use RunPassesOn as in the rest of bugpoint.Rafael Espindola2010-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110682 91177308-0d34-0410-b5e6-96231b3b80d8
* Most of bugpoint now only needs to know the pass names.Rafael Espindola2010-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110534 91177308-0d34-0410-b5e6-96231b3b80d8
* Run opt instead of bugpoint itself.Rafael Espindola2010-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110524 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert bugpoint change due to buildbot breakage.Bob Wilson2010-08-05
| | | | | | | | | | | --- Reverse-merging r110333 into '.': U tools/bugpoint/BugDriver.h U tools/bugpoint/OptimizerDriver.cpp U tools/bugpoint/bugpoint.cpp U tools/bugpoint/BugDriver.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110341 91177308-0d34-0410-b5e6-96231b3b80d8
* Run opt instead of bugpoint itself.Rafael Espindola2010-08-05
| | | | | | Fixes PR753. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110333 91177308-0d34-0410-b5e6-96231b3b80d8
* Add const to compileProgram and to the various test functions in CrashDebugger.Rafael Espindola2010-08-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110306 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a Module argument to the remaining runPasses methods and mark getContextRafael Espindola2010-08-05
| | | | | | const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110300 91177308-0d34-0410-b5e6-96231b3b80d8
* Make EmitProgressBitcode const and add a Module argument to runPasses. UseRafael Espindola2010-08-05
| | | | | | that argument to simplify runPassesOn. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110291 91177308-0d34-0410-b5e6-96231b3b80d8
* Add const to some methods and change TestMergedProgram to return the mergedRafael Espindola2010-07-31
| | | | | | module and take a const BugDriver. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109951 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a Program argument to diffProgram to avoid a use of swapProgramIn.Rafael Espindola2010-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109859 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of abusing swapProgramIn, just add a Module argument toRafael Espindola2010-07-28
| | | | | | EmitProgressBitcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109602 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert r108813, in an attempt to get the self-host buildbots ↵Owen Anderson2010-07-20
| | | | | | | | | working again. I don't see why this patch would cause them to fail the way they are, but none of the other intervening patches seem likely either. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108818 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r108794, a fix for the failing test from last time.Owen Anderson2010-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108813 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r108794, "Separate PassInfo into two classes: a constructor-freeDaniel Dunbar2010-07-20
| | | | | | | superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is breaking teh everything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108805 91177308-0d34-0410-b5e6-96231b3b80d8
* Separate PassInfo into two classes: a constructor-free superclass ↵Owen Anderson2010-07-20
| | | | | | (StaticPassInfo) and a constructor-ful subclass (PassInfo). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108794 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some tab stops into spaces.Duncan Sands2010-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ValueMap instead of DenseMap.Devang Patel2010-06-24
| | | | | | | The ValueMapper used by various cloning utility maps MDNodes also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106706 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove accidentally committed cruft.Nick Lewycky2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101230 91177308-0d34-0410-b5e6-96231b3b80d8
* Bugpoint no longer uses exceptions.Nick Lewycky2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101228 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove use of exceptions from bugpoint. No deliberate functionality change!Nick Lewycky2010-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101013 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead argument and clean whitespace. No functionality change.Nick Lewycky2010-04-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100954 91177308-0d34-0410-b5e6-96231b3b80d8
* Free all Constants in ~LLVMConstantImpl. We avoid assertion failuresJeffrey Yasskin2010-03-22
| | | | | | | | | | | by dropping all references from all constants that can use other constants before trying to destroy any of them. I also had to free bugpoint's Module in ~BugDriver(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99160 91177308-0d34-0410-b5e6-96231b3b80d8
* Bugpoint's default memory limit (100MB) was too low for valgrind, soJeffrey Yasskin2010-03-19
| | | | | | | | | this patch raises the default to 800MB when valgrind's active. 800 was chosen semi-arbitrarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98905 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LLVMContext and LLVMContextImpl classes instead of structs.Benjamin Kramer2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix FindExecutable to use sys::Path::GetMainExecutable instead ofDan Gohman2009-08-05
| | | | | | | | | | | | | | just argv[0]. And remove the code for searching the current working directory and for searching PATH; the point of FindExecutable is not to find whatever version of the executable can be found by searching around, but to find an executable that accompanies the current executable. Update the tools to use sys::Program::FindProgramByName when they want PATH searching. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78240 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some of the constants+context related code out into a separate ↵Owen Anderson2009-08-04
| | | | | | | | | header, to make LLVMContextImpl.h not hideous. Also, fix some MSVC compile errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more tools code from cerr and cout to errs() and outs().Dan Gohman2009-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the use of const with respect to LLVMContext sane. Hopefully this is ↵Owen Anderson2009-07-01
| | | | | | | | | the last time, for the moment, that I will need to make far-reaching changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74655 91177308-0d34-0410-b5e6-96231b3b80d8
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-01
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CloneModule's ValueMap in more places, instead of lookingDan Gohman2009-04-22
| | | | | | | up functions by name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69805 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize bugpoint's concept of a "safe" backend, and add optionsDan Gohman2008-12-08
| | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60681 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attributions from tools.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the block extractor take to take a list of basic blocks to not extractNick Lewycky2007-11-14
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44101 91177308-0d34-0410-b5e6-96231b3b80d8
* Pretty straightforward replacement of "bytecode" by "bitcode"Gabor Greif2007-07-04
| | | | | | | performed on tools/ first, in order not to cause lethal damage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37877 91177308-0d34-0410-b5e6-96231b3b80d8
* Add possibility to set memory limit for binaries run via libSystem. ThisAnton Korobeynikov2007-02-16
| | | | | | | is especially needed for bugpoint. This partly implements PR688 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34349 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR960. Improves bugpoint so that it removes global variableBill Wendling2006-10-25
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31182 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new -cbe-bug mode, which works just like -run-llc, except that it usesChris Lattner2006-09-15
| | | | | | | LLC as the reference compiler to reduce testcases for bugs in GCC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30400 91177308-0d34-0410-b5e6-96231b3b80d8
* fit in 80 colsChris Lattner2006-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29754 91177308-0d34-0410-b5e6-96231b3b80d8
* This commit adds a new feature called find-bugs. The find-bugs option can be ↵Patrick Jenkins2006-08-15
| | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29703 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach bugpoint to kill optimization passes that run over the timeout limit,Chris Lattner2006-06-13
| | | | | | | | which allows it to debug optimizer infinite loops. This patch is contributed by Nick Lewycky, thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28763 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351:Reid Spencer2005-12-22
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24961 91177308-0d34-0410-b5e6-96231b3b80d8
* When the user hits ctrl-c, bugpoint should attempt to stop reduction asChris Lattner2005-08-02
| | | | | | | | quickly as possible and output what it has so far. If they hit it twice, bugpoint is killed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22579 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate tabs and trailing spacesJeff Cohen2005-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21441 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21428 91177308-0d34-0410-b5e6-96231b3b80d8
* 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