Commit Graph

88 Commits

Author SHA1 Message Date
Chris Lattner 7c3230d348 fit in 80 cols.
llvm-svn: 126399
2011-02-24 18:59:38 +00:00
Michael J. Spencer 447762da85 Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Mikhail Glushenkov b8211b80bc Rename FindExecutable to PrependMainExecutablePath.
Makes it more clear that it is just a path manipulation function.

llvm-svn: 118174
2010-11-03 16:14:16 +00:00
Mikhail Glushenkov 189c6c687c 80-col violations, trailing whitespace.
llvm-svn: 118173
2010-11-03 16:14:07 +00:00
Dan Gohman 094da1dc44 Check for (unlikely) errors from FindExecutable.
llvm-svn: 117658
2010-10-29 16:18:26 +00:00
Dan Gohman a42c78fadb Delete this obsolete comment.
llvm-svn: 117655
2010-10-29 16:03:34 +00:00
Dan Gohman 0df7ea4c24 Move tool_output_file into its own file.
llvm-svn: 115973
2010-10-07 20:32:40 +00:00
Dan Gohman a2233f2801 Make tool_output_file's raw_ostream instance a member variable instead
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
2010-09-01 14:20:41 +00:00
Chris Lattner 5afc1e7b31 Apply "Win32's Hybrid path separator in argv[0] should be accepted to bugpoint",
patch by NAKAMURA Takumi!

llvm-svn: 111929
2010-08-24 17:44:07 +00:00
Dan Gohman 8525fe7155 Convert tools to use tool_output_file, and introduce error
checking to places which previously lacked it.

llvm-svn: 111651
2010-08-20 16:59:15 +00:00
Rafael Espindola fb1f29acf9 Add a opt-args option that can be used to pass arguments to every opt
invocation. Fixes PR7793:

bugpoint -debug test.ll --opt-args -unroll-count=4

llvm-svn: 110555
2010-08-08 22:14:20 +00:00
Rafael Espindola 33e81a8221 Most of bugpoint now only needs to know the pass names.
llvm-svn: 110534
2010-08-08 03:55:08 +00:00
Rafael Espindola bbdce49c2a Run opt instead of bugpoint itself.
llvm-svn: 110524
2010-08-07 23:03:21 +00:00
Bob Wilson 824edeb842 Revert bugpoint change due to buildbot breakage.
--- 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
2010-08-05 16:26:32 +00:00
Rafael Espindola 86d7095eac Run opt instead of bugpoint itself.
Fixes PR753.

llvm-svn: 110333
2010-08-05 15:25:38 +00:00
Rafael Espindola 315190b28c Make EmitProgressBitcode const and add a Module argument to runPasses. Use
that argument to simplify runPassesOn.

llvm-svn: 110291
2010-08-05 00:29:04 +00:00
Rafael Espindola 594994a34c Instead of abusing swapProgramIn, just add a Module argument to
EmitProgressBitcode.

llvm-svn: 109602
2010-07-28 18:12:30 +00:00
Owen Anderson 81781220d2 Speculatively revert r108813, in an attempt to get the self-host buildbots 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
2010-07-20 08:26:15 +00:00
Owen Anderson 8dc129325f Reapply r108794, a fix for the failing test from last time.
llvm-svn: 108813
2010-07-20 06:52:42 +00:00
Daniel Dunbar 4a35d6f8cd Revert r108794, "Separate PassInfo into two classes: a constructor-free
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.

llvm-svn: 108805
2010-07-20 03:06:07 +00:00
Owen Anderson e7c5fe586a Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
llvm-svn: 108794
2010-07-20 01:19:58 +00:00
Jeffrey Yasskin 71bd0f4eda Bugpoint's default memory limit (100MB) was too low for valgrind, so
this patch raises the default to 800MB when valgrind's active.  800
was chosen semi-arbitrarily.

llvm-svn: 98905
2010-03-19 00:09:28 +00:00
Daniel Dunbar a53337f731 Add -output-prefix option to bugpoint (to change the default output name).
llvm-svn: 81154
2009-09-07 19:26:11 +00:00
Dan Gohman 61a8796ddb Make LLVM command-line tools overwrite their output files without -f.
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
2009-08-25 15:34:52 +00:00
Chris Lattner c521f54198 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
forcing them down into various .cpp files.

This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
   for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
   clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
   instead.
4. Weans llvm-db off <iostream>

sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.

llvm-svn: 79869
2009-08-23 22:45:37 +00:00
Chris Lattner 6973395cc7 eliminate the std::ostream forms of the bitcode writing APIs.
llvm-svn: 79840
2009-08-23 07:49:08 +00:00
Nick Lewycky e6e82b8480 Include valgrind in the steps to reproduce if valgrind was used to reproduce
the problem.

llvm-svn: 79322
2009-08-18 06:08:01 +00:00
Dan Gohman 46ffffa750 Fix FindExecutable to use sys::Path::GetMainExecutable instead of
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
2009-08-05 20:21:17 +00:00
Dan Gohman ee05152cfa Convert more tools code from cerr and cout to errs() and outs().
llvm-svn: 76070
2009-07-16 15:30:09 +00:00
Owen Anderson 6773d388aa Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.

Patches for Clang and LLVM-GCC to follow.

llvm-svn: 74614
2009-07-01 16:58:40 +00:00
Matthijs Kooijman 4ba5df8a68 Add -silence-passes option to bugpoint. This option suppresses output generated
when bugpoint is running passes in a child process.

llvm-svn: 52234
2008-06-12 13:02:26 +00:00
Bill Wendling 8ff4320071 Detabify.
llvm-svn: 47596
2008-02-26 10:46:10 +00:00
Chris Lattner 345353d6b4 remove attributions from tools.
llvm-svn: 45421
2007-12-29 20:44:31 +00:00
Nick Lewycky c6243020a6 Allow the block extractor take to take a list of basic blocks to not extract
from a file containing Function/BasicBlock pairings. This is not safe against
anonymous or abnormally-named Funcs or BBs.

Make bugpoint use this interface to pass the BBs list to the child bugpoint.

llvm-svn: 44101
2007-11-14 06:47:06 +00:00
Gabor Greif 0e535c3c8e Pretty straightforward replacement of "bytecode" by "bitcode"
performed on tools/ first, in order not to cause lethal damage

llvm-svn: 37877
2007-07-04 21:55:50 +00:00
Chris Lattner 69a1f813a2 Fix a buggy conversion from bytecode to bitcode
llvm-svn: 36883
2007-05-06 19:43:09 +00:00
Chris Lattner f5599efb00 switch tools to bitcode from bytecode
llvm-svn: 36872
2007-05-06 09:32:02 +00:00
Chris Lattner f6dd4d7fca add bitcode support
llvm-svn: 36849
2007-05-06 05:47:06 +00:00
Anton Korobeynikov d01defedf6 Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688

llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Chris Lattner 19bb6b996b default to emiting an uncompressed .bc file
llvm-svn: 33420
2007-01-21 06:34:18 +00:00
Bill Wendling f3baad3ee1 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Bill Wendling afd54eb8b6 Replacing std::iostreams with llvm iostreams. Some of these changes involve
adding a temporary wrapper around the ostream to make it friendly to
functions expecting an LLVM stream. This should be fixed in the future.

llvm-svn: 31990
2006-11-29 00:19:40 +00:00
Nick Lewycky a2c681ab41 Fix --enable-valgrind. Add room for the new arguments, and don't keep
a pointer to a temporary.

llvm-svn: 30312
2006-09-14 04:20:17 +00:00
Nick Lewycky 7faef23f02 Add --enable-valgrind option to run optimizations through valgrind to
pick up on memory errors.

llvm-svn: 30311
2006-09-14 03:49:54 +00:00
Chris Lattner 68e53db664 analyze no longer exists, don't offer to run it :)
llvm-svn: 29919
2006-08-27 22:12:06 +00:00
Reid Spencer e4ca722199 For PR797:
Final removal of exceptions from lib/System and adjustment of users to
accommodate.

llvm-svn: 29846
2006-08-23 20:34:57 +00:00
Reid Spencer 944645af44 For PR797:
Adjust usage of the ExecuteAndWait function to use the last argument which
is the ErrMsg string. This is necessitated because this function no longer
throws exceptions on error.

llvm-svn: 29791
2006-08-21 06:04:45 +00:00
Reid Spencer c295914b7a For PR797:
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.

llvm-svn: 29785
2006-08-21 02:04:43 +00:00
Chris Lattner 16cf81306e Don't pass target name into TargetData anymore, it is never used or needed.
llvm-svn: 28831
2006-06-16 18:23:49 +00:00
Chris Lattner 20ec1654b1 Teach bugpoint to kill optimization passes that run over the timeout limit,
which allows it to debug optimizer infinite loops.  This patch is contributed
by Nick Lewycky, thanks!

llvm-svn: 28763
2006-06-13 03:10:48 +00:00