summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/OptimizerDriver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix style.Michael J. Spencer2014-11-071-8/+6
| | | | llvm-svn: 221547
* Use findProgramByName.Michael J. Spencer2014-11-041-7/+22
| | | | llvm-svn: 221221
* Return a std::unique_ptr from parseInputFile and propagate. NFC.Rafael Espindola2014-08-261-8/+5
| | | | | | | | 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
* Modernize raw_fd_ostream's constructor a bit.Rafael Espindola2014-08-251-5/+5
| | | | | | | | | | Take a StringRef instead of a "const char *". Take a "std::error_code &" instead of a "std::string &" for error. A create static method would be even better, but this patch is already a bit too big. llvm-svn: 216393
* Remove 'using std::error_code' from tools.Rafael Espindola2014-06-131-2/+1
| | | | llvm-svn: 210876
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-0/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* [C++] Use 'nullptr'. Tools edition.Craig Topper2014-04-251-7/+7
| | | | llvm-svn: 207176
* [Modules] Make Support/Debug.h modular. This requires it to not changeChandler Carruth2014-04-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | behavior based on other files defining DEBUG_TYPE, which means it cannot define DEBUG_TYPE at all. This is actually better IMO as it forces folks to define relevant DEBUG_TYPEs for their files. However, it requires all files that currently use DEBUG(...) to define a DEBUG_TYPE if they don't already. I've updated all such files in LLVM and will do the same for other upstream projects. This still leaves one important change in how LLVM uses the DEBUG_TYPE macro going forward: we need to only define the macro *after* header files have been #include-ed. Previously, this wasn't possible because Debug.h required the macro to be pre-defined. This commit removes that. By defining DEBUG_TYPE after the includes two things are fixed: - Header files that need to provide a DEBUG_TYPE for some inline code can do so by defining the macro before their inline code and undef-ing it afterward so the macro does not escape. - We no longer have rampant ODR violations due to including headers with different DEBUG_TYPE definitions. This may be mostly an academic violation today, but with modules these types of violations are easy to check for and potentially very relevant. Where necessary to suppor headers with DEBUG_TYPE, I have moved the definitions below the includes in this commit. I plan to move the rest of the DEBUG_TYPE macros in LLVM in subsequent commits; this one is big enough. The comments in Debug.h, which were hilariously out of date already, have been updated to reflect the recommended practice going forward. llvm-svn: 206822
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-241-1/+1
| | | | | | | | | After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) llvm-svn: 202052
* [cleanup] Move the Dominators.h and Verifier.h headers into the IRChandler Carruth2014-01-131-1/+1
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 199082
* [bugpoint] Allow the user to specify the path to opt on the commandline.Michael Gottesman2013-08-051-1/+4
| | | | llvm-svn: 187739
* 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-051-4/+4
| | | | | | | | | | | | | | 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
* Add a version of unique_file that return just the file name.Rafael Espindola2013-06-181-10/+2
| | | | llvm-svn: 184206
* 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-181-11/+19
| | | | llvm-svn: 184193
* Don't use PathV1.h in FileUtilities.h.Rafael Espindola2013-06-131-0/+1
| | | | llvm-svn: 183941
* Avoid using PathV1.h in Program.h.Rafael Espindola2013-06-131-5/+5
| | | | llvm-svn: 183940
* Have sys::FindProgramByName return a std::string.Rafael Espindola2013-06-131-3/+2
| | | | llvm-svn: 183928
* Remove the program class.Rafael Espindola2013-06-121-5/+5
| | | | | | | It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just those two functions and make Execute and Wait implementations details. llvm-svn: 183864
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | 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-041-5/+5
| | | | | | | | 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
* Move TargetData to DataLayout.Micah Villmow2012-10-081-1/+1
| | | | llvm-svn: 165403
* Fix two bugpoint bugs:Chris Lattner2012-03-191-5/+7
| | | | | | | | | | | | 1) opt is not usually in the same path as the target program. Even for the bugpoint as a standalone app, it should be more portable to search in PATH, isn't it? 2) bugpoint driver accounts opt plugins, but does not list them in the final output command. Patch by Dmitry Mikushin! llvm-svn: 153066
* Have Program::Wait return -2 for crashed and timeouts instead of embeddingAndrew Trick2011-05-211-1/+1
| | | | | | info in the error message. Per Dan's request. llvm-svn: 131780
* fit in 80 cols.Chris Lattner2011-02-241-1/+2
| | | | llvm-svn: 126399
* Merge System into Support.Michael J. Spencer2010-11-291-2/+2
| | | | llvm-svn: 120298
* Rename FindExecutable to PrependMainExecutablePath.Mikhail Glushenkov2010-11-031-1/+2
| | | | | | Makes it more clear that it is just a path manipulation function. llvm-svn: 118174
* 80-col violations, trailing whitespace.Mikhail Glushenkov2010-11-031-4/+4
| | | | llvm-svn: 118173
* Check for (unlikely) errors from FindExecutable.Dan Gohman2010-10-291-1/+8
| | | | llvm-svn: 117658
* Delete this obsolete comment.Dan Gohman2010-10-291-4/+0
| | | | llvm-svn: 117655
* Move tool_output_file into its own file.Dan Gohman2010-10-071-1/+1
| | | | llvm-svn: 115973
* Make tool_output_file's raw_ostream instance a member variable insteadDan Gohman2010-09-011-8/+8
| | | | | | | | | | of a base class. This makes it possible to unregister the file from FilesToRemove when the file is done. Also, this eliminates the need for formatted_tool_output_file. llvm-svn: 112706
* Apply "Win32's Hybrid path separator in argv[0] should be accepted to bugpoint",Chris Lattner2010-08-241-10/+3
| | | | | | patch by NAKAMURA Takumi! llvm-svn: 111929
* Convert tools to use tool_output_file, and introduce errorDan Gohman2010-08-201-8/+20
| | | | | | checking to places which previously lacked it. llvm-svn: 111651
* Add a opt-args option that can be used to pass arguments to every optRafael Espindola2010-08-081-0/+6
| | | | | | | | invocation. Fixes PR7793: bugpoint -debug test.ll --opt-args -unroll-count=4 llvm-svn: 110555
* Most of bugpoint now only needs to know the pass names.Rafael Espindola2010-08-081-4/+4
| | | | llvm-svn: 110534
* Run opt instead of bugpoint itself.Rafael Espindola2010-08-071-35/+19
| | | | llvm-svn: 110524
* Revert bugpoint change due to buildbot breakage.Bob Wilson2010-08-051-19/+35
| | | | | | | | | | --- 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-35/+19
| | | | | | Fixes PR753. llvm-svn: 110333
* Make EmitProgressBitcode const and add a Module argument to runPasses. UseRafael Espindola2010-08-051-10/+7
| | | | | | that argument to simplify runPassesOn. llvm-svn: 110291
* Instead of abusing swapProgramIn, just add a Module argument toRafael Espindola2010-07-281-5/+6
| | | | | | EmitProgressBitcode. llvm-svn: 109602
* Speculatively revert r108813, in an attempt to get the self-host buildbots ↵Owen Anderson2010-07-201-4/+4
| | | | | | | | 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-4/+4
| | | | llvm-svn: 108813
* Revert r108794, "Separate PassInfo into two classes: a constructor-freeDaniel Dunbar2010-07-201-4/+4
| | | | | | | 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-4/+4
| | | | | | (StaticPassInfo) and a constructor-ful subclass (PassInfo). llvm-svn: 108794
* Bugpoint's default memory limit (100MB) was too low for valgrind, soJeffrey Yasskin2010-03-191-2/+0
| | | | | | | this patch raises the default to 800MB when valgrind's active. 800 was chosen semi-arbitrarily. llvm-svn: 98905
* Add -output-prefix option to bugpoint (to change the default output name).Daniel Dunbar2009-09-071-3/+6
| | | | llvm-svn: 81154
* Make LLVM command-line tools overwrite their output files without -f.Dan Gohman2009-08-251-3/+3
| | | | | | | | | | | | | | | | This is conventional command-line tool behavior. -f now just means "enable binary output on terminals". Add a -f option to llvm-extract and llvm-link, for consistency. Remove F_Force from raw_fd_ostream and enable overwriting and truncating by default. Introduce an F_Excl flag to permit users to enable a failure when the file already exists. This flag is currently unused. Update Makefiles and documentation accordingly. llvm-svn: 79990
OpenPOWER on IntegriCloud