summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/CloneModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [C++] Use 'nullptr'. Transforms edition.Craig Topper2014-04-251-3/+3
| | | | llvm-svn: 207196
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-3/+3
| | | | | | | | | | | | | | | | | | | | | 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
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+2
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Remove the dependent libraries feature.Bill Wendling2012-11-271-4/+0
| | | | | | The dependent libraries feature was never used and has bit-rotted. Remove it. llvm-svn: 168694
* Extend the IL for selecting TLS models (PR9788)Hans Wennborg2012-06-231-1/+1
| | | | | | | | | | | | | | | This allows the user/front-end to specify a model that is better than what LLVM would choose by default. For example, a variable might be declared as @x = thread_local(initialexec) global i32 42 if it will not be used in a shared library that is dlopen'ed. If the specified model isn't supported by the target, or if LLVM can make a better choice, a different model may be used. llvm-svn: 159077
* Fix llvm::CloneModule to correctly clone globals. Patch per bug report by ↵Eli Friedman2011-08-151-14/+13
| | | | | | Simon Moll on llvmdev. llvm-svn: 137654
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. llvm-svn: 134829
* Revamp the ValueMapper interfaces in a couple ways:Chris Lattner2011-01-081-4/+4
| | | | | | | | | | | | | | | | 1. Take a flags argument instead of a bool. This makes it more clear to the reader what it is used for. 2. Add a flag that says that "remapping a value not in the map is ok". 3. Reimplement MapValue to share a bunch of code and be a lot more efficient. For lookup failures, don't drop null values into the map. 4. Using the new flag a bunch of code can vaporize in LinkModules and LoopUnswitch, kill it. No functionality change. llvm-svn: 123058
* Reapply r112091 and r111922, support for metadata linking, with aDan Gohman2010-08-261-19/+5
| | | | | | | | | | | | | | fix: add a flag to MapValue and friends which indicates whether any module-level mappings are being made. In the common case of inlining, no module-level mappings are needed, so MapValue doesn't need to examine non-function-local metadata, which can be very expensive in the case of a large module with really deep metadata (e.g. a large C++ program compiled with -g). This flag is a little awkward; perhaps eventually it can be moved into the ClonedCodeInfo class. llvm-svn: 112190
* Revert r112091, "Remap metadata attached to instructions when remappingDaniel Dunbar2010-08-261-0/+15
| | | | | | individual ...", which depends on r111922, which I am reverting. llvm-svn: 112157
* Remap metadata attached to instructions when remapping individualDan Gohman2010-08-251-15/+0
| | | | | | instructions, not when remapping modules. llvm-svn: 112091
* Use MapValue in the Linker instead of having a private functionDan Gohman2010-08-241-1/+1
| | | | | | | | which does the same thing. This eliminates redundant code and handles MDNodes better. MDNode linking still doesn't fully work yet though. llvm-svn: 111941
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-211-4/+2
| | | | | | for creating and populating NamedMDNodes. llvm-svn: 109061
* Use available typedef for " DenseMap<const Value*, Value*>".Devang Patel2010-06-241-2/+2
| | | | llvm-svn: 106699
* Cosmetic change.Devang Patel2010-06-231-16/+16
| | | | | | Do not use "ValueMap" as a name for a local variable or an argument. llvm-svn: 106698
* While cloning a module, clone metadata attached with instructions.Devang Patel2010-06-221-1/+16
| | | | llvm-svn: 106591
* Clone named metadata while cloning a module.Devang Patel2010-06-221-0/+11
| | | | | | Reapply Bob's patch. llvm-svn: 106560
* Revert my change to clone named metadata. Buildbots are complaining.Bob Wilson2010-06-221-11/+0
| | | | | | | --- Reverse-merging r106508 into '.': U lib/Transforms/Utils/CloneModule.cpp llvm-svn: 106521
* Include named metadata when cloning a module.Bob Wilson2010-06-221-0/+11
| | | | llvm-svn: 106508
* There is no need to install ValueMapper.h header. Devang Patel2010-04-201-1/+1
| | | | llvm-svn: 101949
* MapValue doesn't needs its LLVMContext argument.Dan Gohman2009-10-241-3/+2
| | | | llvm-svn: 85020
* smallvectorize the list of returns built by CloneAndPruneFunctionInto.Chris Lattner2009-08-271-1/+1
| | | | llvm-svn: 80202
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-2/+2
| | | | llvm-svn: 76702
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-081-2/+2
| | | | | | module is required. llvm-svn: 75025
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-081-1/+2
| | | | llvm-svn: 74985
* More LLVMContext-ification.Owen Anderson2009-07-051-2/+3
| | | | llvm-svn: 74807
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-1/+1
| | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
* Don't drop alignment on globals when cloning.Nick Lewycky2008-10-091-5/+9
| | | | llvm-svn: 57320
* Factor code to copy global value attributes likeDuncan Sands2008-05-261-4/+1
| | | | | | | | | | | | | | | the section or the visibility from one global value to another: copyAttributesFrom. This is particularly useful for duplicating functions: previously this was done by explicitly copying each attribute in turn at each place where a new function was created out of an old one, with the result that obscure attributes were regularly forgotten (like the collector or the section). Hopefully now everything is uniform and nothing is forgotten. llvm-svn: 51567
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-2/+2
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Adding a collector name attribute to Function in the IR. These Gordon Henriksen2007-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | methods are new to Function: bool hasCollector() const; const std::string &getCollector() const; void setCollector(const std::string &); void clearCollector(); The assembly representation is as such: define void @f() gc "shadow-stack" { ... The implementation uses an on-the-side table to map Functions to collector names, such that there is no overhead. A StringPool is further used to unique collector names, which are extremely likely to be unique per process. llvm-svn: 44769
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-2/+1
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* Forget to commit users part of value mapper interfaceAnton Korobeynikov2007-11-091-1/+1
| | | | llvm-svn: 43940
* During module cloning copy aliases too. This fixes PR1544Anton Korobeynikov2007-07-101-0/+15
| | | | llvm-svn: 38505
* Implement the "thread_local" keyword.Lauro Ramos Venancio2007-04-121-0/+2
| | | | llvm-svn: 35950
* For PR411:Reid Spencer2007-02-051-1/+0
| | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. llvm-svn: 33918
* Switch inliner over to use DenseMap instead of std::map for ValueMap. ThisChris Lattner2007-02-031-3/+3
| | | | | | speeds up the inliner 16%. llvm-svn: 33801
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-1/+1
| | | | | | confusion with external linkage types. llvm-svn: 33663
* For PR761:Reid Spencer2007-01-261-2/+1
| | | | | | | The Module::setEndianness and Module::setPointerSize methods have been removed. Instead you can get/set the DataLayout. Adjust thise accordingly. llvm-svn: 33530
* For PR411:Reid Spencer2007-01-061-5/+5
| | | | | | | | | Take an incremental step towards type plane elimination. This change separates types from values in the symbol tables by finally making use of the TypeSymbolTable class. This yields more natural interfaces for dealing with types and unclutters the SymbolTable class. llvm-svn: 32956
* Add a CloneModule call that exposes the mapping of values from the old moduleChris Lattner2006-05-171-4/+8
| | | | | | to the new module. Patch provided by Nick Lewycky! llvm-svn: 28349
* rename methodChris Lattner2006-01-241-1/+1
| | | | llvm-svn: 25572
* When cloning a module, clone the inline asm.Chris Lattner2006-01-231-0/+1
| | | | llvm-svn: 25559
* Make sure that cloning a module clones its target triple and dependentChris Lattner2006-01-181-3/+7
| | | | | | library list as well. This should help bugpoint. llvm-svn: 25424
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-271-1/+1
| | | | llvm-svn: 22523
* wrap long lines, preserve calling conventions when cloning functions andChris Lattner2005-05-091-6/+13
| | | | | | turning calls into invokes llvm-svn: 21797
* Remove trailing whitespaceMisha Brukman2005-04-211-2/+2
| | | | llvm-svn: 21427
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-4/+4
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* Convert to SymbolTable's new iteration interface.Reid Spencer2004-05-251-5/+7
| | | | llvm-svn: 13754
OpenPOWER on IntegriCloud