summaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
AgeCommit message (Collapse)Author
2025-11-11Remove unused <utility> inclusionserge-sans-paille
Per https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible this improves compilation time, while not being too intrusive on the codebase.
2025-04-16[llvm] Use llvm::append_range (NFC) (#135931)Kazu Hirata
2023-03-06ExternalFunctions.cpp - fix "unknown pragma 'clang'" MSVC warning. NFCI.Simon Pilgrim
2023-03-01[ExecutionEngine] Silence warnings about sprintf use in interpreter.Lang Hames
We should review memory safety in the interpreter (https://github.com/llvm/llvm-project/issues/58086), but for now just silence the warnings to reduce noise. rdar://100555195
2022-08-03ManagedStatic: remove from Interpreter/ExternalFunctionsNicolai Hähnle
Differential Revision: https://reviews.llvm.org/D129124
2021-06-08Use llvm_unreachable for unsupported integer types.Simon Pilgrim
As suggested on rG937c4cffd024, use llvm_unreachable for unhandled integer types (which shouldn't be possible) instead of breaking and dropping down to the existing fatal error handler. Helps silence static analyzer warnings.
2021-06-06Fix implicit fall through compiler warning. NFCI.Simon Pilgrim
2021-01-06[llvm] Use llvm::append_range (NFC)Kazu Hirata
2020-02-01Make StringRef's std::string conversion operator explicitSylvestre Ledru
The build is currenly broken when perf or ffi are enabled for llvm Just like in https://reviews.llvm.org/rG777180a32b61070a10dd330b4f038bf24e916af1
2019-08-07Replace llvm::MutexGuard/UniqueLock with their standard equivalentsBenjamin Kramer
All supported platforms have <mutex> now, so we don't need our own copies any longer. No functionality change intended. llvm-svn: 368149
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2019-01-10[opaque pointer types] Remove some calls to generic Type subtype accessors.James Y Knight
That is, remove many of the calls to Type::getNumContainedTypes(), Type::subtypes(), and Type::getContainedType(N). I'm not intending to remove these accessors -- they are useful/necessary in some cases. However, removing the pointee type from pointers would potentially break some uses, and reducing the number of calls makes it easier to audit. llvm-svn: 350835
2018-11-20[ExecutionEngine][Interpreter] Fix out-of-bounds array access.Lang Hames
If args is empty then accesing element 0 is illegal. https://reviews.llvm.org/D53556 Patch by Eugene Sharygin. Thanks Eugene! llvm-svn: 347281
2017-06-06Sort the remaining #include lines in include/... and lib/....Chandler Carruth
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
2016-08-23Fix some Clang-tidy modernize-use-using and Include What You Use warnings; ↵Eugene Zelenko
other minor fixes. Differential revision: https://reviews.llvm.org/D23789 llvm-svn: 279535
2015-07-16Fix ffiInvoke() use of DataLayout, broken in 242414Mehdi Amini
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 242456
2015-07-16Make ExecutionEngine owning a DataLayoutMehdi Amini
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
2015-07-16Revert "Make ExecutionEngine owning a DataLayout"Michael Kuperstein
Reverting to fix buildbot breakage. This reverts commit r242387. llvm-svn: 242394
2015-07-16Make ExecutionEngine owning a DataLayoutMehdi Amini
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
2015-06-13[ExecutionEngine] ArrayRefize argument passing.Benjamin Kramer
No functionality change intended. llvm-svn: 239687
2015-03-30Remove more superfluous .str() and replace std::string concatenation with Twine.Yaron Keren
Following r233392, http://llvm.org/viewvc/llvm-project?rev=233392&view=rev. llvm-svn: 233555
2014-09-19Converting FuncNames to a ManagedStatic to avoid static constructors and ↵Chris Bieneman
destructors. llvm-svn: 218151
2014-08-23Support: add llvm::unique_lockDylan Noblesmith
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
2014-08-23Support: make LLVM Mutexes STL-compatibleDylan Noblesmith
Use lock/unlock() convention instead of acquire/release(). llvm-svn: 216336
2014-04-24[C++] Use 'nullptr'.Craig Topper
llvm-svn: 207083
2013-09-11Don't expose symbols of lle_ functions.Benjamin Kramer
+ formatting fixes. llvm-svn: 190523
2013-09-02llvm interpreter: select, shuffle and insertelement instructions.Elena Demikhovsky
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
2013-01-02Move all of the header files which are involved in modelling the LLVM IRChandler Carruth
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
2012-12-03Use the new script to sort the includes of every file under lib.Chandler Carruth
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
2012-11-01Revert the majority of the next patch in the address space series:Chandler Carruth
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
2012-10-15Resubmit the changes to llvm core to update the functions to support ↵Micah Villmow
different pointer sizes on a per address space basis. llvm-svn: 165941
2012-10-11Revert 165732 for further review.Micah Villmow
llvm-svn: 165747
2012-10-11Add in the first iteration of support for llvm/clang/lldb to allow variable ↵Micah Villmow
per address space pointer sizes to be optimized correctly. llvm-svn: 165726
2012-10-08Move TargetData to DataLayout.Micah Villmow
llvm-svn: 165402
2012-02-24EE/Interpreter/ExternalFunctions.cpp: Staticize lle_X_() entries. They can ↵NAKAMURA Takumi
be mapped in FuncNames[] at the initialization. llvm-svn: 151313
2012-02-24EE/Interpreter/ExternalFunctions.cpp: Prune "C" linkage to suppress warnings ↵NAKAMURA Takumi
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
2012-02-14Using the new external-linkage warning recently added instead of disabling ↵Aaron Ballman
all return type warnings. llvm-svn: 150512
2012-02-14Fixing warning due to the new "UTD return type in extern 'C'".Aaron Ballman
Patch by Matt Johnson llvm-svn: 150508
2012-01-20More dead code removal (using -Wunreachable-code)David Blaikie
llvm-svn: 148578
2011-11-15Remove all remaining uses of Value::getNameStr().Benjamin Kramer
llvm-svn: 144648
2011-07-18land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner
llvm-svn: 135375
2011-07-09Land the long talked about "type system rewrite" patch. ThisChris Lattner
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
2011-06-18eliminate the Type::getDescription() method, using "<<" instead. This Chris Lattner
removes some gunk from LLVMContext. llvm-svn: 133360
2010-11-29Merge System into Support.Michael J. Spencer
llvm-svn: 120298
2010-07-12Convert some tab stops into spaces.Duncan Sands
llvm-svn: 108130
2010-04-07rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner
llvm-svn: 100709
2010-03-30Typo noticed by Duncan.Torok Edwin
llvm-svn: 99918
2010-03-30Don't overwrite previous value, if it succeeded.Torok Edwin
llvm-svn: 99886
2010-03-30Honour addGlobalMapping() in the interpreter, if it was used to add mappings forTorok Edwin
external Functions (the JIT does honour this). llvm-svn: 99885
2010-01-28Replace strcpy with memcpy when we have the length around anyway.Benjamin Kramer
llvm-svn: 94746