summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
Commit message (Collapse)AuthorAgeFilesLines
* Implement APFloat::isDenormal()Shuxin Yang2013-01-071-0/+52
| | | | llvm-svn: 171764
* Rename the VMCore unittest tree to IR. Somehow was missed when doing theChandler Carruth2013-01-0716-16/+16
| | | | | | library rename. llvm-svn: 171747
* Move CallGraphSCCPass.h into the Analysis tree; that's where theChandler Carruth2013-01-071-1/+1
| | | | | | implementation lives already. llvm-svn: 171746
* Rename the unittest from ArrayRecylerTest.cpp to ArrayRecyclerTest.cpp.Chandler Carruth2013-01-051-0/+0
| | | | | | | Fixes the CMake build. It took me cutting and pasting this before I managed to see the missing character. =] llvm-svn: 171589
* Add an ArrayRecycler class.Jakob Stoklund Olesen2013-01-052-0/+110
| | | | | | | | This is similar to the existing Recycler allocator, but instead of recycling individual objects from a BumpPtrAllocator, arrays of different sizes can be allocated. llvm-svn: 171581
* Add time getters to the process interface for requesting the elapsedChandler Carruth2013-01-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wall time, user time, and system time since a process started. For walltime, we currently use TimeValue's interface and a global initializer to compute a close approximation of total process runtime. For user time, this adds support for an somewhat more precise timing mechanism -- clock_gettime with the CLOCK_PROCESS_CPUTIME_ID clock selected. For system time, we have to do a full getrusage call to extract the system time from the OS. This is expensive but unavoidable. In passing, clean up the implementation of the old APIs and fix some latent bugs in the Windows code. This might have manifested on Windows ARM systems or other systems with strange 64-bit integer behavior. The old API for this both user time and system time simultaneously from a single getrusage call. While this results in fewer system calls, it also results in a lower precision user time and if only user time is desired, it introduces a higher overhead. It may be worthwhile to switch some of the pass timers to not track system time and directly track user and wall time. The old API also tracked walltime in a confusing way -- it just set it to the current walltime rather than providing any measure of wall time since the process started the way buth user and system time are tracked. The new API is more consistent here. The plan is to eventually implement these methods for a *child* process by using the wait3(2) system call to populate an rusage struct representing the whole subprocess execution. That way, after waiting on a child process its stats will become accurate and cheap to query. llvm-svn: 171551
* Add an iplist::clearAndLeakNodesUnsafely() function.Jakob Stoklund Olesen2013-01-041-0/+33
| | | | | | | | | | | | The iplist::clear() function can be quite expensive because it traverses the entire list, calling deleteNode() and removeNodeFromList() on each element. If node destruction and deallocation can be handled some other way, clearAndLeakNodesUnsafely() can be used to jettison all nodes without bringing them into cache. The function name is meant to be ominous. llvm-svn: 171540
* Fix how YAML I/O detects flow sequences. Nick Kledzik2013-01-041-3/+9
| | | | | | | Update test case to verify flow sequence is written as a flow sequence. llvm-svn: 171514
* [Support][Endian] Add support for specifying the alignment and native ↵Michael J. Spencer2013-01-021-11/+11
| | | | | | | | | | | unaligned types. * Add support for specifying the alignment to use. * Add the concept of native endianness. Used for unaligned native types. The native alignment and read/write simplification is based on a patch by Richard Smith. llvm-svn: 171406
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-0226-124/+124
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Sort a few more #include lines in tools/... unittests/... and utils/...Chandler Carruth2013-01-023-3/+1
| | | | llvm-svn: 171363
* Go ahead and get rid of the old page size interface and convert all theChandler Carruth2012-12-311-1/+1
| | | | | | | users over to the new one. No sense maintaining this "compatibility" layer it seems. llvm-svn: 171331
* Flesh out a page size accessor in the new API.Chandler Carruth2012-12-311-0/+2
| | | | | | | | Implement the old API in terms of the new one. This simplifies the implementation on Windows which can now re-use the self_process's once initialization. llvm-svn: 171330
* [AlignOf] Add AlignedCharArray and refactor AlignedCharArrayUnion.Michael J. Spencer2012-12-311-2/+11
| | | | | | | This adds AlignedCharArray<Alignment, Size>. A templated struct that contains a member named buffer of type char[Size] that is aligned to Alignment. llvm-svn: 171319
* Begin sketching out the process interface.Chandler Carruth2012-12-312-0/+34
| | | | | | | | | | | | | | | | | | | | | | | The coding style used here is not LLVM's style because this is modeled after a Boost interface and thus done in the style of a candidate C++ standard library interface. I'll probably end up proposing it as a standard C++ library if it proves to be reasonably portable and useful. This is just the most basic parts of the interface -- getting the process ID out of it. However, it helps sketch out some of the boiler plate such as the base class, derived class, shared code, and static factory function. It also introduces a unittest so that I can incrementally ensure this stuff works. However, I've not even compiled this code for Windows yet. I'll try to fix any Windows fallout from the bots, and if I can't fix it I'll revert and get someone on Windows to help out. There isn't a lot more that is mandatory, so soon I'll switch to just stubbing out the Windows side and get Michael Spencer to help with implementation as he can test it directly. llvm-svn: 171289
* Test that a landingpad gets the name provided when it was created (see commitDuncan Sands2012-12-211-0/+7
| | | | | | 170318). llvm-svn: 170886
* Add an assertion for a likely ilist::splice() contract violation.Jakob Stoklund Olesen2012-12-181-0/+21
| | | | | | | | | | | | | | | | | | | | | | | The single-element ilist::splice() function supports a noop move: List.splice(I, List, I); The corresponding std::list function doesn't allow that, so add a unit test to document that behavior. This also means that List.splice(I, List, F); is somewhat surprisingly not equivalent to List.splice(I, List, F, next(F)); This patch adds an assertion to catch the illegal case I == F above. Alternatively, we could make I == F a legal noop, but that would make ilist differ even more from std::list. llvm-svn: 170443
* Fix some integer constant warnings by using a suffixNick Kledzik2012-12-171-7/+7
| | | | llvm-svn: 170376
* re-enable test cases now that traits work with g++. Fix some g++ warningsNick Kledzik2012-12-171-12/+7
| | | | llvm-svn: 170369
* Temporarily disable test cases until they compile with g++ too.Nick Kledzik2012-12-121-0/+4
| | | | llvm-svn: 170035
* Unbreak the build. Fallout from r170019.David Blaikie2012-12-121-1/+1
| | | | llvm-svn: 170033
* Initial implementation of a utility for converting native data Nick Kledzik2012-12-122-0/+1289
| | | | | | | | | structures to and from YAML using traits. The first client will be the test suite of lld. The documentation will show up at: http://llvm.org/docs/YamlIO.html llvm-svn: 170019
* Reorganize FastMathFlags to be a wrapper around unsigned, and streamline ↵Michael Ilseman2012-12-091-2/+2
| | | | | | some interfaces. llvm-svn: 169712
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-071-7/+7
| | | | | | in the near future. llvm-svn: 169651
* Do not run tests MappedMemoryTest.BasicWrite and MultipleWrite unless bothAkira Hatanaka2012-12-051-4/+6
| | | | | | MF_READ and MF_WRITE are set. llvm-svn: 169439
* Copy clang/Driver/<Option parsing stuff> to llvm.Michael J. Spencer2012-12-054-0/+131
| | | | llvm-svn: 169344
* Sort the #include lines for unittest/...Chandler Carruth2012-12-0449-131/+103
| | | | llvm-svn: 169250
* VMCoreTests/PassManagerTest.cpp: Appease msvc not to do "using llvm::Pass" ↵NAKAMURA Takumi2012-12-041-0/+2
| | | | | | | in class template. FIXME: I have not checked whether to be compiled on msvc11. llvm-svn: 169225
* Add 'using' declarations to suppress -Woverloaded-virtual warnings.Matt Beaumont-Gay2012-12-041-0/+4
| | | | llvm-svn: 169214
* [Support] Make FileOutputBuffer work on Windows.Michael J. Spencer2012-12-031-18/+7
| | | | llvm-svn: 169167
* Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.Chandler Carruth2012-11-302-18/+18
| | | | | | | | | | | | | | Rationale: 1) This was the name in the comment block. ;] 2) It matches Clang's __has_feature naming convention. 3) It matches other compiler-feature-test conventions. Sorry for the noise. =] I've also switch the comment block to use a \brief tag and not duplicate the name. llvm-svn: 168996
* copyFastMathFlags utility and test caseMichael Ilseman2012-11-291-0/+9
| | | | llvm-svn: 168943
* Whoops, fixed bad mergeMichael Ilseman2012-11-281-55/+0
| | | | llvm-svn: 168816
* Fixed bad test caseMichael Ilseman2012-11-281-0/+55
| | | | llvm-svn: 168815
* Fast-math: IRBuilder test for creating instructions with fast-math flagsMichael Ilseman2012-11-281-0/+58
| | | | llvm-svn: 168814
* Add backreference matching capabilities to Support/Regex, withEli Bendersky2012-11-281-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate unit tests. This change in itself is not expected to affect any functionality at this point, but it will serve as a stepping stone to improve FileCheck's variable matching capabilities. Luckily, our regex implementation already supports backreferences, although a bit of hacking is required to enable it. It supports both Basic Regular Expressions (BREs) and Extended Regular Expressions (EREs), without supporting backrefs for EREs, following POSIX strictly in this respect. And EREs is what we actually use (rightly). This is contrary to many implementations (including the default on Linux) of POSIX regexes, that do allow backrefs in EREs. Adding backref support to our EREs is a very simple change in the regcomp parsing code. I fail to think of significant cases where it would clash with existing things, and can bring more versatility to the regexes we write. There's always the danger of a backref in a specially crafted regex causing exponential matching times, but since we mainly use them for testing purposes I don't think it's a big problem. [it can also be placed behind a flag specific to FileCheck, if needed]. For more details, see: * http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/055840.html * http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/156878.html llvm-svn: 168802
* Moving SectionMemoryManager into RuntimeDyld and adding unit tests for it.Andrew Kaylor2012-11-275-406/+175
| | | | | | | | The SectionMemoryManager now supports (and requires) applying section-specific page permissions. Clients using this memory manager must call either MCJIT::finalizeObject() or SectionMemoryManager::applyPermissions() before executing JITed code. See r168718 for changes from the previous implementation. llvm-svn: 168721
* Implementing page permission setting in MCJIT unit test SectionMemoryManager.cppAndrew Kaylor2012-11-273-63/+205
| | | | | | This commit is primarily here for the revision history. I'm about to move the SectionMemoryManager into the RuntimeDyld library, but I wanted to check the changes in here so people could see the differences in the updated implementation. llvm-svn: 168718
* Allow using MemoryBuffers with yaml::Stream directly.Sean Silva2012-11-191-0/+34
| | | | | | | | | | The rationale is to get YAML filenames in diagnostics from yaml::Stream::printError -- currently the filename is hard-coded as "YAML" because there's no buffer information available. Patch by Kim Gräsman! llvm-svn: 168341
* Add a new function to ConstantExpr - getAsInstruction. This returns its ↵James Molloy2012-11-171-0/+106
| | | | | | | | Instruction* corollary, which may be useful if a user wishes to transform a ConstantExpr so that one of its operands is no longer constant. llvm-svn: 168262
* Removing utf-8 smart quote and trailing whitespaceJoe Abbey2012-11-171-2/+2
| | | | llvm-svn: 168253
* Suppressing the 'direct base ‘{anonymous}::S1’ inaccessible in ↵Joe Abbey2012-11-171-0/+12
| | | | | | | | ‘{anonymous}::D9’ due to ambiguity' warning. llvm-svn: 168251
* Interface changes to allow RuntimeDyld memory managers to set memory ↵Andrew Kaylor2012-11-153-4/+8
| | | | | | permissions after an object has been loaded. llvm-svn: 168114
* Remove DOS line endings.Jakub Staszak2012-11-141-356/+356
| | | | llvm-svn: 167968
* do not play preprocessor tricks with 'private', use public interfaces ↵Gabor Greif2012-11-121-7/+4
| | | | | | instead; this appeases the VC++ buildbots llvm-svn: 167724
* add unit test for waymarking algorithm (Use::getUser)Gabor Greif2012-11-122-0/+58
| | | | llvm-svn: 167720
* Provide definitions for all functions.Benjamin Kramer2012-11-101-0/+11
| | | | | | | ICC refuses to compile a class in an anonymous namespace if some functions aren't defined. Fixes PR13477. llvm-svn: 167676
* Drop the limitation to IEEE floating point types from the fdiv of pow2 -> ↵Benjamin Kramer2012-11-081-0/+6
| | | | | | | | fmul transform. This is safe for x87 long doubles and ppc double doubles too. llvm-svn: 167582
* MCJIT unit test: add calls to ensure that instruction caches are properly ↵Amara Emerson2012-10-311-0/+5
| | | | | | invalidated before code execution. llvm-svn: 167146
* Port lli bug fix from r166920 to MCJIT unit test.Amara Emerson2012-10-311-3/+11
| | | | llvm-svn: 167145
OpenPOWER on IntegriCloud