summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAge
* Fixing MCJIT unit test on Windows.Andrew Kaylor2013-05-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181625 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented public interface for modifying registered (not positional or ↵Andrew Trick2013-05-06
| | | | | | | | sink options) command line options at runtime. Patch by Dan Liew! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181254 91177308-0d34-0410-b5e6-96231b3b80d8
* Support command line option categories.Andrew Trick2013-05-06
| | | | | | Patch by Dan Liew! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181253 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Set up JIT/MCJIT test casesUlrich Weigand2013-05-06
| | | | | | | | | | | | | This patch adds the necessary configuration bits and #ifdef's to set up the JIT/MCJIT test cases for SystemZ. Like other recent targets, we do fully support MCJIT, but do not support the old JIT at all. Set up the lit config files accordingly, and disable old-JIT unit tests. Patch by Richard Sandiford. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181207 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify JIT unit test #ifdefsUlrich Weigand2013-05-06
| | | | | | | | | | | | | | | | | | | | | Several platforms need to disable all old-JIT unit tests, since they only support the new MCJIT. This currently done via #ifdef'ing out those tests in the ExecutionEngine/JIT/*.cpp files. As those #ifdef's have grown historically, we now have a number of repeated directives which -in total- cover nearly the whole file, but leave a couple of helper functions out. When building the tests with clang itself, those helper functions now cause spurious "unused function" warnings. To fix those warnings, and also to remove the duplicate #ifdef conditions and make it easier to disable the tests for a new target, this patch consolidates the #ifdefs into a single one per file, which covers all the tests including all helper routines. Tested on PowerPC and SystemZ. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181200 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing PatternMatch.cpp to CMakeLists.txtArnold Schwaighofer2013-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181147 91177308-0d34-0410-b5e6-96231b3b80d8
* PatternMatch: Matcher for (un)ordered floating point min/maxArnold Schwaighofer2013-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for matching 'ordered' and 'unordered' floating point min/max constructs. In LLVM we can express min/max functions as a combination of compare and select. We have support for matching such constructs for integers but not for floating point. In floating point math there is no total order because of the presence of 'NaN'. Therefore, we have to be careful to preserve the original fcmp semantics when interpreting floating point compare select combinations as a minimum or maximum function. The resulting 'ordered/unordered' floating point maximum function has to select the same value as the select/fcmp combination it is based on. ordered_max(x,y) = max(x,y) iff x and y are not NaN, y otherwise unordered_max(x,y) = max(x,y) iff x and y are not NaN, x otherwise ordered_min(x,y) = min(x,y) iff x and y are not NaN, y otherwise unordered_min(x,y) = min(x,y) iff x and y are not NaN, x otherwise This matches the behavior of the underlying select(fcmp(olt/ult/.., L, R), L, R) construct. Any code using this predicate has to preserve this semantics. A follow-up patch will use this to implement floating point min/max reductions in the vectorizer. radar://13723044 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181143 91177308-0d34-0410-b5e6-96231b3b80d8
* This exposes more MCJIT options via the C API:Filip Pizlo2013-05-01
| | | | | | | | | | | | | | | | | | | | | | | CodeModel: It's now possible to create an MCJIT instance with any CodeModel you like. Previously it was only possible to create an MCJIT that used CodeModel::JITDefault. EnableFastISel: It's now possible to turn on the fast instruction selector. The CodeModel option required some trickery. The problem is that previously, we were ensuring future binary compatibility in the MCJITCompilerOptions by mandating that the user bzero's the options struct and passes the sizeof() that he saw; the bindings then bzero the remaining bits. This works great but assumes that the bitwise zero equivalent of any field is a sensible default value. But this is not the case for LLVMCodeModel, or its internal equivalent, llvm::CodeModel::Model. In both of those, the default for a JIT is CodeModel::JITDefault (or LLVMCodeModelJITDefault), which is not bitwise zero. Hence this change introduces LLVMInitializeMCJITCompilerOptions(), which will initialize the user's options struct with defaults. The user will use this in the same way that they would have previously used memset() or bzero(). MCJITCAPITest.cpp illustrates the change, as does the comment in ExecutionEngine.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180893 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap some lines to bring MCJITCAPITest into conformance with the 80 column ↵Filip Pizlo2013-05-01
| | | | | | limit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180839 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix ProgramTest on FreeBSDReid Kleckner2013-04-30
| | | | | | | This seemed like the cleanest way to find the test executable. Also fix the file mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180770 91177308-0d34-0410-b5e6-96231b3b80d8
* Exposing MCJIT through C APIAndrew Kaylor2013-04-29
| | | | | | | | | | Re-submitting with fix for OCaml dependency problems (removing dependency on SectionMemoryManager when it isn't used). Patch by Fili Pizlo git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180720 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enabling MCJIT object caching with memory leak fixedAndrew Kaylor2013-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180575 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Adding object caching support to MCJIT"Rafael Espindola2013-04-25
| | | | | | | | | | This reverts commit 07f03923137a91e3cca5d7fc075a22f8c9baf33a. Looks like it broke the valgrind bot: http://lab.llvm.org:8011/builders/llvm-x86_64-linux-vg_leak/builds/649 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180249 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Exposing MCJIT through C API"Rafael Espindola2013-04-25
| | | | | | | | | | This reverts commit 8c31b298149ca3c3f2bbd9e8aa9a01c4d91f3d74. It looks like this commit broke some bots: http://lab.llvm.org:8011/builders/llvm-ppc64-linux2/builds/5209 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180248 91177308-0d34-0410-b5e6-96231b3b80d8
* Exposing MCJIT through C APIAndrew Kaylor2013-04-24
| | | | | | | | Patch by Filip Pizlo git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180229 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't forward declare environ on WindowsReid Kleckner2013-04-24
| | | | | | | | | That seems to interact poorly with the environ and _environ macros defined in MSVC's <stdlib.h>. Also remove the incorrect comment about _NSGetEnviron(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180200 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing cmake build for MCJIT unit testsAndrew Kaylor2013-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180150 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding object caching support to MCJITAndrew Kaylor2013-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180146 91177308-0d34-0410-b5e6-96231b3b80d8
* Un-revert the environ copy in ProgramTest after fixing it on OS XReid Kleckner2013-04-23
| | | | | | | | | | This was r180041 and r180046, which was reverted in r180066. Re-committing this should fix the dragonegg bootstrap, which I presume needs LD_LIBRARY_PATH to be propagated to the child. Tested on Linux, Windows, and Mac OS 10.6. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180099 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more guards around zlib-dependent codeAlexey Samsonov2013-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180084 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic zlib support to LLVM. This would allow to use ↵Alexey Samsonov2013-04-23
| | | | | | compression/uncompression in selected LLVM tools. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180083 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add a missing reference on a std::vector<> out param"Michael Gottesman2013-04-22
| | | | | | | | | | | | | Revert "[Support] Propagate the environment into the test child process" This reverts commit r180046. This reverts commit r180041. These have broken buildbots for ~3 hours: http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/763 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180066 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a missing reference on a std::vector<> out paramReid Kleckner2013-04-22
| | | | | | | Pointed out by Eli. The test passes for me either way, so I missed this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180046 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Propagate the environment into the test child processReid Kleckner2013-04-22
| | | | | | | Should fix the dragonegg bootstrap builder, which reasonably needs LD_LIBRARY_PATH to be set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180041 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Fix argv string escape bug on WindowsReid Kleckner2013-04-22
| | | | | | | | | | | | | | | | Summary: This is http://llvm.org/PR15802. Backslashes preceding double quotes in arguments must be escaped. The interesting bit is that all other backslashes should *not* be escaped, because the un-escaping logic is only triggered by the presence of a double quote character. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D705 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180035 91177308-0d34-0410-b5e6-96231b3b80d8
* Create a stub for DWARF parser unittestsAlexey Samsonov2013-04-17
| | | | | | | | Moves one DWARF-specific header to include/llvm/DebugInfo from lib/. Add a short unittest for r179095. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179678 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a disconcerting bug in Value::isUsedInBasicBlock, which gave wrong ↵Benjamin Kramer2013-04-12
| | | | | | | | answers for blocks larger than 3 instrs. Also add a unit test. PR15727. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179370 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete the functions F1 and F2 to appease the valgrind bot.Joey Gouly2013-04-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179239 91177308-0d34-0410-b5e6-96231b3b80d8
* Change CloneFunctionInto to always clone Argument attributes induvidually,Joey Gouly2013-04-10
| | | | | | | | rather than checking if the source and destination have the same number of arguments and copying the attributes over directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179169 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][FileSystem] Fix identify_magic for big endian ELF.Michael J. Spencer2013-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178905 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable JIT/MCJIT unit tests for targets with JIT support.Jyotsna Verma2013-04-05
| | | | | | | | | | | Change unittests/ExecutionEngine/Makefile to include Makefile.config before TARGET_HAS_JIT flag is checked. Fixes bug: http://llvm.org/bugs/show_bug.cgi?id=15669 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178871 91177308-0d34-0410-b5e6-96231b3b80d8
* Explicitly add -Wl,--export-all-symbols on mingw/cygwin.Rafael Espindola2013-04-04
| | | | | | | Looks like cmake on windows is not expanding ENABLE_EXPORTS to -Wl,--export-all-symbols on mingw or cygwin, so add this back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178730 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't export symbols in every binary on linux.Rafael Espindola2013-04-04
| | | | | | | | | | | | On freebsd this makes sure that symbols are exported on the binaries that need them. The net result is that we should get symbols in the binaries that need them on every platform. On linux x86-64 this reduces the size of the bin directory from 262MB to 250MB. Patch by Stephen Checkoway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178725 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallVector and SmallPtrSet allocations now power-of-two aligned.Jean-Luc Duprat2013-03-29
| | | | | | | | This time tested on both OSX and Linux. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178377 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Fix allocations of SmallVector and SmallPtrSet so they are more ↵Rafael Espindola2013-03-29
| | | | | | | | | | | | | | | | | prone to" This reverts commit 617330909f0c26a3f2ab8601a029b9bdca48aa61. It broke the bots: /home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:150: PushPopTest /home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:118: Failure Value of: v[i].getValue() Actual: 0 Expected: value Which is: 2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178334 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix allocations of SmallVector and SmallPtrSet so they are more prone toJean-Luc Duprat2013-03-29
| | | | | | | | being power-of-two sized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178332 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable JIT/MCJIT tests in unittests/ExecutionEngine for the targets that ↵Jyotsna Verma2013-03-28
| | | | | | don't support JIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178221 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable Initialize.MultipleThreads test under MemorySanitizer.Evgeniy Stepanov2013-03-27
| | | | | | | Fails due to insufficient thread stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178135 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for graceful handling of long file names on Windows. Patch thanks ↵Aaron Ballman2013-03-16
| | | | | | to Paul Robinson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177223 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][Test] Missed this in the API change.Michael J. Spencer2013-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176996 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][ErrorOr] Add support for implicit conversion from error ↵Michael J. Spencer2013-02-28
| | | | | | code/condition enums. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176228 91177308-0d34-0410-b5e6-96231b3b80d8
* Only include move-related Optional<T> tests when rvalue references are ↵David Blaikie2013-02-21
| | | | | | available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175730 91177308-0d34-0410-b5e6-96231b3b80d8
* Add move ctor/assignment to Optional<T>David Blaikie2013-02-21
| | | | | | Code review feedback for r175580 by Jordan Rose. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175729 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the SplatByte helper to APInt and generalize it a bit.Benjamin Kramer2013-02-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175621 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.David Blaikie2013-02-20
| | | | | | Code review feedback on r175580 from Jordan Rose. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175595 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow llvm::Optional to work with types without default constructors.David Blaikie2013-02-20
| | | | | | | | | This generalizes Optional to require less from the T type by using aligned storage for backing & placement new/deleting the T into it when necessary. Also includes unit tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175580 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove my bogus MapVector::erase() with a narrower ::pop_back(), and add a ↵Douglas Gregor2013-02-19
| | | | | | unit test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175538 91177308-0d34-0410-b5e6-96231b3b80d8
* ADT: Correct APInt::getActiveWords for zero valuesMeador Inge2013-02-07
| | | | | | | | | | PR15138 was opened because of a segfault in the Bitcode writer. The actual issue ended up being a bug in APInt where calls to APInt::getActiveWords returns a bogus value when the APInt value is 0. This patch fixes the problem by ensuring that getActiveWords returns 1 for 0 valued APInts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174641 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][ErrorOr] Add support for convertable types.Michael J. Spencer2013-02-06
| | | | | | Thanks to Andrew, David, and Aaron for helping fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174552 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[Support][ErrorOr] Add support for convertable types."Andrew Trick2013-02-05
| | | | | | | | | This reverts commit a33e1fafac7fedb1b080ef07ddf9ad6ddff3a830. This unit test crashes on Darwon. It needs to be temporarily reverted to unblock the test infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174458 91177308-0d34-0410-b5e6-96231b3b80d8