summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint
Commit message (Collapse)AuthorAgeFilesLines
...
* [bugpoint] Allow the user to specify the path to opt on the commandline.Michael Gottesman2013-08-051-1/+4
| | | | llvm-svn: 187739
* Fix invalid function pointers in bugpoint ExtractLoopsHal Finkel2013-08-021-7/+42
| | | | | | | | | | | | | | | | | | | | | | | The ExtractLoops function tries to reduce the failing test case by extracting one or more loops from the misoptimized piece of the program. In doing this, ExtractLoops must keep the MiscompiledFunctions vector up-to-date by ensuring that the pointers refer to functions in the current failing program. Unfortunately, this is not trivial because: - ExtractLoops is iterative, and there are several early exits (and the MiscompiledFunctions vector must be consistent with the current program at every non-fatal exit point). - Several of the utility functions used by ExtractLoops (such as TestOptimizer, some of which are called through the TestFn callback parameter, and Linker::LinkModules) delete their inputs upon success. This change adds several updates of the MiscompiledFunctions vector at different points. The first is after the initial call to TestMergedProgram which checks that the loop-extracted program still works. The second is after the call to TestFn (TestOptimizer, for example). This function will delete its inputs (which is why the existing ExtractLoops logic cloned the inputs first). llvm-svn: 187674
* Add a wrapper for open.Rafael Espindola2013-07-161-1/+1
| | | | | | | This centralizes the handling of O_BINARY and opens the way for hiding more differences (like how open behaves with directories). llvm-svn: 186447
* Add a createUniqueFile function and switch llvm's users of unique_file.Rafael Espindola2013-07-054-13/+13
| | | | | | | | | | | | | | 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
* Use sys::fs::createTemporaryFile.Rafael Espindola2013-07-052-10/+10
| | | | llvm-svn: 185719
* Fix bugpoint execution/reference output file nameHal Finkel2013-06-282-2/+2
| | | | | | | | | 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
* Remove unused includes.Rafael Espindola2013-06-261-1/+0
| | | | | | llvm itself is now PathV1 clean. llvm-svn: 184947
* Port GetMainExecutable over to PathV2.Rafael Espindola2013-06-261-2/+2
| | | | | | I will remove the V1 version as soon as I change clang in the next commit. llvm-svn: 184914
* Move GetEXESuffix to the one place it is used.Rafael Espindola2013-06-251-1/+7
| | | | llvm-svn: 184853
* Convert most uses of PathV1.h in ToolRunner.cpp.Rafael Espindola2013-06-181-25/+35
| | | | llvm-svn: 184210
* Add a version of unique_file that return just the file name.Rafael Espindola2013-06-182-19/+3
| | | | llvm-svn: 184206
* Return a std::string from PrependMainExecutablePath.Rafael Espindola2013-06-181-6/+7
| | | | llvm-svn: 184204
* Remove PathV1.h use from BugDriver.cpp.Rafael Espindola2013-06-181-3/+2
| | | | llvm-svn: 184203
* Remove use of PathV1.h from ExecutionDriver.cpp.Rafael Espindola2013-06-181-24/+37
| | | | llvm-svn: 184202
* Remove usage of PathV1.h from OptimizerDriver.cpp.Rafael Espindola2013-06-181-26/+32
| | | | llvm-svn: 184198
* Convert some uses of eraseFromDisk.Rafael Espindola2013-06-181-3/+3
| | | | llvm-svn: 184196
* Don't use PathV1.h in tools/bugpoint/Miscompilation.cpp.Rafael Espindola2013-06-183-30/+49
| | | | llvm-svn: 184193
* Convert two uses of eraseFromDisk.Rafael Espindola2013-06-171-2/+2
| | | | llvm-svn: 184136
* Remove usage of PathV1.h in FindBugs.cpp.Rafael Espindola2013-06-171-2/+2
| | | | llvm-svn: 184122
* Don't use PathV1.h in CrashDebugger.cpp.Rafael Espindola2013-06-171-8/+5
| | | | llvm-svn: 184109
* Don't use PathV1.h in ToolRunner.h.Rafael Espindola2013-06-177-13/+18
| | | | llvm-svn: 184107
* Remove CBE related code.Rafael Espindola2013-06-171-50/+0
| | | | llvm-svn: 184106
* Don't use PathV1.h in ExtractFunction.cpp.Rafael Espindola2013-06-171-19/+12
| | | | llvm-svn: 184102
* Move PrependMainExecutablePath next to its only user.Rafael Espindola2013-06-141-0/+22
| | | | llvm-svn: 183980
* Don't use PathV1.h in Signals.h.Rafael Espindola2013-06-131-1/+2
| | | | llvm-svn: 183947
* Don't use PathV1.h in FileUtilities.h.Rafael Espindola2013-06-132-2/+3
| | | | llvm-svn: 183941
* Avoid using PathV1.h in Program.h.Rafael Espindola2013-06-132-18/+10
| | | | llvm-svn: 183940
* Have sys::FindProgramByName return a std::string.Rafael Espindola2013-06-132-9/+8
| | | | llvm-svn: 183928
* Further reduce usage of sys::Path in bugpoint.Rafael Espindola2013-06-132-11/+11
| | | | llvm-svn: 183912
* Try to fix the build with libstdc++ 4.4.Rafael Espindola2013-06-131-1/+2
| | | | llvm-svn: 183909
* Reduce sys::Path usage in bugpoint.Rafael Espindola2013-06-131-47/+47
| | | | llvm-svn: 183908
* Remove the program class.Rafael Espindola2013-06-122-13/+12
| | | | | | | It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just those two functions and make Execute and Wait implementations details. llvm-svn: 183864
* Include PathV1.h in files that use it.Rafael Espindola2013-06-111-0/+1
| | | | | | This is preparation for replacing Path.h with PathV2.h. llvm-svn: 183782
* Use only explicit bool conversion operatorsDavid Blaikie2013-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | BitVector/SmallBitVector::reference::operator bool remain implicit since they model more exactly a bool, rather than something else that can be boolean tested. The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. One behavior change (YAMLParser) was made, though no test case is included as I'm not sure how to reach that code path. Essentially any comparison of llvm::yaml::document_iterators would be invalid if neither iterator was at the end. This helped uncover a couple of bugs in Clang - test cases provided for those in a separate commit along with similar changes to `operator bool` instances in Clang. llvm-svn: 181868
* Replace uses of the deprecated std::auto_ptr with OwningPtr.Andy Gibbs2013-04-121-1/+1
| | | | llvm-svn: 179373
* Don't export symbols in every binary on linux.Rafael Espindola2013-04-041-0/+1
| | | | | | | | | | | | On freebsd this makes sure that symbols are exported on the binaries that need them. The net result is that we should get symbols in the binaries that need them on every platform. On linux x86-64 this reduces the size of the bin directory from 262MB to 250MB. Patch by Stephen Checkoway. llvm-svn: 178725
* Manually update the dependencies in the Makefiles. It turns out that allChandler Carruth2013-03-261-1/+1
| | | | | | | | | | | that work on the LLVMBuild based dependency specification didn't actually work, we just now maintain dependencies in *3* places instead of 2. Yay. There may still be some missing dependencies, I'm still sifting through the bots and my builds, but this is a step in the right direction. llvm-svn: 177988
* Split out the IRReader header and the utility functions it provides intoChandler Carruth2013-03-263-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | its own library. These functions are bridging between the bitcode reader and the ll parser which are in different libraries. Previously we didn't have any good library to do this, and instead played fast and loose with a "header only" set of interfaces in the Support library. This really doesn't work well as evidenced by the recent attempt to add timing logic to the these routines. As part of this, make them normal functions rather than weird inline functions, and sink the implementation into the library. Also clean up the header to be nice and minimal. This requires updating lots of build system dependencies to specify that the IRReader library is needed, and several source files to not implicitly rely upon the header file to transitively include all manner of other headers. If you are using IRReader.h, this commit will break you (the header moved) and you'll need to also update your library usage to include 'irreader'. I will commit the corresponding change to Clang momentarily. llvm-svn: 177971
* Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation ↵Michael Gottesman2013-01-284-3/+4
| | | | | | for refactoring the ARC Optimizer. llvm-svn: 173647
* [bugpoint] make tool selection messages uniqueSaleem Abdulrasool2013-01-241-1/+1
| | | | | | | | | 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
* [bugpoint] set Message after tool configurationSaleem Abdulrasool2013-01-241-1/+1
| | | | | | | | | | Set the message returned after the GCC runner has been constructed as otherwise the message will be overwritten by the construction of the runner, resulting in misleading messages. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Reviewed-by: Chandler Carruth <chandlerc@gmail.com> llvm-svn: 173359
* Sort all of the includes. Several files got checked in with mis-sortedChandler Carruth2013-01-191-1/+1
| | | | | | includes. llvm-svn: 172891
* Fix #includes after my last commit.Jakub Staszak2013-01-101-1/+1
| | | | llvm-svn: 172114
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-026-18/+18
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Sort the #include lines for tools/...Chandler Carruth2012-12-0410-34/+34
| | | | | | | | 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
* One more step towards making doInitialization and doFinalization useful forPedro Artigas2012-11-291-2/+0
| | | | | | | start up and clean up module passes, now that ASAN and TSAN are fixed the tests pass llvm-svn: 168905
* Revert r168635 "Step towards implementation of pass manager with ↵Owen Anderson2012-11-271-0/+2
| | | | | | | | doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model". It appears to have broken at least one buildbot. llvm-svn: 168654
* Step towards implementation of pass manager with doInitialization and ↵Owen Anderson2012-11-261-2/+0
| | | | | | | | doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model Patch by Pedro Artigas, with feedback from by Chandler Carruth. llvm-svn: 168635
* Add doInitialization and doFinalization methods to ModulePass's, to allow ↵Owen Anderson2012-11-151-0/+2
| | | | | | | | them to be re-initialized and reused on multiple Module's. Patch by Pedro Artigas. llvm-svn: 168008
* Move TargetData to DataLayout.Micah Villmow2012-10-082-2/+2
| | | | llvm-svn: 165403
OpenPOWER on IntegriCloud