Chris Lattner
316e3268a8
llvm-ld doesn't throw.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 00:52:28 +00:00
Dan Gohman
baa26395cc
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 15:34:52 +00:00
Chris Lattner
74382b7c69
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 22:45:37 +00:00
Chris Lattner
17e9edc4a7
Change raw_fd_ostream to take flags as an optional bitmask
...
instead of as two bools. Use this to add a F_Append flag
which has the obvious behavior.
Other unrelated changes conflated into this patch:
1. REmove EH stuff from llvm-dis and llvm-as, the try blocks
are dead.
2. Simplify the filename inference code in llvm-as/llvm-dis,
because raw_fd_ostream does the right thing with '-'.
3. Switch machine verifier to use raw_ostream instead of ostream
(Which is the thing that needed append in the first place).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 02:51:22 +00:00
Dan Gohman
8608cf23da
Use (void *)(intptr_t) to cast function addresses to void*
...
for use with sys::Path::GetMainExecutable, to avoid warnings
with -pedantic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78245 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 21:03:39 +00:00
Dan Gohman
197f728d49
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 20:21:17 +00:00
Sanjiv Gupta
d7de7bc297
Added -b option to override the default bitcode output file name.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 18:41:45 +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
Daniel Dunbar
ff9834ab9d
Kill off last uses of TargetMachineRegistry class.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75892 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 02:41:19 +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
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
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
Daniel Dunbar
e0f0e0be1c
Change LTO to run the global opt pass twice.
...
- This matches llvm-ld.
It took a bit of archeology to figure out what the right thing to do was
(whether this was intentionally added or intentionally removed). My final
conclusion is that Chris added this intentionally here:
http://llvm.org/viewvc/llvm-project?view=rev&revision=16913
but the changes weren't propogated to llvm-ld until here:
http://llvm.org/viewvc/llvm-project?view=rev&revision=34058
which was after lto.cpp had been cloned off (of llvm-ld), here:
http://llvm.org/viewvc/llvm-project?view=rev&revision=29494
From the commit message, it looks like the motivation for running global opt
again is because we ran it prior to inlining. Based on that I updated the
comment and also only run the pass if we actually ran the inliner.
Chris, please review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 21:51:32 +00:00
Daniel Dunbar
006a034828
Add createStandardLTOPasses to StandardPasses.h, and move lto and llvm-ld over.
...
- I know it sounds crazy, but I think all the pass lists are now coalesced into
StandardPasses.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 21:06:14 +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
Nick Lewycky
677c2c2a62
Add the function attributes pass during LTO time.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 06:56:16 +00:00
Chris Lattner
5d5a897529
make llvm-ld smart enough to link against native libraries that are
...
not in system library directories by checking -L paths as well.
Patch by Axel Naumann!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61730 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 19:01:32 +00:00
Andrew Lenharth
0c6ba44890
ignore the -m elf_i386 directive used in the linux kernel
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59642 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 17:00:08 +00:00
Oscar Fuentes
3d01fc7de8
Initial support for the CMake build system.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 01:08:49 +00:00
Owen Anderson
3688f268cb
Remove GCSE, ValueNumbering, and LoadValueNumbering. These have been deprecated for almost a year; it's finally time for them to go away.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54822 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-15 21:31:02 +00:00
Owen Anderson
735e6eabf1
Use ADCE instead of just DCE. ADCE will better clean up after jump threading,
...
for instance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53045 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-02 18:42:07 +00:00
Argyrios Kyrtzidis
ca29dffa16
Since we are using GCC to assemble the program, make sure the assembly syntax is AT&T.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52827 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-27 15:08:59 +00:00
Chris Lattner
6c31e87d7c
run mem2reg after the second jump threading pass in llvm-ld.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52728 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-25 16:51:55 +00:00
Chris Lattner
8e336eb04d
remove some dead options.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52726 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-25 16:44:08 +00:00
Argyrios Kyrtzidis
48cca1fd46
Add an "exe" suffix only if the output file has no suffix at all.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52289 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 15:20:16 +00:00
Argyrios Kyrtzidis
1662183a83
Make sure all produced executable files have "exe" suffix on Windows.
...
With this more general way, -native and -native-cbe options are handled too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52287 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 13:48:12 +00:00
Argyrios Kyrtzidis
5b90a7296c
Append "exe" suffix to executable files.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52285 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 12:01:16 +00:00
Owen Anderson
d2368dc344
Move MemCpyOpt after GVN.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50097 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 07:12:26 +00:00
Chris Lattner
e12d8e422d
run the jump threading pass in llvm-ld also
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50027 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 04:28:40 +00:00
Owen Anderson
a723d1e48f
Factor a bunch of functionality related to memcpy and memset transforms out of
...
GVN and into its own pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 08:23:16 +00:00
Andrew Lenharth
230293b4c5
style and spelling
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48562 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 22:32:43 +00:00
Andrew Lenharth
50b5742157
llvm-ld deserves disable-verify too. opt shouldn't have all the fun options.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48550 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 20:49:51 +00:00
Anton Korobeynikov
ae9f3a3b7c
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:08:44 +00:00
Chris Lattner
3992f5231a
Add support for frameworks. Patch by Shantonu Sen!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46421 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-27 22:58:59 +00:00
Chris Lattner
03a1c7ae3d
Fix llvm-ld -Xlinker, patch by Daniel Teske!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45770 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09 01:01:17 +00:00
Chris Lattner
21c62da287
remove attributions from tools.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:44:31 +00:00
Chris Lattner
5116784826
remove attributions from tools/utils makefiles.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45414 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:07:17 +00:00
Dan Gohman
82a13c9c48
Move the space in overview output for commands out of each of the
...
commands and into the common code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-08 15:45:12 +00:00
Owen Anderson
d06eb2c879
Turn GVN on by default.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41787 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-08 22:23:52 +00:00
Owen Anderson
f6a05f949f
Rename FastDSE to just DSE.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40668 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 06:36:51 +00:00
Reid Spencer
0a4c8de81c
Remove dead option.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40415 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-23 04:23:32 +00:00
Owen Anderson
b63c7b695f
Turn on FastDSE by default.
...
Note: FastDSE now equals or exceeds the results of old DSE on all of SPEC2000 and SPEC2006. Unless major problems
show up in the testers, it will likely completely replace old DSE in the near future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-17 21:59:21 +00:00
Gabor Greif
a99be51bf5
Here is the bulk of the sanitizing.
...
Almost all occurrences of "bytecode" in the sources have been eliminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 17:07:56 +00:00
Chris Lattner
3f931b8c0e
Fix pr1448
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37658 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 16:46:48 +00:00
Chris Lattner
037a704f4f
if internalize is disabled, don't run the pass at all!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-06 20:51:14 +00:00
Chris Lattner
44dadffe4b
switch tools to bitcode instead of bytecode
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36868 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:29:57 +00:00
Chris Lattner
bb3f3d357f
add bitcode support.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36853 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:56:58 +00:00
Reid Spencer
3b726396ab
Augment the verbose output to print out the sub-commands executed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36581 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 23:59:47 +00:00
Chris Lattner
c8c5752b2f
run a late dce pass to clean up extra cruft.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35684 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-05 16:50:20 +00:00