summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an assert on Darwin llvm-gcc builds. Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, li\ ne 2067. etc. http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354 --- Reverse-merging r134893 into '.': U include/llvm/Target/TargetData.h U include/llvm/DerivedTypes.h U tools/bugpoint/ExtractFunction.cpp U unittests/Support/TypeBuilderTest.cpp U lib/Target/ARM/ARMGlobalMerge.cpp U lib/Target/TargetData.cpp U lib/VMCore/Constants.cpp U lib/VMCore/Type.cpp U lib/VMCore/Core.cpp U lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Instrumentation/ProfilingUtils.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/CodeGen/SjLjEHPrepare.cpp --- Reverse-merging r134888 into '.': G include/llvm/DerivedTypes.h U include/llvm/Support/TypeBuilder.h U include/llvm/Intrinsics.h U unittests/Analysis/ScalarEvolutionTest.cpp U unittests/ExecutionEngine/JIT/JITTest.cpp U unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp U unittests/VMCore/PassManagerTest.cpp G unittests/Support/TypeBuilderTest.cpp U lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp U lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp U lib/VMCore/IRBuilder.cpp G lib/VMCore/Type.cpp U lib/VMCore/Function.cpp G lib/VMCore/Core.cpp U lib/VMCore/Module.cpp U lib/AsmParser/LLParser.cpp U lib/Transforms/Utils/CloneFunction.cpp G lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Utils/InlineFunction.cpp U lib/Transforms/Instrumentation/GCOVProfiling.cpp U lib/Transforms/Scalar/ObjCARC.cpp U lib/Transforms/Scalar/SimplifyLibCalls.cpp U lib/Transforms/Scalar/MemCpyOptimizer.cpp G lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/Transforms/IPO/ArgumentPromotion.cpp U lib/Transforms/InstCombine/InstCombineCompares.cpp U lib/Transforms/InstCombine/InstCombineAndOrXor.cpp U lib/Transforms/InstCombine/InstCombineCalls.cpp U lib/CodeGen/DwarfEHPrepare.cpp U lib/CodeGen/IntrinsicLowering.cpp U lib/Bitcode/Reader/BitcodeReader.cpp llvm-svn: 134949
* De-constify Types in FunctionType::get().Jay Foad2011-07-111-2/+2
| | | | llvm-svn: 134888
* missed a use of SizeRequired.Chris Lattner2010-07-221-2/+0
| | | | llvm-svn: 109172
* instead of migrating it to the MC instruction encoder, justChris Lattner2010-07-221-25/+0
| | | | | | | | | | | | | | rip out the implementation of X86InstrInfo::GetInstSizeInBytes. The code being ripped out just implemented a copy and hacked up version of the (old) instruction encoder, and is buggy and terrible in other ways. Since "GetInstSizeInBytes" is really only there to support the JIT's "NeedsExactSize" hook (which noone is using), just rip out the code. I will rip out the NeedsExactSize hook next. This resolves rdar://7617809 - switch X86InstrInfo::GetInstSizeInBytes to use X86MCCodeEmitter llvm-svn: 109149
* update unit test for api change.Chris Lattner2010-04-051-3/+1
| | | | llvm-svn: 100486
* Fix PR6360. It's easy for a stub's address to escape to user code, so we can'tJeffrey Yasskin2010-03-041-0/+23
| | | | | | | | | just count references to it from JIT output to decide when to destroy it. This patch waits to destroy the JIT's memory of a stub until the Function it refers to is destroyed. External function stubs and GVIndirectSyms aren't destroyed until the JIT itself is. llvm-svn: 97737
* Fix PR5291, in which a SmallPtrSet iterator was held across an insertion intoJeffrey Yasskin2010-03-041-0/+27
| | | | | | the set. llvm-svn: 97720
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-22/+52
| | | | | | | | | | | | | | | | | | | | | 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
* Roll r94484 (avoiding RTTI problems in tests) forward again in a way that isn'tJeffrey Yasskin2010-01-261-14/+0
| | | | | | broken by setting CXXFLAGS on the command line. llvm-svn: 94619
* Revert 94484. Re-disable unittests that need RTTI.Bob Wilson2010-01-261-0/+14
| | | | llvm-svn: 94569
* Re-enable unit tests disabled in r94164 by telling GTest about theJeffrey Yasskin2010-01-261-14/+0
| | | | | | lack of RTTI. llvm-svn: 94484
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+14
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* Disable JITTest.FunctionIsRecompiledAndRelinked on ARM where it's notJeffrey Yasskin2009-12-231-0/+4
| | | | | | implemented. llvm-svn: 91963
* Partially revert r91626. Materializing extra functions to determine whetherJeffrey Yasskin2009-12-221-6/+96
| | | | | | | | | | | they're available_externally broke VMKit, which was relying on the fact that functions would only be materialized when they were first called. We'll have to wait for http://llvm.org/PR5737 to really fix this. I also added a test for one of the F->isDeclaration() calls which wasn't covered by anything else in the test suite. llvm-svn: 91943
* Fix a crash in JIT::recompileAndRelinkFunction(). It doesn't pass the MCIJeffrey Yasskin2009-12-221-0/+31
| | | | | | | | | argument to runJITOnFunction(), which caused a null pointer dereference at every call. Patch by Gianluca Guida! llvm-svn: 91939
* Don't codegen available_externally functions. Fixes http://llvm.org/PR5735.Jeffrey Yasskin2009-12-171-0/+29
| | | | llvm-svn: 91626
* Reinstate r91208 to fix available_externally linkage for globals, withJeffrey Yasskin2009-12-131-0/+25
| | | | | | | nlewycky's fix to add -rdynamic so the JIT can look symbols up in Linux builds of the JITTests binary. llvm-svn: 91250
* Revert r91208. Something on Linux prevents the JIT from looking up a symbolJeffrey Yasskin2009-12-121-25/+0
| | | | | | defined in the test, and I don't have time tonight to figure it out. llvm-svn: 91209
* Fix available_externally linkage for globals. It's probably still notJeffrey Yasskin2009-12-121-0/+25
| | | | | | supported by emitGlobals, but I don't have a test case for that. llvm-svn: 91208
* Oops. Re-disable JITTest.NoStubs on ARM and PPC since they still use stubs toJeffrey Yasskin2009-11-241-0/+5
| | | | | | make far calls work. llvm-svn: 89733
* * Move stub allocation inside the JITEmitter, instead of exposing aJeffrey Yasskin2009-11-231-3/+34
| | | | | | | | | | | | | | way for each TargetJITInfo subclass to allocate its own stubs. This means stubs aren't as exactly-sized anymore, but it lets us get rid of TargetJITInfo::emitFunctionStubAtAddr(), which lets ARM and PPC support the eager JIT, fixing http://llvm.org/PR4816. * Rename the JITEmitter's stub creation functions to describe the kind of stub they create. So far, all of them create lazy-compilation stubs, but they sometimes get used when far-call stubs are needed. Fixing http://llvm.org/PR5201 will involve fixing this. llvm-svn: 89715
* Revert the test from r88984. It relies on being able to mmap 16GB ofJeffrey Yasskin2009-11-161-151/+6
| | | | | | | | | | address space (though it only uses a small fraction of that), and the buildbots disallow that. Also add a comment to the Makefile's ulimit line warning future developers that changing it won't work. llvm-svn: 88994
* Make X86-64 in the Large model always emit 64-bit calls.Jeffrey Yasskin2009-11-161-6/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The large code model is documented at http://www.x86-64.org/documentation/abi.pdf and says that calls should assume their target doesn't live within the 32-bit pc-relative offset that fits in the call instruction. To do this, we turn off the global-address->target-global-address conversion in X86TargetLowering::LowerCall(). The first attempt at this broke the lazy JIT because it can separate the movabs(imm->reg) from the actual call instruction. The lazy JIT receives the address of the movabs as a relocation and needs to record the return address from the call; and then when that call happens, it needs to patch the movabs with the newly-compiled target. We could thread the call instruction into the relocation and record the movabs<->call mapping explicitly, but that seems to require at least as much new complication in the code generator as this change. To fix this, we make lazy functions _always_ go through a call stub. You'd think we'd only have to force lazy calls through a stub on difficult platforms, but that turns out to break indirect calls through a function pointer. The right fix for that is to distinguish between calls and address-of operations on uncompiled functions, but that's complex enough to leave for someone else to do. Another attempt at this defined a new CALL64i pseudo-instruction, which expanded to a 2-instruction sequence in the assembly output and was special-cased in the X86CodeEmitter's emitInstruction() function. That broke indirect calls in the same way as above. This patch also removes a hack forcing Darwin to the small code model. Without far-call-stubs, the small code model requires things of the JITMemoryManager that the DefaultJITMemoryManager can't provide. Thanks to echristo for lots of testing! llvm-svn: 88984
* This test doesn't work on arm either.Benjamin Kramer2009-11-141-3/+1
| | | | llvm-svn: 88794
* Disable the JITTest.NoStubs test for Darwin PPC. It apparently doesn't implementBill Wendling2009-11-131-0/+4
| | | | | | emitFunctionStubAtAddr. llvm-svn: 88708
* Use stubs when we have them, otherwise use code we already have,Eric Christopher2009-11-121-0/+41
| | | | | | | | otherwise create a stub. Add a test to make sure we don't create extraneous stubs. llvm-svn: 86941
* Fix JITTest.ModuleDeletion in -Asserts mode (which turns off JITEmitDebugInfoJeffrey Yasskin2009-11-111-1/+7
| | | | | | by default). llvm-svn: 86807
* Remove dlsym stubs, with Nate Begeman's permission.Jeffrey Yasskin2009-11-091-3/+0
| | | | llvm-svn: 86606
* Fix the ModuleDeletion test on PPC and ARM.Jeffrey Yasskin2009-10-281-0/+1
| | | | llvm-svn: 85352
* Revert the API changes from r85295 to make it easier for people to buildJeffrey Yasskin2009-10-271-3/+3
| | | | | | against both 2.6 and HEAD. The default is still changed to eager jitting. llvm-svn: 85330
* Change the JIT to compile eagerly by default as agreed inJeffrey Yasskin2009-10-271-3/+3
| | | | | | | 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
* Automatically do the equivalent of freeMachineCodeForFunction(F) when F isJeffrey Yasskin2009-10-271-0/+160
| | | | | | | | | | | | | being destroyed. This allows users to run global optimizations like globaldce even after some functions have been jitted. This patch also removes the Function* parameter to JITEventListener::NotifyFreeingMachineCode() since it can cause that to be called when the Function is partially destroyed. This change will be even more helpful later when I think we'll want to allow machine code to actually outlive its Function. llvm-svn: 85182
* Fix http://llvm.org/PR4822: allow module deletion after a function has beenJeffrey Yasskin2009-10-231-2/+29
| | | | | | | | | | | | | | 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
* PowerPC ifdef'ing considered more complicated than one might like.Daniel Dunbar2009-10-201-1/+1
| | | | llvm-svn: 84603
* Correct test for PowerPC.Nick Lewycky2009-10-201-1/+1
| | | | llvm-svn: 84595
* Also check for __POWERPC__ when skipping these tests.Daniel Dunbar2009-10-191-1/+1
| | | | llvm-svn: 84482
* Disable another unittest that doesn't work on arm and ppc.Benjamin Kramer2009-10-151-1/+1
| | | | llvm-svn: 84186
* The ARM and PowerPC jits are broken in this regard.Nick Lewycky2009-10-141-0/+2
| | | | llvm-svn: 84128
* Keep track of stubs that are created. This fixes PR5162 and probably PR4822 andJeffrey Yasskin2009-10-131-0/+96
| | | | | | 4406. Patch by Nick Lewycky! llvm-svn: 84032
* Fix illegal cross-type aliasing. Found by baldrick on a newer gcc.Jeffrey Yasskin2009-10-061-6/+4
| | | | llvm-svn: 83401
* Fix http://llvm.org/PR5116 by rolling back r60822. This passes `make unittestsJeffrey Yasskin2009-10-061-0/+53
| | | | | | check-lit` on both x86-64 Linux and x86-32 Darwin. llvm-svn: 83353
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-2/+2
| | | | llvm-svn: 78948
* Update unittest for LLVM API change.Benjamin Kramer2009-07-311-1/+1
| | | | llvm-svn: 77730
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+1
| | | | llvm-svn: 77516
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-2/+1
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Unbreak unittests build.Daniel Dunbar2009-07-181-1/+1
| | | | | | - Reid, please check, I'm not sure if this is what was intended. llvm-svn: 76286
* Add EngineBuilder to ExecutionEngine in favor of the five optional argument ↵Reid Kleckner2009-07-181-10/+13
| | | | | | | | EE::create(). Also a test commit. llvm-svn: 76276
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-2/+4
| | | | llvm-svn: 75703
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-1/+1
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* Don't use a void return type with a function that returns a value.Dan Gohman2009-07-111-1/+2
| | | | llvm-svn: 75364
OpenPOWER on IntegriCloud