aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
AgeCommit message (Collapse)AuthorFilesLines
2011-07-20- Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng1-5/+3
- Introduce JITDefault code model. This tells targets to set different default code model for JIT. This eliminates the ugly hack in TargetMachine where code model is changed after construction. llvm-svn: 135580
2011-07-19Convert TargetData::getIndexedOffset to use ArrayRef.Jay Foad1-2/+1
llvm-svn: 135478
2011-07-19Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng1-3/+4
(including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. llvm-svn: 135468
2011-07-18Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ↵Jeffrey Yasskin1-1/+1
ambiguity errors like the one corrected by r135261. Migrate all LLVM callers of the old constructor to the new one. llvm-svn: 135431
2011-07-18land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner1-9/+9
llvm-svn: 135375
2011-05-13ExecutionEngine: move createJIT() definition (v2)Dylan Noblesmith1-0/+29
As an ExecutionEngine class function, its definition really belongs in ExecutionEngine.cpp, not JIT.cpp. llvm-svn: 131320
2011-05-13ExecutionEngine: push TargetMachine creation into clients (v2)Dylan Noblesmith1-20/+18
In particular, into EngineBuilder. This should only impact the private API between the EE and EB classes, not external clients, since JITCtor and MCJITCtor are both protected members. llvm-svn: 131317
2011-05-07Revert ExecutionEngine patches, they either failed to build or broke unit tests.Jakob Stoklund Olesen1-39/+12
Please ensure the build is clean and tests are passing when recommitting. llvm-svn: 131044
2011-05-06ExecutionEngine: move createJIT() definitionDylan Noblesmith1-0/+29
As an ExecutionEngine class function, its definition really belongs in ExecutionEngine.cpp, not JIT.cpp. llvm-svn: 131027
2011-05-06ExecutionEngine: push TargetMachine creation into clientsDylan Noblesmith1-12/+10
In particular, into EngineBuilder. This should only impact the private API between the EE and EB classes, not external clients, since JITCtor and MCJITCtor are both protected members. llvm-svn: 131026
2011-04-28Fix the last -Wnon-pod-memset I'm seeing. This is benign, but appearsChandler Carruth1-1/+1
a bit more sinister as the memset doesn't do what the constructor does. There seems to be a cleaner solution than a cast here though, instead we can point the memset destination into the union its actually trying to clear. An alternative is to point to the Untyped member of this union. Review appreciated, and if that is cleaner I'm happy to switch. All of these should be functionally equivalent to the original code. llvm-svn: 130395
2011-04-11Just because a GlobalVariable's initializer is [N x { i32, void ()* }] doesn'tNick Lewycky1-1/+5
mean that it has to be ConstantArray of ConstantStruct. We might have ConstantAggregateZero, at either level, so don't crash on that. Also, semi-deprecate the sentinal value. The linker isn't aware of sentinals so we end up with the two lists appended, each with their "sentinals" on them. Different parts of LLVM treated sentinals differently, so make them all just ignore the single entry and continue on with the rest of the list. llvm-svn: 129307
2011-04-08llvm.global_[cd]tor is defined to be either external, or appending with an arrayNick Lewycky1-6/+2
of { i32, void ()* }. Teach the verifier to verify that, deleting copies of checks strewn about. llvm-svn: 129128
2011-04-06Fix comment to use llvm 2.x syntax.Nick Lewycky1-1/+1
llvm-svn: 129025
2011-03-04Support unregistering exception frames of functions when they are removed.Eric Christopher1-3/+4
Patch by Johannes Schaub! Fixes PR8548 llvm-svn: 127047
2010-12-04Remove unneeded zero arrays.Benjamin Kramer1-4/+2
llvm-svn: 120910
2010-11-29Merge System into Support.Michael J. Spencer1-2/+2
llvm-svn: 120298
2010-11-28PR5207: change APInt::doubleToBits() and APInt::floatToBits() to beJay Foad1-2/+2
static methods that return a new APInt. llvm-svn: 120261
2010-11-17lli: Add stub -use-mcjit option, which doesn't currently do anything.Daniel Dunbar1-1/+17
llvm-svn: 119508
2010-11-13JIT: More nitty style tweakage, aka territory marking.Daniel Dunbar1-192/+140
llvm-svn: 118973
2010-11-13Fix 80-col violation / non-sensicalness.Daniel Dunbar1-3/+3
llvm-svn: 118958
2010-10-21Fix the cleanup process of exception information in JIT. Now JITDuncan Sands1-3/+13
deregisters registered by it FDE structures allowing consecutive JIT runs to succeed. Patch by Yuri. Fixes PR8285. llvm-svn: 117004
2010-05-15improve portability to systems that don't have powf/modf (e.g. solaris 9)Chris Lattner1-2/+2
patch by Evzen Muller! llvm-svn: 103876
2010-04-07rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner1-9/+9
llvm-svn: 100709
2010-03-27Avoid leaking the memory allocated for GlobalVariables in the interpreter, byJeffrey Yasskin1-3/+32
freeing that memory when the GV is destroyed. llvm-svn: 99706
2010-03-26Avoid leaking argv and env arrays from lli.Jeffrey Yasskin1-13/+35
llvm-svn: 99589
2010-02-16There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands1-2/+2
and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
2010-02-15Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands1-4/+4
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
2010-02-05Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.Jeffrey Yasskin1-7/+12
llc.cpp also defined these flags, meaning that when I linked all of LLVM's libraries into a single shared library, llc crashed on startup with duplicate flag definitions. This patch passes them through the EngineBuilder into JIT::selectTarget(). llvm-svn: 95390
2010-02-03r94686 changed all ModuleProvider parameters to Modules, which made theJeffrey Yasskin1-4/+0
1-argument ExecutionEngine::create(Module*) ambiguous with the signature that used to be ExecutionEngine::create(ModuleProvider*, defaulted_params). Fixed by removing the 1-argument create(). Fixes PR6221. llvm-svn: 95236
2010-01-27Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin1-48/+21
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
2010-01-15Fix http://llvm.org/PR6028, an assertion failure when an UndefValue ofJay Foad1-2/+16
integer type is used. llvm-svn: 93509
2010-01-05Move remaining stuff to the isInteger predicate.Benjamin Kramer1-5/+3
llvm-svn: 92771
2010-01-05Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer1-4/+2
dereference the type pointer. llvm-svn: 92726
2010-01-05Change errs() to dbgs().David Greene1-6/+6
llvm-svn: 92621
2009-11-17Add ability to set code model within the execution engine buildersEric Christopher1-2/+3
and creation interfaces. llvm-svn: 89151
2009-11-09Remove dlsym stubs, with Nate Begeman's permission.Jeffrey Yasskin1-1/+0
llvm-svn: 86606
2009-10-29add interpreter support for indirect goto / blockaddress. The interpreterChris Lattner1-1/+4
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-27Change the JIT to compile eagerly by default as agreed inJeffrey Yasskin1-1/+1
http://llvm.org/PR5184, and beef up the comments to describe what both options do and the risks of lazy compilation in the presence of threads. llvm-svn: 85295
2009-10-23Fix http://llvm.org/PR4822: allow module deletion after a function has beenJeffrey Yasskin1-18/+22
compiled. When functions are compiled, they accumulate references in the JITResolver's stub maps. This patch removes those references when the functions are destroyed. It's illegal to destroy a Function when any thread may still try to call its machine code. This patch also updates r83987 to use ValueMap instead of explicit CallbackVHs and fixes a couple "do stuff inside assert()" bugs from r84522. llvm-svn: 84975
2009-10-13Make the ExecutionEngine automatically remove global mappings on when theirJeffrey Yasskin1-30/+47
GlobalValue is destroyed. Function destruction still leaks machine code and can crash on leaked stubs, but this is some progress. llvm-svn: 83987
2009-10-09ExecutionEngine::clearGlobalMappingsFromModule failed to remove reverseJeffrey Yasskin1-16/+19
mappings, which could cause errors and assert-failures. This patch fixes that, adds a test, and refactors the global-mapping-removal code into a single place. llvm-svn: 83678
2009-10-06Introduce and use convenience methods for getting pointer typesDuncan Sands1-1/+1
where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
2009-10-05strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner1-11/+11
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-09-23errorstr can be null, don't unconditionally set it. Only report thatChris Lattner1-6/+9
"the jit has not been linked in" if the interpreter failed. This fixes a unit test failure. llvm-svn: 82601
2009-09-23Make EngineBuilder return more error codes, by KS Sreeram.Chris Lattner1-13/+22
llvm-svn: 82600
2009-08-23just remove interpreter support for endianness mismatches. This wasChris Lattner1-12/+0
really old code from when we were running sparcv9 bc files on x86 (before I ported llvm-gcc 3 to work on x86) :) llvm-svn: 79871
2009-08-23remove use of alloca.hChris Lattner1-5/+7
llvm-svn: 79870
2009-08-23remove a few DOUTs here and there.Chris Lattner1-3/+3
llvm-svn: 79832
2009-08-23remove the std::ostream version of module and type printing.Chris Lattner1-2/+2
llvm-svn: 79823