summaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
AgeCommit message (Collapse)Author
2024-09-19[LLVM] Use {} instead of std::nullopt to initialize empty ArrayRef (#109133)Jay Foad
It is almost always simpler to use {} instead of std::nullopt to initialize an empty ArrayRef. This patch changes all occurrences I could find in LLVM itself. In future the ArrayRef(std::nullopt_t) constructor could be deprecated or removed.
2022-12-02[llvm] Use std::nullopt instead of None (NFC)Kazu Hirata
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
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
2016-11-09Bitcode: Change the materializer interface to return llvm::Error.Peter Collingbourne
Differential Revision: https://reviews.llvm.org/D26439 llvm-svn: 286382
2015-12-18Drop materializeAllPermanently.Rafael Espindola
This inlines materializeAll into the only caller (materializeAllPermanently) and renames materializeAllPermanently to just materializeAll. llvm-svn: 256024
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
2014-08-19Make it explicit that ExecutionEngine takes ownership of the modules.Rafael Espindola
llvm-svn: 215967
2014-06-13Remove 'using std::errro_code' from lib.Rafael Espindola
llvm-svn: 210871
2014-06-12Don't use 'using std::error_code' in include/llvm.Rafael Espindola
This should make sure that most new uses use the std prefix. llvm-svn: 210835
2014-04-24[C++] Use 'nullptr'.Craig Topper
llvm-svn: 207083
2014-01-14Return an error_code from materializeAllPermanently.Rafael Espindola
llvm-svn: 199275
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-10-08Move TargetData to DataLayout.Micah Villmow
llvm-svn: 165402
2010-01-27Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
2009-07-18Add EngineBuilder to ExecutionEngine in favor of the five optional argument ↵Reid Kleckner
EE::create(). Also a test commit. llvm-svn: 76276
2009-07-08Add an option to allocate JITed global data separately from code. ByJeffrey Yasskin
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-06-24Fix the Ocaml bindings for the ExecutionEngine: with the change to buildBob Wilson
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-04-29Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling
which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
2009-04-29The second part of the change from -fast to -O#. This changes the JIT to acceptBill Wendling
an optimization level instead of a simple boolean telling it to generate code "fast" or the other type of "fast". llvm-svn: 70347
2008-08-08Add new parameter Fast to createJIT to enable the fast codegen path.Evan Cheng
llvm-svn: 54523
2008-05-13Clean up the use of static and anonymous namespaces. This turned upDan Gohman
several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
2008-02-20Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov
annoying warnings. llvm-svn: 47367
2007-12-29Remove attribution from file headers, per discussion on llvmdev.Chris Lattner
llvm-svn: 45418
2007-12-06simplify creation of the interpreter, make ExecutionEngine ctor protected,Chris Lattner
delete one ExecutionEngine ctor, minor cleanup. llvm-svn: 44646
2007-06-01For PR1486:Reid Spencer
Avoid overwriting the APInt instance with 0 bytes which causes the bitwidth to be set to 0 (illegal) producing a subsequent assert. llvm-svn: 37391
2007-03-06Remove the insufficient code in Interpreter::create that computed theReid Spencer
Target DataLayout incorrectly. For now, we'll trust that the module has got the correct DataLayout. In the future, this needs to be changed to tell the TargetData to be "current host". llvm-svn: 34947
2007-03-03Remove unnecessary #include.Reid Spencer
llvm-svn: 34889
2007-03-03Deal with error handling better.Reid Spencer
llvm-svn: 34887
2007-01-29Remove tabs.Reid Spencer
llvm-svn: 33620
2007-01-29Implement use of new IntrinsicLowering interface.Reid Spencer
llvm-svn: 33619
2007-01-26For PR761:Reid Spencer
The Module::setEndianness and Module::setPointerSize methods have been removed. Instead you can get/set the DataLayout. Adjust thise accordingly. llvm-svn: 33530
2006-11-15Simplify IntrinsicLowering and clarify that it is only for use by theChris Lattner
CBE and interpreter. llvm-svn: 31755
2006-06-16Simplify TargetData ctor callChris Lattner
llvm-svn: 28832
2006-06-16Simplify interpreter construction.Chris Lattner
llvm-svn: 28826
2006-05-03Refactor TargetMachine, pushing handling of TargetData into the ↵Owen Anderson
target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference. This fixes PR 759. llvm-svn: 28074
2006-03-24Get JIT/Interpreter working on Windows again.Jeff Cohen
llvm-svn: 27037
2006-03-23remove the intrinsiclowering hookChris Lattner
llvm-svn: 26970
2006-03-22Eliminate the dependency of ExecutionEngine on the JIT/Interpreter libraries.Chris Lattner
Now you can build a tool with just the JIT or just the interpreter. llvm-svn: 26946
2006-02-07The interpreter assumes that the caller of runFunction() must be lli, andJeff Cohen
therefore the function being called must be a main() returning an int. The consequences when these assumptions are false are not good, so don't assume them. llvm-svn: 26031
2005-07-27Eliminate all remaining tabs and trailing spaces.Jeff Cohen
llvm-svn: 22523
2005-04-22Convert tabs to spacesMisha Brukman
llvm-svn: 21440
2005-04-21* Remove trailing whitespaceMisha Brukman
* Convert tabs to spaces llvm-svn: 21421
2004-06-20Move the IntrinsicLowering header into the CodeGen directory, as per PR346Chris Lattner
llvm-svn: 14266
2004-02-09Start using the new and improve interface to FunctionType argumentsChris Lattner
llvm-svn: 11224
2003-12-28Pass around IntrinsicLowering instances as appropriate.Chris Lattner
Reimplement the Interpreters implementation of va_* to be more direct. llvm-svn: 10627
2003-12-26No longer run atExit functions from run()Chris Lattner
rename run to runFunction llvm-svn: 10609
2003-12-14Finegrainify namespacificationChris Lattner
llvm-svn: 10465