summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Commit message (Collapse)AuthorAge
* [C++] Use 'nullptr'.Craig Topper2014-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207083 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't expose symbols of lle_ functions.Benjamin Kramer2013-09-11
| | | | | | + formatting fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190523 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm interpreter: select, shuffle and insertelement instructions.Elena Demikhovsky2013-09-02
| | | | | | | | | | | This patch implements vector support for select instruction and adds specific vector instructions : shuffle and insertelement. (tests are also included) and functions lle_X_memset, lle_X_memcpy added. Done by Veselov, Yuri (mailto:Yuri.Veselov@intel.com) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189735 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-03
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the majority of the next patch in the address space series:Chandler Carruth2012-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r165941: Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis. Despite this commit log, this change primarily changed stuff outside of VMCore, and those changes do not carry any tests for correctness (or even plausibility), and we have consistently found questionable or flat out incorrect cases in these changes. Most of them are probably correct, but we need to devise a system that makes it more clear when we have handled the address space concerns correctly, and ideally each pass that gets updated would receive an accompanying test case that exercises that pass specificaly w.r.t. alternate address spaces. However, from this commit, I have retained the new C API entry points. Those were an orthogonal change that probably should have been split apart, but they seem entirely good. In several places the changes were very obvious cleanups with no actual multiple address space code added; these I have not reverted when I spotted them. In a few other places there were merge conflicts due to a cleaner solution being implemented later, often not using address spaces at all. In those cases, I've preserved the new code which isn't address space dependent. This is part of my ongoing effort to clean out the partial address space code which carries high risk and low test coverage, and not likely to be finished before the 3.2 release looms closer. Duncan and I would both like to see the above issues addressed before we return to these changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167222 91177308-0d34-0410-b5e6-96231b3b80d8
* Resubmit the changes to llvm core to update the functions to support ↵Micah Villmow2012-10-15
| | | | | | different pointer sizes on a per address space basis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165941 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 165732 for further review.Micah Villmow2012-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165747 91177308-0d34-0410-b5e6-96231b3b80d8
* Add in the first iteration of support for llvm/clang/lldb to allow variable ↵Micah Villmow2012-10-11
| | | | | | per address space pointer sizes to be optimized correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165726 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetData to DataLayout.Micah Villmow2012-10-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
* EE/Interpreter/ExternalFunctions.cpp: Staticize lle_X_() entries. They can ↵NAKAMURA Takumi2012-02-24
| | | | | | be mapped in FuncNames[] at the initialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151313 91177308-0d34-0410-b5e6-96231b3b80d8
* EE/Interpreter/ExternalFunctions.cpp: Prune "C" linkage to suppress warnings ↵NAKAMURA Takumi2012-02-24
| | | | | | | | | | | | with -Wreturn-type (and MSC's w4190). In historical reason, Interpreter's external entries had prefix "lle_X_" as C linkage, even for well-known entries in EE/Interpreter. Now, at least on ToT, they are resolved via FuncNames[] mapper. We will not need their symbols are expected to be exported any more. Clang r150128 has introduced the warning <"%0 has C-linkage specified, but returns user-defined type %1 which is incompatible with C">. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151312 91177308-0d34-0410-b5e6-96231b3b80d8
* Using the new external-linkage warning recently added instead of disabling ↵Aaron Ballman2012-02-14
| | | | | | all return type warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150512 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing warning due to the new "UTD return type in extern 'C'".Aaron Ballman2012-02-14
| | | | | | Patch by Matt Johnson git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150508 91177308-0d34-0410-b5e6-96231b3b80d8
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144648 91177308-0d34-0410-b5e6-96231b3b80d8
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the Type::getDescription() method, using "<<" instead. This Chris Lattner2011-06-18
| | | | | | | removes some gunk from LLVMContext. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133360 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some tab stops into spaces.Duncan Sands2010-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
* Typo noticed by Duncan.Torok Edwin2010-03-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99918 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't overwrite previous value, if it succeeded.Torok Edwin2010-03-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99886 91177308-0d34-0410-b5e6-96231b3b80d8
* Honour addGlobalMapping() in the interpreter, if it was used to add mappings forTorok Edwin2010-03-30
| | | | | | | external Functions (the JIT does honour this). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99885 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace strcpy with memcpy when we have the length around anyway.Benjamin Kramer2010-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94746 91177308-0d34-0410-b5e6-96231b3b80d8
* These should probably be errs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92673 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92618 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix passing of float arguments through ffi.Nick Lewycky2009-11-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89198 91177308-0d34-0410-b5e6-96231b3b80d8
* Fail less mysteriously; inform the user that their LLVM was not built withNick Lewycky2009-11-17
| | | | | | | | libffi support and that the interpreter can't call external functions without it. Patch by Timo Juhani Lindfors! Fixes PR5466. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89062 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove ByteswapSCANFResults, it is dead.Daniel Dunbar2009-11-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86458 91177308-0d34-0410-b5e6-96231b3b80d8
* We don't need to byteswap, the interpreter assumes the program is runningNick Lewycky2009-11-08
| | | | | | | native anyways. This fixes a crash using %d and similar in a scanf statement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86440 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop using alloca.Nick Lewycky2009-09-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82225 91177308-0d34-0410-b5e6-96231b3b80d8
* Some platforms may need malloc.h for alloca.Daniel Dunbar2009-09-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82100 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some uses of llvm/Support/Streams.hChris Lattner2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79842 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* This void is implicit in C++.Dan Gohman2009-08-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78848 91177308-0d34-0410-b5e6-96231b3b80d8
* MSVC warning fixes; patch by Stein Roger!Daniel Dunbar2009-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78405 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to getNameStr().Daniel Dunbar2009-07-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76962 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify some uses of Value::getName()Daniel Dunbar2009-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76786 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-11
| | | | | | | and abort()/exit() -> llvm_report_error(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75363 91177308-0d34-0410-b5e6-96231b3b80d8
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
* Add locking around the external function lookup table for the interpreter.Owen Anderson2009-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73912 91177308-0d34-0410-b5e6-96231b3b80d8
* Link against libffi if available, fall back to "no external calls fromNick Lewycky2009-04-13
| | | | | | | interpreter mode" when it's not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68937 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply patch from r62553, with a fix to avoid looking for an ffi.h that isn'tNick Lewycky2009-02-04
| | | | | | | | | | | | | 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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63723 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r62553 and r62616 due to issues with portability.Tanya Lattner2009-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62777 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo. Patch by Alexei Svitkine.Duncan Sands2009-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62616 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the Interpreter use libffi if it's available. Patch from Alexei Svitkine!Nick Lewycky2009-01-20
| | | | | | | | | | | | 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 ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62553 91177308-0d34-0410-b5e6-96231b3b80d8
* Add <cstdio> include where needed by gcc-4.4.Duncan Sands2008-10-08
| | | | | | | Patch by Samuel Tardieu. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57291 91177308-0d34-0410-b5e6-96231b3b80d8
* Use strcpy instead of sprintf here. This avoids a GCC 4.3 format-stringDan Gohman2008-08-05
| | | | | | | | warning. There wasn't actually a problem here, because the contents of the string are known. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54385 91177308-0d34-0410-b5e6-96231b3b80d8