Commit Graph

283 Commits

Author SHA1 Message Date
John Criswell 29265fe981 Added LLVM copyright header.
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
John Criswell 4436c49787 Added LLVM copyright notice to Makefiles.
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell 482202a601 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner f2a34aa278 Hrm, a relic from the past. How cute :)
llvm-svn: 9283
2003-10-20 05:45:49 +00:00
Chris Lattner fefd3bebc4 Interpret the new varargs intrinsics correctly
llvm-svn: 9222
2003-10-18 05:55:25 +00:00
Misha Brukman e37fb9ddc5 Don't release the Module, as that invalidates the Module* within the
ModuleProvider, which has bad consequences in lli::callAsMain() which tries to
access that same Module*.

llvm-svn: 9205
2003-10-17 18:31:59 +00:00
Brian Gaeke d2bc5ac045 Tidy up doxygen comment for getPointerToFunction().
Add prototypes for recompileAndRelinkFunction() and runJITOnFunction().

llvm-svn: 9200
2003-10-17 18:27:12 +00:00
Brian Gaeke 3b5f24513c Refactor running the JIT passes on a single function into the new method,
runJITOnFunction().

Add new method for recompiling and patching in new versions of functions,
recompileAndRelinkFunction().

llvm-svn: 9199
2003-10-17 18:27:00 +00:00
Brian Gaeke 13b9395071 Fix a typo in a comment, and zap a blank line.
llvm-svn: 9184
2003-10-16 23:33:38 +00:00
Misha Brukman 1273147daf JIT.cpp:
* #include "llvm/ModuleProvider"
* alphabetize #includes
* omit extraneous parens in pointer expressions

VM.cpp:
* #include "llvm/ModuleProvider"
* alphabetize #includes

llvm-svn: 9182
2003-10-16 21:19:34 +00:00
Misha Brukman 260b0c88a0 * Reorder includes as per the style guide
* Move the constructors from .h file here
* Document ExecutionEngine::create()
* Catch exception possibly thrown by ModuleProvider::releaseModule()

llvm-svn: 9181
2003-10-16 21:18:05 +00:00
Misha Brukman 1d2d8ec853 Order #includes as per the style guide.
llvm-svn: 9128
2003-10-14 21:42:11 +00:00
Misha Brukman 299f3e650f Enabling incremental bytecode loading in the JIT:
* The VM is now constructed with a ModuleProvider

llvm-svn: 9125
2003-10-14 21:37:41 +00:00
Misha Brukman 2f1e200248 Enabling incremental bytecode loading in the JIT:
* ExecutionEngine and VM can be constructed using a ModuleProvider.

llvm-svn: 9124
2003-10-14 21:36:31 +00:00
Brian Gaeke 74edce6f7c Make mmap's fd for anonymous memory acquisition default to -1, except on
Linux. This is consistent with what FreeBSD and Solaris both want.
This makes the JIT work on FreeBSD 5.1-RELEASE. Whee.

llvm-svn: 9045
2003-10-11 03:51:18 +00:00
Brian Gaeke cc31fddf13 Don't include Config/stdio.h or <stdio.h>.
llvm-svn: 9031
2003-10-10 18:46:29 +00:00
Misha Brukman 857c21b4e0 * Tabs to spaces
* Doxygenified function comments
* Added FIXMEs to solicit documentation for other functions

llvm-svn: 9022
2003-10-10 17:45:12 +00:00
Misha Brukman aa7d26c8c8 Fix spelling.
llvm-svn: 9021
2003-10-10 17:42:19 +00:00
Brian Gaeke 20c65741d0 Never set any signal handlers.
Never call setjmp(), longjmp() or strsignal().

llvm-svn: 9014
2003-10-10 17:03:22 +00:00
Brian Gaeke 6cc20deac1 Rewrite head-of-file comment.
In lookupFunction():
 Change to use "F" for Function argument instead of ancient "M".
 Remove commented-out code.
 Change to use GetAddressOfSymbol instead of dlsym.

llvm-svn: 9013
2003-10-10 17:03:10 +00:00
Brian Gaeke e8bbcfc298 Change to use GetAddressOfSymbol instead of dlsym.
llvm-svn: 9012
2003-10-10 17:02:42 +00:00
Chris Lattner 93cb392a33 Do not read past the end of the contained type list
llvm-svn: 8986
2003-10-09 20:31:18 +00:00
Chris Lattner a220b04ce4 Actually _PASS IN_ NO_RESERVE if we have it.
Thanks to Brian for fixing this obvious oops

llvm-svn: 8899
2003-10-06 19:07:41 +00:00
Chris Lattner 2caaaba3e9 Squelch warning
llvm-svn: 8659
2003-09-22 20:33:34 +00:00
Chris Lattner a28e1f281a Change FunctionInfo from being an annotation put on Functions to be
something which is mapped from functions.

llvm-svn: 8580
2003-09-17 17:26:22 +00:00
Misha Brukman 93d0ffb864 * Move include files from middle of file to the top where they belong, moving
the #define up there too
* Since we're including system headers, use the ones in include/llvm/Config
* While we're here, use the canonical LLVM header ordering algorithm

llvm-svn: 8463
2003-09-10 20:52:05 +00:00
Misha Brukman 8c056e4337 Fix warning when _POSIX_MAPPED_FILES is already defined in unistd.h
llvm-svn: 8436
2003-09-10 15:09:45 +00:00
Chris Lattner 6052fe375c Remove a bunch of unneeded stuph
llvm-svn: 8400
2003-09-08 18:19:58 +00:00
Chris Lattner ad48131254 Reorder #includes to follow LLVM conventions
llvm-svn: 8375
2003-09-05 20:08:15 +00:00
Brian Gaeke f3a300d578 ExecutionEngine.h, GenericValue.h --> include/llvm/ExecutionEngine/
Build ExecutionEngine as library.

llvm-svn: 8370
2003-09-05 19:39:22 +00:00
Brian Gaeke 9b518bc0be Make getOperandValue and executeCastOperation methods of Interpreter.
This lets us protect a few more ExecutionEngine methods.

llvm-svn: 8367
2003-09-05 18:55:03 +00:00
Brian Gaeke a7669038fc Make CreateArgv part of lli rather than part of ExecutionEngine.
Switch Interpreter and JIT's "run" methods to take a Function and a vector of
 GenericValues.
Move (almost all of) the stuff that constructs a canonical call to main()
 into lli (new methods "callAsMain", "makeStringVector").
Nuke getCurrentExecutablePath(), enableTracing(), getCurrentFunction(),
 isStopped(), and many dead decls from interpreter.
Add linux strdup() support to interpreter.
Make interpreter's atexit handler runner and JIT's runAtExitHandlers() look
 more alike, in preparation for refactoring.
atexit() is spelled "atexit", not "at_exit".

llvm-svn: 8366
2003-09-05 18:42:01 +00:00
Brian Gaeke 33d98aebe7 Remove printOperandInfo(), and simplify run().
llvm-svn: 8362
2003-09-05 05:22:08 +00:00
Brian Gaeke ed9917b3f8 Remove support for printing values from a module by name, only used
w/ interactive keyboard entry of names.
With that, Support.cpp is history.

llvm-svn: 8360
2003-09-05 05:04:32 +00:00
Brian Gaeke 8421765778 Remove support for interactive (step finish next) instructions.
Remove printCurrentInstruction, printStackFrame and infoValue
 (only used interactively) and other unused methods of Interpreter.
Fold UserInput.cpp containing only callMainFunction() into Interpreter.cpp.
Remove unused Profile flag.

llvm-svn: 8359
2003-09-05 04:46:26 +00:00
Brian Gaeke 411281cc82 Remove support for breakpoints (not used).
Remove some dead code and whitespace.

llvm-svn: 8346
2003-09-04 23:15:40 +00:00
Brian Gaeke 92f8b30d24 Move EE dtor where it belongs
llvm-svn: 8345
2003-09-04 22:57:27 +00:00
Brian Gaeke e80e5ba7f8 Interpreter cleanups:
Get rid of support for DebugMode (make it always off).
Mung some comments.
Get rid of interpreter's PROFILE_STRUCTURE_FIELDS and PerformExitStuff
 which have been disabled forever.
Get rid of -abort-on-exception (make it always on).
Get rid of user interaction stuff (debug mode innards).
Simplify Interpreter's callMainFunction().

llvm-svn: 8344
2003-09-04 22:21:24 +00:00
Brian Gaeke 4bd3bd5b5a ExecutionEngine.cpp: Move execution engine creation stuff into a new
static method here.
 Remove some extra blank lines.
ExecutionEngine.h: Add its prototype.
lli.cpp: Call it.

Make creation method for each type of EE into a static method of its
own subclass.

Interpreter/Interpreter.cpp: ExecutionEngine::createInterpreter -->
 Interpreter::create
Interpreter/Interpreter.h: Likewise.
JIT/JIT.cpp: ExecutionEngine::createJIT --> VM::create
JIT/VM.h: Likewise.

llvm-svn: 8343
2003-09-03 20:34:19 +00:00
Chris Lattner e722930efd Preselection is now integrated into the Sparc target library
llvm-svn: 8305
2003-09-01 20:30:17 +00:00
Chris Lattner c7f87d30ab Sparc peephole optimizer moved out of post-opts library into Sparc target library
llvm-svn: 8302
2003-09-01 20:26:14 +00:00
Chris Lattner 69cab0dd52 Consult the target data, not the module, about how large the current pointer
size is.  This ensures that if the module has no specified pointer size that
things will work correctly.

llvm-svn: 8136
2003-08-24 19:55:26 +00:00
Chris Lattner 4d4f424f0c Targets now configure themselves based on the source module, not on the
ad-hoc "Config" flags

llvm-svn: 8134
2003-08-24 19:50:53 +00:00
Chris Lattner 479854091a Add preliminary support for "any" pointersize/endianness. This will need
to change soon though.

llvm-svn: 8123
2003-08-24 14:02:47 +00:00
Chris Lattner abca19d2b3 Minor cleanups: wrap at 80 lines. Convert file comment to doxygen format and
llvm style

llvm-svn: 8024
2003-08-21 21:32:12 +00:00
John Criswell 71c3e6236f The JIT now passes the environment pointer to the main() function when it
starts a program.  This allows the GNU env program to compile and JIT under
LLVM.

llvm-svn: 8022
2003-08-21 21:12:30 +00:00
Chris Lattner 8e69339879 no really, implement it!
llvm-svn: 7955
2003-08-18 17:33:15 +00:00
Chris Lattner 0627a96e7e Add support for casting any pointer to any integer type
llvm-svn: 7953
2003-08-18 17:23:40 +00:00
Misha Brukman 7eb05a170a Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner 6ae402fd2c rename selection library to selectiondag
llvm-svn: 7878
2003-08-15 04:56:09 +00:00