[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp
Changes in directory llvm/lib/Transforms/Utils: CloneModule.cpp updated: 1.23 - 1.24 --- Log message: Implement the thread_local keyword. --- Diffs of the changes: (+2 -0) CloneModule.cpp |2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Transforms/Utils/CloneModule.cpp diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.23 llvm/lib/Transforms/Utils/CloneModule.cpp:1.24 --- llvm/lib/Transforms/Utils/CloneModule.cpp:1.23 Mon Feb 5 14:47:20 2007 +++ llvm/lib/Transforms/Utils/CloneModule.cpp Thu Apr 12 13:32:50 2007 @@ -80,6 +80,8 @@ GV-setInitializer(castConstant(MapValue(I-getInitializer(), ValueMap))); GV-setLinkage(I-getLinkage()); +GV-setThreadLocal(I-isThreadLocal()); +GV-setConstant(I-isConstant()); } // Similarly, copy over function bodies now... ___ llvm-commits mailing list [EMAIL PROTECTED] http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp
Changes in directory llvm/lib/Transforms/Utils: CloneModule.cpp updated: 1.22 - 1.23 --- Log message: For PR411: http://llvm.org/PR411 : 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. --- Diffs of the changes: (+0 -1) CloneModule.cpp |1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Transforms/Utils/CloneModule.cpp diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.22 llvm/lib/Transforms/Utils/CloneModule.cpp:1.23 --- llvm/lib/Transforms/Utils/CloneModule.cpp:1.22 Fri Feb 2 18:08:31 2007 +++ llvm/lib/Transforms/Utils/CloneModule.cpp Mon Feb 5 14:47:20 2007 @@ -15,7 +15,6 @@ #include llvm/Transforms/Utils/Cloning.h #include llvm/Module.h #include llvm/DerivedTypes.h -#include llvm/SymbolTable.h #include llvm/TypeSymbolTable.h #include llvm/Constant.h #include ValueMapper.h ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp InlineFunction.cpp
Changes in directory llvm/lib/Transforms/Utils: CloneModule.cpp updated: 1.20 - 1.21 InlineFunction.cpp updated: 1.49 - 1.50 --- Log message: For PR1136: http://llvm.org/PR1136 : Rename GlobalVariable::isExternal as isDeclaration to avoid confusion with external linkage types. --- Diffs of the changes: (+2 -2) CloneModule.cpp|2 +- InlineFunction.cpp |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Utils/CloneModule.cpp diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.20 llvm/lib/Transforms/Utils/CloneModule.cpp:1.21 --- llvm/lib/Transforms/Utils/CloneModule.cpp:1.20 Fri Jan 26 02:11:39 2007 +++ llvm/lib/Transforms/Utils/CloneModule.cpp Tue Jan 30 14:08:38 2007 @@ -87,7 +87,7 @@ // for (Module::const_iterator I = M-begin(), E = M-end(); I != E; ++I) { Function *F = castFunction(ValueMap[I]); -if (!I-isExternal()) { +if (!I-isDeclaration()) { Function::arg_iterator DestI = F-arg_begin(); for (Function::const_arg_iterator J = I-arg_begin(); J != I-arg_end(); ++J) { Index: llvm/lib/Transforms/Utils/InlineFunction.cpp diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.49 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.50 --- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.49 Sun Jan 7 01:54:34 2007 +++ llvm/lib/Transforms/Utils/InlineFunction.cppTue Jan 30 14:08:38 2007 @@ -184,7 +184,7 @@ const Function *CalledFunc = CS.getCalledFunction(); if (CalledFunc == 0 || // Can't inline external function or indirect - CalledFunc-isExternal() || // call, or call to a vararg function! + CalledFunc-isDeclaration() || // call, or call to a vararg function! CalledFunc-getFunctionType()-isVarArg()) return false; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp
Changes in directory llvm/lib/Transforms/Utils: CloneModule.cpp updated: 1.19 - 1.20 --- Log message: For PR761: http://llvm.org/PR761 : The Module::setEndianness and Module::setPointerSize methods have been removed. Instead you can get/set the DataLayout. Adjust thise accordingly. --- Diffs of the changes: (+1 -2) CloneModule.cpp |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Transforms/Utils/CloneModule.cpp diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.19 llvm/lib/Transforms/Utils/CloneModule.cpp:1.20 --- llvm/lib/Transforms/Utils/CloneModule.cpp:1.19 Sat Jan 6 01:24:44 2007 +++ llvm/lib/Transforms/Utils/CloneModule.cpp Fri Jan 26 02:11:39 2007 @@ -37,8 +37,7 @@ Module *llvm::CloneModule(const Module *M, std::mapconst Value*, Value* ValueMap) { // First off, we need to create the new module... Module *New = new Module(M-getModuleIdentifier()); - New-setEndianness(M-getEndianness()); - New-setPointerSize(M-getPointerSize()); + New-setDataLayout(M-getDataLayout()); New-setTargetTriple(M-getTargetTriple()); New-setModuleInlineAsm(M-getModuleInlineAsm()); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp
Changes in directory llvm/lib/Transforms/Utils: CloneModule.cpp updated: 1.18 - 1.19 --- Log message: For PR411: http://llvm.org/PR411 : 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. --- Diffs of the changes: (+5 -5) CloneModule.cpp | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/lib/Transforms/Utils/CloneModule.cpp diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.18 llvm/lib/Transforms/Utils/CloneModule.cpp:1.19 --- llvm/lib/Transforms/Utils/CloneModule.cpp:1.18 Wed May 17 13:05:35 2006 +++ llvm/lib/Transforms/Utils/CloneModule.cpp Sat Jan 6 01:24:44 2007 @@ -16,6 +16,7 @@ #include llvm/Module.h #include llvm/DerivedTypes.h #include llvm/SymbolTable.h +#include llvm/TypeSymbolTable.h #include llvm/Constant.h #include ValueMapper.h using namespace llvm; @@ -42,11 +43,10 @@ New-setModuleInlineAsm(M-getModuleInlineAsm()); // Copy all of the type symbol table entries over. - const SymbolTable SymTab = M-getSymbolTable(); - SymbolTable::type_const_iterator TypeI = SymTab.type_begin(); - SymbolTable::type_const_iterator TypeE = SymTab.type_end(); - for (; TypeI != TypeE; ++TypeI) -New-addTypeName(TypeI-first, TypeI-second); + const TypeSymbolTable TST = M-getTypeSymbolTable(); + for (TypeSymbolTable::const_iterator TI = TST.begin(), TE = TST.end(); + TI != TE; ++TI) +New-addTypeName(TI-first, TI-second); // Copy all of the dependent libraries over. for (Module::lib_iterator I = M-lib_begin(), E = M-lib_end(); I != E; ++I) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp
Changes in directory llvm/lib/Transforms/Utils: CloneModule.cpp updated: 1.17 - 1.18 --- Log message: Add a CloneModule call that exposes the mapping of values from the old module to the new module. Patch provided by Nick Lewycky! --- Diffs of the changes: (+8 -4) CloneModule.cpp | 12 1 files changed, 8 insertions(+), 4 deletions(-) Index: llvm/lib/Transforms/Utils/CloneModule.cpp diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.17 llvm/lib/Transforms/Utils/CloneModule.cpp:1.18 --- llvm/lib/Transforms/Utils/CloneModule.cpp:1.17 Mon Jan 23 22:16:34 2006 +++ llvm/lib/Transforms/Utils/CloneModule.cpp Wed May 17 13:05:35 2006 @@ -26,6 +26,14 @@ /// respectively) refer to the right globals. /// Module *llvm::CloneModule(const Module *M) { + // Create the value map that maps things from the old module over to the new + // module. + std::mapconst Value*, Value* ValueMap; + + return CloneModule(M, ValueMap); +} + +Module *llvm::CloneModule(const Module *M, std::mapconst Value*, Value* ValueMap) { // First off, we need to create the new module... Module *New = new Module(M-getModuleIdentifier()); New-setEndianness(M-getEndianness()); @@ -44,10 +52,6 @@ for (Module::lib_iterator I = M-lib_begin(), E = M-lib_end(); I != E; ++I) New-addLibrary(*I); - // Create the value map that maps things from the old module over to the new - // module. - std::mapconst Value*, Value* ValueMap; - // Loop over all of the global variables, making corresponding globals in the // new module. Here we add them to the ValueMap and to the new Module. We // don't worry about attributes or initializers, they will come later. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp
Changes in directory llvm/lib/Transforms/Utils: CloneModule.cpp updated: 1.15 - 1.16 --- Log message: When cloning a module, clone the inline asm. --- Diffs of the changes: (+1 -0) CloneModule.cpp |1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Transforms/Utils/CloneModule.cpp diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.15 llvm/lib/Transforms/Utils/CloneModule.cpp:1.16 --- llvm/lib/Transforms/Utils/CloneModule.cpp:1.15 Wed Jan 18 15:32:45 2006 +++ llvm/lib/Transforms/Utils/CloneModule.cpp Mon Jan 23 17:06:28 2006 @@ -31,6 +31,7 @@ New-setEndianness(M-getEndianness()); New-setPointerSize(M-getPointerSize()); New-setTargetTriple(M-getTargetTriple()); + New-setInlineAsm(M-getInlineAsm()); // Copy all of the type symbol table entries over. const SymbolTable SymTab = M-getSymbolTable(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp
Changes in directory llvm/lib/Transforms/Utils: CloneModule.cpp updated: 1.16 - 1.17 --- Log message: rename method --- Diffs of the changes: (+1 -1) CloneModule.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Utils/CloneModule.cpp diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.16 llvm/lib/Transforms/Utils/CloneModule.cpp:1.17 --- llvm/lib/Transforms/Utils/CloneModule.cpp:1.16 Mon Jan 23 17:06:28 2006 +++ llvm/lib/Transforms/Utils/CloneModule.cpp Mon Jan 23 22:16:34 2006 @@ -31,7 +31,7 @@ New-setEndianness(M-getEndianness()); New-setPointerSize(M-getPointerSize()); New-setTargetTriple(M-getTargetTriple()); - New-setInlineAsm(M-getInlineAsm()); + New-setModuleInlineAsm(M-getModuleInlineAsm()); // Copy all of the type symbol table entries over. const SymbolTable SymTab = M-getSymbolTable(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp
Changes in directory llvm/lib/Transforms/Utils: CloneModule.cpp updated: 1.14 - 1.15 --- Log message: Make sure that cloning a module clones its target triple and dependent library list as well. This should help bugpoint. --- Diffs of the changes: (+7 -3) CloneModule.cpp | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Utils/CloneModule.cpp diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.14 llvm/lib/Transforms/Utils/CloneModule.cpp:1.15 --- llvm/lib/Transforms/Utils/CloneModule.cpp:1.14 Wed Jul 27 01:12:34 2005 +++ llvm/lib/Transforms/Utils/CloneModule.cpp Wed Jan 18 15:32:45 2006 @@ -30,14 +30,18 @@ Module *New = new Module(M-getModuleIdentifier()); New-setEndianness(M-getEndianness()); New-setPointerSize(M-getPointerSize()); + New-setTargetTriple(M-getTargetTriple()); - // Copy all of the type symbol table entries over... + // Copy all of the type symbol table entries over. const SymbolTable SymTab = M-getSymbolTable(); SymbolTable::type_const_iterator TypeI = SymTab.type_begin(); SymbolTable::type_const_iterator TypeE = SymTab.type_end(); - for ( ; TypeI != TypeE; ++TypeI ) { + for (; TypeI != TypeE; ++TypeI) New-addTypeName(TypeI-first, TypeI-second); - } + + // Copy all of the dependent libraries over. + for (Module::lib_iterator I = M-lib_begin(), E = M-lib_end(); I != E; ++I) +New-addLibrary(*I); // Create the value map that maps things from the old module over to the new // module. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits