summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/BugDriver.h
Commit message (Collapse)AuthorAgeFilesLines
* [bugpoint] Update runPasses to take ArrayRef instead of a pointer (NFC)Florian Hahn2019-09-301-4/+3
| | | | | | | | | | | | | This makes it slightly easier to pass extra arguments to runPasses and simplifies the code slightly. Reviewers: efriedma, bogner, dblaikie, diegotf, hiraditya Reviewed By: dblaikie, hiraditya Differential Revision: https://reviews.llvm.org/D68228 llvm-svn: 373265
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [bugpoint] Fix crash when testing for miscompilation.Rafael Espindola2018-04-241-1/+1
| | | | | | | | | | | Method BugDriver::performFinalCleanups(...) would delete Module object it worked on, which was also deleted by its caller (e.g. TestCodeGenerator(...)). Changed the code to avoid double delete and make Module ownership slightly clearer. Patch by Andrzej Janik. llvm-svn: 330763
* Change the BugDriver to store the current module with std::unique_ptr.Rafael Espindola2018-02-141-48/+34
| | | | | | | | | While there, change a bunch of helper functions to take references to avoid adding calls to get(). This should conclude the bugpoint yak shaving. llvm-svn: 325177
* Convert another use of createUniqueFile to TempFile::create.Rafael Espindola2017-11-161-0/+1
| | | | | | | This one requires a new small feature in TempFile: the ability to keep the temporary file with the temporary name. llvm-svn: 318458
* Convert another use of createUniqueFile to TempFile::create.Rafael Espindola2017-11-161-0/+6
| | | | llvm-svn: 318427
* bugpoint: Return Errors instead of passing around stringsJustin Bogner2016-09-061-36/+31
| | | | | | | | | | | | | This replaces the threading of `std::string &Error` through all of these APIs with checked Error returns instead. There are very few places here that actually emit any errors right now, but threading the APIs through will allow us to replace a bunch of exit(1)'s that are scattered through this code with proper error handling. This is more or less NFC, but does move around where a couple of error messages are printed out. llvm-svn: 280720
* Revert "bugpoint: Stop threading errors through APIs that never fail"Justin Bogner2016-09-061-3/+4
| | | | | | | | | | | | | This isn't the right thing to do - it turns out a number of the APIs that "never fail" just exit(1) if something bad happens. We can and should thread Error through this instead. That diff will make more sense with this reverted. Sorry for the noise. This reverts r280690 llvm-svn: 280691
* bugpoint: Stop threading errors through APIs that never failJustin Bogner2016-09-061-4/+3
| | | | | | | | | | | | | This simplifies ListReducer and most of its subclasses by removing the std::string &Error that was threaded through all of them but almost never used. If we end up needing error handling in more places here we can reinstate it using llvm::Error instead of these unwieldy strings. The 2 cases (out of 12) that actually can hit the error cases are a little bit awkward now, but those will clean up as I refactor this API further. llvm-svn: 280690
* bugpoint: clang-format all of bugpoint. NFCJustin Bogner2016-09-021-37/+29
| | | | | | | I'm going to clean up the APIs here a bit and touch many many lines anyway. llvm-svn: 280450
* [bugpoint] Delete a stale comment.Philip Reames2016-06-291-3/+0
| | | | llvm-svn: 274093
* [bugpoint] Unwrap one level of wrapper functions [NFC]Philip Reames2016-06-291-17/+10
| | | | llvm-svn: 274092
* [bugpoint] Simplify code by moving exception to only callerPhilip Reames2016-06-291-1/+0
| | | | llvm-svn: 274083
* Apply most suggestions of clang-tidy's performance-unnecessary-value-paramBenjamin Kramer2016-06-081-2/+2
| | | | | | | Avoids unnecessary copies. All changes audited & pass tests with asan. No functional change intended. llvm-svn: 272190
* Return std::unique_ptr from SplitFunctionsOutOfModule. NFC.Rafael Espindola2015-12-091-5/+5
| | | | llvm-svn: 255084
* [bugpoint] Fix "Alias must point to a definition" problemsHal Finkel2015-11-261-0/+5
| | | | | | | | | | | | | | | | | | GlobalAliases may reference function definitions, but not function declarations. bugpoint would sometimes create invalid IR by deleting a function's body (thus mutating a function definition into a declaration) without first 'fixing' any GlobalAliases that reference that function definition. This change iteratively prevents that issue. Before deleting a function's body, it scans the module for GlobalAliases which reference that function. When found, it eliminates them using replaceAllUsesWith. Fixes PR20788. Patch by Nick Johnson! llvm-svn: 254171
* [Bugpoint] Use 'CC' instead of 'GCC' for variable naming.Davide Italiano2015-10-141-2/+2
| | | | | | | | | | We now use clang by default and fallback to gcc when requested. With this commit, names reflect reality. No functional change intended. Discussed with: Rafael Espindola. llvm-svn: 250321
* Return a std::unique_ptr from parseInputFile and propagate. NFC.Rafael Espindola2014-08-261-36/+41
| | | | | | | | The memory management in BugPoint is fairly convoluted, so this just unwraps one layer by changing the return type of functions that always return owned Modules. llvm-svn: 216464
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-131-2/+2
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
* [C++] Use 'nullptr'.Craig Topper2014-04-281-3/+3
| | | | llvm-svn: 207394
* [Modules] Move ValueMap to the IR library. While this class does notChandler Carruth2014-03-041-1/+1
| | | | | | | | | | | | directly care about the Value class (it is templated so that the key can be any arbitrary Value subclass), it is in fact concretely tied to the Value class through the ValueHandle's CallbackVH interface which relies on the key type being some Value subclass to establish the value handle chain. Ironically, the unittest is already in the right library. llvm-svn: 202824
* Fix bugpoint execution/reference output file nameHal Finkel2013-06-281-1/+1
| | | | | | | | | 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). llvm-svn: 185166
* Don't use PathV1.h in tools/bugpoint/Miscompilation.cpp.Rafael Espindola2013-06-181-0/+2
| | | | llvm-svn: 184193
* Sort the #include lines for tools/...Chandler Carruth2012-12-041-1/+1
| | | | | | | | 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. llvm-svn: 169252
* Be more consistent in using ValueToValueMapTy.Rafael Espindola2010-10-131-1/+2
| | | | llvm-svn: 116387
* Use RunPassesOn as in the rest of bugpoint.Rafael Espindola2010-08-101-2/+1
| | | | llvm-svn: 110682
* Most of bugpoint now only needs to know the pass names.Rafael Espindola2010-08-081-10/+9
| | | | llvm-svn: 110534
* Run opt instead of bugpoint itself.Rafael Espindola2010-08-071-5/+1
| | | | llvm-svn: 110524
* Revert bugpoint change due to buildbot breakage.Bob Wilson2010-08-051-1/+5
| | | | | | | | | | --- Reverse-merging r110333 into '.': U tools/bugpoint/BugDriver.h U tools/bugpoint/OptimizerDriver.cpp U tools/bugpoint/bugpoint.cpp U tools/bugpoint/BugDriver.cpp llvm-svn: 110341
* Run opt instead of bugpoint itself.Rafael Espindola2010-08-051-5/+1
| | | | | | Fixes PR753. llvm-svn: 110333
* Add const to compileProgram and to the various test functions in CrashDebugger.Rafael Espindola2010-08-051-1/+1
| | | | llvm-svn: 110306
* Add a Module argument to the remaining runPasses methods and mark getContextRafael Espindola2010-08-051-9/+6
| | | | | | const. llvm-svn: 110300
* Make EmitProgressBitcode const and add a Module argument to runPasses. UseRafael Espindola2010-08-051-3/+4
| | | | | | that argument to simplify runPassesOn. llvm-svn: 110291
* Add const to some methods and change TestMergedProgram to return the mergedRafael Espindola2010-07-311-3/+4
| | | | | | module and take a const BugDriver. llvm-svn: 109951
* Add a Program argument to diffProgram to avoid a use of swapProgramIn.Rafael Espindola2010-07-301-3/+6
| | | | llvm-svn: 109859
* Instead of abusing swapProgramIn, just add a Module argument toRafael Espindola2010-07-281-4/+5
| | | | | | EmitProgressBitcode. llvm-svn: 109602
* Speculatively revert r108813, in an attempt to get the self-host buildbots ↵Owen Anderson2010-07-201-12/+11
| | | | | | | | 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. llvm-svn: 108818
* Reapply r108794, a fix for the failing test from last time.Owen Anderson2010-07-201-11/+12
| | | | llvm-svn: 108813
* Revert r108794, "Separate PassInfo into two classes: a constructor-freeDaniel Dunbar2010-07-201-12/+11
| | | | | | | superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is breaking teh everything. llvm-svn: 108805
* Separate PassInfo into two classes: a constructor-free superclass ↵Owen Anderson2010-07-201-11/+12
| | | | | | (StaticPassInfo) and a constructor-ful subclass (PassInfo). llvm-svn: 108794
* Convert some tab stops into spaces.Duncan Sands2010-07-121-1/+1
| | | | llvm-svn: 108130
* Use ValueMap instead of DenseMap.Devang Patel2010-06-241-2/+2
| | | | | | The ValueMapper used by various cloning utility maps MDNodes also. llvm-svn: 106706
* Remove accidentally committed cruft.Nick Lewycky2010-04-141-3/+0
| | | | llvm-svn: 101230
* Bugpoint no longer uses exceptions.Nick Lewycky2010-04-141-3/+4
| | | | llvm-svn: 101228
* Remove use of exceptions from bugpoint. No deliberate functionality change!Nick Lewycky2010-04-121-23/+28
| | | | llvm-svn: 101013
* Remove dead argument and clean whitespace. No functionality change.Nick Lewycky2010-04-101-2/+1
| | | | llvm-svn: 100954
* Free all Constants in ~LLVMConstantImpl. We avoid assertion failuresJeffrey Yasskin2010-03-221-0/+1
| | | | | | | | | 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(). llvm-svn: 99160
* Bugpoint's default memory limit (100MB) was too low for valgrind, soJeffrey Yasskin2010-03-191-1/+3
| | | | | | | this patch raises the default to 800MB when valgrind's active. 800 was chosen semi-arbitrarily. llvm-svn: 98905
* Make LLVMContext and LLVMContextImpl classes instead of structs.Benjamin Kramer2009-08-111-1/+1
| | | | llvm-svn: 78690
* Fix FindExecutable to use sys::Path::GetMainExecutable instead ofDan Gohman2009-08-051-2/+2
| | | | | | | | | | | | | 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. llvm-svn: 78240
OpenPOWER on IntegriCloud