Commit Graph

492 Commits

Author SHA1 Message Date
Dan Gohman
b6dec1bdd6 Pass true to the Internalize parameter of createStandardLTOPasses,
to match llvm-ld's default behavior.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 23:23:47 +00:00
Owen Anderson
8fa3338ed2 Move ConstantStruct back to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 22:29:26 +00:00
Daniel Dunbar
3f53fa9a51 Remove Value::setName(const char*, unsigned).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:34:27 +00:00
Owen Anderson
eed707b1e6 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 23:12:02 +00:00
Daniel Dunbar
f6ccee5a9d Switch to getNameStr().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 08:24:36 +00:00
Owen Anderson
e922c02019 Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:24:57 +00:00
Evan Cheng
49419e28fe 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76629 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 19:25:09 +00:00
David Goodwin
91cf361516 For remote execution, must cd to the executable directory since the exe expects to find a dylib in the CWD ('.').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:15:03 +00:00
Daniel Dunbar
1488670076 Add -std-{compile,link}-opts to bugpoint.
- Sheesh.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76402 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 07:01:01 +00:00
Chris Lattner
e0d5c17921 fix test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 20:19:25 +00:00
Chris Lattner
4285d15703 DisambiguateGlobalSymbols should not mangle intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 20:19:04 +00:00
Viktor Kutuzov
fc2271f3f5 Require a remote command to exit with the exit status of the test program or with 255 if an error occurred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76323 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 18:39:24 +00:00
Dan Gohman
ac95cc79ac Convert more tools code from cerr and cout to errs() and outs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:30:09 +00:00
Owen Anderson
0d7c695c74 To simplify the upcoming context-on-type change, switch all command line tools to using the default global context for now.
This will let us to hardwire stuff to the global context in the short term while the API is sorted out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 22:16:10 +00:00
Dan Gohman
a1bdcedc38 Add a Force option to raw_fd_ostream to specify whether opening
an existing file is considered an error. Convert several tools
to use raw_fd_ostream instead of std::ostream, and to use this
new option instead of doing a manual check.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75801 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:29:42 +00:00
Dan Gohman
65f57c233c Use errs() instead of std::cerr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75791 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 16:35:29 +00:00
Chris Lattner
9d5511b7db eliminate the Mangler::PreserveAsmNames bit, the sole client of this
can do it perfectly well itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 04:50:47 +00:00
Evan Cheng
f975e011fb control reaches end of non-void function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:55:32 +00:00
Owen Anderson
9adc0abad3 Move EVER MORE stuff over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:09:55 +00:00
Viktor Kutuzov
699220b64f Fix for bugpoint -remote-client
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75665 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 19:10:55 +00:00
Chris Lattner
b8158acc23 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 18:17:16 +00:00
Daniel Dunbar
1f316e321a 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 16:25:11 +00:00
Chris Lattner
b5851462d0 rename getValueName -> getMangledName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75616 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 06:19:07 +00:00
Dan Gohman
e860dcb6e4 #include "llvm/Assembly/Writer.h" to get the declaration for WriteAsOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75542 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:56:37 +00:00
Owen Anderson
db1cd5eba5 Fix the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75536 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:40:32 +00:00
Owen Anderson
0a5372ed3e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 04:09:18 +00:00
Daniel Dunbar
84f9abe3f5 Fix unused function warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75386 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 21:24:52 +00:00
David Goodwin
80becf194d Support remote execute for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 21:39:28 +00:00
Owen Anderson
333c400965 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:48:35 +00:00
Owen Anderson
e9b11b4313 Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 19:03:57 +00:00
Owen Anderson
3d29df3e8a Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 01:26:06 +00:00
Chris Lattner
92bcb426c3 switch the .ll parser into SMDiagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74734 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 22:46:18 +00:00
Owen Anderson
4434ed44c4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 23:13:44 +00:00
Owen Anderson
31895e7359 Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:22:36 +00:00
Owen Anderson
8b477ed579 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 16:58:40 +00:00
Nick Lewycky
028839db09 Fix the crash debugger to actually bisect globals once it's determined that it
can't just eliminate all global initializers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-25 06:29:56 +00:00
Nick Lewycky
4c8f9af6e0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-25 05:30:00 +00:00
Torok Edwin
2c23501031 Make bugpoint emit a bugpoint-reduced-blocks.bc, because bugpoint itself
can crash during instruction simplification (for example if it creates a
broken module).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-24 09:40:47 +00:00
Torok Edwin
23d471f62e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72361 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-24 09:31:04 +00:00
Evan Cheng
26edc21b1b bugpoint for jit should just ignore GCC arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-05 18:35:36 +00:00
Dan Gohman
0324205bbb Improve bugpoint's error messages when it runs out of memory,
or when some other std::exception is thrown.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27 01:30:37 +00:00
Dan Gohman
d50330cd02 Use CloneModule's ValueMap in more places, instead of looking
up functions by name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22 15:57:18 +00:00
Nick Lewycky
e032590f58 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-04 09:39:23 +00:00
Evan Cheng
fd82995823 Also pass -gcc-tool-args when building a shared object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 00:53:34 +00:00
Chris Lattner
cc14d25dd9 Change various llvm utilities to use PrettyStackTraceProgram in
their main routines.  This makes the tools print their argc/argv
commands if they crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 05:34:10 +00:00
Dan Gohman
f6dd0eb5c4 Use CloneModule's ValueMap to avoid needing to look up
functions by name. This fixes PR718.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 02:16:23 +00:00
Dan Gohman
ef0ff140a7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66216 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05 23:20:46 +00:00
Bill Wendling
38efa38c86 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65896 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 23:13:18 +00:00
Dan Gohman
865f006bb4 Eliminate several more unnecessary intptr_t casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 05:09:16 +00:00
Dan Gohman
a971b29425 Rename bugpoint's error message file so that if it somehow
gets left behind, it's less cryptic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-12 20:53:27 +00:00