Commit Graph

723 Commits

Author SHA1 Message Date
Gordon Henriksen
2566388bc4 PR2202: LLVMCreateInterpreter creates a JIT
Applying fix by Frits van Bommel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-25 02:52:30 +00:00
Nicolas Geoffray
580631a73a Be pessimistic in computing the buffer size when aligning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50008 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 23:39:44 +00:00
Nicolas Geoffray
5913e6c5db Cosmetic changes, as suggested by Evan. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49993 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 17:44:19 +00:00
Nicolas Geoffray
fd7d99120b Do not hold the JIT lock when materializing a function and verify if the
function has already been codegen'd. This is required by the Java class loading
mechanism which executes Java code when materializing a function.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49988 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 08:33:02 +00:00
Chris Lattner
02a260aa11 Switch to using Simplified ConstantFP::get API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49977 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 00:41:09 +00:00
Nicolas Geoffray
dc17ab2bf0 Enable jitting with a known memory size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49924 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 20:59:31 +00:00
Nicolas Geoffray
51cc3c13ea Correlate stubs with functions in JIT: when emitting a stub, the JIT tells the memory manager which function
the stub will resolve.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49814 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 20:46:05 +00:00
Chris Lattner
3b37448904 Fix some serious logic errors that broke the jit on darwin/x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49606 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 07:04:56 +00:00
Evan Cheng
97b8c40d09 Add debugging code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49566 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 00:22:01 +00:00
Chris Lattner
6098e4be94 Reenable JIT symbol table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49548 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 18:11:56 +00:00
Chris Lattner
aee7f21c47 fix warnings with assertions disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49285 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 21:50:58 +00:00
Gabor Greif
051a950000 API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 20:25:17 +00:00
Chris Lattner
e52419147a disable this for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49248 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-05 04:12:01 +00:00
Chris Lattner
8ac66c122b Provide an initial cut at exposing JIT compiled symbols to performance
tools.  This is currently only enabled on the mac, but could easily be
supported by other hosts that are interested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49207 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 05:51:42 +00:00
Chris Lattner
f4cc3096fd Make ExecutionEngine::updateGlobalMapping return the old mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49206 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 04:47:41 +00:00
Chris Lattner
d27c991ceb Fix "Control reaches the end of non-void function" warnings,
patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48963 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-30 18:22:13 +00:00
Erick Tryzelaar
7c1483bc6f Expose ExecutionEngine::getTargetData() to c and ocaml bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48851 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 00:27:14 +00:00
Dan Gohman
950a4c40b8 Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48801 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 22:06:05 +00:00
Anton Korobeynikov
299d9d74e9 Register EH frames emitted in JIT when using gcc unwinding runtime
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48688 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-22 08:53:09 +00:00
Duncan Sands
08bfe26f5a Fix formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48151 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 16:38:37 +00:00
Nick Lewycky
6456d8639b Load the symbols first so that the interpreter constructor can find them when
it tries to initialize them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48046 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-08 02:49:45 +00:00
Chris Lattner
0fdaa0b8f1 fix 80 col violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48019 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-07 20:05:43 +00:00
Dan Gohman
6282406492 Simplify code using convertFromZeroExtendedInteger with an APInt
by using the new convertFromAPInt directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47739 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29 01:27:13 +00:00
Anton Korobeynikov
4c71dfe356 Update gcc 4.3 warnings fix patch with recent head changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47368 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:10:28 +00:00
Anton Korobeynikov
ae9f3a3b7c Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:08:44 +00:00
Evan Cheng
8647bcd5de Added memmove to interpreter external functions list. Patch by Daniel Dunbar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 07:55:26 +00:00
Chris Lattner
b6e1dd7075 Support vector constant zeros, thanks to Zack Rusin for the testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47148 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15 00:57:28 +00:00
Nicolas Geoffray
afe6c2b001 Enable exception handling int JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47079 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13 18:39:37 +00:00
Dan Gohman
3035959425 Use empty() instead of comparing size() with zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46514 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 13:02:09 +00:00
Duncan Sands
d102593b42 Use getPreferredAlignmentLog or getPreferredAlignment
to get the alignment of global variables, rather than
using hand-made versions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46495 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 06:23:44 +00:00
Chris Lattner
1910e2f3ec JITEmitter.cpp was trying to sync the icache for function stubs, but
was actually passing a completely incorrect size to sys_icache_invalidate.
Instead of having the JITEmitter do this (which doesn't have the correct 
size), just make the target sync its own stubs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46354 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-25 16:41:09 +00:00
Duncan Sands
6aae7a748e I doubt the address of the Error string was intended
to be used for the force_interpreter parameter...
Spotted by gcc-4.2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07 19:14:42 +00:00
Evan Cheng
2a3e08b596 X86 JIT PIC jumptable support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45616 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-05 02:26:58 +00:00
Evan Cheng
be8c03fc66 X86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45575 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04 10:46:51 +00:00
Chris Lattner
c45f5c7652 Remove symbols that don't exist, remove tabs, fix comment typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45553 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03 22:15:32 +00:00
Chris Lattner
76327d9cf5 Fix PR1873, a problem finding stat-related symbols on linux, due to
"libc_nonshared.a". Patch by Edwin Török!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45532 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03 07:10:51 +00:00
Evan Cheng
02aabbf96b Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be used
for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45527 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03 02:56:28 +00:00
Chris Lattner
4ee451de36 Remove attribution from file headers, per discussion on llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:36:04 +00:00
Chris Lattner
fc643c5e88 remove attribution from lib Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45415 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:09:26 +00:00
Gordon Henriksen
2e855e68d8 C and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45335 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23 16:59:28 +00:00
Christopher Lamb
43ad6b3e0d Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 01:12:55 +00:00
Duncan Sands
9e4635a5b8 These are more correctly called signaling NaNs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45059 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-15 17:37:40 +00:00
Duncan Sands
8a43e9e5d7 Teach the interpreter to read and write memory in the
endianness of the target not of the host.  Done by the
simple expedient of reversing bytes for primitive types
if the host and target endianness don't match.  This is
correct for integer and pointer types.  I don't know if
it is correct for floating point types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45039 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14 19:38:31 +00:00
Dan Gohman
ded2b0d0fb Add explicit keywords, and fix a minor typo that they uncovered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45034 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14 15:41:34 +00:00
Duncan Sands
67f1c493d1 Remove host endianness info from TargetData and
put it in a new header System/Host.h instead.
Instead of getting the endianness from configure,
calculate it directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44959 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 23:03:45 +00:00
Zhou Sheng
621deadee8 Add a guard to cxxabi header as other platform may
not support it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44914 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:16:47 +00:00
Zhou Sheng
6a7951ce9b Fixed PR1629.
Make lli interpreter correctly call external functions sin()/cos(),
__cxa_guard_acquire() and __cxa_guard_release().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44910 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 04:55:43 +00:00
Duncan Sands
1eff70451f Fix PR1836: in the interpreter, read and write apints
using the minimum possible number of bytes.  For little
endian targets run on little endian machines, apints are
stored in memory from LSB to MSB as before.  For big endian
targets on big endian machines they are stored from MSB to
LSB which wasn't always the case before (if the target and
host endianness doesn't match values are stored according
to the host's endianness).  Doing this requires knowing the
endianness of the host, which is determined when configuring -
thanks go to Anton for this.  Only having access to little
endian machines I was unable to properly test the big endian
part, which is also the most complicated...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44796 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10 17:43:13 +00:00
Duncan Sands
22ad1d72cd It looks like this has been broken for some time -
get it to compile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44791 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10 14:43:10 +00:00
Chuck Rose III
3012ac63d3 Adjust VStudio files to add JITMemoryManager files + include <cassert> from same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44651 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06 02:03:01 +00:00