John Criswell
b6d3cb9449
Modified the linker so that it always links in an object from an archive
...
that defines the symbol "main." This is a hack that ensures that programs
that place their main function in a library and then link it in
(i.e. Apache 2.x) get their main function linked in.
There is probably a more correct way to do this, but this works for now.
llvm-svn: 10594
2003-12-23 17:37:06 +00:00
Chris Lattner
bd03ac8567
Rename method
...
llvm-svn: 10593
2003-12-23 09:41:45 +00:00
Chris Lattner
e5ac39d664
There is no reason to add -load support to LLC
...
llvm-svn: 10483
2003-12-15 23:10:25 +00:00
Brian Gaeke
1f147379b7
Add an assertion to make sure we are at least getting argv[0] right.
...
Use a clearer error message when we fail to load a program.
llvm-svn: 10414
2003-12-12 00:47:19 +00:00
Chris Lattner
ed9fc4baad
Run tailcall elimination in a more logical place
...
llvm-svn: 10402
2003-12-11 17:50:32 +00:00
Chris Lattner
98cd4bf06f
Make 'opt -o -' work correctly instead of creating a file named './-'
...
llvm-svn: 10359
2003-12-10 14:41:33 +00:00
John Criswell
7dd715180d
Added the -h option for compatibility with other linkers.
...
llvm-svn: 10335
2003-12-09 15:39:11 +00:00
Chris Lattner
69d47e7314
Bugpoint had appalingly bad grammar. Fix some of it.
...
llvm-svn: 10308
2003-12-07 02:43:09 +00:00
Chris Lattner
233b069113
Do not leave a bunch of crud lying around
...
llvm-svn: 10307
2003-12-07 02:31:03 +00:00
Chris Lattner
b762ddbdf1
It is now after pldi. This issue has been fixed, so remove the hack
...
llvm-svn: 10306
2003-12-07 01:44:18 +00:00
Tanya Lattner
c970a38824
New command line parsing. This isn't as perfect as I would have liked. The CommandLine Library needs to be extended, in order to parse the options and allow for optional dashes. In addition, the help option isn't correct since I do the parsing mostly myself. But this is in the ocorrect ar format.
...
llvm-svn: 10297
2003-12-06 23:01:25 +00:00
Chris Lattner
58efc9e0fe
be 3.4 happy
...
llvm-svn: 10265
2003-11-29 20:04:13 +00:00
Chris Lattner
982b285232
Fix compatibility with gcc 3.4
...
llvm-svn: 10262
2003-11-29 19:45:47 +00:00
Chris Lattner
8abd7dca76
The function resolving pass must be run, even if -disable-opt is specified
...
llvm-svn: 10250
2003-11-28 09:44:03 +00:00
Chris Lattner
fcaa6fbbd8
* The return value of LinkLibraries is ignored, so remove it.
...
* Finegrainify namespacification of Linker.cpp
* If linking a library in fails, do not STOP LINKING IN LIBRARIES AND
CONTINUE ANYWAY! Instead, just output the warning, and keep going. :)
llvm-svn: 10249
2003-11-28 07:44:09 +00:00
Misha Brukman
c10bf39a7d
I'm gonna be picky and say we don't really need that trailing slash "lib/"
...
llvm-svn: 10196
2003-11-24 05:31:57 +00:00
Misha Brukman
44a562bba6
Make sure we ONLY add a `-load' switch to the JIT command line if the file is
...
verified as having an ELF header. This fixes PR151.
llvm-svn: 10195
2003-11-24 05:29:42 +00:00
Chris Lattner
3f1ad878ac
Do not DESTROY programs by default. No wonder bugpoint was not being useful all this time!
...
llvm-svn: 10175
2003-11-23 04:51:05 +00:00
Chris Lattner
db8a179838
Revert the previous patch since it causes lots of miscompilations. :( :(
...
llvm-svn: 10172
2003-11-22 19:07:47 +00:00
Chris Lattner
7b233af247
Do not crash when dealing with invoke and unwind instructions!
...
llvm-svn: 10160
2003-11-22 02:10:38 +00:00
Chris Lattner
1e6089c2d6
Use new interfaces
...
llvm-svn: 10159
2003-11-22 02:10:26 +00:00
Chris Lattner
52b4fb3fde
Reorder passes a bit. In particular, it makes sense to run globaldce IMMEDIATELY after funcresolve. Also, run the mem2reg pass _early_ so that IPCP and DAE actually do stuff.
...
Run instcombine and simplify cfg after this to cleanup the intraprocedural messes we create.
llvm-svn: 10134
2003-11-21 21:44:35 +00:00
Misha Brukman
1df12628a0
When writing out the runner script, add -load=<lib> lines to pull in all the
...
shared objects automagically, so it doesn't have to be done by hand.
llvm-svn: 10114
2003-11-20 19:08:42 +00:00
Misha Brukman
c0e6157f99
Add ability to search only for native shared object, and expose the
...
functionality to the rest of gccld.
llvm-svn: 10113
2003-11-20 19:08:06 +00:00
Misha Brukman
aa525937c7
For consistency, removed space between function name and left paren in function
...
call, i.e. [ addPass (...) ] => [ addPass(...) ]
llvm-svn: 10105
2003-11-20 06:26:15 +00:00
Misha Brukman
d16a03727b
* Doxygenified comments, simplifying them and shortening in the process
...
* Eliminated extra space
llvm-svn: 10104
2003-11-20 06:21:54 +00:00
Brian Gaeke
d2553359a8
Unbreak the "-" as filename hack.
...
llvm-svn: 10099
2003-11-19 22:15:00 +00:00
Brian Gaeke
618026afb2
Also print an error msg. for files we cannot currently deal with.
...
llvm-svn: 10097
2003-11-19 21:57:30 +00:00
Brian Gaeke
55447b4541
Fix PR134, by checking FileOpenable() on each input file before analyzing its
...
type.
llvm-svn: 10096
2003-11-19 21:52:09 +00:00
Brian Gaeke
747777795f
Include Support/FileUtilities.h.
...
Print module identifier in DumpSymbolNamesFromModule().
In DumpSymbolNamesFromFile(), check whether it is an archive or a bytecode
file, and call the corresponding reader function (ParseBytecodeFile or
ReadArchiveFile).
Unconditionally set MultipleFiles for archives.
Fixes PR117.
llvm-svn: 10044
2003-11-16 23:34:13 +00:00
Brian Gaeke
eb3de8f39a
Add a -verify option to verify the results of gccld passes.
...
Add a -disable-opt option to turn off gccld optimization passes.
llvm-svn: 10040
2003-11-16 23:07:28 +00:00
Brian Gaeke
7ff0d09adc
When we find a module we want, in an archive, in verbose mode,
...
print out the module's identifier (which should now contain the name
of both the archive and the module.)
Wrap some lines at 80 cols.
llvm-svn: 10039
2003-11-16 23:07:13 +00:00
Chris Lattner
093cc6dc92
As the comments indicate, this is a temporary, repulsive, hack
...
llvm-svn: 9982
2003-11-13 19:26:54 +00:00
Chris Lattner
7cb5070672
Restore the -llvm option
...
llvm-svn: 9915
2003-11-12 04:59:59 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke
da3f675edd
Move IsArchive, IsBytecode to FileUtilities. Fix up some method comments.
...
llvm-svn: 9902
2003-11-11 21:54:01 +00:00
Misha Brukman
895b12faff
'Tis quite silly to check for a cached version of the entire executable. That
...
amounts to checking for a completely-native version. We'll cache on a
function-by-function basis instead (in the JIT's CodeEmitter).
llvm-svn: 9894
2003-11-11 18:38:56 +00:00
Brian Gaeke
ec21f8e9bf
This version of Linker.cpp works a lot better, but it's a little messy. Sorry.
...
Use FileOpenable() instead of FileExists().
Create IsBytecode() predicate -- like IsArchive(), but for bytecode files.
Use IsBytecode() before trying to load any file as a bytecode file.
llvm-svn: 9893
2003-11-11 18:27:37 +00:00
Misha Brukman
8bbd8c2689
The caching will not live in LLEE's execve() handler; that's suboptimal.
...
llvm-svn: 9890
2003-11-11 18:23:09 +00:00
Chris Lattner
b2d575769b
Give gccld more guts
...
llvm-svn: 9835
2003-11-09 19:55:09 +00:00
Chris Lattner
7985d3664d
Add new command line option
...
llvm-svn: 9754
2003-11-06 20:29:25 +00:00
Brian Gaeke
6f54518e08
Give this header file an Emacs mode-line.
...
llvm-svn: 9749
2003-11-05 22:13:10 +00:00
Brian Gaeke
1d9515b0a1
Do not assume the first file is a bytecode file. Instead, construct a dummy
...
Module and link things into that.
Also, fix a typo in an error message.
llvm-svn: 9748
2003-11-05 22:13:00 +00:00
Brian Gaeke
31af708ef6
Shorten and correct some function-header comments.
...
Make "verbose" output MUCH nicer. Now it tells you when you are linking a
bytecode file, or an archive, and whether it's because you called it by name,
or because you gave it a -l option, and it says "Trying" before it takes
action and prints a message in the past tense afterwards.
Make LinkFiles not skip the first file in Files.
Make LinkFiles warn you if it can't find a file and LLVM_LIB_SEARCH_PATH is
unset.
llvm-svn: 9747
2003-11-05 22:12:52 +00:00
Chris Lattner
2920100e4d
I hate it when bugpoint is all ready to give me a bytecode file, then crashes
...
in final cleanups. Then you had to run the whole mess again with
-disable-final-cleanups.
This makes bugpoint run the cleanups in a protected environment so that if
they crash, bugpoint itself doesn't crash. This makes things much happier,
implements a FIXME, and gets rid of YABPO (yet another bugpoint option).
llvm-svn: 9743
2003-11-05 21:45:35 +00:00
Chris Lattner
debac38f5e
Simplify the performFinalCleanups interface
...
llvm-svn: 9740
2003-11-05 21:15:19 +00:00
Chris Lattner
c17fe1cdfe
Make -r work, fixing PR 91
...
llvm-svn: 9724
2003-11-05 06:05:21 +00:00
Chris Lattner
cbf2aeb684
If linking a library, do not link other libraries, like libc, into it!
...
This fixes lots of annoying warnings and error messages
llvm-svn: 9677
2003-11-03 17:27:17 +00:00
Chris Lattner
9061d70325
never print zero executions blocks
...
llvm-svn: 9626
2003-10-31 00:34:05 +00:00
Chris Lattner
a36f81a3ea
Simplify code
...
llvm-svn: 9625
2003-10-31 00:20:09 +00:00
Chris Lattner
34e1549e1b
Add percentage info
...
llvm-svn: 9624
2003-10-31 00:13:26 +00:00
Chris Lattner
0575f97e4b
Hrm, some of my counters are wrapping around 32 bits
...
llvm-svn: 9623
2003-10-31 00:06:57 +00:00
Chris Lattner
babc99cf80
If only have function profile, don't print out "not executed" for all of the blocks :)
...
llvm-svn: 9622
2003-10-30 23:44:28 +00:00
Chris Lattner
2a5767e4f1
Add the ability to print out llvm code when the -annotated-llvm option is given
...
llvm-svn: 9621
2003-10-30 23:42:09 +00:00
Chris Lattner
a79d2b54d2
Add the ability to synthesize function counts from block count information
...
llvm-svn: 9595
2003-10-29 21:47:44 +00:00
Chris Lattner
e4fb19033e
Print the top 20 most frequently executed blocks. Fix sort predicate problem
...
llvm-svn: 9594
2003-10-29 21:41:17 +00:00
Chris Lattner
c88f7bb317
Cleanup output a bit
...
llvm-svn: 9567
2003-10-28 22:53:49 +00:00
Chris Lattner
5564406f6e
Add the ability for users to specify a specific argv[0] to pass into the
...
program
llvm-svn: 9565
2003-10-28 22:51:44 +00:00
Chris Lattner
2343a0eed2
Print out command lines used to run the programs
...
llvm-svn: 9562
2003-10-28 22:30:37 +00:00
Brian Gaeke
8fb7af1ee7
Fix extract to use the right TargetData, like Bugpoint does.
...
llvm-svn: 9561
2003-10-28 22:22:16 +00:00
Chris Lattner
2091cc4310
Add support for reading block frequencies. Fix bug in attribution of counts
...
to functions
llvm-svn: 9559
2003-10-28 21:25:23 +00:00
Chris Lattner
8b8a777e41
Provide an accessor for getting function count information. Print a simple
...
report
llvm-svn: 9557
2003-10-28 21:08:18 +00:00
Chris Lattner
fc8bd0622f
Read in the bytecode and profile information, but don't do anything with
...
it yet.
llvm-svn: 9556
2003-10-28 20:13:07 +00:00
Chris Lattner
f6c89c91ae
Build the llvm-prof directory
...
llvm-svn: 9552
2003-10-28 19:16:49 +00:00
Chris Lattner
14b392fdea
Initial checkin of llvmprof stub
...
llvm-svn: 9551
2003-10-28 19:16:35 +00:00
Chris Lattner
3c0254e47e
Reorder #includes, drop unneeded one
...
llvm-svn: 9548
2003-10-28 19:08:15 +00:00
Chris Lattner
4f50ebda32
Do not print out lists with thousands of elements in them, that's kinda silly
...
llvm-svn: 9523
2003-10-27 04:44:59 +00:00
Brian Gaeke
055148bdc1
TraceMode, as you may have heard, is history.
...
ExecutionEngine::create no longer takes a TraceMode argument.
llvm-svn: 9495
2003-10-24 20:00:17 +00:00
Brian Gaeke
275811125d
lli -q is history. Rebuild your gccld shell scripts, folks!
...
llvm-svn: 9494
2003-10-24 20:00:06 +00:00
Chris Lattner
b1e8187c31
Turn on the inliner by default at link-time
...
llvm-svn: 9477
2003-10-24 18:09:23 +00:00
Chris Lattner
95ee0b0288
Turn on the IPCP pass by default. It has passed all of the tests
...
llvm-svn: 9435
2003-10-23 18:25:57 +00:00
Chris Lattner
f3e8f97d7e
Fix an assertion failure in Bugpoint
...
llvm-svn: 9406
2003-10-23 15:42:55 +00:00
Chris Lattner
638b5374d8
Delete the -print-cfg pass from this file
...
llvm-svn: 9372
2003-10-22 16:02:58 +00:00
Chris Lattner
f1a80fc54e
New library needed
...
llvm-svn: 9364
2003-10-22 03:40:33 +00:00
Brian Gaeke
9e10b9a96f
Fix off-by-one error in processing of libraries named on command line.
...
llvm-svn: 9351
2003-10-21 21:07:12 +00:00
Brian Gaeke
9a0bdb1aca
Fix the first FIXME in this file: automatically pick a "good"
...
interpreter by default, by picking the first one that works
from a hard-coded list.
llvm-svn: 9337
2003-10-21 17:41:35 +00:00
John Criswell
abe5cdcf21
Added LLVM copyright to Makefiles.
...
llvm-svn: 9314
2003-10-20 22:29:16 +00:00
John Criswell
567fe2f312
Removed extraneous comment line.
...
llvm-svn: 9308
2003-10-20 20:40:30 +00:00
Misha Brukman
098cafd62b
Made error message more comprehensible.
...
llvm-svn: 9299
2003-10-20 19:43:47 +00:00
Chris Lattner
8f71f04961
fix file header
...
llvm-svn: 9294
2003-10-20 17:58:43 +00:00
Chris Lattner
ebec8030d6
fix file headers
...
llvm-svn: 9293
2003-10-20 17:57:13 +00:00
Chris Lattner
22feb17ea4
Fix file header
...
llvm-svn: 9292
2003-10-20 17:52:11 +00:00
John Criswell
09344dcf97
Added copyright header to all C++ source files.
...
llvm-svn: 9291
2003-10-20 17:47:21 +00:00
Chris Lattner
4705141f28
Don't bother forwarding function references which are external to the program entirely
...
llvm-svn: 9274
2003-10-19 23:32:50 +00:00
Chris Lattner
2b97d6e7cd
Ok, return an explicit path to the shared object, unbreaking code generator
...
debugging with the JIT
llvm-svn: 9273
2003-10-19 21:54:13 +00:00
Chris Lattner
a4004f6678
Fix iterator invalidation problem
...
llvm-svn: 9272
2003-10-19 21:48:27 +00:00
Chris Lattner
a9a7c92cea
Update compile information
...
llvm-svn: 9247
2003-10-18 21:55:47 +00:00
Chris Lattner
849619e23e
Add usage blurb
...
llvm-svn: 9246
2003-10-18 21:55:35 +00:00
Chris Lattner
667ad30e5a
Print -fno-strict-aliasing as well
...
llvm-svn: 9243
2003-10-18 21:08:57 +00:00
Chris Lattner
759b9931fe
Don't leave a trail of bugpoint-execution-output-* breadcrumbs all over the place
...
llvm-svn: 9242
2003-10-18 21:02:51 +00:00
Chris Lattner
9e52550555
Change run-lli -> run-int
...
Many people associate lli with the jit, so we don't want to suprise them
llvm-svn: 9238
2003-10-18 20:30:48 +00:00
Chris Lattner
16d36a1875
Default to using the CBE instead of the Interpreter if no -run-* option is specified
...
llvm-svn: 9237
2003-10-18 20:18:20 +00:00
Chris Lattner
bb831b9cf9
If we detect a pass crash during miscompilation testing, immediately enter the
...
crash debugger
llvm-svn: 9234
2003-10-18 19:27:48 +00:00
Chris Lattner
54cbc41d05
Fix bug in my checkin
...
llvm-svn: 9217
2003-10-18 00:14:13 +00:00
Chris Lattner
ea48572a80
Another formatting fix
...
llvm-svn: 9216
2003-10-18 00:05:05 +00:00
Chris Lattner
92a9f7adc4
More cleanups
...
llvm-svn: 9215
2003-10-17 23:07:47 +00:00
Chris Lattner
7d147aec11
Be more helpful if a pass fails while chasing down a miscompilation
...
llvm-svn: 9214
2003-10-17 23:03:16 +00:00
Chris Lattner
4aae1f45b7
Make llvm-nm work in "pipe mode"
...
llvm-svn: 9172
2003-10-16 18:45:23 +00:00
Chris Lattner
06bd29b53b
Geeze, what is with Brian and these ifdef's?
...
llvm-svn: 9169
2003-10-16 18:27:24 +00:00
Chris Lattner
f4aa7404db
Welcome llvm-nm to the family
...
llvm-svn: 9161
2003-10-16 17:46:21 +00:00
Chris Lattner
3f8b7c24f6
Unfortunately, it looks like level raise is still needed :(
...
llvm-svn: 9158
2003-10-16 16:50:34 +00:00
Brian Gaeke
0af759d3af
Okay, this is a little hack that "scratches an itch" of mine.
...
I dislike having to examine the output of "dis" to see what symbols
are in a bytecode file. So, here is a first cut at a "nm" utility for llvm.
Flame away.... :-)
llvm-svn: 9153
2003-10-16 04:43:15 +00:00
Chris Lattner
3334c884bc
Give this file a proper header
...
llvm-svn: 9141
2003-10-15 21:49:57 +00:00
Chris Lattner
4973805acd
The levelraise pass is a broken old piece of crufty code that should be
...
left on the side of the road without a second thought.
It is preventing forward progress, so for now, we will disable it by default.
llvm-svn: 9140
2003-10-15 21:48:38 +00:00
Brian Gaeke
adbbfebfae
Flush output after writing out the list of function names.
...
llvm-svn: 9138
2003-10-15 20:42:48 +00:00
Chris Lattner
dc92fa6473
add support forloading additional .so files on the command line
...
llvm-svn: 9131
2003-10-14 22:24:31 +00:00
Chris Lattner
3f6e522257
Change the execute methods to take the shared object filename by const reference.
...
Other adjustments to work with the new ToolRunner interfaces
llvm-svn: 9130
2003-10-14 21:59:36 +00:00
Misha Brukman
5b255e59ac
Enabling incremental bytecode loading in the JIT:
...
* Use the incremental bytecode reader interface to speed up execution
llvm-svn: 9127
2003-10-14 21:39:53 +00:00
Chris Lattner
f8a84dbff3
The return value of compileSharedObject was never used. Return the shared
...
object's name instead
llvm-svn: 9120
2003-10-14 21:09:11 +00:00
Chris Lattner
6ad91d7166
minor cleanups
...
llvm-svn: 9118
2003-10-14 21:01:51 +00:00
Chris Lattner
67cc196bf7
Fix minor formatting bug
...
llvm-svn: 9116
2003-10-14 20:55:56 +00:00
Chris Lattner
2ed0642a95
Eliminate the bugpoint -mode option, by making bugpoint automatically infer the root of all of your problems
...
llvm-svn: 9115
2003-10-14 20:52:55 +00:00
Chris Lattner
6ca0b8738a
Unbreak code generator debug mode
...
llvm-svn: 9106
2003-10-13 21:04:26 +00:00
Brian Gaeke
c4501c936f
Don't include <stdlib.h>.
...
llvm-svn: 9038
2003-10-10 19:12:45 +00:00
Brian Gaeke
2797c131ef
Don't include "Config/stdlib.h".
...
llvm-svn: 9037
2003-10-10 19:12:22 +00:00
Brian Gaeke
81d153e37f
Rewrite head-of-file comment.
...
Include <cstdio> instead of <stdio.h>.
llvm-svn: 9033
2003-10-10 18:47:08 +00:00
Chris Lattner
e01ba00b87
Add a new -disable-inlining option
...
llvm-svn: 9028
2003-10-10 18:18:53 +00:00
Misha Brukman
8b2bd4ed47
Fix spelling.
...
llvm-svn: 9027
2003-10-10 17:57:28 +00:00
Misha Brukman
d67697411a
Fix grammar.
...
llvm-svn: 9026
2003-10-10 17:56:49 +00:00
Misha Brukman
3a0677e0da
Renamed dis.cpp => llvm-dis.cpp
...
llvm-svn: 9017
2003-10-10 17:30:10 +00:00
Misha Brukman
71563f49b2
Renamed as.cpp => llvm-as.cpp; this should've happened a long time ago.
...
llvm-svn: 9016
2003-10-10 17:28:53 +00:00
Brian Gaeke
068546cf78
Make more error messages have gccld's name in them.
...
Add a newline after "Cannot find <library>".
llvm-svn: 8968
2003-10-08 19:09:30 +00:00
Chris Lattner
10bd1c2c4e
This header file moved. Thanks to Bill and Nightly tester for noticing
...
llvm-svn: 8920
2003-10-07 13:45:51 +00:00
Misha Brukman
e4edb3f3db
Doxygen-ified comments.
...
llvm-svn: 8778
2003-09-30 18:09:32 +00:00
Misha Brukman
21663634c5
* Ordered includes according to LLVM style
...
* Put function signatures on one line if possible
* Deleted empty comment lines (^//$)
* Deleted braces around single statements
* Deleted space between function call and argument list
llvm-svn: 8775
2003-09-30 17:59:25 +00:00
Misha Brukman
143af9cf13
Made code more terse:
...
* Deleted empty comment lines
* No single begin-braces '{' on a line by themselves
llvm-svn: 8773
2003-09-30 17:51:20 +00:00
Misha Brukman
33b9647a45
Doxygen-ified function comments.
...
llvm-svn: 8771
2003-09-30 17:42:57 +00:00
Misha Brukman
af3b3bdf6d
Removed extra space in comments.
...
llvm-svn: 8770
2003-09-30 17:40:12 +00:00
Chris Lattner
f5f4cbb055
Remove initials from source file
...
llvm-svn: 8769
2003-09-30 17:36:51 +00:00
Misha Brukman
a307080d60
Make code more terse:
...
* Remove extra blank lines
* Delete space between function call and arg list
* Delete non-content comment lines ("//")
llvm-svn: 8768
2003-09-30 17:33:12 +00:00
Brian Gaeke
484f2c7442
1. Use better error messages in LinkFiles().
...
2. I think the caller of LinkFiles() should not ignore a true return value.
(If you have a good reason why it ought to, feel free to revert
this. It's just something that's been bugging me for a while.)
llvm-svn: 8760
2003-09-30 14:03:48 +00:00
Chris Lattner
cc83d5f3e2
Update file headers for renamed files.
...
llvm-svn: 8758
2003-09-30 03:24:28 +00:00
Misha Brukman
5bc6a8fa38
Use the newly abstracted interface for running our tools and gcc.
...
llvm-svn: 8756
2003-09-29 22:40:52 +00:00
Misha Brukman
64adfee893
* Added an interface for how LLEE would communicate with the OS
...
* Implemented the interface in StorageProxy.c
* Removed the script `llee' as it is now created by the Makefile
* Makefile now compiles a shared object version of the library, but only if
using gcc-3.3, linking fails under gcc-3.2
llvm-svn: 8751
2003-09-29 22:37:00 +00:00
Misha Brukman
b3541d4264
Tersified code:
...
* Removed space between function name and its argument list
* Removed space between '&' and variable name
* Removed empty comment lines: `//'
llvm-svn: 8750
2003-09-29 22:26:24 +00:00
Misha Brukman
0575c6c432
* Ordered includes according to LLVM programmers' guide
...
* Made code layout more verbose: no more '{' on a line by itself
* Pruned extra whitespace
llvm-svn: 8748
2003-09-29 22:16:43 +00:00
Misha Brukman
f75d52eceb
Squelch warnings.
...
llvm-svn: 8729
2003-09-27 22:26:37 +00:00
Misha Brukman
c2186e3110
To be consistent with the rest of LLVM codebase (and the rest of this file):
...
* Changed tabs to spaces
* Removed a space between a function call and its arguments (...)
llvm-svn: 8712
2003-09-25 18:10:34 +00:00
Misha Brukman
08993c8068
Squelch warning and delete extra space.
...
llvm-svn: 8685
2003-09-23 17:27:02 +00:00
Chris Lattner
65d93e208b
Minor cleanups:
...
* Local header file goes at top
* Remove unneeded #includes
* Wrap code at 80 columns
* Declare variables where they are used
* 'register' is not needed
* Use 'unsigned' instead of 'int' variables where possible
llvm-svn: 8657
2003-09-22 20:21:34 +00:00
Chris Lattner
25963c85e3
Now that the TCE pass passes all of the tests, add it to GCCAS
...
llvm-svn: 8621
2003-09-20 05:26:22 +00:00
Chris Lattner
825937df8e
Fix file header
...
llvm-svn: 8613
2003-09-20 02:42:54 +00:00
John Criswell
17c3d4dfc1
New header file for gccld.
...
llvm-svn: 8610
2003-09-19 20:24:40 +00:00
John Criswell
b533bde540
Removed linking functionality from gccld.cpp and moved it to linker.cpp.
...
Renamed functions that were all lower-case.
Moved functions from util.cpp into linker.cpp or gccld.cpp.
Removed util.h and created gccld.h.
Refactored the linker functionality in linker.cpp so that it is easier to
follow, easier to modify, and it's library/object file search behavior is
easier to understand and document.
Added code to include library paths when doing native linking, but this
causes problems and is currently #ifdef'd out.
llvm-svn: 8609
2003-09-19 20:24:23 +00:00
John Criswell
8ecc30249f
Refactored gccld into three C++ source files.
...
Added code ignore bytecode link failures when generating native code.
Moved native code and bytecode generation out of the main() function.
llvm-svn: 8595
2003-09-18 16:22:26 +00:00
John Criswell
a2748c267b
Replaced the call to strdup() with a new operator followed by a strcpy().
...
This should prevent calls to the new oerator and malloc.
llvm-svn: 8587
2003-09-17 19:14:41 +00:00
John Criswell
0217b1beb3
Added the use of the const keyword.
...
Have gccld find the path to llc and gcc instead of having the library do it.
llvm-svn: 8586
2003-09-17 19:04:22 +00:00
John Criswell
f22d845bd7
Removed the use of the environ variable and instead use the environment array
...
passed into main(). This may (or may not) be more portable, but it looks
nicer.
Added functions to copy the environment array and modify the copy, thus
preserving the environment.
Switched from using system() to using ExecWait().
The code now removes the assembly file generated when using the -native option.
Fixed the remove_env() function: The previous revision truncated the
environment variable list. This version just zaps the variable as intended.
llvm-svn: 8579
2003-09-17 15:20:51 +00:00
Chris Lattner
8552e7c6df
Use new method
...
llvm-svn: 8573
2003-09-17 05:00:07 +00:00
John Criswell
1997a34e26
Added the -native option.
...
With this option, gccld links the program into LLVM bytecode and a native code
binary. This allows llvmgcc to correctly tell GNU configure scripts when
things aren't defined properly (because the native link will fail).
llvm-svn: 8570
2003-09-16 21:27:35 +00:00
Misha Brukman
c6547505e6
`link' is now `llvm-link'.
...
llvm-svn: 8556
2003-09-16 15:21:52 +00:00
Misha Brukman
df8eee614c
`link' has become `llvm-link'.
...
llvm-svn: 8555
2003-09-16 15:21:21 +00:00
Misha Brukman
cf0c744c42
`link' is being renamed to `llvm-link'.
...
llvm-svn: 8541
2003-09-15 18:34:34 +00:00
Misha Brukman
d5cc6bf0dc
Stop building `as' and `dis' as they have been removed.
...
llvm-svn: 8529
2003-09-15 14:45:00 +00:00
Misha Brukman
5135afaa5a
`dis' is no longer an LLVM tool.
...
llvm-svn: 8528
2003-09-15 14:44:22 +00:00
Misha Brukman
9f0ab6b5db
`as' is no longer an LLVM tool.
...
llvm-svn: 8527
2003-09-15 14:44:05 +00:00
Chris Lattner
cf82b00eb5
Enable the setjmp/longjmp lowering pass
...
llvm-svn: 8521
2003-09-15 04:56:44 +00:00
Tanya Lattner
a3be0508d5
Added llvm-ar to the Makefile
...
llvm-svn: 8506
2003-09-13 03:23:46 +00:00
Tanya Lattner
124ddeff3c
Fixed warning.
...
llvm-svn: 8505
2003-09-13 03:18:56 +00:00
Misha Brukman
46e18d437e
Bugpoint has the ability of generating a plethora of core files, so to
...
avoid filling up the disk, set the max core file size to 0.
llvm-svn: 8503
2003-09-12 20:42:57 +00:00
Chris Lattner
23ff5c1ccb
scalarrepl now includes mem2reg
...
llvm-svn: 8472
2003-09-11 16:46:10 +00:00
Chris Lattner
2f6de8b335
Move the -indvars pass much later to where it is more likely to do good stuff
...
llvm-svn: 8470
2003-09-11 16:34:07 +00:00
Brian Gaeke
ef4327037a
Check in the fix I meant to apply here, but mistakenly applied to
...
tools/extract instead..... heh
llvm-svn: 8464
2003-09-10 21:11:42 +00:00
Chris Lattner
6d2eab62b7
Clean up header, remove extra #include
...
llvm-svn: 8451
2003-09-10 19:42:51 +00:00
Brian Gaeke
ff713ae819
Make createVerifierPass return a FunctionPass *.
...
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner
ad48131254
Reorder #includes to follow LLVM conventions
...
llvm-svn: 8375
2003-09-05 20:08:15 +00:00
Brian Gaeke
e99ca44153
Interpreter, JIT moved to lib/ExecutionEngine (includes -> llvm/ExecutionEngine)
...
Build lli using executionengine library
llvm-svn: 8372
2003-09-05 19:42:34 +00:00
Brian Gaeke
28f8e41203
-abort-on-exception is gone. Rebuild your gccld shell scripts, folks! :-)
...
llvm-svn: 8368
2003-09-05 19:23:03 +00:00
Brian Gaeke
a7669038fc
Make CreateArgv part of lli rather than part of ExecutionEngine.
...
Switch Interpreter and JIT's "run" methods to take a Function and a vector of
GenericValues.
Move (almost all of) the stuff that constructs a canonical call to main()
into lli (new methods "callAsMain", "makeStringVector").
Nuke getCurrentExecutablePath(), enableTracing(), getCurrentFunction(),
isStopped(), and many dead decls from interpreter.
Add linux strdup() support to interpreter.
Make interpreter's atexit handler runner and JIT's runAtExitHandlers() look
more alike, in preparation for refactoring.
atexit() is spelled "atexit", not "at_exit".
llvm-svn: 8366
2003-09-05 18:42:01 +00:00
Brian Gaeke
92f8b30d24
Move EE dtor where it belongs
...
llvm-svn: 8345
2003-09-04 22:57:27 +00:00
Brian Gaeke
e80e5ba7f8
Interpreter cleanups:
...
Get rid of support for DebugMode (make it always off).
Mung some comments.
Get rid of interpreter's PROFILE_STRUCTURE_FIELDS and PerformExitStuff
which have been disabled forever.
Get rid of -abort-on-exception (make it always on).
Get rid of user interaction stuff (debug mode innards).
Simplify Interpreter's callMainFunction().
llvm-svn: 8344
2003-09-04 22:21:24 +00:00
Brian Gaeke
4bd3bd5b5a
ExecutionEngine.cpp: Move execution engine creation stuff into a new
...
static method here.
Remove some extra blank lines.
ExecutionEngine.h: Add its prototype.
lli.cpp: Call it.
Make creation method for each type of EE into a static method of its
own subclass.
Interpreter/Interpreter.cpp: ExecutionEngine::createInterpreter -->
Interpreter::create
Interpreter/Interpreter.h: Likewise.
JIT/JIT.cpp: ExecutionEngine::createJIT --> VM::create
JIT/VM.h: Likewise.
llvm-svn: 8343
2003-09-03 20:34:19 +00:00
John Criswell
a3ce8b48b0
Added code that makes the bytecode file readable (needed by the generated shell
...
script).
Removed the use of sys/types.h and sys/stat.h.
Modified FileExists() so that it uses the access() system call to check for
file existance. This requires less header files and might even be a tad bit
faster.
llvm-svn: 8328
2003-09-02 21:11:22 +00:00
John Criswell
06327da723
Modified the code so that it uses the MakeFileExecutable() method. The new
...
library code now adds all execute bits that are allowed by the umask value to
the file's current permission bits.
llvm-svn: 8325
2003-09-02 20:17:20 +00:00
Chris Lattner
b42862c32d
#include is unnecessary
...
llvm-svn: 8316
2003-09-01 20:45:46 +00:00
Chris Lattner
e722930efd
Preselection is now integrated into the Sparc target library
...
llvm-svn: 8305
2003-09-01 20:30:17 +00:00
Chris Lattner
c7f87d30ab
Sparc peephole optimizer moved out of post-opts library into Sparc target library
...
llvm-svn: 8302
2003-09-01 20:26:14 +00:00
Chris Lattner
ad7b556813
Remove the -stopAfterNPasses option, which has been long obsoleted by bugpoint
...
llvm-svn: 8278
2003-08-31 21:47:24 +00:00
Chris Lattner
6f21fe9278
* move the dead-type-eliminate passes to the end, where they are more useful
...
* add prune-eh and inlining passes
* other minor pass reorganizations
llvm-svn: 8277
2003-08-31 21:45:55 +00:00
John Criswell
c907487c22
"Help keep our secrets secret."
...
Added code to respect the umask value. Before, files were generated world
readable, which may not be desirable for all installations.
llvm-svn: 8215
2003-08-29 14:46:12 +00:00
Misha Brukman
bd779f7819
Renaming `dis' -> `llvm-dis'.
...
llvm-svn: 8197
2003-08-28 22:14:16 +00:00
Misha Brukman
84acf179dd
Build llvm-as and llvm-dis as the upgrade path to renamed tools.
...
llvm-svn: 8192
2003-08-28 21:43:51 +00:00
John Criswell
a289abfc82
Added code to avoid checking for .bc when the filename is too short.
...
llvm-svn: 8190
2003-08-28 21:42:29 +00:00
Misha Brukman
f12549d921
Renaming LLVM `dis' to `llvm-dis'.
...
llvm-svn: 8189
2003-08-28 21:34:13 +00:00
Misha Brukman
9893027b5e
Renaming LLVM `as' to `llvm-as'.
...
llvm-svn: 8188
2003-08-28 21:32:57 +00:00
Chris Lattner
aa6a44f501
Reorder #includes
...
Make sure that we veryify the result before writing it out!
llvm-svn: 8177
2003-08-28 16:25:34 +00:00
Tanya Lattner
57c70a62e0
First version of llvm-ar added to cvs repository.
...
llvm-svn: 8173
2003-08-28 15:22:38 +00:00
Chris Lattner
5c13c941de
Remove some long-dead code
...
llvm-svn: 8135
2003-08-24 19:52:02 +00:00
Chris Lattner
4d4f424f0c
Targets now configure themselves based on the source module, not on the
...
ad-hoc "Config" flags
llvm-svn: 8134
2003-08-24 19:50:53 +00:00
Chris Lattner
9cb8d7d0ac
Targets now configure themselves with the module, not flags
...
llvm-svn: 8133
2003-08-24 19:50:12 +00:00
Chris Lattner
479854091a
Add preliminary support for "any" pointersize/endianness. This will need
...
to change soon though.
llvm-svn: 8123
2003-08-24 14:02:47 +00:00
Chris Lattner
b149240096
Add support for modules with "any" pointersize/endianness
...
llvm-svn: 8122
2003-08-24 14:02:14 +00:00
Chris Lattner
b4d9921728
add preliminary support for -export-dynamic
...
llvm-svn: 8058
2003-08-22 19:18:45 +00:00
Chris Lattner
d1123fde11
Kill warning
...
llvm-svn: 8056
2003-08-22 18:57:43 +00:00
Misha Brukman
188bf100aa
Squash the warning that `Result' may not be initialized on all code paths.
...
llvm-svn: 8042
2003-08-22 03:35:24 +00:00
John Criswell
71c3e6236f
The JIT now passes the environment pointer to the main() function when it
...
starts a program. This allows the GNU env program to compile and JIT under
LLVM.
llvm-svn: 8022
2003-08-21 21:12:30 +00:00
Misha Brukman
90869942e7
Make the bytecode file executable as well for LLEE purposes.
...
llvm-svn: 7992
2003-08-20 20:38:15 +00:00
Chris Lattner
a615c77cde
no-strict-aliasing redux
...
llvm-svn: 7965
2003-08-18 22:32:48 +00:00
Chris Lattner
c8e81ba355
The CBE generates code which violates the TBAA rules of C, thus we must disable
...
optimizations based on these rules. :(
llvm-svn: 7964
2003-08-18 22:32:03 +00:00
Chris Lattner
016ccdfea6
Add new -disable-verify option
...
llvm-svn: 7960
2003-08-18 20:47:13 +00:00