summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* [PathV2] Add mapped_file_region. Implementation for Windows and POSIX.Michael J. Spencer2012-08-151-26/+33
| | | | llvm-svn: 161976
* Added test for non-static use of cl::opt (fixed in r160170)Alexander Kornienko2012-08-131-0/+11
| | | | llvm-svn: 161751
* 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
* Suppress stderr noise when test case runs.Nick Kledzik2012-07-311-0/+6
| | | | llvm-svn: 161085
* make ConstantRange::zeroExtend() optimalNuno Lopes2012-07-231-0/+4
| | | | llvm-svn: 160643
* teach ConstantRange that zero times X is always zeroNuno Lopes2012-07-161-0/+8
| | | | llvm-svn: 160317
* make ConstantRange::getSetSize() properly compute the size of wrapped and ↵Nuno Lopes2012-07-161-5/+9
| | | | | | | | full sets. Make it always return APInts with the same bitwidth for the same ConstantRange bitwidth to simply clients llvm-svn: 160294
* Move the IRBuilder unittest from Support to VMCore. This got missed inChandler Carruth2012-07-162-75/+0
| | | | | | the original move of IRBuilder. llvm-svn: 160249
* Move llvm/Support/TypeBuilder.h -> llvm/TypeBuilder.h. This completesChandler Carruth2012-07-152-255/+0
| | | | | | | | | | | | the move of *Builder classes into the Core library. No uses of this builder in Clang or DragonEgg I could find. If there is a desire to have an IR-building-support library that contains all of these builders, that can be easily added, but currently it seems likely that these add no real overhead to VMCore. llvm-svn: 160243
* Move llvm/Support/MDBuilder.h to llvm/MDBuilder.h, to live withChandler Carruth2012-07-152-108/+0
| | | | | | | | | | | IRBuilder, DIBuilder, etc. This is the proper layering as MDBuilder can't be used (or implemented) without the Core Metadata representation. Patches to Clang and Dragonegg coming up. llvm-svn: 160237
* Revert "IntRange:" as it appears to be breaking self hosting.Eric Christopher2012-07-021-14/+8
| | | | | | This reverts commit b2833d9dcba88c6f0520cad760619200adc0442c. llvm-svn: 159618
* IntRange:Stepan Dyatkovskiy2012-07-021-8/+14
| | | | | | | | | | | | | | | | | | | | | | - Changed isSingleNumber method behaviour. Now this flag is calculated on demand. IntegersSubsetMapping - Optimized diff operation. - Replaced type of Items field from std::list with std::map. - Added new methods: bool isOverlapped(self &RHS) void add(self& RHS, SuccessorClass *S) void detachCase(self& NewMapping, SuccessorClass *Succ) void removeCase(SuccessorClass *Succ) SuccessorClass *findSuccessor(const IntTy& Val) const IntTy* getCaseSingleNumber(SuccessorClass *Succ) IntegersSubsetTest - DiffTest: Added checks for successors. SimplifyCFG Updated SwitchInst usage (now it is case-ragnes compatible) for - SimplifyEqualityComparisonWithOnlyPredecessor - FoldValueComparisonIntoPredecessors llvm-svn: 159527
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-292-3/+5
| | | | | | | | | | | | | | | | | This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. llvm-svn: 159421
* add ConstantRange::difference (to perform set difference/relative complement)Nuno Lopes2012-06-281-0/+17
| | | | llvm-svn: 159352
* fix a off-by-one bug in intersectWith(), and add a bunch of testsNuno Lopes2012-06-281-2/+32
| | | | llvm-svn: 159319
* IntegersSubsetTest: Due to compilation failure with -std=c11, replaced -1UL ↵Stepan Dyatkovskiy2012-06-261-4/+8
| | | | | | with NOT_A_NUMBER constant (0xffff). llvm-svn: 159207
* IntegersSubsetMapping: implemented "diff" operation. Operation allows at the ↵Stepan Dyatkovskiy2012-06-261-0/+143
| | | | | | | | | | | | | same time perform up to three operations: - LHS exclude RHS - LHS intersect RHS (LHS successors will keeped) - RHS exclude LHS The complexity is N+M, where N is size of LHS M is size of RHS. llvm-svn: 159201
* IntegersSubsetMapping: removed exclude operation, it will replaced with more ↵Stepan Dyatkovskiy2012-06-261-174/+0
| | | | | | | | universal "diff" operation in next commit. Changes was separated onto two commits for better readability. llvm-svn: 159200
* unittests/Support/Path.cpp: [Win32] Suppress FileSystemTest.FileMapping for now.NAKAMURA Takumi2012-06-241-0/+2
| | | | llvm-svn: 159099
* unittests/Support/Path.cpp: [Win32] Suppress FileSystemTest.Permissions for now.NAKAMURA Takumi2012-06-241-1/+2
| | | | llvm-svn: 159098
* Add a pragma to supress an MSVC warning on some of the absurd code I'mChandler Carruth2012-06-211-0/+6
| | | | | | | | using to test the alignment support library. Patch from Nikola on IRC. llvm-svn: 158912
* Completely refactor the structuring of unittest CMake files to match theChandler Carruth2012-06-211-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix inappropriate use of anonymous namespaces in unittests.Chandler Carruth2012-06-201-1/+3
| | | | | | | | | | | The TEST_F macros actually declare *subclasses* of the test fixtures. Even if they didn't we don't want them to declare external functions. The entire unit test, including both the fixture class and the fixture test cases should be wrapped in the anonymous namespace. This issue was caught by the new '-Winternal-linkage-in-inline' warning. llvm-svn: 158798
* Add permissions(), map_file_pages(), and unmap_file_pages() to llvm::sys::fs ↵Nick Kledzik2012-06-201-0/+65
| | | | | | and add unit test. Unix is implemented. Windows side needs to be implemented. llvm-svn: 158770
* For reasons I can't fathom MSVC supports ULL but not LLU suffixes on long ↵Benjamin Kramer2012-06-171-1/+1
| | | | | | long integer literals. llvm-svn: 158648
* Disable a particular assertion on MSVC... I'm deeply disturbed by itsChandler Carruth2012-06-171-0/+5
| | | | | | implementation of the class layout for the V8 type. llvm-svn: 158640
* Add some somewhat exhaustive tests of sizeof properties of this horribleChandler Carruth2012-06-171-0/+60
| | | | | | construct just for my sanity. llvm-svn: 158637
* Relax one assertion -- long double has strange alignments on lots ofChandler Carruth2012-06-161-1/+6
| | | | | | | | | platforms. Also, remove one assertion on MSVC because it produces a completely preposterous result, claiming something needs 12-byte alignment. llvm-svn: 158599
* Try to reduce the size of the array used for compile-time testing byChandler Carruth2012-06-161-44/+48
| | | | | | making the bounds all '1', and chunking it a bit. llvm-svn: 158598
* Add support to the alignment support header for conjuring a characterChandler Carruth2012-06-161-0/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | array of a suitable size and alignment for any of a number of different types to be stored into the character array. The mechanisms for producing an explicitly aligned type are fairly complex because this operation is poorly supported on all compilers. We've spent a fairly significant amount of time experimenting with different implementations inside of Google, and the one using explicitly expanded templates has been the most robust. Credit goes to Nick Lewycky for writing the first 20 versions or so of this logic we had inside of Google. I based this on the only one to actually survive. In case anyone is worried, yes we are both explicitly re-contributing and re-licensing it for LLVM. =] Once the issues with actually specifying the alignment are finished, it turns out that most compilers don't in turn align anything the way they are instructed. Testing of this logic against both Clang and GCC indicate that the alignment constraints are largely ignored by both compilers! I've come up with and used a work-around by wrapping each alignment-hinted type directly in a struct, and using that struct to align the character array through a union. This elaborate hackery is terrifying, but I've included testing that caught a terrifying number of bugs in every other technique I've tried. All of this in order to implement a poor C++98 programmers emulation of C++11 unrestricted unions in classes such as SmallDenseMap. llvm-svn: 158597
* Round 2 of dead private variable removal.Benjamin Kramer2012-06-061-2/+2
| | | | | | | | LLVM is now -Wunused-private-field clean except for - lib/MC/MCDisassembler/Disassembler.h. Not sure why it keeps all those unaccessible fields. - gtest. llvm-svn: 158096
* IntegersSubsetMapping: added exclude operation, that allows to exclude ↵Stepan Dyatkovskiy2012-06-051-0/+174
| | | | | | subset of integers from current mapping. llvm-svn: 157989
* IntegersSubsetMapping:Stepan Dyatkovskiy2012-06-051-0/+1
| | | | | | | Changed type of Items collection: from std::vector to std::list. Also some small fixes made in IntegersSubset.h, IntegersSubsetMapping.h and IntegersSubsetTest.cpp. llvm-svn: 157987
* Added unittests for IntegersSubset and IntegersSubsetMapping.Stepan Dyatkovskiy2012-06-021-0/+180
| | | | | | | | | | - Fixed IntegersSubsetGeneric copy/assignment behaviour. - Fixed IntegersSubsetGeneric::getSize/getSingleValue methods. - Fixed IntegersSubsetGeneric::verify method. Also IntegersSubset.h and IntegersSubsetMapping.h headers was fixed. llvm-svn: 157887
* fix corner case in ConstantRange::intersectWith().Nuno Lopes2012-05-181-0/+5
| | | | | | this fixes the missed optimization I was seeing in the CorrelatedValuePropagation pass llvm-svn: 157032
* Goodbye, JSONParser...Manuel Klimek2012-04-171-191/+0
| | | | llvm-svn: 154930
* Remove support for the special 'fast' value for fpmath accuracy for the moment.Duncan Sands2012-04-161-12/+0
| | | | llvm-svn: 154850
* Make it possible to indicate relaxed floating point requirements at the IR levelDuncan Sands2012-04-161-19/+45
| | | | | | | | | through the use of 'fpmath' metadata. Currently this only provides a 'fpaccuracy' value, which may be a number in ULPs or the keyword 'fast', however the intent is that this will be extended with additional information about NaN's, infinities etc later. No optimizations have been hooked up to this so far. llvm-svn: 154822
* Add the MDBuilder helper class for conveniently creating metadata.Duncan Sands2012-04-151-0/+91
| | | | llvm-svn: 154766
* Add YAML parser to Support.Michael J. Spencer2012-04-031-0/+179
| | | | llvm-svn: 153977
* BumpPtrAllocator: Make sure threshold cannot be initialized with a value ↵Benjamin Kramer2012-03-011-1/+1
| | | | | | | | smaller than the slab size. This replaces r151834 with a simpler fix. llvm-svn: 151842
* If BumpPtrAllocator is requested to allocate a size that exceeds the slab size,Argyrios Kyrtzidis2012-03-011-0/+8
| | | | | | increase the slab size. llvm-svn: 151834
* unittests/Support/Casting.cpp: [PR8226] Workaround for MSVC|Debug.NAKAMURA Takumi2012-01-221-3/+2
| | | | llvm-svn: 148659
* Changes the JSON parser to use the SourceMgr.Manuel Klimek2011-12-211-41/+14
| | | | | | | | Diagnostics are now emitted via the SourceMgr and we use MemoryBuffer for buffer management. Switched the code to make use of the trailing '0' that MemoryBuffer guarantees where it makes sense. llvm-svn: 147063
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+2
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
* Adds a JSON parser and a benchmark (json-bench) to catch performance ↵Manuel Klimek2011-12-161-0/+218
| | | | | | regressions. llvm-svn: 146735
* Revert r146363 to allow buildbots to make forward progress.Chad Rosier2011-12-121-28/+0
| | | | | | | Original commit message: Support/FileSystem: Implement canonicalize. llvm-svn: 146378
* Support/FileSystem: Implement bool equivalent(file_status A, file_status B);Michael J. Spencer2011-12-121-0/+8
| | | | llvm-svn: 146364
* Support/FileSystem: Implement canonicalize.Michael J. Spencer2011-12-121-0/+28
| | | | llvm-svn: 146363
* unittests/Support/Path.cpp: [recursive_directory_iterator] Work around for ↵NAKAMURA Takumi2011-12-091-1/+4
| | | | | | | end iterator. FIXME: It should be more robust. llvm-svn: 146294
OpenPOWER on IntegriCloud