Commit Graph

23 Commits

Author SHA1 Message Date
Chris Lattner
7301178aac Pass around IntrinsicLowering instances as appropriate.
Reimplement the Interpreters implementation of va_* to be more direct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10627 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 09:44:37 +00:00
Chris Lattner
ff0f1bb32a No longer run atExit functions from run()
rename run to runFunction
Genericize the runFunction code a little bit, though it still stinks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10610 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-26 06:13:47 +00:00
Chris Lattner
c07ed13875 Implement PR135, lazy emission of global variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10549 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 03:36:47 +00:00
Chris Lattner
4d326fa9be Cleanup the JIT as per PR176. This renames the VM class to JIT, and merges the
VM.cpp and JIT.cpp files into JIT.cpp.  This also splits some nasty code out
into TargetSelect.cpp so that people hopefully won't notice it.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10544 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 01:46:27 +00:00
Chris Lattner
1e60a9165d Rip JIT specific stuff out of TargetMachine, as per PR176
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 01:22:19 +00:00
Chris Lattner
993bdcec00 Implement the ExecutionEngine::getPointerToFunctionOrStub by forwarding the
request on to the TargetMachine if it supports the getJITStubForFunction method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10431 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-12 07:12:02 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
John Criswell
856ba76200 Added LLVM copyright header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9321 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 15:17:13 +00:00
Brian Gaeke
55c0f02cbf Tidy up doxygen comment for getPointerToFunction().
Add prototypes for recompileAndRelinkFunction() and runJITOnFunction().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9200 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-17 18:27:12 +00:00
Misha Brukman
005e5e9a48 Enabling incremental bytecode loading in the JIT:
* The VM is now constructed with a ModuleProvider


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9125 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:37:41 +00:00
Brian Gaeke
9722294d30 ExecutionEngine.h, GenericValue.h --> include/llvm/ExecutionEngine/
Build ExecutionEngine as library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8370 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 19:39:22 +00:00
Brian Gaeke
70975eef57 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".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8366 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 18:42:01 +00:00
Brian Gaeke
82d8277ad5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8343 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-03 20:34:19 +00:00
John Criswell
69582b35b6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8022 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 21:12:30 +00:00
Brian Gaeke
c227c1fc7f Deconstify parameter to getPointerToFunction().
Use a FunctionPassManager instead of a PassManager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7820 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:16:50 +00:00
Misha Brukman
906f5fa5c8 * Removed SparcEmitter.cpp; rolled into lib/Target/Sparc/SparcV9CodeEmitter.cpp
* No more createX86Emitter() vs. createSparcEmitter() -- there can be only one
* As a result, the memory management semantics must be handled according to
  platform -- the parameters to mmap() are particularly sensitive to the host
  architecture.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6527 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 03:23:16 +00:00
Chris Lattner
bba1b6df9a Move target specific code to target files. The new MachineCodeEmitter
class is actually target independent!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6517 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 23:24:36 +00:00
Misha Brukman
abb027cf41 Allow for specification of which JIT to run on the commandline.
`lli -march=x86' or `lli -march=sparc' will forcefully select the JIT even on a
different platform. Running lli without the -march option will select the JIT
for the platform that it's currently running on.

Pro: can test Sparc JIT (debug printing mode) on X86 -- faster to compile/link
LLVM source base to test changes.
Con: Linking lli on x86 now pulls in all the Sparc libs -> longer link time
(but X86 can bear it, right?)

In the future, perhaps this should be a ./configure option to enable/disable
target JITting...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6360 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 21:40:39 +00:00
Chris Lattner
22080f9f16 Add support for atexit handlers to the JIT, fixing 2003-05-14-AtExit.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6193 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-14 13:53:40 +00:00
Chris Lattner
6125fddb52 Add support for function stubs, which allow calling functions which need to
have an address available, but have not yet been code generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6059 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-09 03:30:07 +00:00
Chris Lattner
c309a7627c Improve efficiency of JIT by having it use direct function calls instead of
signals to regain control from the executing code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6051 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 21:34:11 +00:00
Chris Lattner
0d448c03f3 Add support for named functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5258 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 01:00:48 +00:00
Chris Lattner
836f675c49 Initial checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5127 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-24 00:01:22 +00:00