summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Transforms/Utils/Cloning.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Transforms: Fix a use of the old DebugLoc in unittestsDuncan P. N. Exon Smith2015-03-301-3/+3
| | | | | | Missed this one before. llvm-svn: 233597
* [opaque pointer type] gep API migrationDavid Blaikie2015-03-141-1/+2
| | | | | | | This concludes the GetElementPtrInst::Create migration, thus marking the beginning of the IRBuilder::CreateGEP* migration to come. llvm-svn: 232280
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-3/+2
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Move the complex address expression out of DIVariable and into an extraAdrian Prantl2014-10-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument of the llvm.dbg.declare/llvm.dbg.value intrinsics. Previously, DIVariable was a variable-length field that has an optional reference to a Metadata array consisting of a variable number of complex address expressions. In the case of OpPiece expressions this is wasting a lot of storage in IR, because when an aggregate type is, e.g., SROA'd into all of its n individual members, the IR will contain n copies of the DIVariable, all alike, only differing in the complex address reference at the end. By making the complex address into an extra argument of the dbg.value/dbg.declare intrinsics, all of the pieces can reference the same variable and the complex address expressions can be uniqued across the CU, too. Down the road, this will allow us to move other flags, such as "indirection" out of the DIVariable, too. The new intrinsics look like this: declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr) declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr) This patch adds a new LLVM-local tag to DIExpressions, so we can detect and pretty-print DIExpression metadata nodes. What this patch doesn't do: This patch does not touch the "Indirect" field in DIVariable; but moving that into the expression would be a natural next step. http://reviews.llvm.org/D4919 rdar://problem/17994491 Thanks to dblaikie and dexonsmith for reviewing this patch! Note: I accidentally committed a bogus older version of this patch previously. llvm-svn: 218787
* Revert r218778 while investigating buldbot breakage.Adrian Prantl2014-10-011-3/+2
| | | | | | "Move the complex address expression out of DIVariable and into an extra" llvm-svn: 218782
* Move the complex address expression out of DIVariable and into an extraAdrian Prantl2014-10-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument of the llvm.dbg.declare/llvm.dbg.value intrinsics. Previously, DIVariable was a variable-length field that has an optional reference to a Metadata array consisting of a variable number of complex address expressions. In the case of OpPiece expressions this is wasting a lot of storage in IR, because when an aggregate type is, e.g., SROA'd into all of its n individual members, the IR will contain n copies of the DIVariable, all alike, only differing in the complex address reference at the end. By making the complex address into an extra argument of the dbg.value/dbg.declare intrinsics, all of the pieces can reference the same variable and the complex address expressions can be uniqued across the CU, too. Down the road, this will allow us to move other flags, such as "indirection" out of the DIVariable, too. The new intrinsics look like this: declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr) declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr) This patch adds a new LLVM-local tag to DIExpressions, so we can detect and pretty-print DIExpression metadata nodes. What this patch doesn't do: This patch does not touch the "Indirect" field in DIVariable; but moving that into the expression would be a natural next step. http://reviews.llvm.org/D4919 rdar://problem/17994491 Thanks to dblaikie and dexonsmith for reviewing this patch! llvm-svn: 218778
* [Debug Info] add DISubroutineType and its creation takes DITypeArray. Manman Ren2014-07-281-1/+1
| | | | | | | | | | | DITypeArray is an array of DITypeRef, at its creation, we will create DITypeRef (i.e use the identifier if the type node has an identifier). This is the last patch to unique the type array of a subroutine type. rdar://17628609 llvm-svn: 214132
* [C++11] Use 'nullptr'.Craig Topper2014-06-081-2/+2
| | | | llvm-svn: 210442
* This reverts r206828 until David has time to figure out that is going on.Quentin Colombet2014-04-221-25/+19
| | | | llvm-svn: 206839
* Use unique_ptr to handle ownership of Value*s in Cloning unit tests.David Blaikie2014-04-211-19/+25
| | | | llvm-svn: 206828
* 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
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-071-1/+1
| | | | | | | | | | 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
* 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-021-4/+4
| | | | | | | | | | | | | | | | | | | | | 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-041-4/+4
| | | | llvm-svn: 169250
* 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
* 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-271-0/+87
instructions' optimization flags. llvm-svn: 82934
OpenPOWER on IntegriCloud