1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
Commit Graph

55 Commits

Author SHA1 Message Date
Chris Lattner
4e9d804f1d Make the stub functions be tail calls
llvm-svn: 21738
2005-05-06 06:48:54 +00:00
Misha Brukman
933cdaf254 Remove trailing whitespace
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Chris Lattner
f1c684b3a2 Silence VS warnings.
llvm-svn: 19390
2005-01-08 20:07:03 +00:00
Chris Lattner
fd2cb25d5f Properly implement a fix for PR475
llvm-svn: 18537
2004-12-05 07:19:16 +00:00
Chris Lattner
0f2cf7324c Revert this patch, it broke a ton of programs.
llvm-svn: 18535
2004-12-05 06:59:59 +00:00
Alkis Evlogimenos
687155333f Fix PR475.
llvm-svn: 18515
2004-12-05 01:51:20 +00:00
Reid Spencer
74b17227a5 Use System/DynamicLibrary instead of Support/DynamicLinker
llvm-svn: 18357
2004-11-29 14:11:29 +00:00
Chris Lattner
c6c7f2ac58 This method does not exist any longer.
llvm-svn: 18061
2004-11-20 23:51:03 +00:00
Chris Lattner
583ea4764c There is no reason to try to materialize the function from bytecode if it
already has been.  This may be a small speedup.

llvm-svn: 17863
2004-11-15 23:18:09 +00:00
Misha Brukman
8c397821a5 Implement ExecutionEngine::freeMachineCodeForFunction()
llvm-svn: 17601
2004-11-07 23:58:46 +00:00
Misha Brukman
cfd8a7eb53 Use cleaner quoting and eliminate blank space
llvm-svn: 17174
2004-10-22 23:35:57 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
ffaad65b22 Add a special case for argc,argv
llvm-svn: 15802
2004-08-16 01:07:04 +00:00
Chris Lattner
9cbc5f306a Finally, add support for calling arbitrary non-varargs functions.
llvm-svn: 15799
2004-08-16 00:14:18 +00:00
Chris Lattner
70ddd561fb Handle all nullary functions, of any valid return type.
llvm-svn: 15798
2004-08-15 23:53:06 +00:00
Chris Lattner
ed3a37a9ed Fine, go all of the way and check that the argument types are correct as well.
llvm-svn: 15797
2004-08-15 23:39:59 +00:00
Chris Lattner
9657e92992 These only really work if returning int or void
llvm-svn: 15796
2004-08-15 23:34:48 +00:00
Chris Lattner
557b356131 Handle zero arg function case
llvm-svn: 15794
2004-08-15 23:31:43 +00:00
Chris Lattner
c5f794403e Simplify code a bit, print error message always instead of asserting.
llvm-svn: 15793
2004-08-15 23:29:50 +00:00
Reid Spencer
b28dd1ea9f Make error message consistent with the rest of LLVM by saying that bytecode
is read, not parsed.

llvm-svn: 14677
2004-07-07 21:20:28 +00:00
Reid Spencer
ff9f74082f Fix for bug 391.
Improve exeception handling around bcreader invocations.

llvm-svn: 14674
2004-07-07 21:01:38 +00:00
Reid Spencer
50ec3f9325 Add #include <iostream> since Value.h does not #include it any more.
llvm-svn: 14622
2004-07-04 12:19:56 +00:00
Brian Gaeke
2c02798e86 Add a TargetData to the PassManager regardless of the TargetMachine.
This should unbreak the Sparc JIT again.

llvm-svn: 12949
2004-04-14 17:45:52 +00:00
Chris Lattner
c76f82c957 Print an error message if there is an error materialize the bc file.
llvm-svn: 11041
2004-02-01 00:32:35 +00:00
Chris Lattner
ddcbddf9e9 No longer run atExit functions from run()
rename run to runFunction
Genericize the runFunction code a little bit, though it still stinks

llvm-svn: 10610
2003-12-26 06:13:47 +00:00
Chris Lattner
013d4bee41 This should not be needed anymore
llvm-svn: 10558
2003-12-20 10:19:18 +00:00
Chris Lattner
edda0e5d4f Implement PR135, lazy emission of global variables
llvm-svn: 10549
2003-12-20 03:36:47 +00:00
Chris Lattner
cd8f92bc62 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.  :)

llvm-svn: 10544
2003-12-20 01:46:27 +00:00
Chris Lattner
1cb1efedb3 Rip JIT specific stuff out of TargetMachine, as per PR176
llvm-svn: 10542
2003-12-20 01:22:19 +00:00
Chris Lattner
ebd5b871e4 Finegrainify namespacification
llvm-svn: 10318
2003-12-08 08:06:28 +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
46510fbed5 Remove #include of PassManager.h which was marked FIXME, and apparently is no
longer used.

llvm-svn: 9823
2003-11-09 03:15:40 +00:00
Misha Brukman
4b82908055 Remove the *BIG UGLY HACK* from the JIT: PreSelection is now a FunctionPass.
llvm-svn: 9790
2003-11-07 20:32:08 +00:00
Brian Gaeke
d6816f603f In VM::create(), comment out almost the whole function if NO_JITS_ENABLED,
because the Arch variable will likely be undefined.

llvm-svn: 9576
2003-10-29 04:24:09 +00:00
John Criswell
b402729b30 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
Misha Brukman
d5c9118c89 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
5252af2728 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
Brian Gaeke
ba6d0a6759 ExecutionEngine.h, GenericValue.h --> include/llvm/ExecutionEngine/
Build ExecutionEngine as library.

llvm-svn: 8370
2003-09-05 19:39:22 +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
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
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
d9a212abca 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
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
Chris Lattner
fc4a57d904 Fix space
llvm-svn: 7273
2003-07-23 20:21:06 +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
Chris Lattner
0aa503a72d Apparently "sparc" is a macro on sparcs. Ugh. :)
llvm-svn: 6744
2003-06-17 15:54:02 +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
1f384965af #ifdef out code that only applies when the HOSTARCH = sparc
llvm-svn: 6741
2003-06-17 15:32:38 +00:00
Misha Brukman
1a3c1a6208 ::: HACK ALERT ::: HACK ALERT ::: HACK ALERT ::: HACK ALERT ::: HACK ALERT :::
The JIT is designed to code-generate a function at-a-time. That means that any
pass can only make local changes to its function. Period.

Because the Sparc PreSelection pass claims to be a BasicBlock pass while adding
globals to the Module, it cannot be run with the other passes, because by this
time, the globals have been output already by the JIT, and the addresses of any
globals appearing AFTER this point are not recognized.

However, the PreSelection pass is a requirement for correctness in the Sparc
codegen path, so it MUST be run.

::: HACK ALERT ::: HACK ALERT ::: HACK ALERT ::: HACK ALERT ::: HACK ALERT :::

llvm-svn: 6650
2003-06-06 06:59:55 +00:00
Misha Brukman
1c70c3f7a3 * 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.

llvm-svn: 6527
2003-06-02 03:23:16 +00:00