1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

715 Commits

Author SHA1 Message Date
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