Commit Graph

397 Commits

Author SHA1 Message Date
Nick Lewycky b294e31e83 CloneModule stores the BasicBlock mapping in ValueMap. There's no need to
recompute it. This fixes a O(n^2) in number of blocks when reducing a crash.

llvm-svn: 68422
2009-04-04 09:39:23 +00:00
Evan Cheng 690b635aa6 Also pass -gcc-tool-args when building a shared object.
llvm-svn: 66746
2009-03-12 00:53:34 +00:00
Chris Lattner e3fc2d13be Change various llvm utilities to use PrettyStackTraceProgram in
their main routines.  This makes the tools print their argc/argv
commands if they crash.

llvm-svn: 66248
2009-03-06 05:34:10 +00:00
Dan Gohman bcad718f73 Use CloneModule's ValueMap to avoid needing to look up
functions by name. This fixes PR718.

llvm-svn: 66239
2009-03-06 02:16:23 +00:00
Dan Gohman 4f42ac8400 Fix a bugpoint bug on anonymous functions. Instead of looking up
functions in the new module by name, use the ValueMap provided by
CloneModule to do the lookups.

llvm-svn: 66216
2009-03-05 23:20:46 +00:00
Bill Wendling bf5d827194 Add a "-gcc-tool-args" option. This option acts like the "-tool-args" option,
but passes the arguments to the "gcc" invocation instead of to the "llc"
invocation.

llvm-svn: 65896
2009-03-02 23:13:18 +00:00
Dan Gohman 38a9631d5f Eliminate several more unnecessary intptr_t casts.
llvm-svn: 64888
2009-02-18 05:09:16 +00:00
Dan Gohman af2037fbfd Rename bugpoint's error message file so that if it somehow
gets left behind, it's less cryptic.

llvm-svn: 64399
2009-02-12 20:53:27 +00:00
Chris Lattner c3aa8f7bab fix bugpoint url, patch by Pieter de Bie!
llvm-svn: 64022
2009-02-07 18:56:30 +00:00
Rafael Espindola 6de96a1b5d Add the private linkage.
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Chris Lattner ac161bff07 Reimplement the old and horrible bison parser for .ll files with a nice
and clean recursive descent parser.

This change has a couple of ramifications:
1. The parser code is about 400 lines shorter (in what we maintain, not
   including what is autogenerated).
2. The code should be significantly faster than the old code because we 
   don't have to work around bison's poor handling of datatypes with 
   ctors/dtors.  This also makes the code much more resistant to memory 
   leaks.
3. We now get caret diagnostics from the .ll parser, woo.
4. The actual diagnostics emited from the parser are completely different
   so a bunch of testcases had to be updated.
5. I now disallow "%ty = type opaque %ty = type i32".  There was no good
   reason to support this, it was just an accident of the old 
   implementation.  I have no reason to think that anyone is actually using
   this.
6. The syntax for sticking a global variable has changed to make it 
   unambiguous.  I don't think anyone is depending on this since only clang
   supports this and it is not solid yet, so I'm not worried about anything
   breaking.
7. This gets rid of the last use of bison, and along with it the .cvs files.
   I'll prune this from the makefiles as a subsequent commit.

There are a few minor cleanups that can be done after this commit (suggestions
welcome!) but this passes dejagnu testing and is ready for its time in the
limelight.

llvm-svn: 61558
2009-01-02 07:01:27 +00:00
Dan Gohman 414cf50234 Generalize bugpoint's concept of a "safe" backend, and add options
to allow the "safe" backend to be run with a different path, and/or
with different command-line options.

This enables the following use cases:
 - bugpoint llc against an llc command from a different build
 - bugpoint llc against the same llc with different command-line options
 - and more...

Also, document the existing "custom" interpreter options.

llvm-svn: 60681
2008-12-08 04:02:47 +00:00
Nick Lewycky f5ba827d41 Remove -check-exit-code from bugpoint. This is subsumed by -append-exit-code.
Note that -check-exit-code was on by default while -append-exit-code is not.

llvm-svn: 58221
2008-10-26 23:59:36 +00:00
Oscar Fuentes a229b3c9a7 Initial support for the CMake build system.
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Evan Cheng 7aedcf151c Allow use of ssh to perform remote execution.
llvm-svn: 55979
2008-09-09 06:11:26 +00:00
Matthijs Kooijman 3d5d6f90e0 Improve bugpoint output a bit by outputting the actual instructions instead of
just it's name, which is often empty. Also remove a newline from the output
that wasn't really needed.

llvm-svn: 54158
2008-07-29 08:55:30 +00:00
Dan Gohman 0c292dbb6c Reformat this message to fit in 80 cols.
llvm-svn: 53561
2008-07-14 17:43:27 +00:00
Owen Anderson c76bacbffb Global variables beginning with \01 have special meaning on Darwin, so we need to remove
the name prefix when we change them from internal to external.  This allows bugpointing
of codegen miscompilations to work more reliably on Darwin.

llvm-svn: 53236
2008-07-08 16:38:42 +00:00
Matthijs Kooijman 3bb1276ed2 Let bugpoint display generated messages on stderr only if no interpreter was
found, this ensures that messages like "Found gcc" end up on stdout where they
belong.

llvm-svn: 52235
2008-06-12 13:09:43 +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
Gabor Greif 697e94cc22 Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
llvm-svn: 51143
2008-05-15 10:04:30 +00:00
Anton Korobeynikov c53565c479 Add possibility of using arbitrary to to execute stuff from bugpoint.
Patch by Pekka Jääskeläinen!

llvm-svn: 50373
2008-04-28 20:53:48 +00:00
Chris Lattner 7855a5cb70 several multiple-retval fixes for bugpoint.
llvm-svn: 50331
2008-04-28 00:04:58 +00:00
Owen Anderson 7629b71dd4 Revert r49614. As Dan pointed out, some of these aren't correct.
llvm-svn: 49657
2008-04-14 17:38:21 +00:00
Owen Anderson 1f6fbc4bc3 Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
which is significantly more efficient.

llvm-svn: 49614
2008-04-13 19:15:17 +00:00
Bill Wendling 856d8f5b58 Remove tabs. Patch by Mike Stump!
llvm-svn: 49317
2008-04-07 05:47:52 +00:00
Gabor Greif e9ecc68d8f API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.

llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Torok Edwin 538160b7ff -fPIC is required on x86-64 when building shared objects.
llvm-svn: 49274
2008-04-06 12:42:29 +00:00
Andrew Lenharth 5e0067d982 With debug info, there are nameless constant global values. do not crash when we hit one
llvm-svn: 48749
2008-03-24 22:16:14 +00:00
Bill Wendling 8ff4320071 Detabify.
llvm-svn: 47596
2008-02-26 10:46:10 +00:00
Dan Gohman 02d2bc8d3e Fix a missing space in the description of the find-bugs option.
llvm-svn: 47271
2008-02-18 17:15:45 +00:00
Nick Lewycky 8102d473ce PR2027, Fix bugpoint's -find-bugs option, clean up the code.
llvm-svn: 47105
2008-02-14 05:01:46 +00:00
Chris Lattner 97879424fe Fix PR1797
llvm-svn: 45736
2008-01-08 04:26:20 +00:00
Chris Lattner 345353d6b4 remove attributions from tools.
llvm-svn: 45421
2007-12-29 20:44:31 +00:00
Chris Lattner 8fa21acd25 remove attributions from tools/utils makefiles.
llvm-svn: 45414
2007-12-29 20:07:17 +00:00
Christopher Lamb edf0788758 Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
llvm-svn: 45082
2007-12-17 01:12:55 +00:00
Duncan Sands 38ef3a8ec7 Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).

llvm-svn: 44544
2007-12-03 20:06:50 +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
Gordon Henriksen 2ed067a0d9 Deleting redundant copy of block extractor pass. See also PR1775.
llvm-svn: 43694
2007-11-05 01:54:05 +00:00
Dan Gohman 2c6a821fd7 Move the space in overview output for commands out of each of the
commands and into the common code.

llvm-svn: 42752
2007-10-08 15:45:12 +00:00
David Greene 17a5dfe6f7 New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.

Updates to all clients.

llvm-svn: 40660
2007-08-01 03:43:44 +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
Lauro Ramos Venancio f04823af30 Fix bugpoint to run -llc-safe with -Xlinker.
llvm-svn: 37483
2007-06-06 23:10:56 +00:00
Chris Lattner 9e9a34c6bf use the new MemoryBuffer interfaces to simplify error reporting in clients.
llvm-svn: 36900
2007-05-06 23:45:49 +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
Evan Cheng 779b52e4c4 Added -rsh-host and -rsh-user to support remote execution.
llvm-svn: 36685
2007-05-03 18:36:15 +00:00
Devang Patel 8c78a0bff0 Drop 'const'
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel e95c6ad802 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.

llvm-svn: 36652
2007-05-02 21:39:20 +00:00