Chris Lattner
15ea2aa0ff
Now that tailduplication does not bork SSA form, run mem2reg earlier in gccas.
...
This tremendously improves the code generated by the LLVM optimizer, primarily
by making the inliner more aggressive. For example, it improves the stepanov
benchmark from 55.56 mega-additions/sec to 98.04 Ma/s. It also improves the
oopack/iterator benchmark from 338.3MFLOPS/s to 1103.4MFLOPS/s. Less noteworthy,
it improves oopack/matrix from 573 -> 641 MFLOPS/s.
llvm-svn: 11053
2004-02-01 07:24:53 +00:00
John Criswell
a43fe7d309
Fixed PR#197. The libcrtend library is removed from the library linking list
...
when creating native executables.
llvm-svn: 10979
2004-01-26 23:51:10 +00:00
John Criswell
3a994220ad
Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
...
every file.
llvm-svn: 10976
2004-01-26 20:59:41 +00:00
Chris Lattner
9ec6983d9e
Make sure to verify the result before writing out the bytecode file. Not doing
...
so can cause obscure errors downstream.
llvm-svn: 10840
2004-01-14 03:39:46 +00:00
Chris Lattner
98f2200fb2
finegrainify namespacification
...
llvm-svn: 10839
2004-01-14 03:38:37 +00:00
Chris Lattner
e4a3a98db3
Remove standard C header wrappers
...
llvm-svn: 10748
2004-01-10 19:15:38 +00:00
Chris Lattner
ef4ace0cd9
Remove wrappers around std c files
...
llvm-svn: 10744
2004-01-10 19:12:09 +00:00
Chris Lattner
26d7d42141
Ugh, fix some copy and pasted code that somehow never got compiled or something
...
:(
llvm-svn: 10706
2004-01-06 23:46:17 +00:00
Chris Lattner
56a2afdc26
* Implement set/show args
...
* Implement support for arguments to the 'run' command
* Minor cleanups and fixes
llvm-svn: 10703
2004-01-06 05:37:16 +00:00
Chris Lattner
b699064224
implement the "null command" which repeats the last command
...
llvm-svn: 10702
2004-01-06 05:36:30 +00:00
Chris Lattner
cfeebf332f
/me slaps head
...
llvm-svn: 10694
2004-01-05 05:47:19 +00:00
Chris Lattner
2bbc048d2c
Add new directory
...
llvm-svn: 10688
2004-01-05 05:28:15 +00:00
Chris Lattner
3725336680
Initial checkin of the LLVM Source-Level Debugger. This is incomplete, but
...
a good start. The status is documented in docs/SourceLevelDebugging.html
llvm-svn: 10687
2004-01-05 05:27:31 +00:00
Chris Lattner
3be2513e7d
Remove some pointless #includes
...
llvm-svn: 10653
2003-12-30 07:50:31 +00:00
Chris Lattner
aac7c59bb7
Use getFileSize() instead of sys/stat.h directly
...
llvm-svn: 10652
2003-12-30 07:48:17 +00:00
Chris Lattner
ba378df132
Use new getFileSize function. Eliminate some using directives. Reorder #includes a bit
...
llvm-svn: 10651
2003-12-30 07:45:46 +00:00
Chris Lattner
886cc8ad49
Add a -disable-opt flag to gccas, so that we can use -Wa,-disable-opt just
...
like -Wl,-disable-opt
llvm-svn: 10647
2003-12-30 03:24:27 +00:00
Chris Lattner
2a1a75c9aa
Pass extra arguments around n stuph
...
llvm-svn: 10631
2003-12-28 09:51:04 +00:00
Chris Lattner
66c9cb837b
Factor out code to ExecutionEngine
...
llvm-svn: 10614
2003-12-26 06:49:53 +00:00
Chris Lattner
e0269dd42a
Simplify code
...
llvm-svn: 10613
2003-12-26 06:36:20 +00:00
Chris Lattner
4c0d6c8d46
* eliminate the -f argument to lli, as it was silly and never useful anyway
...
* Inline callMain function
* Remove hack from the ExecutionEngines where the 'run' method would automatically
run atExit functions. Fixing this requires explicitly calling exit if main returns
llvm-svn: 10611
2003-12-26 06:14:47 +00:00
Chris Lattner
d530851235
update comment
...
llvm-svn: 10607
2003-12-26 05:07:35 +00:00
John Criswell
207cf0a20d
Modified the logic so that library objects with main() are only linked in
...
if the program currently has main undefined.
llvm-svn: 10597
2003-12-23 20:27:14 +00:00
John Criswell
8f95f1d2ca
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
148767d3bd
Rename method
...
llvm-svn: 10593
2003-12-23 09:41:45 +00:00
Chris Lattner
ce63e55d3f
There is no reason to add -load support to LLC
...
llvm-svn: 10483
2003-12-15 23:10:25 +00:00
Brian Gaeke
528af07c42
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
1dc6025d53
Run tailcall elimination in a more logical place
...
llvm-svn: 10402
2003-12-11 17:50:32 +00:00
Chris Lattner
effecb429c
Make 'opt -o -' work correctly instead of creating a file named './-'
...
llvm-svn: 10359
2003-12-10 14:41:33 +00:00
John Criswell
90e72c9cba
Added the -h option for compatibility with other linkers.
...
llvm-svn: 10335
2003-12-09 15:39:11 +00:00
Chris Lattner
21819d462c
Bugpoint had appalingly bad grammar. Fix some of it.
...
llvm-svn: 10308
2003-12-07 02:43:09 +00:00
Chris Lattner
d7b71dadf5
Do not leave a bunch of crud lying around
...
llvm-svn: 10307
2003-12-07 02:31:03 +00:00
Chris Lattner
ccff2f467f
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
0499e53fe5
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
5b5415c547
be 3.4 happy
...
llvm-svn: 10265
2003-11-29 20:04:13 +00:00
Chris Lattner
21551f0cd4
Fix compatibility with gcc 3.4
...
llvm-svn: 10262
2003-11-29 19:45:47 +00:00
Chris Lattner
d4174e7703
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
e7ad2f6b04
* 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
1af6ec9cbf
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
407528ec44
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
fe396111ee
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
3eaa9eec80
Revert the previous patch since it causes lots of miscompilations. :( :(
...
llvm-svn: 10172
2003-11-22 19:07:47 +00:00
Chris Lattner
a2120947bb
Do not crash when dealing with invoke and unwind instructions!
...
llvm-svn: 10160
2003-11-22 02:10:38 +00:00
Chris Lattner
50d9290183
Use new interfaces
...
llvm-svn: 10159
2003-11-22 02:10:26 +00:00
Chris Lattner
1b7c6e072b
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
c147a00407
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
f045db38cd
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
19a9eeb585
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
f516afa0c0
* 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
f67fef08c2
Unbreak the "-" as filename hack.
...
llvm-svn: 10099
2003-11-19 22:15:00 +00:00
Brian Gaeke
6669b6c511
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
1b0a946551
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
570e50fc30
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
2016376753
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
c65d049581
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
b6b3b55e95
As the comments indicate, this is a temporary, repulsive, hack
...
llvm-svn: 9982
2003-11-13 19:26:54 +00:00
Chris Lattner
463dc76802
Restore the -llvm option
...
llvm-svn: 9915
2003-11-12 04:59:59 +00:00
Brian Gaeke
d25f86d683
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
dad096c2e1
Move IsArchive, IsBytecode to FileUtilities. Fix up some method comments.
...
llvm-svn: 9902
2003-11-11 21:54:01 +00:00
Misha Brukman
fd7a4f1337
'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
aaa29b094d
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
00298d15e4
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
14ab34bf94
Give gccld more guts
...
llvm-svn: 9835
2003-11-09 19:55:09 +00:00
Chris Lattner
1dd7f6c133
Add new command line option
...
llvm-svn: 9754
2003-11-06 20:29:25 +00:00
Brian Gaeke
4388a20bc3
Give this header file an Emacs mode-line.
...
llvm-svn: 9749
2003-11-05 22:13:10 +00:00
Brian Gaeke
a38dea74cc
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
4f8c392983
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
62b495bd5c
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
c26574d777
Simplify the performFinalCleanups interface
...
llvm-svn: 9740
2003-11-05 21:15:19 +00:00
Chris Lattner
16a148787e
Make -r work, fixing PR 91
...
llvm-svn: 9724
2003-11-05 06:05:21 +00:00
Chris Lattner
dc9da3878f
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
57ab49a333
never print zero executions blocks
...
llvm-svn: 9626
2003-10-31 00:34:05 +00:00
Chris Lattner
ad78f589c2
Simplify code
...
llvm-svn: 9625
2003-10-31 00:20:09 +00:00
Chris Lattner
070a7bbb3a
Add percentage info
...
llvm-svn: 9624
2003-10-31 00:13:26 +00:00
Chris Lattner
9f8be3ae6c
Hrm, some of my counters are wrapping around 32 bits
...
llvm-svn: 9623
2003-10-31 00:06:57 +00:00
Chris Lattner
101db596b9
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
e1e31f80d6
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
dc337f0f06
Add the ability to synthesize function counts from block count information
...
llvm-svn: 9595
2003-10-29 21:47:44 +00:00
Chris Lattner
db34628888
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
1815e9fca1
Cleanup output a bit
...
llvm-svn: 9567
2003-10-28 22:53:49 +00:00
Chris Lattner
a146b08899
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
dc67d609a2
Print out command lines used to run the programs
...
llvm-svn: 9562
2003-10-28 22:30:37 +00:00
Brian Gaeke
a6359018f4
Fix extract to use the right TargetData, like Bugpoint does.
...
llvm-svn: 9561
2003-10-28 22:22:16 +00:00
Chris Lattner
f279ebdc69
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
f6c2a91b0e
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
f3c4c4f96e
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
6522de3349
Build the llvm-prof directory
...
llvm-svn: 9552
2003-10-28 19:16:49 +00:00
Chris Lattner
8b5c356569
Initial checkin of llvmprof stub
...
llvm-svn: 9551
2003-10-28 19:16:35 +00:00
Chris Lattner
f7585e10cf
Reorder #includes, drop unneeded one
...
llvm-svn: 9548
2003-10-28 19:08:15 +00:00
Chris Lattner
1844c58727
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
a53265c402
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
93e3e06b90
lli -q is history. Rebuild your gccld shell scripts, folks!
...
llvm-svn: 9494
2003-10-24 20:00:06 +00:00
Chris Lattner
bc9bb8e370
Turn on the inliner by default at link-time
...
llvm-svn: 9477
2003-10-24 18:09:23 +00:00
Chris Lattner
97d6ee74bb
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
e4da5a79fc
Fix an assertion failure in Bugpoint
...
llvm-svn: 9406
2003-10-23 15:42:55 +00:00
Chris Lattner
a3abd017b1
Delete the -print-cfg pass from this file
...
llvm-svn: 9372
2003-10-22 16:02:58 +00:00
Chris Lattner
d5d03541ed
New library needed
...
llvm-svn: 9364
2003-10-22 03:40:33 +00:00
Brian Gaeke
bbeaf0ce11
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
4034694fef
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
a8dfda0513
Added LLVM copyright to Makefiles.
...
llvm-svn: 9314
2003-10-20 22:29:16 +00:00
John Criswell
569fd0bb5c
Removed extraneous comment line.
...
llvm-svn: 9308
2003-10-20 20:40:30 +00:00
Misha Brukman
4303b02f66
Made error message more comprehensible.
...
llvm-svn: 9299
2003-10-20 19:43:47 +00:00
Chris Lattner
34a5a4c718
fix file header
...
llvm-svn: 9294
2003-10-20 17:58:43 +00:00
Chris Lattner
656ad51b9d
fix file headers
...
llvm-svn: 9293
2003-10-20 17:57:13 +00:00
Chris Lattner
d1b0d59014
Fix file header
...
llvm-svn: 9292
2003-10-20 17:52:11 +00:00
John Criswell
d06dc1136b
Added copyright header to all C++ source files.
...
llvm-svn: 9291
2003-10-20 17:47:21 +00:00
Chris Lattner
091340ca13
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
3a0b78c289
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
84a991bc86
Fix iterator invalidation problem
...
llvm-svn: 9272
2003-10-19 21:48:27 +00:00
Chris Lattner
008529a320
Update compile information
...
llvm-svn: 9247
2003-10-18 21:55:47 +00:00
Chris Lattner
babd7c5dfd
Add usage blurb
...
llvm-svn: 9246
2003-10-18 21:55:35 +00:00
Chris Lattner
4aa68a71a7
Print -fno-strict-aliasing as well
...
llvm-svn: 9243
2003-10-18 21:08:57 +00:00
Chris Lattner
23628ef2fb
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
6dc01b06f7
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
aea6238a66
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
a65c470b02
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
d38efa85f5
Fix bug in my checkin
...
llvm-svn: 9217
2003-10-18 00:14:13 +00:00
Chris Lattner
10c281e015
Another formatting fix
...
llvm-svn: 9216
2003-10-18 00:05:05 +00:00
Chris Lattner
877bfd7e34
More cleanups
...
llvm-svn: 9215
2003-10-17 23:07:47 +00:00
Chris Lattner
2db02886eb
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
2c93d183ac
Make llvm-nm work in "pipe mode"
...
llvm-svn: 9172
2003-10-16 18:45:23 +00:00
Chris Lattner
d7e4cc9339
Geeze, what is with Brian and these ifdef's?
...
llvm-svn: 9169
2003-10-16 18:27:24 +00:00
Chris Lattner
815249e86c
Welcome llvm-nm to the family
...
llvm-svn: 9161
2003-10-16 17:46:21 +00:00
Chris Lattner
e1f71ee070
Unfortunately, it looks like level raise is still needed :(
...
llvm-svn: 9158
2003-10-16 16:50:34 +00:00
Brian Gaeke
d7f07a7f91
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
5e7680e517
Give this file a proper header
...
llvm-svn: 9141
2003-10-15 21:49:57 +00:00
Chris Lattner
b3414f7cb6
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
53682403cf
Flush output after writing out the list of function names.
...
llvm-svn: 9138
2003-10-15 20:42:48 +00:00
Chris Lattner
c44998d315
add support forloading additional .so files on the command line
...
llvm-svn: 9131
2003-10-14 22:24:31 +00:00
Chris Lattner
1a8192c85e
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
f5f7216102
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
60503a16cf
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
beca447374
minor cleanups
...
llvm-svn: 9118
2003-10-14 21:01:51 +00:00
Chris Lattner
b44dd76513
Fix minor formatting bug
...
llvm-svn: 9116
2003-10-14 20:55:56 +00:00
Chris Lattner
32f66afbad
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
5851e74388
Unbreak code generator debug mode
...
llvm-svn: 9106
2003-10-13 21:04:26 +00:00
Brian Gaeke
bb70cb175c
Don't include <stdlib.h>.
...
llvm-svn: 9038
2003-10-10 19:12:45 +00:00
Brian Gaeke
acbc37a19e
Don't include "Config/stdlib.h".
...
llvm-svn: 9037
2003-10-10 19:12:22 +00:00
Brian Gaeke
edc3b79945
Rewrite head-of-file comment.
...
Include <cstdio> instead of <stdio.h>.
llvm-svn: 9033
2003-10-10 18:47:08 +00:00
Chris Lattner
dc3f14015e
Add a new -disable-inlining option
...
llvm-svn: 9028
2003-10-10 18:18:53 +00:00
Misha Brukman
868eac95dd
Fix spelling.
...
llvm-svn: 9027
2003-10-10 17:57:28 +00:00
Misha Brukman
e63af2ec7e
Fix grammar.
...
llvm-svn: 9026
2003-10-10 17:56:49 +00:00
Misha Brukman
4815d85f62
Renamed dis.cpp => llvm-dis.cpp
...
llvm-svn: 9017
2003-10-10 17:30:10 +00:00
Misha Brukman
9ebb38a3db
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
66d8a200cf
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
d6ed5425f4
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
a43e5aae7e
Doxygen-ified comments.
...
llvm-svn: 8778
2003-09-30 18:09:32 +00:00
Misha Brukman
6ff19a4909
* 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
5d816db32f
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
ddcbeb56a9
Doxygen-ified function comments.
...
llvm-svn: 8771
2003-09-30 17:42:57 +00:00
Misha Brukman
c4577d4f33
Removed extra space in comments.
...
llvm-svn: 8770
2003-09-30 17:40:12 +00:00
Chris Lattner
0552cd931e
Remove initials from source file
...
llvm-svn: 8769
2003-09-30 17:36:51 +00:00
Misha Brukman
d85607c390
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
7e16b3f05b
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
9ca002dd34
Update file headers for renamed files.
...
llvm-svn: 8758
2003-09-30 03:24:28 +00:00
Misha Brukman
c253fa6c45
Use the newly abstracted interface for running our tools and gcc.
...
llvm-svn: 8756
2003-09-29 22:40:52 +00:00
Misha Brukman
488440afc8
* 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
8e65370329
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
7a17430b40
* 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
f8e2f35538
Squelch warnings.
...
llvm-svn: 8729
2003-09-27 22:26:37 +00:00
Misha Brukman
6f218c8b49
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
29af701f5b
Squelch warning and delete extra space.
...
llvm-svn: 8685
2003-09-23 17:27:02 +00:00
Chris Lattner
07621721bf
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
2c6d4d649e
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
ef1a4771f0
Fix file header
...
llvm-svn: 8613
2003-09-20 02:42:54 +00:00
John Criswell
2d676f282d
New header file for gccld.
...
llvm-svn: 8610
2003-09-19 20:24:40 +00:00
John Criswell
a63a20d3eb
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
9f7bb3c331
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
d3b8e07a98
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
b0eb351d77
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
2682c34226
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
20dd7a8b54
Use new method
...
llvm-svn: 8573
2003-09-17 05:00:07 +00:00
John Criswell
206836748e
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
3d15fc4062
link' is now
llvm-link'.
...
llvm-svn: 8556
2003-09-16 15:21:52 +00:00
Misha Brukman
88e17e49e3
link' has become
llvm-link'.
...
llvm-svn: 8555
2003-09-16 15:21:21 +00:00
Misha Brukman
ef4f17dc3d
link' is being renamed to
llvm-link'.
...
llvm-svn: 8541
2003-09-15 18:34:34 +00:00
Misha Brukman
1ca2a3375c
Stop building as' and
dis' as they have been removed.
...
llvm-svn: 8529
2003-09-15 14:45:00 +00:00
Misha Brukman
44b6128337
`dis' is no longer an LLVM tool.
...
llvm-svn: 8528
2003-09-15 14:44:22 +00:00
Misha Brukman
85eaa143f3
`as' is no longer an LLVM tool.
...
llvm-svn: 8527
2003-09-15 14:44:05 +00:00
Chris Lattner
bad3f67b54
Enable the setjmp/longjmp lowering pass
...
llvm-svn: 8521
2003-09-15 04:56:44 +00:00
Tanya Lattner
5ff76aa271
Added llvm-ar to the Makefile
...
llvm-svn: 8506
2003-09-13 03:23:46 +00:00
Tanya Lattner
6744cea856
Fixed warning.
...
llvm-svn: 8505
2003-09-13 03:18:56 +00:00
Misha Brukman
0eb15a2ced
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
427bf36a96
scalarrepl now includes mem2reg
...
llvm-svn: 8472
2003-09-11 16:46:10 +00:00
Chris Lattner
1b50ec752d
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
069e2d385a
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
bb9c377e56
Clean up header, remove extra #include
...
llvm-svn: 8451
2003-09-10 19:42:51 +00:00
Brian Gaeke
7eaecc239a
Make createVerifierPass return a FunctionPass *.
...
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner
6c68b828f6
Reorder #includes to follow LLVM conventions
...
llvm-svn: 8375
2003-09-05 20:08:15 +00:00
Brian Gaeke
e26fb3c866
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
b10292fa2a
-abort-on-exception is gone. Rebuild your gccld shell scripts, folks! :-)
...
llvm-svn: 8368
2003-09-05 19:23:03 +00:00
Brian Gaeke
e157a77485
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
0fdcd57402
Move EE dtor where it belongs
...
llvm-svn: 8345
2003-09-04 22:57:27 +00:00
Brian Gaeke
6d7d9f9cd9
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
cec978e0ed
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
cdcee99ee6
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
3ac81b74cb
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
7149fa4d4b
#include is unnecessary
...
llvm-svn: 8316
2003-09-01 20:45:46 +00:00
Chris Lattner
f2e4f5a388
Preselection is now integrated into the Sparc target library
...
llvm-svn: 8305
2003-09-01 20:30:17 +00:00
Chris Lattner
25669f3e09
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
1f9495ceab
Remove the -stopAfterNPasses option, which has been long obsoleted by bugpoint
...
llvm-svn: 8278
2003-08-31 21:47:24 +00:00
Chris Lattner
c2f8ebd598
* 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
9047331cc7
"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
7fbf15848b
Renaming dis' ->
llvm-dis'.
...
llvm-svn: 8197
2003-08-28 22:14:16 +00:00
Misha Brukman
eed6bdf487
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
65e849241f
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
a42a115cb9
Renaming LLVM dis' to
llvm-dis'.
...
llvm-svn: 8189
2003-08-28 21:34:13 +00:00
Misha Brukman
6da6dc6264
Renaming LLVM as' to
llvm-as'.
...
llvm-svn: 8188
2003-08-28 21:32:57 +00:00
Chris Lattner
9e8da6070b
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
0438742d12
First version of llvm-ar added to cvs repository.
...
llvm-svn: 8173
2003-08-28 15:22:38 +00:00
Chris Lattner
3e77e87c15
Remove some long-dead code
...
llvm-svn: 8135
2003-08-24 19:52:02 +00:00
Chris Lattner
24b58d4b81
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
f1f637aac9
Targets now configure themselves with the module, not flags
...
llvm-svn: 8133
2003-08-24 19:50:12 +00:00
Chris Lattner
688dd40912
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
98320af078
Add support for modules with "any" pointersize/endianness
...
llvm-svn: 8122
2003-08-24 14:02:14 +00:00
Chris Lattner
2f00b4ed63
add preliminary support for -export-dynamic
...
llvm-svn: 8058
2003-08-22 19:18:45 +00:00
Chris Lattner
ac65cd51a4
Kill warning
...
llvm-svn: 8056
2003-08-22 18:57:43 +00:00
Misha Brukman
c33d6ace03
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
8bc390da1b
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
1b0f71e3f1
Make the bytecode file executable as well for LLEE purposes.
...
llvm-svn: 7992
2003-08-20 20:38:15 +00:00
Chris Lattner
31da13847a
no-strict-aliasing redux
...
llvm-svn: 7965
2003-08-18 22:32:48 +00:00
Chris Lattner
de8083df45
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
b80602b282
Add new -disable-verify option
...
llvm-svn: 7960
2003-08-18 20:47:13 +00:00
Misha Brukman
56f7db4178
Spell `necessary' correctly.
...
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
b9a9bcf261
Give correct command line for making a shared object
...
llvm-svn: 7929
2003-08-17 23:38:53 +00:00
Chris Lattner
4a8c16cf34
Make sure that "newmain" gets names for its arguments
...
llvm-svn: 7927
2003-08-17 22:14:20 +00:00
Chris Lattner
4d28b73dab
Fix message
...
llvm-svn: 7926
2003-08-17 22:08:25 +00:00
Misha Brukman
0709078b8d
`execve_test' is not part of LLEE.
...
llvm-svn: 7912
2003-08-15 23:31:54 +00:00
Misha Brukman
6ad21447f8
A lot of changes were suggested by Chris.
...
ExecveHandler.c:
* Use "" instead of <> for LLVM include files
* Use raw I/O, we don't need buffering
* Set errno = 0 before using open()
* strlen() doesn't count NULL terminator in its size
* Use memcmp() instead of strcmp()
* Return result of the real execve(), not 0
* Search for path to bytecode file if not absolute/relative path
SysUtils.c:
* Convert all comments to C-style
* Stop using `bool', use `unsigned' instead
SysUtils.h:
* Stop using `bool', use `unsigned' instead
* Updated comment to FindExecutable()
README.txt:
* Describe the goal of LLEE and an application
llvm-svn: 7911
2003-08-15 23:31:16 +00:00
Chris Lattner
899f2381f1
Revert my last (accidental) checkin, but keep the typeo fix
...
llvm-svn: 7879
2003-08-15 04:56:47 +00:00
Chris Lattner
0427dd4f4f
rename selection library to selectiondag
...
llvm-svn: 7878
2003-08-15 04:56:09 +00:00
Chris Lattner
6cc411cb24
Incorporate mapping library into the sparc library
...
llvm-svn: 7800
2003-08-13 02:28:20 +00:00
Misha Brukman
18dffadc13
Initial checkin of the LLEE, the (LL)VM (E)xecution (E)nvironment.
...
llvm-svn: 7760
2003-08-11 22:29:36 +00:00
Chris Lattner
a0d327277d
Include the new selection library for the X86 target
...
llvm-svn: 7720
2003-08-11 14:59:53 +00:00
Misha Brukman
84acb273f9
Chomped spurious blank lines.
...
llvm-svn: 7700
2003-08-08 15:37:35 +00:00
Misha Brukman
de33e42aa9
File-related functions moved to FileUtilities.h .
...
llvm-svn: 7696
2003-08-07 21:42:28 +00:00
Chris Lattner
494b24e49f
Completely remove mention of the correlated branch elimination pass. It has
...
bugs and needs to be reworked anyway.
llvm-svn: 7692
2003-08-07 21:30:12 +00:00
Misha Brukman
5d7c46c4b3
* The possessive third-person singular has no apostrophe (its)
...
* Grouped header files to fit with the LLVM standard
* Fit code into 80 columns
llvm-svn: 7690
2003-08-07 21:23:52 +00:00
Misha Brukman
6cb08f34b6
Re-grouped and alphabetized headers for easier reading and cleaner style.
...
llvm-svn: 7689
2003-08-07 21:19:30 +00:00
Misha Brukman
461b7cdfc3
Fixed path for SystemUtils.h and a few code cleanups.
...
llvm-svn: 7688
2003-08-07 21:05:13 +00:00
Misha Brukman
43f3b68016
Moved SystemUtils.h to include/Support and SystemUtils.cpp to lib/Support.
...
llvm-svn: 7687
2003-08-07 21:04:42 +00:00
Chris Lattner
cd4179f054
If we're debugging the SimplifyCFG pass, we _REALLY_ don't want to use it for
...
narrowing, no matter what.
llvm-svn: 7596
2003-08-05 15:51:05 +00:00
Misha Brukman
65bebf03f0
Only test the vector of functions if it is non-empty.
...
llvm-svn: 7594
2003-08-05 15:26:21 +00:00
Misha Brukman
a326e31a1c
Do not attempt to reduce a test case if it is an empty set.
...
llvm-svn: 7570
2003-08-04 19:03:42 +00:00
John Criswell
4f1ed9c65b
Added code that ensures that we don't try to reduce an empty vector of basic
...
blocks.
This fixes the bugpoint regressions.
llvm-svn: 7569
2003-08-04 18:24:31 +00:00
Chris Lattner
929fe6d82c
Make sure to flush the output stream so that we get incremental updates
...
llvm-svn: 7555
2003-08-04 00:56:43 +00:00
Chris Lattner
70dd263ae7
Print accurate run instructions for when testing LLC
...
llvm-svn: 7554
2003-08-04 00:56:27 +00:00
Chris Lattner
da25645be4
Fix problem I introduced in bugpoint with the cleanup functions
...
llvm-svn: 7549
2003-08-03 22:29:43 +00:00
Chris Lattner
64fade1536
DEBUG got moved to Debug.h
...
llvm-svn: 7491
2003-08-01 22:13:59 +00:00
Chris Lattner
cd252af3e1
Use the new FileUtilities library to do diff'ing of files
...
llvm-svn: 7484
2003-08-01 20:29:45 +00:00
Chris Lattner
cba4e65559
Use the C++, more portable, deleter
...
llvm-svn: 7483
2003-08-01 20:29:18 +00:00
Chris Lattner
d2ef0a77d5
Don't emit modules with lots of cruft hanging off of them.
...
llvm-svn: 7478
2003-08-01 16:14:33 +00:00
Chris Lattner
ef04e86804
Parameterize the performFinalCleanups a bit
...
llvm-svn: 7477
2003-08-01 16:13:49 +00:00
Misha Brukman
e9565593a6
Ignore intrinsic functions -- don't mangle their names or rewrite calls to them.
...
llvm-svn: 7438
2003-07-30 21:45:20 +00:00
Misha Brukman
3c2462bb76
CodeGeneratorBug.cpp:
...
* Temporarily externing InputArgv to print it out for the benefit of LLI command
needed to reproduce the result.
* Print out the list of functions currently being tested
* ListReducer now returns a bool if there was a failure, so test for it
ListReducer.h:
* Handle the case where there is no problem by returning true if failure is
found. Also correctly handles the case when there is only 1 pass/function.
Miscompilation.cpp:
* ListReducer now returns a bool if there was a failure, so test for it
llvm-svn: 7434
2003-07-30 20:15:56 +00:00
Misha Brukman
10e9e036c2
* Moved InputArgv out of anonymous scope to be extern'd in another file.
...
* Added DEBUG() statements to print out parameters passed to executing programs
* Actually ADD parameters to a program running via the JIT (using vector<char*>)
llvm-svn: 7433
2003-07-30 20:15:44 +00:00
Misha Brukman
f41d2acc8d
Moved definition of InputArgv into ExecutionDriver.cpp -- it is only used there.
...
llvm-svn: 7427
2003-07-30 17:59:23 +00:00
Misha Brukman
a38f409401
Use a vector<char*> instead of char*[] so that we can add arbitrary number of
...
parameters, such as command-line arguments that the executing program gets via
bugpoint.
llvm-svn: 7423
2003-07-30 17:44:15 +00:00
Chris Lattner
fdcda7baa4
Add variable to capture arguments that should be passed to the user program
...
This is unused so far.
llvm-svn: 7422
2003-07-30 17:36:07 +00:00
Misha Brukman
6f05e9ea0c
Revert change: default architecture is never set, it is guessed from input
...
bytecode file. This means that LLC on X86 will compile to Sparc assembly given a
64-bit input bytecode file...
llvm-svn: 7419
2003-07-30 15:29:55 +00:00
Misha Brukman
3564e354b3
* Disambiguate symbols before we start splitting module by functions
...
* Moved DisambiguateGlobalSymbols() out of the ReduceMisCodegenFunctions class
* Added an assert to have a cleaner exit if `main' is not found in the module
llvm-svn: 7380
2003-07-29 16:02:28 +00:00
Misha Brukman
397c1b8f48
Implemented cleanups as suggested by Chris:
...
* Use Module::getNamedFunction() to delete "main" instead of using a loop
* Compare function pointers instead of function names to determine equivalence
* Simplified creation of a 2-element vector containing zeroes
* Manually performed LICM on code
* Added an abort() in case a function we're considering occurs in something that
is not an instruction
* Use DEBUG() around code sections instead of just in a statement in a loop,
because GCC's DCE may not be good enough to completely remove it in a release
build
* Print out a command that can be directly copied-and-pasted to re-execute
* Instead of just checking if a symbol begins with a dot and fixing it
accordingly, use Mangler and fix all the problems (invalid chars in C symbol
names) entirely
* The new `main' function has external linkage
llvm-svn: 7371
2003-07-28 21:07:39 +00:00
Misha Brukman
216406a10b
Added comment to function isExecutingJIT()
...
llvm-svn: 7370
2003-07-28 20:59:16 +00:00
Misha Brukman
844d79f8f5
BugDriver.h:
...
* Added method to query if BugDriver is executing the JIT currently.
This provides the ability in adding code that is conditionally executed in
codegen debugging phase.
CodeGeneratorBug.cpp:
* Delete test functions from the Safe module
* Code conditionally added when debugging the JIT:
use the lazy resolver function added to Emitter.cpp to get function pointer
by name. When compiled into an .so, this is the only way to get a pointer to
an external function
* Added a symbol disambiguator which will keep symbols uniquely named across
modules
* Delete generated files by default
* The function `main' *must* stay in the .bc file for the JIT, but that prevents
debugging it alone. This patch makes the old `main' become `old_main' and adds
a new function named `main' which just calls the original with the same
parameters, thereby keeping functionality the same.
ExecutionDriver.cpp:
* Returned to getting unique filenames
* Simplified code choosing between using and not using shared library option
llvm-svn: 7364
2003-07-28 19:16:14 +00:00
Misha Brukman
f4702ed4d1
Add in support to load shared objects (-load is provided by Support library).
...
llvm-svn: 7360
2003-07-28 19:06:19 +00:00
Misha Brukman
914429c42b
Made a bunch of cleanups, as per Chris' recommendations:
...
* Removed unused global and member variables
* Fixed comments (CodeGeneratorBug.cpp)
* Check for possibly failing GCC::create() and CBE::create()
* Remove generated files after diffing the output (e.g., shared object)
* Instead of using std::for_each, use explicit loops as std::for_each may
duplicate the functor, and ours carries state
* Changed member var from cl::opt<std::string> to just std::string
* Fixed doxygen comments
* Fixed string comparisons to use [ str.empty() ] instead of [ str == "" ]
* Cache instances of CBE and GCC in BugDriver across compilations and executions
while testing tools.
llvm-svn: 7302
2003-07-24 21:59:10 +00:00
Misha Brukman
e98a7e97d9
Major addition to bugpoint: ability to debug code generators (LLC and LLI).
...
The C backend is assumed correct and is used to generate shared objects to be
loaded by the other two code generators.
LLC debugging should be functional now, LLI needs a few more additions to work,
the major one is renaming of external functions to call the JIT lazy function
resolver.
Bugpoint now has a command-line switch -mode with options 'compile' and
'codegen' to debug appropriate portions of tools.
ExecutionDriver.cpp: Added implementations of AbstractInterpreter for LLC and
GCC, broke out common code within other tools, and added ability to generate C
code with CBE individually, without executing the program, and the GCC tool can
generate executables shared objects or executables.
If no reference output is specified to Bugpoint, it will be generated with CBE,
because it is already assumed to be correct for the purposes of debugging using
this method. As a result, many functions now accept as an optional parameter a
shared object to be loaded in, if specified.
llvm-svn: 7293
2003-07-24 18:17:43 +00:00
Misha Brukman
f5b33e92c2
Fixed misspelling.
...
llvm-svn: 7223
2003-07-21 21:58:16 +00:00
Chris Lattner
7f36f7e9f0
Remove instloops library
...
llvm-svn: 7210
2003-07-21 19:07:27 +00:00
Misha Brukman
582cf5be31
Initialize the target architecture based on compiler defines, so if compiled on
...
x86 or Sparc, LLC will automatically default to that platform, no guessing
required. On another platform, it will default to `noarch' and will have to
guess which architecture to compile to.
llvm-svn: 7207
2003-07-18 22:21:40 +00:00
Anand Shukla
fa520f62c4
Added pass to instrument backedges for lightweight tracing
...
llvm-svn: 7202
2003-07-18 16:25:40 +00:00
Misha Brukman
5de3e14206
The word separate' only has one
e'.
...
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
Misha Brukman
6b2cd003d4
Converted tabs to spaces.
...
llvm-svn: 7139
2003-07-10 16:35:17 +00:00
Misha Brukman
543aedd7d0
Fixed indentation.
...
llvm-svn: 7122
2003-07-07 22:28:42 +00:00
Misha Brukman
009e42dd43
* If compiling on X86 or Sparc, automagically enable the JIT for that arch
...
* Setting ENABLE_X86_JIT or ENABLE_SPARC_JIT on the `make' command-line will
force the inclusion of that JIT on a different architecture
* If neither JIT is enabled (e.g., compiling on a different architecture), the
-march option will not be available to LLI.
* As a side effect of the $ARCH variable, the Sparc LLI can now link just a bit
faster by not including the x86 library.
llvm-svn: 7070
2003-07-02 17:53:19 +00:00
John Criswell
258dfc0319
Merged in autoconf branch. This provides configuration via the autoconf
...
system.
llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner
caa0d010d6
Run the simplify CFG pass after instcombine which has the effect of deleting
...
ALL of the global ctor/dtor stuff if it is not used!
llvm-svn: 6916
2003-06-26 05:29:50 +00:00
Chris Lattner
622df692df
Move the instcombine pass before globaldce, so that if globals are made dead by instcombine, that they can be deleted.
...
llvm-svn: 6910
2003-06-26 04:32:31 +00:00
Chris Lattner
ca92cc4853
Try to run cleanups even if nothing was modified in the preview passes
...
llvm-svn: 6897
2003-06-25 04:13:52 +00:00
Chris Lattner
bc15c235dd
Run dead arg elimination, and tell it that it's ok to hack up non-internal functions
...
llvm-svn: 6896
2003-06-25 04:13:36 +00:00
Chris Lattner
1eb4533b66
Add tail duplication pass to the pipeline, move the verifier pass to the front
...
Other minor reorganizations
llvm-svn: 6849
2003-06-22 20:11:45 +00:00
Chris Lattner
85559692cb
Minor cleanups
...
llvm-svn: 6799
2003-06-20 15:49:04 +00:00
Chris Lattner
daebdb2358
Funcresolve no longer performs nicification of resolved functions
...
instcombine does this
llvm-svn: 6787
2003-06-19 17:03:51 +00:00
Brian Gaeke
667447173d
tools/llc/llc.cpp: Make "-o -" work.
...
llvm-svn: 6780
2003-06-18 21:43:33 +00:00
Brian Gaeke
19420e8daf
lib/Target/Sparc/Sparc.cpp:
...
Move LowerAllocations, PrintFunction, and SymbolStripping passes, and
the corresponding -disable-strip and -d options, over here to the SPARC
target-specific bits of llc. Rename -d to -dump-asm.
tools/llc/Makefile:
Reindent. Add x86 library so that llc compiles again.
tools/llc/llc.cpp:
Remove support for running arbitrary optimization passes. Use opt instead.
Remove LowerAllocations, PrintFunction, and SymbolStripping passes, as noted
above.
Allow user to select a backend (x86 or SPARC); default to guessing from
the endianness/pointer size of the input bytecode file.
Fix typos.
Delete empty .s file and exit with error status if target does not support
static compilation.
llvm-svn: 6776
2003-06-18 21:14:23 +00:00
Chris Lattner
a7bf3dea5c
Reindent code to match the rest of the file
...
llvm-svn: 6772
2003-06-18 18:46:08 +00:00
Chris Lattner
7b1df04748
Add new DAE pass to gccld. It does not add cause any regressions in the test-suite
...
llvm-svn: 6770
2003-06-18 16:29:02 +00:00
Brian Gaeke
17f041ba98
Use $(PLATFORMLIBDL) to selectively bring in -ldl only on those platforms where
...
it is needed.
llvm-svn: 6753
2003-06-17 20:09:18 +00:00
Chris Lattner
6d0553444b
Life is too short. Link in too much stuff on Linux to make building on sun easier
...
llvm-svn: 6748
2003-06-17 19:14:59 +00:00
Chris Lattner
0fc18257a9
The never-ending odyssey trying to get sparc to link
...
llvm-svn: 6747
2003-06-17 18:19:52 +00:00
Chris Lattner
85f1b38638
Make sure to get the value of ARCH before we use it
...
llvm-svn: 6746
2003-06-17 17:53:35 +00:00
Chris Lattner
0c7e4fdfa2
Do not link in the Sparc JIT when building on X86. Eventually the sparc will not
...
link in the X86 JIT either, but this makes testing easier.
For some reason, the sparc JIT was breaking the X86 JIT when it was linked in. :(
llvm-svn: 6745
2003-06-17 15:54:52 +00:00
Chris Lattner
ed38cd7aa9
Whoops, didn't mean to check that in :(
...
llvm-svn: 6743
2003-06-17 15:46:34 +00:00
Chris Lattner
1afd194a33
Use more structured command line option processing
...
llvm-svn: 6742
2003-06-17 15:43:13 +00:00
Chris Lattner
493103ea3b
Actually, change it to use explicit new/delete, which is more likely to be
...
optimized INTO an alloca
llvm-svn: 6727
2003-06-16 22:29:09 +00:00
Chris Lattner
9fa396e6c7
Remove usage of alloca
...
llvm-svn: 6726
2003-06-16 22:22:11 +00:00
Brian Gaeke
4681b27a92
Isolate machine-dependent use of <alloca.h> in "Support/Alloca.h",
...
so that we can easily change its use to be conditional on the result of
an autoconf test later.
llvm-svn: 6723
2003-06-16 21:54:01 +00:00
Chris Lattner
15bfe02e6f
Fix major bug in my last checkin. :(
...
llvm-svn: 6688
2003-06-13 16:10:26 +00:00
Chris Lattner
f90b0e49fa
Remove obsolete comments about llvm-ar
...
llvm-svn: 6686
2003-06-12 18:57:42 +00:00
Chris Lattner
dec82c2ca1
Remove duplicate pass
...
llvm-svn: 6631
2003-06-05 20:51:10 +00:00
Chris Lattner
c3373f42ce
Remove stupid thinko that was preventing bugpoint from working
...
llvm-svn: 6533
2003-06-02 04:54:29 +00:00
Chris Lattner
b7a4d035d7
Give better information about how the passes crash
...
llvm-svn: 6532
2003-06-02 04:54:16 +00:00
Chris Lattner
037fce29a8
Add support for: -o -
...
llvm-svn: 6485
2003-05-31 21:47:16 +00:00
Chris Lattner
a05571b144
Add SRoA pass to gccas
...
llvm-svn: 6442
2003-05-30 19:24:06 +00:00
Chris Lattner
e4108c9550
Move indvars pass after mem2reg pass where it is more likely to be useful
...
llvm-svn: 6441
2003-05-30 19:23:10 +00:00
Chris Lattner
67b4289b39
Fix formatting in file
...
llvm-svn: 6398
2003-05-29 15:13:15 +00:00
Misha Brukman
4931c59635
Link in Sparc libs for the JIT, even on X86 to be able to support debugging
...
of Sparc JIT (printing out instrs) on X86. Con: this increases linking time.
llvm-svn: 6361
2003-05-27 21:42:05 +00:00
Chris Lattner
f8db81aac0
Remove ugly hack (that I put in originally) for building in trace stuff
...
automatically in LLC
llvm-svn: 6358
2003-05-27 21:23:02 +00:00
Chris Lattner
c8e346caeb
Add compatibility option
...
llvm-svn: 6354
2003-05-27 19:15:11 +00:00
Brian Gaeke
b9ec46415f
Remove ".bc" from the end of InputFile if it is there, in
...
tools/lli/lli.cpp:main().
llvm-svn: 6317
2003-05-23 20:28:07 +00:00
Brian Gaeke
b599881570
gccld.cpp:
...
Fix typo in header.
Add IsArchive static method.
Roll LoadLibraryFromDirectory() into LoadLibrary(), and factor
LoadLibraryExactName() out of the result. Instead of treating the current
directory specially, just insert it into LibPaths in the beginning of
main().
Make LoadLibrary() take a "search" flag that says whether to search for the
correct library, or just trust that LibName is right.
Make LinkLibrary() take a "search" flag, and pass it to LoadLibrary().
Change the for-loop over InputFilenames to detect ar archives and link them
in as libraries without searching.
Change the for-loop over Libraries to explicitly turn on the "search" flag
to LinkLibrary() that makes LoadLibrary() search for the correct library
(i.e., when processing -lNAME options.)
llvm-svn: 6316
2003-05-23 20:27:07 +00:00
Brian Gaeke
5eee0dd116
Clarify BugDriver.cpp:BugDriver::ParseInputFile()'s return values in its
...
explanatory comment.
llvm-svn: 6308
2003-05-23 05:34:32 +00:00
Chris Lattner
ea946cf5c1
Kill using declarations
...
llvm-svn: 6292
2003-05-22 20:13:16 +00:00
Chris Lattner
4875906a69
Allow disabling final cleanups
...
llvm-svn: 6271
2003-05-21 20:38:59 +00:00
Chris Lattner
5a8e740420
Increase odds that this won't bork things
...
llvm-svn: 6267
2003-05-21 19:41:31 +00:00
Chris Lattner
add97ceef3
Get rid of really old makefile cruft
...
llvm-svn: 6218
2003-05-14 21:31:31 +00:00
Chris Lattner
a929e45913
Search LLVM_LIB_SEARCH_PATH for objects to allow it to find crtend.o
...
Implement minor library linking optimization.
llvm-svn: 6181
2003-05-13 22:14:13 +00:00
Chris Lattner
229be7a063
Add a disable-verify option
...
llvm-svn: 6155
2003-05-12 22:12:44 +00:00
Chris Lattner
4596303925
Move static stuff to an anonymous namespace
...
llvm-svn: 6154
2003-05-12 22:08:58 +00:00
Chris Lattner
8b8e1625e1
Print filename correctly
...
llvm-svn: 6119
2003-05-12 14:32:04 +00:00
Chris Lattner
5d3b17a4cc
The JIT is the default mode for LLI now
...
llvm-svn: 6118
2003-05-12 14:31:57 +00:00
Chris Lattner
63f5ef84be
Make a comment more accurate
...
llvm-svn: 5991
2003-05-03 03:20:36 +00:00
Chris Lattner
198cc8f556
Add support for debugging miscompilations with the use of the JIT or CBE!
...
llvm-svn: 5990
2003-05-03 03:19:41 +00:00
Chris Lattner
b65c30446d
Bugpoint is always verbose, eliminate option
...
llvm-svn: 5989
2003-05-03 03:18:41 +00:00
Misha Brukman
7257cc718d
The Grammar Police is out on patrol.
...
llvm-svn: 5985
2003-05-03 02:16:43 +00:00
Chris Lattner
08b4007a7c
Add an instcombine pass before levelraise
...
llvm-svn: 5980
2003-05-02 18:19:05 +00:00
Chris Lattner
0316a440a1
Add a new option to disable stripping of bytecode files
...
llvm-svn: 5969
2003-04-28 03:28:56 +00:00
Chris Lattner
bbe1aba425
Remove two fields from TargetData which are target specific.
...
llvm-svn: 5963
2003-04-26 20:11:09 +00:00
Chris Lattner
e05ccb1be2
Add options to disable simplification with passes, in case one of them crashes
...
llvm-svn: 5950
2003-04-25 22:08:12 +00:00
Chris Lattner
86ff9b94a9
Make sure to copy double alignment as well
...
llvm-svn: 5936
2003-04-25 06:06:13 +00:00
Chris Lattner
658693c26d
Kill using declarations
...
llvm-svn: 5934
2003-04-25 05:26:11 +00:00
Chris Lattner
5efddeb447
Make sure to add a targetdata instance to the passmanager, and make it match the
...
one in use by the TargetMachine
llvm-svn: 5931
2003-04-25 05:22:29 +00:00
Chris Lattner
ff58b89809
Rename Kept -> Suffix
...
FIX problem where we were incorrectly putting the prefix of the list into the "suffix" list.
llvm-svn: 5926
2003-04-25 03:16:33 +00:00
Chris Lattner
7114e0ee34
Rename Kept -> Suffix
...
Fix problem where we accidentally returned KeepPrefix instead of KeepSuffix!
llvm-svn: 5925
2003-04-25 03:16:05 +00:00
Chris Lattner
8a549d117d
Big programs have tons of global variable initializers, and most passes don't care
...
about them. Try to delete them if it doesn't affect the passes.
llvm-svn: 5918
2003-04-25 00:53:05 +00:00
Chris Lattner
dcae180f95
When cleaning up the final bytecode file, make sure to run DTE as well
...
llvm-svn: 5917
2003-04-25 00:52:30 +00:00
Chris Lattner
9c2869eca8
Speed up convergence significantly and also reduce the size of testcases by making large portions of a function's CFG dead at a time.
...
llvm-svn: 5915
2003-04-24 23:51:38 +00:00
Chris Lattner
15574dd30f
The big fix is this change:
...
- if (I->isExternal() && !Functions.count(I))
+ if (!I->isExternal() && !Functions.count(I))
We were not actually deleting any functions from the module!
llvm-svn: 5914
2003-04-24 22:54:06 +00:00
Chris Lattner
0df20905d4
Remove dead functions
...
llvm-svn: 5913
2003-04-24 22:53:24 +00:00
Chris Lattner
7a2b711c95
Make sure that deleted functions have external linkage
...
llvm-svn: 5912
2003-04-24 22:53:01 +00:00
Chris Lattner
ad5fa07a44
Use the list reducer to improve convergence speed and to support crashes that
...
only occur when multiple passes interact or when multiple functions exist in a module
llvm-svn: 5911
2003-04-24 22:24:58 +00:00
Chris Lattner
e09e448832
Adjust to match new ListReducer interface
...
Move function to generic code
llvm-svn: 5910
2003-04-24 22:24:22 +00:00
Chris Lattner
3bfc9a1e4f
Allow reducer interfaces to mutate the lists passed in
...
llvm-svn: 5909
2003-04-24 22:23:56 +00:00
Chris Lattner
5b90b2a7d4
Move function from Miscompilation.cpp
...
llvm-svn: 5908
2003-04-24 22:23:34 +00:00
Chris Lattner
f6d04c9d0c
Move the ListReducer Class into it's own header file instead of living in Miscompilation.cpp
...
llvm-svn: 5907
2003-04-24 20:16:29 +00:00
Chris Lattner
d7a7ef633f
Allow bugpoint to try new an different methods for pruning down lists
...
llvm-svn: 5905
2003-04-24 19:32:42 +00:00
Chris Lattner
4a984c606f
Make sure to create a target data that matches the Module's target properties.
...
llvm-svn: 5904
2003-04-24 19:13:02 +00:00
Chris Lattner
1228ad2415
Remove support for "target data" pass ctors
...
llvm-svn: 5900
2003-04-24 18:36:41 +00:00
Chris Lattner
18f2992e5e
LevelRaise now gets target data from passmanager
...
llvm-svn: 5898
2003-04-24 18:26:03 +00:00
Chris Lattner
0b66fe7194
Implement support for bugpoint to identify which FUNCTION an optimization
...
is miscompiling.
llvm-svn: 5893
2003-04-24 17:02:17 +00:00
Chris Lattner
343d952a53
Print where reference output goes
...
llvm-svn: 5891
2003-04-23 20:41:18 +00:00
Chris Lattner
14f89ddf52
The new CFrontend generates LOTs of basic blocks that just fall through and do
...
other funky stuff. Clean it up early.
llvm-svn: 5889
2003-04-23 20:40:42 +00:00
Chris Lattner
d44e355c9c
Allow specifying an input file for the program being executed
...
llvm-svn: 5888
2003-04-23 20:31:37 +00:00
Chris Lattner
9938a43aac
We now need to link libscalar to get the switch lowering pass
...
llvm-svn: 5874
2003-04-23 16:43:02 +00:00
Chris Lattner
796281cf86
Remove unnecessary &*
...
llvm-svn: 5873
2003-04-23 16:38:00 +00:00
Chris Lattner
ae39f7112f
Build the appropriate target machine for the input pointer size and endianness
...
llvm-svn: 5838
2003-04-22 18:10:32 +00:00
Chris Lattner
cfac8ce5da
Add support for allowing the user to extend the GCCLD searchpath
...
llvm-svn: 5825
2003-04-21 19:53:24 +00:00
Chris Lattner
e3fca9bc04
Eliminate useless duplicate libraries
...
llvm-svn: 5823
2003-04-19 23:07:33 +00:00
Chris Lattner
8b99be746e
Add first support for linking in .a files correctly and minimally, like a real linker does
...
llvm-svn: 5822
2003-04-19 22:44:38 +00:00
Chris Lattner
f53dee47b8
Add crufty compatibility stuff for ld
...
llvm-svn: 5813
2003-04-18 23:38:22 +00:00
Chris Lattner
b53f5d3a9f
Eliminate some compatibility stuff no longer needed :P
...
llvm-svn: 5812
2003-04-18 23:38:09 +00:00
Chris Lattner
60bb70a682
Use anonymous namespace instead of "static"
...
Kill using decl
llvm-svn: 5811
2003-04-18 23:01:25 +00:00
Chris Lattner
dd3d3438c1
Don't support codegen passes in opt
...
llvm-svn: 5797
2003-04-16 23:02:16 +00:00
Chris Lattner
6a3b90dfad
Remove codegen libraries to speed up linking opt
...
llvm-svn: 5796
2003-04-16 22:55:55 +00:00
Chris Lattner
4fa3b88238
Allow the user to disable the internalize pass
...
llvm-svn: 5792
2003-04-16 21:43:22 +00:00
Chris Lattner
fa428e3417
Give verbose error messages if bytecode file cannot be parsed
...
llvm-svn: 5789
2003-04-16 20:51:36 +00:00
Chris Lattner
9d614bf2d1
Improve compatibility with system AS further by allowing input from stdin
...
llvm-svn: 5780
2003-04-16 17:49:18 +00:00
Chris Lattner
951662218c
* Get rid of using declaration
...
* Add two compatibility options to work better with new GCC frontend
llvm-svn: 5779
2003-04-16 17:41:08 +00:00
Chris Lattner
7c29feaeb7
Namespacify command line options
...
llvm-svn: 5778
2003-04-16 17:34:29 +00:00
Chris Lattner
6024ecfc43
Minor tweak
...
llvm-svn: 5758
2003-03-31 17:30:35 +00:00
Chris Lattner
03df18f1c2
Make sure that intermediate code is verifier clean to avoid wierd problems.
...
llvm-svn: 5723
2003-03-07 18:17:13 +00:00
Chris Lattner
b58da8ab04
* Reduce the number of useless bytecode files produced by bugpoint.
...
- This also speeds it up as the bytecode writer isn't terribly fast.
* Add a new cleanup pass after everything else to run -funcresolve -globaldce
llvm-svn: 5668
2003-02-28 16:13:20 +00:00
Chris Lattner
ea424f3aff
Rename -no-* to -disable-*
...
llvm-svn: 5642
2003-02-26 20:00:41 +00:00
Chris Lattner
f170a0d80f
Make printing messages nicer
...
llvm-svn: 5616
2003-02-24 20:07:54 +00:00
Chris Lattner
8b72239415
Add new -no-verify option
...
llvm-svn: 5542
2003-02-12 18:45:08 +00:00
Chris Lattner
0005ea2a7f
Add a new -no-output option, useful for -aa-eval tests.
...
llvm-svn: 5541
2003-02-12 18:43:33 +00:00
Chris Lattner
649a63bd45
Fix build problem on sparc
...
llvm-svn: 5428
2003-01-29 18:15:34 +00:00
Chris Lattner
e6f7b214de
Make bugpoint *much* more powerful, giving it the capability to delete instructions
...
out of a large function to reduce it.
llvm-svn: 5408
2003-01-23 02:48:33 +00:00
Chris Lattner
e3b4ef8e1a
Allow creating of passes like levelraise which use a targetdata ctor
...
llvm-svn: 5403
2003-01-22 23:24:11 +00:00
Chris Lattner
598270f39d
link with static versions of some libs to avoid having to pull in all of ipo/ipa and datastructure at all
...
llvm-svn: 5402
2003-01-22 22:14:04 +00:00
Chris Lattner
0d35f25ed7
Fix didn't fix the race condition in the makefiles
...
llvm-svn: 5394
2003-01-22 15:41:10 +00:00
Chris Lattner
7964483787
Fix race condition in Makefile
...
llvm-svn: 5380
2003-01-21 15:20:50 +00:00
Chris Lattner
abe1b658e7
* Prune down library list. In particular, llc doesn't need all of IPO, and none of data structure and IPA completely!
...
* Do not keep symbols by default!
llvm-svn: 5375
2003-01-19 21:55:43 +00:00
Chris Lattner
bdb65e864f
Rename header
...
llvm-svn: 5283
2003-01-14 22:57:15 +00:00
Chris Lattner
c582c69c7a
Link in lots o libraries
...
llvm-svn: 5269
2003-01-14 21:30:30 +00:00
Chris Lattner
cffd554b7f
No longer need scalaropts lib
...
llvm-svn: 5252
2003-01-13 00:58:18 +00:00
Chris Lattner
4b2c56d87f
Eliminate direct access to TargetData structure
...
llvm-svn: 5156
2002-12-28 20:00:00 +00:00
Chris Lattner
1214348847
Fix compilation on GCC 3.2
...
llvm-svn: 5136
2002-12-24 00:44:34 +00:00
Chris Lattner
1897b07db2
Don't try to buidl jello
...
llvm-svn: 5135
2002-12-24 00:44:26 +00:00
Chris Lattner
2ee368e312
Fixes to compile with GCC 3.2
...
llvm-svn: 5134
2002-12-24 00:39:16 +00:00
Chris Lattner
e2857c2d41
Jello is now part of LLI
...
llvm-svn: 5133
2002-12-24 00:14:25 +00:00
Chris Lattner
42057e4d2a
Substantial changes to refactor LLI to incorporate both the Jello JIT and
...
the traditional LLI interpreter
llvm-svn: 5125
2002-12-23 23:59:41 +00:00
Chris Lattner
1bb5148632
X86 target machine is now parameterizable
...
llvm-svn: 5124
2002-12-23 23:55:01 +00:00
Chris Lattner
2af84f79e3
New files for miscompilation detection
...
llvm-svn: 5120
2002-12-23 23:50:16 +00:00
Chris Lattner
6788e95757
Implement the start of the miscompilation detection stuff
...
llvm-svn: 5119
2002-12-23 23:49:59 +00:00
Brian Gaeke
8f7c7a40c5
brg
...
Add statistic for number of bytes of data area initialized.
We used this statistic in collecting data for the paper, but I forgot
to commit it.
llvm-svn: 5112
2002-12-22 18:53:23 +00:00
Chris Lattner
9a6368cb87
Make stuff compiled with gccld not dump into the debugger if there's a problem
...
llvm-svn: 5028
2002-12-14 21:28:32 +00:00
Chris Lattner
3aecb5fcd6
Pass command line arguments to main
...
llvm-svn: 5027
2002-12-13 16:48:57 +00:00
Chris Lattner
ab38002b81
Add statistic
...
llvm-svn: 5026
2002-12-13 15:28:42 +00:00
Misha Brukman
0550d7ead0
Made status output debug-only (for testing diffs against lli).
...
llvm-svn: 5022
2002-12-13 13:15:36 +00:00
Brian Gaeke
641c6fa60a
brg
...
InstSelectSimple.cpp: Add stub implementation of visitFreeInst.
Add comments that mention how we are failing to implement malloc/free.
Add initial implementation of visitAllocaInst.
X86TargetMachine.cpp: Include llvm/Transforms/Scalar.h.
Add LowerAllocations pass before instruction selection.
jello/Makefile: Add scalaropts.a.
llvm-svn: 4994
2002-12-13 06:46:31 +00:00
Chris Lattner
73433b07b9
Implement branches
...
llvm-svn: 4988
2002-12-13 05:40:28 +00:00
Brian Gaeke
9b38597288
This checkin is brought to you by the brian gaeke allnighter fund.
...
(lib/Target/X86) InstSelectSimple.cpp:
Include llvm/DerivedTypes.h and iostream.
Refactor visitMul out into a wrapper around doMultiply(), so that we
can do multiplications on temporary values when we are doing
getelementptrs.
Refactor part of getReg out into makeAnotherReg, so that we can create
registers willy-nilly to hold temporary values, when we are doing
getelementptrs.
Add stub implementations of visitMallocInst and visitAllocaInst.
Add initial implementation of visitGetElementPtrInst.
In copyConstantToRegister:
We throw a *lot* of our asserts here. So, when we want to throw an
assert, print out to stderr whatever expr or whatever constant made
us barf.
Support copying ConstantPointerNull to register, using a move immediate
of zero.
Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings
of the numbers in the other instruction names. All uses modified.
Teach visitCallInst to extract byte- and short-class return values
from subregs of EAX. Add a FIXME note about how we would do it for
float-class return values.
Add a FIXME note about how we would cast float to int and back.
X86InstrInfo.def:
Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings
of the numbers in the other instruction names. All uses modified.
(tools/jello) GlobalVars.cpp:
Include iostream.
If we have to emit a floating-point constant to memory, gamble and use
the same method as for ints.
If we have to emit a ConstantPointerNull to memory, try using a "void *"
and "NULL".
Otherwise, if we are going to throw an assert, print out whatever constant
made us barf, first.
llvm-svn: 4973
2002-12-12 15:33:40 +00:00
Misha Brukman
46aa1be828
ipa.a only needs to be mentioned once, and spaces should be used instead of
...
tabs for readability.
llvm-svn: 4970
2002-12-12 05:29:32 +00:00
Vikram S. Adve
03e6fa5804
Fix link errors due to new IPModRef pass.
...
llvm-svn: 4960
2002-12-09 05:53:11 +00:00
Vikram S. Adve
4c20f7764d
Repeat ipa.a. Since IPModRef is currently only used in analysis.o,
...
it was causing linking errors.
llvm-svn: 4959
2002-12-09 04:46:25 +00:00
Chris Lattner
f525e2f95e
Add support to count the number of dynamic instructions executed by LLI
...
llvm-svn: 4955
2002-12-08 05:51:08 +00:00
Chris Lattner
2c4687b0ed
Only build jello when compiling on X86
...
llvm-svn: 4938
2002-12-06 03:53:40 +00:00
Chris Lattner
a87c79a3fe
Fix to make jello compile on Sparc even though it won't run.
...
llvm-svn: 4937
2002-12-06 03:52:51 +00:00
Chris Lattner
728e4fbd59
Add support for global value references
...
llvm-svn: 4908
2002-12-04 06:45:40 +00:00
Chris Lattner
9080df6970
Initial checkin of global var support code
...
llvm-svn: 4904
2002-12-04 06:09:04 +00:00
Chris Lattner
b7256f170e
Implement simple global variable support
...
llvm-svn: 4903
2002-12-04 06:04:17 +00:00
Chris Lattner
7a95d4ead1
Implement external function support
...
llvm-svn: 4902
2002-12-04 06:04:07 +00:00
Chris Lattner
34e164bb30
Initial checkin of Unresolved function fault handler
...
llvm-svn: 4900
2002-12-04 05:05:26 +00:00
Chris Lattner
913c44f05d
Implement lazy resolution of function calls
...
llvm-svn: 4899
2002-12-04 04:47:34 +00:00
Chris Lattner
b2fe33ac89
Initial checkin of virtual machine implementation.
...
We can now run very trivial test cases
llvm-svn: 4894
2002-12-03 22:48:59 +00:00
Chris Lattner
e7f81463a5
Disable timing of bytecode loader
...
llvm-svn: 4887
2002-12-03 19:42:26 +00:00
Chris Lattner
3f94a45ff8
Final tweak to printer
...
llvm-svn: 4881
2002-12-03 06:33:30 +00:00
Chris Lattner
d412654b95
Implement trivially simple debugger for MachineCodeEmitter interface
...
llvm-svn: 4880
2002-12-03 06:09:26 +00:00
Chris Lattner
d29ab7a539
Add initial support for machine code emission
...
llvm-svn: 4865
2002-12-02 21:22:04 +00:00
Chris Lattner
85ffbadcce
Build bugpoint
...
llvm-svn: 4790
2002-11-20 22:28:18 +00:00
Chris Lattner
ceba1ddf2f
Initial checkin of bugpoint
...
llvm-svn: 4789
2002-11-20 22:28:10 +00:00
Chris Lattner
adea9960ab
Move the function extractor pass from tools/extract into lib/Xform/IPO
...
llvm-svn: 4759
2002-11-19 18:42:59 +00:00
Chris Lattner
0ff016c9e2
Remove extra target.a entry
...
llvm-svn: 4756
2002-11-19 16:59:41 +00:00
Chris Lattner
a91cf7f41b
Add a timer to evaluate bytecode load time and space requirements
...
llvm-svn: 4679
2002-11-10 06:55:02 +00:00
Vikram S. Adve
cf72aec30d
Don't build llc symbols by default.
...
llvm-svn: 4565
2002-11-06 16:10:57 +00:00
Chris Lattner
b49552a328
Give passnames to the printer classes
...
llvm-svn: 4559
2002-11-06 06:16:08 +00:00
Chris Lattner
c23b57a60d
No need to explicitly inclue ExportSymbols now
...
llvm-svn: 4543
2002-11-04 20:50:57 +00:00
Chris Lattner
ea5b4334be
Implement a new -print-callgraph analysis that turns a callgraph into a dot
...
graph
llvm-svn: 4524
2002-11-04 02:55:30 +00:00
Vikram S. Adve
dd2ab407a6
Disable correlated expressions pass until it is reliable.
...
llvm-svn: 4512
2002-11-03 12:41:50 +00:00
Chris Lattner
517a31e940
Reassociate now works
...
llvm-svn: 4472
2002-10-31 17:13:11 +00:00
Misha Brukman
422964104e
Return 0 instead of 1 for correct execution. Makes automated testing happy.
...
llvm-svn: 4449
2002-10-30 02:18:29 +00:00
Chris Lattner
52200beb8d
Jello now builds
...
llvm-svn: 4430
2002-10-29 23:41:11 +00:00
Chris Lattner
fcf89885a1
* Privatize the TargetName
...
llvm-svn: 4418
2002-10-29 21:48:33 +00:00
Chris Lattner
eec571dce8
Allow TargetMachine to refuse static code gen
...
llvm-svn: 4415
2002-10-29 21:12:46 +00:00
Chris Lattner
52b4de4ae9
Convert jello to use PassManager
...
llvm-svn: 4414
2002-10-29 21:06:58 +00:00
Chris Lattner
c2a605c3a8
Rename Sparc.h TargetMachineImpls.h
...
llvm-svn: 4409
2002-10-29 20:48:09 +00:00
Chris Lattner
7bfce07f26
* Remove explicit strcmp calls
...
* Rename Sparc.h to TargetMachineImpls.h
llvm-svn: 4406
2002-10-29 20:45:04 +00:00
Chris Lattner
949958a00b
After removing stuff from TargetMachine, we now no longer have to include
...
it twice.
llvm-svn: 4311
2002-10-28 01:13:07 +00:00
Chris Lattner
82c040cbef
Add codegen library
...
llvm-svn: 4305
2002-10-28 00:54:59 +00:00
Chris Lattner
1f66b56dc7
Initial checkin of LLVM JIT, codenamed jello. This tool is not built by
...
default, until it becomes stable. Even then it will only work for for X86
targets.
llvm-svn: 4285
2002-10-25 22:58:53 +00:00
Vikram S. Adve
3c20672e56
Added datastructure library to resolve link error.
...
llvm-svn: 4279
2002-10-25 21:17:34 +00:00
Chris Lattner
7c270463f1
* Fix extract to work with constant pointer refs correctly
...
* Extract makes all global vars external, so they don't have initializers
llvm-svn: 4121
2002-10-12 20:50:16 +00:00
Chris Lattner
3a13076188
- Implement a new -print-cfg option for analyze, that causes it to print the
...
CFG of each function in the module to 'dot' files.
llvm-svn: 4062
2002-10-07 18:38:01 +00:00
Chris Lattner
1a1a1002c4
Avoid making external global variables internal
...
llvm-svn: 4059
2002-10-07 18:33:53 +00:00
Chris Lattner
6eae53f5b1
- The extract tool now is sure to extract the function implementation for
...
the specified name instead of extracting the prototype if both exist.
llvm-svn: 4045
2002-10-06 21:30:04 +00:00
Chris Lattner
b6ec3ac95d
Temporary change to make datastructure stuff link in right
...
llvm-svn: 4005
2002-10-01 22:41:01 +00:00
Chris Lattner
4b838cd6b5
Change LowerAllocations pass to 'require' TargetData instead of it being
...
passed in.
llvm-svn: 3930
2002-09-25 23:47:49 +00:00
Chris Lattner
2ccb52142f
Make sure to close the file before deleting it
...
llvm-svn: 3905
2002-09-24 00:09:48 +00:00
Chris Lattner
d01dffe97f
* Remove the -stopraise option, which is no longer needed now that we have
...
the -debug-pass=Arguments option
* Run instcombining BEFORE mem2reg so that getelementptr X, long 0's are
cleaned up. This is also important because scalar replacement of aggr.
will want instcombine to run before it goes as well.
llvm-svn: 3879
2002-09-22 18:50:22 +00:00