Benjamin Kramer
e90a3c66c4
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
...
llvm-svn: 92726
2010-01-05 13:12:22 +00:00
David Greene
28c02548d3
These should probably be errs().
...
llvm-svn: 92673
2010-01-05 01:53:59 +00:00
David Greene
7da633ede5
Change errs() to dbgs().
...
llvm-svn: 92618
2010-01-05 01:27:26 +00:00
David Greene
e874c127bd
Change errs() to dbgs().
...
llvm-svn: 92616
2010-01-05 01:27:23 +00:00
Nick Lewycky
ac0e7c8aca
Fix passing of float arguments through ffi.
...
llvm-svn: 89198
2009-11-18 05:43:15 +00:00
Nick Lewycky
f6d8788686
Fail less mysteriously; inform the user that their LLVM was not built with
...
libffi support and that the interpreter can't call external functions without
it. Patch by Timo Juhani Lindfors! Fixes PR5466.
llvm-svn: 89062
2009-11-17 07:52:09 +00:00
Daniel Dunbar
c2a6a7dea5
Remove ByteswapSCANFResults, it is dead.
...
llvm-svn: 86458
2009-11-08 09:46:57 +00:00
Nick Lewycky
1909b23533
We don't need to byteswap, the interpreter assumes the program is running
...
native anyways. This fixes a crash using %d and similar in a scanf statement.
llvm-svn: 86440
2009-11-08 05:45:04 +00:00
Nick Lewycky
21dd3f31b0
Fix the interpreter to not crash due to zeroext/signext
...
llvm-svn: 86428
2009-11-08 00:45:29 +00:00
Chris Lattner
9bc4a421e2
add interpreter support for indirect goto / blockaddress. The interpreter
...
now correctly runs clang's test/CodeGen/indirect-goto.c. The JIT will abort
on it until someone feels compelled to implement this.
llvm-svn: 85488
2009-10-29 05:26:09 +00:00
Victor Hernandez
673c036bc7
Remove FreeInst.
...
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.
llvm-svn: 85176
2009-10-26 23:43:48 +00:00
Chandler Carruth
766362c707
Move DataTypes.h to include/llvm/System, update all users. This breaks the last
...
direct inclusion edge from System to Support.
llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Victor Hernandez
8428eb5720
Remove AllocationInst. Since MallocInst went away, AllocaInst is the only subclass of AllocationInst, so it no longer is necessary.
...
llvm-svn: 84969
2009-10-23 21:09:37 +00:00
Chris Lattner
a3cf123e86
strength reduce a ton of type equality tests to check the typeid (Through
...
the new predicates I added) instead of going through a context and doing a
pointer comparison. Besides being cheaper, this allows a smart compiler
to turn the if sequence into a switch.
llvm-svn: 83297
2009-10-05 05:54:46 +00:00
Nick Lewycky
6fccd67e2f
Stop using alloca.
...
llvm-svn: 82225
2009-09-18 16:46:16 +00:00
Daniel Dunbar
c688e9b700
Some platforms may need malloc.h for alloca.
...
llvm-svn: 82100
2009-09-17 00:14:44 +00:00
Chris Lattner
e22a1d941e
remove some uses of llvm/Support/Streams.h
...
llvm-svn: 79842
2009-08-23 08:43:55 +00:00
Chris Lattner
8500c36f86
remove the std::ostream version of module and type printing.
...
llvm-svn: 79823
2009-08-23 04:52:46 +00:00
Chris Lattner
01dae858b6
eliminate the "Value" printing methods that print to a std::ostream.
...
This required converting a bunch of stuff off DOUT and other cleanups.
llvm-svn: 79819
2009-08-23 04:37:46 +00:00
Owen Anderson
9df206d02d
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Dan Gohman
bc6b14ba00
This void is implicit in C++.
...
llvm-svn: 78848
2009-08-12 22:10:57 +00:00
Daniel Dunbar
3123a37b69
MSVC warning fixes; patch by Stein Roger!
...
llvm-svn: 78405
2009-08-07 20:50:09 +00:00
Benjamin Kramer
7869bad67e
llvm_report_error already prints "LLVM ERROR:". So stop reporting errors like "LLVM ERROR: llvm: error:" or "LLVM ERROR: ERROR:".
...
llvm-svn: 77971
2009-08-03 13:33:33 +00:00
Daniel Dunbar
e3fea713f1
Switch to getNameStr().
...
llvm-svn: 76962
2009-07-24 08:24:36 +00:00
Daniel Dunbar
0ff394b13d
Simplify some uses of Value::getName()
...
llvm-svn: 76786
2009-07-22 21:10:12 +00:00
Reid Kleckner
5460ad390c
Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
...
Also a test commit.
llvm-svn: 76276
2009-07-18 00:42:18 +00:00
Torok Edwin
f955a6ef49
llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
...
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").
llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Torok Edwin
ae8a3ff177
assert(0) -> LLVM_UNREACHABLE.
...
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.
llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Torok Edwin
9b41a5faf2
Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
...
and abort()/exit() -> llvm_report_error().
llvm-svn: 75363
2009-07-11 13:10:19 +00:00
Chris Lattner
3b6ab3722d
remove dead function.
...
llvm-svn: 75143
2009-07-09 16:57:49 +00:00
Jeffrey Yasskin
2ef60bd58a
Add an option to allocate JITed global data separately from code. By
...
default, this option is not enabled to support clients who rely on
this behavior.
Fixes http://llvm.org/PR4483
A patch to allocate additional memory for globals after we run out is
forthcoming.
Patch by Reid Kleckner!
llvm-svn: 75059
2009-07-08 21:59:57 +00:00
Owen Anderson
75f0f1cc6c
Have scoped mutexes take referenes instead of pointers.
...
llvm-svn: 74931
2009-07-07 18:33:04 +00:00
Owen Anderson
6448beadc8
Get rid of unnecessary global variables.
...
llvm-svn: 74291
2009-06-26 16:46:15 +00:00
Bob Wilson
653f309975
Fix the Ocaml bindings for the ExecutionEngine: with the change to build
...
libraries instead of relinked objects, the interpreter, JIT, and native
target libraries were not being linked in to an ocaml program using the
ExecutionEngine.
llvm-svn: 74117
2009-06-24 21:09:18 +00:00
Douglas Gregor
3ca1e68417
Eliminate object-relinking support from CMake. Fixes PR 4429 and
...
cleans up the CMake-based build system a bit. Started by a patch from
Xerxes Rånby.
llvm-svn: 73969
2009-06-23 17:57:35 +00:00
Owen Anderson
81cb764902
Add locking around the external function lookup table for the interpreter.
...
llvm-svn: 73912
2009-06-22 22:30:56 +00:00
Dan Gohman
5f6f8101d5
Split the Add, Sub, and Mul instruction opcodes into separate
...
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.
For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.
This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt
llvm-svn: 72897
2009-06-04 22:49:04 +00:00
Duncan Sands
f7af13b2d4
Rename PaddedSize to AllocSize, in the hope that this
...
will make it more obvious what it represents, and stop
it being confused with the StoreSize.
llvm-svn: 71349
2009-05-09 07:06:46 +00:00
Bill Wendling
40a162f75f
Instead of passing in an unsigned value for the optimization level, use an enum,
...
which better identifies what the optimization is doing. And is more flexible for
future uses.
llvm-svn: 70440
2009-04-29 23:29:43 +00:00
Bill Wendling
50971fd69c
The second part of the change from -fast to -O#. This changes the JIT to accept
...
an optimization level instead of a simple boolean telling it to generate code
"fast" or the other type of "fast".
llvm-svn: 70347
2009-04-29 00:32:19 +00:00
Nick Lewycky
1a908fef1a
Link against libffi if available, fall back to "no external calls from
...
interpreter mode" when it's not.
llvm-svn: 68937
2009-04-13 04:26:06 +00:00
Dan Gohman
770f4158e5
Use CHAR_BIT instead of hard-coding 8 in several places where it
...
is appropriate. This helps visually differentiate host-oriented
calculations from target-oriented calculations.
llvm-svn: 68227
2009-04-01 18:45:54 +00:00
Nick Lewycky
a9c6af0bb8
Reapply patch from r62553, with a fix to avoid looking for an ffi.h that isn't
...
there.
This changes the interpreter to use libffi. After this patch, the interpreter
will barely be able to call any external functions if built on a system without
libffi installed (just enough to pass 'make check' really). But with libffi,
we can now call any function that isn't variadic or taking a struct or vector
parameter (but pointer to struct is fine). Patch by Alexei Svitkine!
llvm-svn: 63723
2009-02-04 06:26:47 +00:00
Tanya Lattner
33f3303401
Revert r62553 and r62616 due to issues with portability.
...
llvm-svn: 62777
2009-01-22 20:09:20 +00:00
Duncan Sands
eb7ffc9654
Fix typo. Patch by Alexei Svitkine.
...
llvm-svn: 62616
2009-01-20 21:20:23 +00:00
Nick Lewycky
6ef90b1a25
Make the Interpreter use libffi if it's available. Patch from Alexei Svitkine!
...
This requires a rebuild of 'configure' itself. I will be committing that next, but
built with the wrong version of autoconf. Somebody who has the right one, please update
it.
As a side-note, because of the way autoconf works, all built tools will link against
libffi, not just lli. If you know how to fix this, please let me know ...
llvm-svn: 62553
2009-01-20 00:51:40 +00:00
Chris Lattner
0354d30311
don't assert and die on out of range (undefined) shifts. This fixes
...
PR3334.
llvm-svn: 62352
2009-01-16 20:17:02 +00:00
Duncan Sands
bcdbfb63dc
Rename getABITypeSize to getTypePaddedSize, as
...
suggested by Chris.
llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Misha Brukman
71c7e40966
Removed trailing whitespace from Makefiles.
...
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Dan Gohman
8271066844
Tidy up #includes, deleting a bunch of unnecessary #includes.
...
llvm-svn: 61715
2009-01-05 17:59:02 +00:00