summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/CloneModule.cpp
Commit message (Collapse)AuthorAge
* Factor code to copy global value attributes likeDuncan Sands2008-05-26
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51567 91177308-0d34-0410-b5e6-96231b3b80d8
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-06
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding a collector name attribute to Function in the IR. These Gordon Henriksen2007-12-10
| | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44769 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-27
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
* Forget to commit users part of value mapper interfaceAnton Korobeynikov2007-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43940 91177308-0d34-0410-b5e6-96231b3b80d8
* During module cloning copy aliases too. This fixes PR1544Anton Korobeynikov2007-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38505 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the "thread_local" keyword.Lauro Ramos Venancio2007-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35950 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-02-05
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch inliner over to use DenseMap instead of std::map for ValueMap. ThisChris Lattner2007-02-03
| | | | | | | speeds up the inliner 16%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33801 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-30
| | | | | | | confusion with external linkage types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR761:Reid Spencer2007-01-26
| | | | | | | | The Module::setEndianness and Module::setPointerSize methods have been removed. Instead you can get/set the DataLayout. Adjust thise accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33530 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-01-06
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a CloneModule call that exposes the mapping of values from the old moduleChris Lattner2006-05-17
| | | | | | | to the new module. Patch provided by Nick Lewycky! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28349 91177308-0d34-0410-b5e6-96231b3b80d8
* rename methodChris Lattner2006-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25572 91177308-0d34-0410-b5e6-96231b3b80d8
* When cloning a module, clone the inline asm.Chris Lattner2006-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25559 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that cloning a module clones its target triple and dependentChris Lattner2006-01-18
| | | | | | | library list as well. This should help bugpoint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25424 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
* wrap long lines, preserve calling conventions when cloning functions andChris Lattner2005-05-09
| | | | | | | turning calls into invokes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21797 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-15
| | | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert to SymbolTable's new iteration interface.Reid Spencer2004-05-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13754 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2004-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10727 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-20
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling.Misha Brukman2003-10-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that the cloned module retains the type symbol table entries!Chris Lattner2003-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5894 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to preserve endiannes and pointer size when cloning modules!Chris Lattner2003-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5892 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve the new moduleID fieldChris Lattner2003-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5835 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new linkage types to support a real frontendChris Lattner2003-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5786 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of Module cloning support stuffChris Lattner2002-11-20
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4788 91177308-0d34-0410-b5e6-96231b3b80d8