summaryrefslogtreecommitdiff
path: root/llvm/tools/bugpoint/ExecutionDriver.cpp
AgeCommit message (Collapse)Author
2025-11-20Revert "[NFC][bugpoint] Namespace cleanup in `bugpoint`" (#168961)Rahul Joshi
Reverts llvm/llvm-project#168921 Causes build failures.
2025-11-20[NFC][bugpoint] Namespace cleanup in `bugpoint` (#168921)Rahul Joshi
Add declaration of command line options to BugDriver.h and remove extern declarations in individual .cpp files.
2025-10-13[NFC][LLVM] Code cleanup in bugpoint (#162909)Rahul Joshi
- Move file local variables and functions out of anonymous namespace and mark them static. - Change a few function names to conform to LLVM coding standard (camelCase). - Add end of namespace comments for anonymous namespaces.
2025-03-03[NFC]Make file-local cl::opt global variables static (#126486)chrisPyr
#125983
2024-01-19[tools] Use SmallString::operator std::string (NFC)Kazu Hirata
2022-06-05Remove unneeded cl::ZeroOrMore for cl::opt/cl::list optionsFangrui Song
2022-06-05Remove unneeded cl::ZeroOrMore for cl::opt/cl::list optionsFangrui Song
2022-06-04Remove unneeded cl::ZeroOrMore for cl::list optionsFangrui Song
2020-10-09[bugpoint] Delete -safe-llc and make -run-llc work like -run-llc -safe-run-llcFangrui Song
2020-02-10Revert "Remove redundant "std::move"s in return statements"Bill Wendling
The build failed with error: call to deleted constructor of 'llvm::Error' errors. This reverts commit 1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.
2020-02-10Remove redundant "std::move"s in return statementsBill Wendling
2020-01-28Make llvm::StringRef to std::string conversions explicit.Benjamin Kramer
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here. This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies. This doesn't actually modify StringRef yet, I'll do that in a follow-up.
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
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
2018-12-10[bugpoint] Find 'opt', etc., in bugpoint directoryBrian Gesiak
Summary: When bugpoint attempts to find the other executables it needs to run, such as `opt` or `clang`, it tries searching the user's PATH. However, in many cases, the 'bugpoint' executable is part of an LLVM build, and the 'opt' executable it's looking for is in that same directory. Many LLVM tools handle this case by using the `Paths` parameter of `llvm::sys::findProgramByName`, passing the parent path of the currently running executable. Do this same thing for bugpoint. However, to preserve the current behavior exactly, first search the user's PATH, and then search for 'opt' in the directory containing 'bugpoint'. Test Plan: `check-llvm`. Many of the existing bugpoint tests no longer need to use the `--opt-command` option as a result of these changes. Reviewers: MatzeB, silvas, davide Reviewed By: MatzeB, davide Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D54884 llvm-svn: 348734
2018-09-18[bugpoint] Revert r318459Don Hinton
Summary: Revert r318459 which introduced a TempFile scoping bug. Differential Revision: https://reviews.llvm.org/D51836 llvm-svn: 342503
2018-02-14Change the BugDriver to store the current module with std::unique_ptr.Rafael Espindola
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
2017-11-16Convert the last use of sys::fs::createUniqueFile in bugpoint.Rafael Espindola
llvm-svn: 318459
2017-11-16Convert another use of createUniqueFile to TempFile::create.Rafael Espindola
This one requires a new small feature in TempFile: the ability to keep the temporary file with the temporary name. llvm-svn: 318458
2016-10-08Turn cl::values() (for enum) from a vararg function to using C++ variadic ↵Mehdi Amini
template The core of the change is supposed to be NFC, however it also fixes what I believe was an undefined behavior when calling: va_start(ValueArgs, Desc); with Desc being a StringRef. Differential Revision: https://reviews.llvm.org/D25342 llvm-svn: 283671
2016-09-06bugpoint: Return Errors instead of passing around stringsJustin Bogner
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
2016-09-02bugpoint: clang-format all of bugpoint. NFCJustin Bogner
I'm going to clean up the APIs here a bit and touch many many lines anyway. llvm-svn: 280450
2016-06-08Apply most suggestions of clang-tidy's performance-unnecessary-value-paramBenjamin Kramer
Avoids unnecessary copies. All changes audited & pass tests with asan. No functional change intended. llvm-svn: 272190
2015-10-14[Bugpoint] Use 'CC' instead of 'GCC' for variable naming.Davide Italiano
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
2015-10-14[Bugpoint] Use clang by default.Davide Italiano
We now rely on gcc only if either of the following is true: 1) -gcc option is passed by the user 2) clang is not found in the default path. Differential Revision: http://reviews.llvm.org/D13642 llvm-svn: 250318
2014-06-13Remove 'using std::error_code' from tools.Rafael Espindola
llvm-svn: 210876
2014-06-12Don't use 'using std::error_code' in include/llvm.Rafael Espindola
This should make sure that most new uses use the std prefix. llvm-svn: 210835
2014-04-25[C++] Use 'nullptr'. Tools edition.Craig Topper
llvm-svn: 207176
2014-03-14Fix a bug introduced during the transition to PathV2.Rafael Espindola
sys::fs::createUniqueFile returns an absolute path, so MakeSharedObject does too and we don't need to add a './' prefix. Patch by Jon McLachlan. llvm-svn: 203931
2013-10-01Remove several unused variables.Rafael Espindola
Patch by Alp Toker. llvm-svn: 191757
2013-07-05Add a createUniqueFile function and switch llvm's users of unique_file.Rafael Espindola
This function is complementary to createTemporaryFile. It handles the case were the unique file is *not* temporary: we will rename it in the end. Since we will rename it, the file has to be in the same filesystem as the final destination and we don't prepend the system temporary directory. This has a small semantic difference from unique_file: the default mode is 0666. This matches the behavior of most unix tools. For example, with this change lld now produces files with the same permissions as ld. I will add a test of this change when I port clang over to createUniqueFile (next commit). llvm-svn: 185726
2013-06-28Fix bugpoint execution/reference output file nameHal Finkel
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
2013-06-18Add a version of unique_file that return just the file name.Rafael Espindola
llvm-svn: 184206
2013-06-18Remove use of PathV1.h from ExecutionDriver.cpp.Rafael Espindola
llvm-svn: 184202
2013-06-17Don't use PathV1.h in ToolRunner.h.Rafael Espindola
llvm-svn: 184107
2013-06-13Don't use PathV1.h in FileUtilities.h.Rafael Espindola
llvm-svn: 183941
2013-01-24[bugpoint] make tool selection messages uniqueSaleem Abdulrasool
Change messages to help identify which interpreter was actually selected (safe vs testing). Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Reviewed-by: Chandler Carruth <chandlerc@gmail.com> llvm-svn: 173360
2012-03-23Remove the C backend.Eric Christopher
llvm-svn: 153307
2012-01-10Remove unnecessary default cases in switches that cover all enum values.David Blaikie
llvm-svn: 147855
2011-05-11Bugpoint support for miscompilations that result in a crash.Andrew Trick
This change allows bugpoint to pinpoint the "opt" pass and bitcode segment responsible for a crash caused by miscompilation. At least it works well for me now, without having to create any custom execution wrappers. llvm-svn: 131186
2011-03-31Switch FileRemover from PathV1 to V2.Michael J. Spencer
llvm-svn: 128630
2011-02-08Added bugpoint options: -compile-custom and -compile-command=...Andrew Trick
I've been using this mode to narrow down llc unit tests. Example custom compile script: llc "$@" not pygrep.py 'mul\s+r([0-9]), r\1,' < bugpoint-test-program.s llvm-svn: 125096
2011-02-08whitespaceAndrew Trick
llvm-svn: 125095
2010-08-05Add const to compileProgram and to the various test functions in CrashDebugger.Rafael Espindola
llvm-svn: 110306
2010-07-31Add const to some methods and change TestMergedProgram to return the mergedRafael Espindola
module and take a const BugDriver. llvm-svn: 109951
2010-07-30Add a Program argument to diffProgram to avoid a use of swapProgramIn.Rafael Espindola
llvm-svn: 109859
2010-05-24Apply timeouts and memory limits in more places. In particular, whenDuncan Sands
bugpoint does "Running the code generator to test for a crash" this gets you a crash if llc goes into an infinite loop or uses up vast amounts of memory. llvm-svn: 104485
2010-05-10Add command line option --gcc to bugpoint.Kalle Raiskila
Remove sending duplicate of the --gcc-tool-args parameters to gcc. llvm-svn: 103397
2010-04-12Remove use of exceptions from bugpoint. No deliberate functionality change!Nick Lewycky
llvm-svn: 101013
2010-04-10Remove dead argument and clean whitespace. No functionality change.Nick Lewycky
llvm-svn: 100954
2010-03-16add support for bugpointing the integrated assembler. Something like thisChris Lattner
works for me: bugpoint Output/bisort.llvm.bc -run-llc-ia -safe-run-llc This uses llc with the integrated assembler as the test compiler and llc without it as the safe compiler. llvm-svn: 98618