summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* llvm/unittests: Simplify LINK_COMPONENTS.NAKAMURA Takumi2012-06-214-5/+2
| | | | llvm-svn: 158942
* llvm/unittests/ExecutionEngine/JIT/CMakeLists.txt: Unbreak build.NAKAMURA Takumi2012-06-211-1/+1
| | | | llvm-svn: 158914
* Add some missing dependencies here that I missed in my first passChandler Carruth2012-06-211-1/+4
| | | | | | through. Also sort them. llvm-svn: 158911
* Completely refactor the structuring of unittest CMake files to match theChandler Carruth2012-06-212-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefiles, the CMake files in every other part of the LLVM tree, and sanity. This should also restore the output tree structure of all the unit tests, sorry for breaking that, and thanks for letting me know. The fundamental change is to put a CMakeLists.txt file in the unittest directory, with a single test binary produced from it. This has several advantages: - No more weird directory stripping in the unittest macro, allowing it to be used more readily in other projects. - No more directory prefixes on all the source files. - Allows correct and precise use of LLVM's per-directory dependency system. - Allows use of the checking logic for source files that have not been added to the CMake build. This uncovered a file being skipped with CMake in LLVM and one in Clang's unit tests. - Makes Specifying conditional compilation or other custom logic for JIT tests easier. It did require adding the concept of an explicit 'optional' source file to the CMake build so that the missing-file check can skip cases where the file is *supposed* to be missing. =] This is another chunk of refactoring the CMake build in order to make it usable for other clients like CompilerRT / ASan / TSan. Note that this is interdependent with a Clang CMake change. llvm-svn: 158909
* Disable JITTest.FunctionIsRecompiledAndRelinked and JITTest.NoStubsSimon Atanasyan2012-05-161-6/+8
| | | | | | on MIPS where they are not implemented. llvm-svn: 156935
* Fix missed files in JIT unittests MakefileDanil Malyshev2012-03-291-1/+2
| | | | llvm-svn: 153672
* Move getPointerToNamedFunction() from JIT/MCJIT to JITMemoryManager.Danil Malyshev2012-03-281-0/+4
| | | | llvm-svn: 153607
* Revert a series of commits to MCJIT to get the build working in CMakeChandler Carruth2012-03-221-4/+0
| | | | | | | | | | | | | | | (and hopefully on Windows). The bots have been down most of the day because of this, and it's not clear to me what all will be required to fix it. The commits started with r153205, then r153207, r153208, and r153221. The first commit seems to be the real culprit, but I couldn't revert a smaller number of patches. When resubmitting, r153207 and r153208 should be folded into r153205, they were simple build fixes. llvm-svn: 153241
* Based on this discussion: ↵Danil Malyshev2012-03-211-0/+4
| | | | | | | | | http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120305/138477.html 1. Declare a virtual function getPointerToNamedFunction() in JITMemoryManager 2. Move the implementation of getPointerToNamedFunction() form JIT/MCJIT to DefaultJITMemoryManager. llvm-svn: 153205
* Follow-up to r152620: restore JIT event listener tests to ↵Eli Bendersky2012-03-156-26/+24
| | | | | | unittest/ExecutionEngine/JIT llvm-svn: 152780
* Clean up removed file after r152620Eli Bendersky2012-03-141-0/+0
| | | | llvm-svn: 152703
* Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted ↵Eli Bendersky2012-03-136-238/+746
| | | | | | | | | | | code in LLVM. Also refactor the existing OProfile profiling code to reuse the same interfaces with the VTune profiling code. In addition, unit tests for the profiling interfaces were added. This patch was prepared by Andrew Kaylor and Daniel Malea, and reviewed in the llvm-commits list by Jim Grosbach llvm-svn: 152620
* MCJIT support for non-function sections.Jim Grosbach2012-01-161-0/+8
| | | | | | | | | | | | | | | | Move to a by-section allocation and relocation scheme. This allows better support for sections which do not contain externally visible symbols. Flesh out the relocation address vs. local storage address separation a bit more as well. Remote process JITs use this to tell the relocation resolution code where the code will live when it executes. The startFunctionBody/endFunctionBody interfaces to the JIT and the memory manager are deprecated. They'll stick around for as long as the old JIT does, but the MCJIT doesn't use them anymore. llvm-svn: 148258
* unittests: add ErrorStr to ExecutionEngine testDylan Noblesmith2011-12-021-3/+5
| | | | | | Makes failures more self-explanatory. llvm-svn: 145704
* unittests/MultiJITTest.cpp: Tweak how to check symbol value for Win32 ↵NAKAMURA Takumi2011-11-091-2/+15
| | | | | | | | | --enable-shared. getPointerToNamedFunction might be indirect jump on Win32 --enable-shared. FF 25 <disp32>: jmp *(pointer to IAT) llvm-svn: 144178
* Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner2011-10-162-2/+2
| | | | | | | | | | | | | | | does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. llvm-svn: 142106
* Exclude more arm jit failures pending PR10783.Andrew Trick2011-09-032-3/+4
| | | | llvm-svn: 139074
* Excluding ARM JIT tests until someone can fix this compilation path.Andrew Trick2011-08-261-0/+9
| | | | llvm-svn: 138676
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-242-2/+2
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* Explicitly cast narrowing conversions inside {}s that will become errors inJeffrey Yasskin2011-07-271-1/+1
| | | | | | C++0x. llvm-svn: 136211
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-183-8/+8
| | | | llvm-svn: 135375
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-122-3/+3
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-122-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-3/+3
| | | | llvm-svn: 134888
* add some #includes that will soon be needed.Chris Lattner2011-06-161-0/+1
| | | | llvm-svn: 133195
* unittests/CMakeLists.txt: [PR8225] Tweak linking JITTests on MSVC to add ↵NAKAMURA Takumi2010-11-191-0/+4
| | | | | | | | JITTests.def. CMake can pass *.def to link.exe. llvm-svn: 119783
* 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 unittest for allocator laziness.Benjamin Kramer2010-04-131-4/+4
| | | | llvm-svn: 101131
* 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
* Make it possible to create multiple JIT instances at the same time, by removingJeffrey Yasskin2010-02-111-0/+164
| | | | | | | | | | the global TheJIT and TheJITResolver variables. Lazy compilation is supported by a global map from a stub address to the JITResolver that knows how to compile it. Patch by Olivier Meurant! llvm-svn: 95837
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-272-23/+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-262-16/+0
| | | | | | broken by setting CXXFLAGS on the command line. llvm-svn: 94619
* Revert 94484. Re-disable unittests that need RTTI.Bob Wilson2010-01-262-0/+16
| | | | llvm-svn: 94569
* Re-enable unit tests disabled in r94164 by telling GTest about theJeffrey Yasskin2010-01-262-16/+0
| | | | | | lack of RTTI. llvm-svn: 94484
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-222-0/+18
| | | | | | | | | | | 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-222-7/+97
| | | | | | | | | | | 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-132-0/+28
| | | | | | | 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
OpenPOWER on IntegriCloud