summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/CloneModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Finegrainify namespacificationChris Lattner2004-01-091-5/+2
| | | | llvm-svn: 10727
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | llvm-svn: 9903
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Fix spelling.Misha Brukman2003-10-101-1/+1
| | | | llvm-svn: 9027
* Make sure that the cloned module retains the type symbol table entries!Chris Lattner2003-04-241-0/+9
| | | | llvm-svn: 5894
* Make sure to preserve endiannes and pointer size when cloning modules!Chris Lattner2003-04-241-0/+2
| | | | llvm-svn: 5892
* Preserve the new moduleID fieldChris Lattner2003-04-221-1/+1
| | | | llvm-svn: 5835
OpenPOWER on IntegriCloud