summaryrefslogtreecommitdiff
path: root/tools/bugpoint
Commit message (Collapse)AuthorAge
* Do not reference llvm-gcc from bugpointTobias Grosser2014-01-27
| | | | | | Reiterating: llvm-gcc is dead since a long time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200220 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.NAKAMURA Takumi2014-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199305 91177308-0d34-0410-b5e6-96231b3b80d8
* [cleanup] Move the Dominators.h and Verifier.h headers into the IRChandler Carruth2014-01-13
| | | | | | | | | | | | | | | | | | directory. These passes are already defined in the IR library, and it doesn't make any sense to have the headers in Analysis. Long term, I think there is going to be a much better way to divide these matters. The dominators code should be fully separated into the abstract graph algorithm and have that put in Support where it becomes obvious that evn Clang's CFGBlock's can use it. Then the verifier can manually construct dominance information from the Support-driven interface while the Analysis library can provide a pass which both caches, reconstructs, and supports a nice update API. But those are very long term, and so I don't want to leave the really confusing structure until that day arrives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199082 91177308-0d34-0410-b5e6-96231b3b80d8
* Put the functionality for printing a value to a raw_ostream as anChandler Carruth2014-01-09
| | | | | | | | | | | | operand into the Value interface just like the core print method is. That gives a more conistent organization to the IR printing interfaces -- they are all attached to the IR objects themselves. Also, update all the users. This removes the 'Writer.h' header which contained only a single function declaration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198836 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the LLVM IR asm writer header files into the IR directory, as theyChandler Carruth2014-01-07
| | | | | | | | | | | | | | | | | are part of the core IR library in order to support dumping and other basic functionality. Rename the 'Assembly' include directory to 'AsmParser' to match the library name and the only functionality left their -- printing has been in the core IR library for quite some time. Update all of the #includes to match. All of this started because I wanted to have the layering in good shape before I started adding support for printing LLVM IR using the new pass infrastructure, and commandline support for the new pass infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198688 91177308-0d34-0410-b5e6-96231b3b80d8
* Port r198087 and r198089 (strip dead code by default) from make to cmake.Nico Weber2013-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198198 91177308-0d34-0410-b5e6-96231b3b80d8
* Strip dead code when linking by default with BFD ld (linux, ...) and ld64 ↵Nico Weber2013-12-27
| | | | | | | | | | | | | | | (os x). This reduces the size of clang-format from 22 MB to 1.8 MB, diagtool goes from 21 MB to 2.8 MB, libclang.so goes from 29 MB to 20 MB, etc. The size of the bin/ folder shrinks from 270 MB to 200 MB. Targets that support plugins and don't already use EXPORTED_SYMBOL_FILE (which libclang and libLTO already do) can set NO_DEAD_STRIP to opt out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198087 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196908 91177308-0d34-0410-b5e6-96231b3b80d8
* Use startswith_lower() where possible.Jakub Staszak2013-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194007 91177308-0d34-0410-b5e6-96231b3b80d8
* [bugpoint] Increase the default memory limit for subprocesses to 300MB.Daniel Sanders2013-10-25
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently shared library builds (BUILD_SHARED_LIBS=ON in cmake) fail three bugpoint tests (BugPoint/remove_arguments_test.ll, BugPoint/crash-narrowfunctiontest.ll, and BugPoint/metadata.ll). If I run the bugpoint commands that llvm-lit runs with without -silence-passes I see errors such as this: opt: error while loading shared libraries: libLLVMSystemZInfo.so: failed to map segment from shared object: Cannot allocate memory It seems that the increased size of the binaries in a shared library build is causing the subprocess to exceed the 100MB memory limit. This patch therefore increases the default limit to a level at which these tests pass. Reviewers: dsanders Reviewed By: dsanders CC: llvm-commits, rafael Differential Revision: http://llvm-reviews.chandlerc.com/D2013 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193420 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove several unused variables.Rafael Espindola2013-10-01
| | | | | | Patch by Alp Toker. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191757 91177308-0d34-0410-b5e6-96231b3b80d8
* Added std:: qualifier to find() invocationDmitri Gribenko2013-09-02
| | | | | | | | | | | Iterator of std::vector may be implemented as a raw pointer. In this case ADL does not find the find() function in the std namespace. For example, this is the case with STDCXX implementation of vector. Patch by Konstantin Tokarev. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189733 91177308-0d34-0410-b5e6-96231b3b80d8
* [bugpoint] Allow the user to specify the path to opt on the commandline.Michael Gottesman2013-08-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187739 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix invalid function pointers in bugpoint ExtractLoopsHal Finkel2013-08-02
| | | | | | | | | | | | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187674 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a wrapper for open.Rafael Espindola2013-07-16
| | | | | | | This centralizes the handling of O_BINARY and opens the way for hiding more differences (like how open behaves with directories). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186447 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a createUniqueFile function and switch llvm's users of unique_file.Rafael Espindola2013-07-05
| | | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185726 91177308-0d34-0410-b5e6-96231b3b80d8
* Use sys::fs::createTemporaryFile.Rafael Espindola2013-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185719 91177308-0d34-0410-b5e6-96231b3b80d8
* 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
* Remove unused includes.Rafael Espindola2013-06-26
| | | | | | llvm itself is now PathV1 clean. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184947 91177308-0d34-0410-b5e6-96231b3b80d8
* Port GetMainExecutable over to PathV2.Rafael Espindola2013-06-26
| | | | | | I will remove the V1 version as soon as I change clang in the next commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184914 91177308-0d34-0410-b5e6-96231b3b80d8
* Move GetEXESuffix to the one place it is used.Rafael Espindola2013-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184853 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert most uses of PathV1.h in ToolRunner.cpp.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184210 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a version of unique_file that return just the file name.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184206 91177308-0d34-0410-b5e6-96231b3b80d8
* Return a std::string from PrependMainExecutablePath.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184204 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove PathV1.h use from BugDriver.cpp.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184203 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove use of PathV1.h from ExecutionDriver.cpp.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184202 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove usage of PathV1.h from OptimizerDriver.cpp.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184198 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some uses of eraseFromDisk.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184196 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
* Convert two uses of eraseFromDisk.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184136 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove usage of PathV1.h in FindBugs.cpp.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184122 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in CrashDebugger.cpp.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184109 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in ToolRunner.h.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184107 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove CBE related code.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184106 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in ExtractFunction.cpp.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184102 91177308-0d34-0410-b5e6-96231b3b80d8
* Move PrependMainExecutablePath next to its only user.Rafael Espindola2013-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183980 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in Signals.h.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183947 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in FileUtilities.h.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183941 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid using PathV1.h in Program.h.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
* Have sys::FindProgramByName return a std::string.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183928 91177308-0d34-0410-b5e6-96231b3b80d8
* Further reduce usage of sys::Path in bugpoint.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183912 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix the build with libstdc++ 4.4.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183909 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce sys::Path usage in bugpoint.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183908 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the program class.Rafael Espindola2013-06-12
| | | | | | | It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just those two functions and make Execute and Wait implementations details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183864 91177308-0d34-0410-b5e6-96231b3b80d8
* Include PathV1.h in files that use it.Rafael Espindola2013-06-11
| | | | | | This is preparation for replacing Path.h with PathV2.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183782 91177308-0d34-0410-b5e6-96231b3b80d8
* Use only explicit bool conversion operatorsDavid Blaikie2013-05-15
| | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181868 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace uses of the deprecated std::auto_ptr with OwningPtr.Andy Gibbs2013-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179373 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't export symbols in every binary on linux.Rafael Espindola2013-04-04
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178725 91177308-0d34-0410-b5e6-96231b3b80d8
* Manually update the dependencies in the Makefiles. It turns out that allChandler Carruth2013-03-26
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177988 91177308-0d34-0410-b5e6-96231b3b80d8
* Split out the IRReader header and the utility functions it provides intoChandler Carruth2013-03-26
| | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177971 91177308-0d34-0410-b5e6-96231b3b80d8