summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
Commit message (Collapse)AuthorAgeFilesLines
* Use an export list when building JIT unittests. <rdar://problem/12473675>Bob Wilson2012-10-181-0/+7
| | | | | | | | | When building with LTO, the internalize pass is hiding some global symbols that are necessary for the JIT unittests. It seems like that may be a bug in LTO to do that by default, but until that gets fixed, this change makes sure that we export the necessary symbols for the tests to pass. llvm-svn: 166220
* Marked this variable as 'used' so that LTO doesn't get rid of it.Bill Wendling2012-10-171-1/+1
| | | | llvm-svn: 166092
* Fix a bug in the set(I,E)/reset(I,E) methods that I recently added. The ↵Owen Anderson2012-10-161-0/+10
| | | | | | boundary condition for checking if I and E were in the same word were incorrect, and, beyond that, the mask computation was not using a wide enough constant. llvm-svn: 166015
* Add range-based set()/reset() to BitVector. These allow fast ↵Owen Anderson2012-10-151-0/+42
| | | | | | setting/resetting of ranges of bits, particularly useful when dealing with very large BitVector's. llvm-svn: 165984
* Update CMake build.Benjamin Kramer2012-10-141-0/+1
| | | | llvm-svn: 165908
* Fix a typo that made ImmutableMap::getMaxElement() useless.Benjamin Kramer2012-10-141-0/+50
| | | | | | Add a basic unit test for ImmutableMap. Found by inspection. llvm-svn: 165907
* Add powerpc-ibm-aix to Triple. Patch by Kai.Duncan Sands2012-10-121-0/+12
| | | | llvm-svn: 165792
* JITTest.cpp: Use LLVM_ATTRIBUTE_USED, rather than __attribute__ directly!NAKAMURA Takumi2012-10-121-1/+1
| | | | llvm-svn: 165790
* Mark function as 'used' so that LTO doesn't try to get rid of it.Bill Wendling2012-10-121-0/+1
| | | | llvm-svn: 165781
* Revert r165777, "Mark function as 'used' so that LTO doesn't try to get rid ↵NAKAMURA Takumi2012-10-121-1/+1
| | | | | | of it." llvm-svn: 165780
* Mark function as 'used' so that LTO doesn't try to get rid of it.Bill Wendling2012-10-121-1/+1
| | | | llvm-svn: 165777
* Casting.h: Automatically handle isa<Base>(Derived).Sean Silva2012-10-111-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | Additionally, all such cases are handled with no dynamic check. All `classof()` of the form class Foo { [...] static bool classof(const Bar *) { return true; } [...] } where Foo is an ancestor of Bar are no longer necessary. Don't write them! Note: The exact test is `is_base_of<Foo, Bar>`, which is non-strict, so that Foo is considered an ancestor of itself. This leads to the following rule of thumb for LLVM-style RTTI: The argument type of `classof()` should be a strict ancestor. For more information about implementing LLVM-style RTTI, see docs/HowToSetUpLLVMStyleRTTI.rst llvm-svn: 165765
* Move TargetData to DataLayout.Micah Villmow2012-10-082-14/+14
| | | | llvm-svn: 165403
* Some regression tests which are testing the old jit and are exercising ↵James Molloy2012-10-081-1/+14
| | | | | | | | functionality which is both known to be broken and not expected to be fixed in the old jit. To remove these from the regression test output, I've marked them XFAIL (for lit tests) and ifdef'd them out (unit tests). These modifications remove the last long-standing regression test failures from the buildbots (though updating the triple to reflect new ubuntu configuration has temporarily caused some new failures). Tested on x86-64 and ARM Linux. Patch by David Tweed! llvm-svn: 165390
* Adding MCJIT and MemoryBuffer unit testsAndrew Kaylor2012-10-0411-1/+869
| | | | | | Patch by Daniel Malea. llvm-svn: 165246
* Use unsigned long long instead of uin64_t for OS where that matters.Nick Kledzik2012-10-031-1/+1
| | | | llvm-svn: 165147
* Don't call getAsUnsignedInteger directly, it fails to compile if uint64_t is ↵Benjamin Kramer2012-10-031-1/+5
| | | | | | | | not "unsigned long long". while there add more test cases. llvm-svn: 165140
* Add getAsUnsignedInteger test case that checks that known bad values are ↵Nick Kledzik2012-10-031-0/+19
| | | | | | rejected llvm-svn: 165136
* Removing dependency on third party library for Intel JIT event support.Andrew Kaylor2012-09-282-3/+4
| | | | | | Patch committed on behalf of Kirill Uhanov llvm-svn: 164831
* Fix of hang during Intel JIT profilingAndrew Kaylor2012-09-261-1/+1
| | | | | | Committed on behalf of Kirill Uhanov llvm-svn: 164736
* Remove unneeded and invalid SetInsertPoint calls from unittest.Benjamin Kramer2012-09-261-8/+0
| | | | | | BB->end() returns a sentinel value that is not a legal insert point. llvm-svn: 164699
* APFloat::roundToIntegral: Special values don't keep the exponent value up to ↵Benjamin Kramer2012-09-261-0/+17
| | | | | | | | date, don't rely on it. Add a couple of unit tests for special floats. Fixes 13929, found by MemorySanitizer. llvm-svn: 164698
* Expansions for u/srem, using the udiv expansion. More unit tests for udiv ↵Michael Ilseman2012-09-261-0/+96
| | | | | | | | and u/srem. Fixed issue with Release build. llvm-svn: 164654
* Revert r164614 to appease the buildbots.Chad Rosier2012-09-251-97/+0
| | | | llvm-svn: 164627
* Expansions for u/srem, using the udiv expansion. More unit tests for udiv ↵Michael Ilseman2012-09-251-0/+97
| | | | | | and u/srem. llvm-svn: 164614
* Unit tests for IntegerDivision. Currently, just a basic sanity check to ↵Michael Ilseman2012-09-252-0/+55
| | | | | | ensure that the code was generated properly. Future work would be finding some way to test the actual result that would be computed. llvm-svn: 164582
* This patch adds memory support functions which will later be used to ↵Andrew Kaylor2012-09-192-0/+357
| | | | | | implement section-specific protection handling in MCJIT. llvm-svn: 164249
* Fix includes of llvm files that used angle brackets.Craig Topper2012-09-152-9/+9
| | | | llvm-svn: 163979
* cmake: Fix file path.Daniel Dunbar2012-09-141-1/+1
| | | | llvm-svn: 163950
* formatted_raw_ostream: Fix a serious bug in tell().Daniel Dunbar2012-09-142-1/+35
| | | | | | | | | - The current_pos function is supposed to return all the written bytes, not the current position of the underlying stream. - This caused tell() to be broken whenever the underlying stream had buffered content. llvm-svn: 163948
* Fix up erroneous alignas usage while making this portable to GCC 4.7David Blaikie2012-09-141-71/+47
| | | | | | Review by Chandler Carruth. llvm-svn: 163944
* ADTTests: [CMake] Exclude DenseMapTest.cpp and SmallVectorTest.cpp on MSVC9 ↵NAKAMURA Takumi2012-08-301-1/+14
| | | | | | due to its bug. llvm-svn: 162918
* Don't pass a null pointer to cast<> in its unit tests.Richard Smith2012-08-211-3/+5
| | | | llvm-svn: 162310
* DataExtractor: Fix integer truncation issues in LEB128 extraction.Benjamin Kramer2012-08-201-0/+9
| | | | llvm-svn: 162201
* Flatten the aligned-char-array utility template to be a directlyChandler Carruth2012-08-171-117/+117
| | | | | | | templated union at the request of Richard Smith. This makes it substantially easier to type. =] llvm-svn: 162072
* Properly test the LLVM_USE_RVALUE_REFERENCES macro.Michael J. Spencer2012-08-151-1/+1
| | | | llvm-svn: 161979
* [PathV2] Add mapped_file_region. Implementation for Windows and POSIX.Michael J. Spencer2012-08-151-26/+33
| | | | llvm-svn: 161976
* Fix another roundToIntegral bug where very large values could become ↵Owen Anderson2012-08-151-1/+14
| | | | | | infinity. Problem and solution identified by Steve Canon. llvm-svn: 161969
* Fix a problem with APFloat::roundToIntegral where it would return incorrect ↵Owen Anderson2012-08-151-0/+30
| | | | | | results for negative inputs to trunc. Add unit tests to verify this behavior. llvm-svn: 161929
* Added test for non-static use of cl::opt (fixed in r160170)Alexander Kornienko2012-08-131-0/+11
| | | | llvm-svn: 161751
* Update cmake build.Benjamin Kramer2012-08-041-0/+1
| | | | llvm-svn: 161297
* Postpone the deletion of the old name in StructType::setName to allow using ↵Benjamin Kramer2012-08-041-0/+30
| | | | | | | | a slice of the old name. Fixes PR13522. Add a rudimentary unit test to exercise the behavior. llvm-svn: 161296
* Add range erase, element insert, and range insert methods toChandler Carruth2012-08-011-0/+91
| | | | | | | | | | | | | | | TinyPtrVector. With these, it is sufficiently functional for my more normal / pedestrian uses. I've not included some r-value reference stuff here because the value type for a TinyPtrVector is, necessarily, just a pointer. I've added tests that cover the basic behavior of these routines, but they aren't as comprehensive as I'd like. In particular, they don't really test the iterator semantics as thoroughly as they should. Maybe some brave soul will feel enterprising and flesh them out. ;] llvm-svn: 161104
* Initial commit of new FileOutputBuffer support class. Nick Kledzik2012-08-012-0/+138
| | | | | | | | Since the llvm::sys::fs::map_file_pages() support function it relies on is not yet implemented on Windows, the unit tests for FileOutputBuffer are currently conditionalized to run only on unix. llvm-svn: 161099
* Implement MipsJITInfo::replaceMachineCodeForFunction.Akira Hatanaka2012-08-011-2/+2
| | | | | | | | | | No new test case is added. This patch makes test JITTest.FunctionIsRecompiledAndRelinked pass on mips platform. Patch by Petar Jovanovic. llvm-svn: 161098
* Suppress stderr noise when test case runs.Nick Kledzik2012-07-311-0/+6
| | | | llvm-svn: 161085
* Implement copy and move assignment for TinyPtrVector. These try toChandler Carruth2012-07-311-0/+166
| | | | | | re-use allocated vectors as much as possible. llvm-svn: 161041
* Bring TinyPtrVector under test. Somehow we never picked up unit testsChandler Carruth2012-07-312-0/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | for this class. These tests exercise most of the basic properties, but the API for TinyPtrVector is very strange currently. My plan is to start fleshing out the API to match that of SmallVector, but I wanted a test for what is there first. Sadly, it doesn't look reasonable to just re-use the SmallVector tests, as this container can only ever store pointers, and much of the SmallVector testing is to get construction and destruction right. Just to get this basic test working, I had to add value_type to the interface. While here I found a subtle bug in the combination of 'erase', 'begin', and 'end'. Both 'begin' and 'end' wanted to use a null pointer to indicate the "end" iterator of an empty vector, regardless of whether there is actually a vector allocated or the pointer union is null. Everything else was fine with this except for erase. If you erase the last element of a vector after it has held more than one element, we return the end iterator of the underlying SmallVector which need not be a null pointer. Instead, simply use the pointer, and poniter + size() begin/end definitions in the tiny case, and delegate to the inner vector whenever it is present. llvm-svn: 161024
* Move the SmallVector unit tests to be type-parameterized so that we canChandler Carruth2012-07-301-149/+176
| | | | | | | | | | | | | | | | | | | | test more than a single instantiation of SmallVector. Add testing for 0, 1, 2, and 4 element sized "small" buffers. These appear to be essentially untested in the unit tests until now. Fix several tests to be robust in the face of a '0' small buffer. As a consequence of this size buffer, the growth patterns are actually observable in the test -- yes this means that many tests never caused a grow to occur before. For some tests I've merely added a reserve call to normalize behavior. For others, the growth is actually interesting, and so I captured the fact that growth would occur and adjusted the assertions to not assume how rapidly growth occured. Also update the specialization for a '0' small buffer length to have all the same interface points as the normal small vector. llvm-svn: 161001
* make ConstantRange::zeroExtend() optimalNuno Lopes2012-07-231-0/+4
| | | | llvm-svn: 160643
OpenPOWER on IntegriCloud