summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sort the remaining #include lines in include/... and lib/....Chandler Carruth2017-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
* Fix some Clang-tidy modernize-use-using and Include What You Use warnings; ↵Eugene Zelenko2016-08-231-3/+13
| | | | | | | | other minor fixes. Differential revision: https://reviews.llvm.org/D23789 llvm-svn: 279535
* Fix ffiInvoke() use of DataLayout, broken in 242414Mehdi Amini2015-07-161-3/+3
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 242456
* Make ExecutionEngine owning a DataLayoutMehdi Amini2015-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. The ExecutionEngine will act as an exception and will be unsafe to be reused across context. We don't enforce this rule but undefined behavior can occurs if the user tries to do it. Reviewers: lhames Subscribers: echristo, llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11110 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 242414
* Revert "Make ExecutionEngine owning a DataLayout"Michael Kuperstein2015-07-161-1/+1
| | | | | | | | Reverting to fix buildbot breakage. This reverts commit r242387. llvm-svn: 242394
* Make ExecutionEngine owning a DataLayoutMehdi Amini2015-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. The ExecutionEngine will act as an exception and will be unsafe to be reused across context. We don't enforce this rule but undefined behavior can occurs if the user tries to do it. Reviewers: lhames Subscribers: echristo, llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11110 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 242387
* [ExecutionEngine] ArrayRefize argument passing.Benjamin Kramer2015-06-131-31/+18
| | | | | | No functionality change intended. llvm-svn: 239687
* Remove more superfluous .str() and replace std::string concatenation with Twine.Yaron Keren2015-03-301-5/+4
| | | | | | Following r233392, http://llvm.org/viewvc/llvm-project?rev=233392&view=rev. llvm-svn: 233555
* Converting FuncNames to a ManagedStatic to avoid static constructors and ↵Chris Bieneman2014-09-191-14/+14
| | | | | | destructors. llvm-svn: 218151
* Support: add llvm::unique_lockDylan Noblesmith2014-08-231-3/+4
| | | | | | | | | | | | | | | Based on the STL class of the same name, it guards a mutex while also allowing it to be unlocked conditionally before destruction. This eliminates the last naked usages of mutexes in LLVM and clang. It also uncovered and fixed a bug in callExternalFunction() when compiled without USE_LIBFFI, where the mutex would never be unlocked if the end of the function was reached. llvm-svn: 216338
* Support: make LLVM Mutexes STL-compatibleDylan Noblesmith2014-08-231-3/+3
| | | | | | Use lock/unlock() convention instead of acquire/release(). llvm-svn: 216336
* [C++] Use 'nullptr'.Craig Topper2014-04-241-3/+3
| | | | llvm-svn: 207083
* Don't expose symbols of lle_ functions.Benjamin Kramer2013-09-111-7/+6
| | | | | | + formatting fixes. llvm-svn: 190523
* llvm interpreter: select, shuffle and insertelement instructions.Elena Demikhovsky2013-09-021-2/+30
| | | | | | | | | 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) llvm-svn: 189735
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-3/+3
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 171366
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-5/+5
| | | | | | | | | | | | | | | | | 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. =] llvm-svn: 169131
* Revert the majority of the next patch in the address space series:Chandler Carruth2012-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 167222
* Resubmit the changes to llvm core to update the functions to support ↵Micah Villmow2012-10-151-1/+1
| | | | | | different pointer sizes on a per address space basis. llvm-svn: 165941
* Revert 165732 for further review.Micah Villmow2012-10-111-1/+1
| | | | llvm-svn: 165747
* Add in the first iteration of support for llvm/clang/lldb to allow variable ↵Micah Villmow2012-10-111-1/+1
| | | | | | per address space pointer sizes to be optimized correctly. llvm-svn: 165726
* Move TargetData to DataLayout.Micah Villmow2012-10-081-4/+4
| | | | llvm-svn: 165402
* EE/Interpreter/ExternalFunctions.cpp: Staticize lle_X_() entries. They can ↵NAKAMURA Takumi2012-02-241-0/+8
| | | | | | be mapped in FuncNames[] at the initialization. llvm-svn: 151313
* EE/Interpreter/ExternalFunctions.cpp: Prune "C" linkage to suppress warnings ↵NAKAMURA Takumi2012-02-241-22/+0
| | | | | | | | | | | | 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">. llvm-svn: 151312
* Using the new external-linkage warning recently added instead of disabling ↵Aaron Ballman2012-02-141-1/+1
| | | | | | all return type warnings. llvm-svn: 150512
* Fixing warning due to the new "UTD return type in extern 'C'".Aaron Ballman2012-02-141-2/+9
| | | | | | Patch by Matt Johnson llvm-svn: 150508
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-1/+0
| | | | llvm-svn: 148578
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-151-3/+4
| | | | llvm-svn: 144648
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-17/+17
| | | | llvm-svn: 135375
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 134829
* eliminate the Type::getDescription() method, using "<<" instead. This Chris Lattner2011-06-181-2/+2
| | | | | | removes some gunk from LLVMContext. llvm-svn: 133360
* Merge System into Support.Michael J. Spencer2010-11-291-2/+2
| | | | llvm-svn: 120298
* Convert some tab stops into spaces.Duncan Sands2010-07-121-1/+1
| | | | llvm-svn: 108130
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-5/+5
| | | | llvm-svn: 100709
* Typo noticed by Duncan.Torok Edwin2010-03-301-1/+1
| | | | llvm-svn: 99918
* Don't overwrite previous value, if it succeeded.Torok Edwin2010-03-301-1/+2
| | | | llvm-svn: 99886
* Honour addGlobalMapping() in the interpreter, if it was used to add mappings forTorok Edwin2010-03-301-0/+1
| | | | | | external Functions (the JIT does honour this). llvm-svn: 99885
* Replace strcpy with memcpy when we have the length around anyway.Benjamin Kramer2010-01-281-3/+4
| | | | llvm-svn: 94746
* These should probably be errs().David Greene2010-01-051-3/+3
| | | | llvm-svn: 92673
* Change errs() to dbgs().David Greene2010-01-051-3/+3
| | | | llvm-svn: 92618
* Fix passing of float arguments through ffi.Nick Lewycky2009-11-181-1/+1
| | | | llvm-svn: 89198
* Fail less mysteriously; inform the user that their LLVM was not built withNick Lewycky2009-11-171-0/+3
| | | | | | | libffi support and that the interpreter can't call external functions without it. Patch by Timo Juhani Lindfors! Fixes PR5466. llvm-svn: 89062
* Remove ByteswapSCANFResults, it is dead.Daniel Dunbar2009-11-081-76/+0
| | | | llvm-svn: 86458
* We don't need to byteswap, the interpreter assumes the program is runningNick Lewycky2009-11-081-8/+1
| | | | | | native anyways. This fixes a crash using %d and similar in a scanf statement. llvm-svn: 86440
* Stop using alloca.Nick Lewycky2009-09-181-17/+14
| | | | llvm-svn: 82225
* Some platforms may need malloc.h for alloca.Daniel Dunbar2009-09-171-3/+6
| | | | llvm-svn: 82100
* remove some uses of llvm/Support/Streams.hChris Lattner2009-08-231-4/+4
| | | | llvm-svn: 79842
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-9/+12
| | | | llvm-svn: 78948
* This void is implicit in C++.Dan Gohman2009-08-121-1/+1
| | | | llvm-svn: 78848
* MSVC warning fixes; patch by Stein Roger!Daniel Dunbar2009-08-071-0/+11
| | | | llvm-svn: 78405
* Switch to getNameStr().Daniel Dunbar2009-07-241-3/+3
| | | | llvm-svn: 76962
OpenPOWER on IntegriCloud