summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
...
* CloneFunction: Clone all attributes, including the CCReid Kleckner2014-03-261-0/+23
| | | | | | | | | | | | | | | | Summary: Tested with a unit test because we don't appear to have any transforms that use this other than ASan, I think. Fixes PR17935. Reviewers: nicholas CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3194 llvm-svn: 204866
* [C++11] Change DebugInfoFinder to use range-based loopsAlon Mishne2014-03-181-2/+2
| | | | | | Also changes the iterators to return actual DI type over MDNode. llvm-svn: 204130
* unittests: Fix -Werror buildJustin Bogner2014-03-121-2/+2
| | | | llvm-svn: 203679
* Add parens around && clauses in a || to appease the compiler.Eli Bendersky2014-03-121-2/+2
| | | | | | Otherwise gcc 4.8.2 generates a warning. llvm-svn: 203671
* Cloning a function now also clones its debug metadata if ↵Alon Mishne2014-03-121-1/+211
| | | | | | 'ModuleLevelChanges' is true. llvm-svn: 203662
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-11/+12
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-072-2/+2
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-101-0/+2
| | | | llvm-svn: 196908
* [asan] rewrite asan's stack frame layoutKostya Serebryany2013-12-062-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Rewrite asan's stack frame layout. First, most of the stack layout logic is moved into a separte file to make it more testable and (potentially) useful for other projects. Second, make the frames more compact by using adaptive redzones (smaller for small objects, larger for large objects). Third, try to minimized gaps due to large alignments (this is hypothetical since today we don't see many stack vars aligned by more than 32). The frames indeed become more compact, but I'll still need to run more benchmarks before committing, but I am sking for review now to get early feedback. This change will be accompanied by a trivial change in compiler-rt tests to match the new frame sizes. Reviewers: samsonov, dvyukov Reviewed By: samsonov CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2324 llvm-svn: 196568
* Add support for software expansion of 64-bit integer division instructions.Michael Ilseman2013-11-191-0/+122
| | | | | | Patch by Dmitri Shtilman! llvm-svn: 195116
* Introduce SpecialCaseList::isIn overload for GlobalAliases.Peter Collingbourne2013-08-191-0/+46
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1437 llvm-svn: 188688
* Remove SpecialCaseList::findCategory.Peter Collingbourne2013-08-191-2/+0
| | | | | | It turned out that I didn't need this for DFSan. llvm-svn: 188646
* Relax conditions of test added in r188156 to fix it on WindowsAlexey Samsonov2013-08-121-1/+1
| | | | llvm-svn: 188157
* Introduce factory methods for SpecialCaseListAlexey Samsonov2013-08-121-2/+32
| | | | | | | | | | | | | | | | | | | | Summary: Doing work in constructors is bad: this change suggests to call SpecialCaseList::create(Path, Error) instead of "new SpecialCaseList(Path)". Currently the latter may crash with report_fatal_error, which is undesirable - sometimes we want to report the error to user gracefully - for example, if he provides an incorrect file as an argument of Clang's -fsanitize-blacklist flag. Reviewers: pcc Reviewed By: pcc CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1327 llvm-svn: 188156
* Make SpecialCaseList match full strings, as documented, using anchors.Peter Collingbourne2013-07-161-0/+16
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1149 llvm-svn: 186431
* Implement categories for special case lists.Peter Collingbourne2013-07-091-8/+33
| | | | | | | | | | | | | | | | | | | | | | | | A special case list can now specify categories for specific globals, which can be used to instruct an instrumentation pass to treat certain functions or global variables in a specific way, such as by omitting certain aspects of instrumentation while keeping others, or informing the instrumentation pass that a specific uninstrumentable function has certain semantics, thus allowing the pass to instrument callers according to those semantics. For example, AddressSanitizer now uses the "init" category instead of global-init prefixes for globals whose initializers should not be instrumented, but which in all other respects should be instrumented. The motivating use case is DataFlowSanitizer, which will have a number of different categories for uninstrumentable functions, such as "functional" which specifies that a function has pure functional semantics, or "discard" which indicates that a function's return value should not be labelled. Differential Revision: http://llvm-reviews.chandlerc.com/D1092 llvm-svn: 185978
* Add some SpecialCaseList unit tests.Peter Collingbourne2013-07-092-0/+118
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1091 llvm-svn: 185977
* Delete the functions F1 and F2 to appease the valgrind bot.Joey Gouly2013-04-101-0/+3
| | | | llvm-svn: 179239
* Change CloneFunctionInto to always clone Argument attributes induvidually,Joey Gouly2013-04-101-1/+28
| | | | | | | rather than checking if the source and destination have the same number of arguments and copying the attributes over directly. llvm-svn: 179169
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-023-13/+13
| | | | | | | | | | | | | | | | | | | | | 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 the #include lines for unittest/...Chandler Carruth2012-12-043-9/+8
| | | | llvm-svn: 169250
* 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
* 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
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-291-2/+3
| | | | | | | | | | | | | | | | | 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
* llvm/unittests: Simplify LINK_COMPONENTS.NAKAMURA Takumi2012-06-211-1/+1
| | | | llvm-svn: 158942
* Completely refactor the structuring of unittest CMake files to match theChandler Carruth2012-06-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+2
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
* Convert GetElementPtrInst to use ArrayRef.Jay Foad2011-07-251-1/+1
| | | | llvm-svn: 135904
* Don't include Operator.h from InstrTypes.h.Jay Foad2011-04-111-0/+1
| | | | llvm-svn: 129271
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-4/+3
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
* (Almost) always call reserveOperandSpace() on newly created PHINodes.Jay Foad2011-03-301-0/+1
| | | | llvm-svn: 128535
* Simplify RecursivelyDeleteDeadPHINode. The only functionality changeDuncan Sands2011-02-211-0/+6
| | | | | | | | should be that if the phi is used by a side-effect free instruction with no uses then the phi and the instruction now get zapped (checked by the unittest). llvm-svn: 126124
* Make RecursivelyDeleteDeadPHINode delete a phi node that has no users and add aNick Lewycky2011-02-201-0/+5
| | | | | | | | | test for that. With this change, test/CodeGen/X86/codegen-dce.ll no longer finds any instructions to DCE, so delete the test. Also renamed J and JP to I and IP in RecursivelyDeleteDeadPHINode. llvm-svn: 126088
* Teach RecursivelyDeleteDeadPHINodes to handle multiple self-references. PatchNick Lewycky2011-02-201-0/+49
| | | | | | by Andrew Clinton! llvm-svn: 126077
* Teach this test not to leak. Also, clean up all the cast<BinaryOperator> cruft.Nick Lewycky2010-03-131-36/+89
| | | | llvm-svn: 98446
* Factor out redundancy from clone() implementations.Devang Patel2009-10-271-28/+28
| | | | llvm-svn: 85327
* Type.h doesn't need to #include LLVMContext.hChris Lattner2009-10-271-0/+1
| | | | llvm-svn: 85254
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-061-1/+1
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* New unit test for the cloning module, which so far only covers cloning ofNick Lewycky2009-09-272-0/+102
instructions' optimization flags. llvm-svn: 82934
OpenPOWER on IntegriCloud