Commit Graph

423 Commits

Author SHA1 Message Date
Chris Lattner c35b5bac32 eliminate the Mangler::PreserveAsmNames bit, the sole client of this
can do it perfectly well itself.

llvm-svn: 75743
2009-07-15 04:50:47 +00:00
Evan Cheng d1c4705577 control reaches end of non-void function.
llvm-svn: 75714
2009-07-14 23:55:32 +00:00
Owen Anderson b6b2530000 Move EVER MORE stuff over to LLVMContext.
llvm-svn: 75703
2009-07-14 23:09:55 +00:00
Viktor Kutuzov 1518de130e Fix for bugpoint -remote-client
llvm-svn: 75665
2009-07-14 19:10:55 +00:00
Chris Lattner 8c9a96b966 Reapply my previous asmprinter changes now with more testing and two
additional bug fixes:

1. The bug that everyone hit was a problem in the asmprinter where it
   would remove $stub but keep the L prefix on a name when emitting the
   indirect symbol.  This is easy to fix by keeping the name of the stub
   and the name of the symbol in a StringMap instead of just keeping a
   StringSet and trying to reconstruct it late.

2. There was a problem printing the personality function.  The current
   logic to print out the personality function from the DWARF information
   is a bit of a cesspool right now that duplicates a bunch of other 
   logic in the asm printer.  The short version of it is that it depends
   on emitting both the L and _ prefix for symbols (at least on darwin)
   and until I can untangle it, it is best to switch the mangler back to
   emitting both prefixes.

llvm-svn: 75646
2009-07-14 18:17:16 +00:00
Daniel Dunbar eb3e4271e8 Revert r7561{9,8,7,6}, which depend on r75610.
--- Reverse-merging r75619 into '.':
U    lib/Target/DarwinTargetAsmInfo.cpp
U    lib/CodeGen/AsmPrinter/AsmPrinter.cpp
--- Reverse-merging r75618 into '.':
U    lib/CodeGen/ELFWriter.cpp
U    lib/CodeGen/MachOCodeEmitter.cpp
U    lib/CodeGen/MachOWriter.cpp
--- Reverse-merging r75617 into '.':
U    lib/Target/CBackend/CBackend.cpp
--- Reverse-merging r75616 into '.':
U    tools/bugpoint/Miscompilation.cpp
U    tools/lto/LTOCodeGenerator.cpp
U    tools/lto/LTOModule.cpp

llvm-svn: 75638
2009-07-14 16:25:11 +00:00
Chris Lattner 0639a72834 rename getValueName -> getMangledName
llvm-svn: 75616
2009-07-14 06:19:07 +00:00
Dan Gohman e2d31aa132 #include "llvm/Assembly/Writer.h" to get the declaration for WriteAsOperand.
llvm-svn: 75542
2009-07-13 22:56:37 +00:00
Owen Anderson b258410a1b Fix the build.
llvm-svn: 75536
2009-07-13 22:40:32 +00:00
Owen Anderson 53a52215b5 Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.

llvm-svn: 75445
2009-07-13 04:09:18 +00:00
Daniel Dunbar 9dc326fbaa Fix unused function warning.
llvm-svn: 75386
2009-07-11 21:24:52 +00:00
David Goodwin 73f4e3f442 Support remote execute for ARM.
llvm-svn: 75292
2009-07-10 21:39:28 +00:00
Owen Anderson 1e5f00e7a7 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
llvm-svn: 75200
2009-07-09 23:48:35 +00:00
Owen Anderson b17f32945f Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
llvm-svn: 75025
2009-07-08 19:03:57 +00:00
Owen Anderson 5948fdf68b Push LLVMContext through GlobalVariables and IRBuilder.
llvm-svn: 74985
2009-07-08 01:26:06 +00:00
Chris Lattner a76611a535 switch the .ll parser into SMDiagnostic.
llvm-svn: 74734
2009-07-02 22:46:18 +00:00
Owen Anderson 2a15443aa8 Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
moment, that I will need to make far-reaching changes.

llvm-svn: 74655
2009-07-01 23:13:44 +00:00
Owen Anderson 1cf085d558 Hold the LLVMContext by reference rather than by pointer.
llvm-svn: 74640
2009-07-01 21:22:36 +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
Nick Lewycky 4099c7c229 Fix the crash debugger to actually bisect globals once it's determined that it
can't just eliminate all global initializers.

llvm-svn: 72378
2009-05-25 06:29:56 +00:00
Nick Lewycky 6e090c9117 Add a bisection step on the list of instructions before doing the linear
simplification. It's not clear to me whether this can replace the first of the
linear instruction simplification stages or not, so I left it in.

llvm-svn: 72377
2009-05-25 05:30:00 +00:00
Torok Edwin 6ee6f73973 Make bugpoint emit a bugpoint-reduced-blocks.bc, because bugpoint itself
can crash during instruction simplification (for example if it creates a
broken module).

llvm-svn: 72362
2009-05-24 09:40:47 +00:00
Torok Edwin 5bd3f7b4a2 Add -disable-global-remove option to bugpoint.
Sometimes when bugpointing a crash the bugpoint-reduced-simplified.bc reproduces
a totally different bug than the original one ("GV doesn't have initializer").
Although its useful to report that bug too, I need a way to reduce the original
bug, hence I introduced -disable-global-remove.

llvm-svn: 72361
2009-05-24 09:31:04 +00:00
Evan Cheng 127df07e56 bugpoint for jit should just ignore GCC arguments.
llvm-svn: 70988
2009-05-05 18:35:36 +00:00
Dan Gohman 6019e07b3b Improve bugpoint's error messages when it runs out of memory,
or when some other std::exception is thrown.

llvm-svn: 70175
2009-04-27 01:30:37 +00:00
Dan Gohman 956ae9dc15 Use CloneModule's ValueMap in more places, instead of looking
up functions by name.

llvm-svn: 69805
2009-04-22 15:57:18 +00:00
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