[llvm-commits] [llvm] r158476 - in /llvm/trunk: include/llvm/GlobalValue.h lib/Transforms/IPO/GlobalDCE.cpp lib/Transforms/IPO/GlobalOpt.cpp test/Transforms/GlobalOpt/deadglobal.ll

Rafael Espíndola rafael.espindola at gmail.com
Fri Jun 15 10:30:15 PDT 2012


Looking at it, thanks!

On 15 June 2012 12:28, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>
> On Jun 14, 2012, at 3:48 PM, Rafael Espindola <rafael.espindola at gmail.com> wrote:
>
>> Author: rafael
>> Date: Thu Jun 14 17:48:13 2012
>> New Revision: 158476
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=158476&view=rev
>> Log:
>> Implement the isSafeToDiscardIfUnused predicate and use it in globalopt and
>> globaldce. Globaldce was already removing linkonce globals, but globalopt was
>> not.
>
> Rafael, this is causing a crash in the GCC testsuite: g++.dg/opt/static5.C (test for excess errors)
>
>
> Executing on host: /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.gccTestSuite_clang-x86_64-darwin10-RA__c++/host-compiler/bin/clang++ /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.gccTestSuite_clang-x86_64-darwin10-RA__c++/clang-tests/gcc-4_2-testsuite/src/g++.dg/opt/static5.C   -fmessage-length=0  -O2    -multiply_defined suppress -Wl,-multiply_defined,suppress -lm   -o ./static5.exe    (timeout = 300)
> spawn /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.gccTestSuite_clang-x86_64-darwin10-RA__c++/host-compiler/bin/clang++ /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.gccTestSuite_clang-x86_64-darwin10-RA__c++/clang-tests/gcc-4_2-testsuite/src/g++.dg/opt/static5.C -fmessage-length=0 -O2 -multiply_defined suppress -Wl,-multiply_defined,suppress -lm -o ./static5.exe
> Assertion failed: (GV->hasLocalLinkage() && !GV->isConstant()), function SRAGlobal, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-RA/llvm/lib/Transforms/IPO/GlobalOpt.cpp, line 499.
> 0  clang             0x000000010154b1c2 llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 14434
> 1  clang             0x000000010154b6d4 llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 15732
> 2  libSystem.B.dylib 0x0000000101d5f1ba _sigtramp + 26
> 3  libSystem.B.dylib 0x0000000001333b55 _sigtramp + 4284303797
> 4  clang             0x000000010154b406 llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 15014
> 5  clang             0x000000010154b3e1 llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 14977
> 6  clang             0x0000000100aa8511 std::vector<llvm::Function*, std::allocator<llvm::Function*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::Function**, std::vector<llvm::Function*, std::allocator<llvm::Function*> > >, llvm::Function* const&) + 13089
> 7  clang             0x0000000100aa5ff6 std::vector<llvm::Function*, std::allocator<llvm::Function*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::Function**, std::vector<llvm::Function*, std::allocator<llvm::Function*> > >, llvm::Function* const&) + 3590
> 8  clang             0x00000001014f0736 std::vector<llvm::StructType*, std::allocator<llvm::StructType*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::StructType**, std::vector<llvm::StructType*, std::allocator<llvm::StructType*> > >, llvm::StructType* const&) + 29670
> 9  clang             0x00000001014f0cf9 std::vector<llvm::StructType*, std::allocator<llvm::StructType*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::StructType**, std::vector<llvm::StructType*, std::allocator<llvm::StructType*> > >, llvm::StructType* const&) + 31145
> 10 clang             0x00000001014f0edd std::vector<llvm::StructType*, std::allocator<llvm::StructType*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::StructType**, std::vector<llvm::StructType*, std::allocator<llvm::StructType*> > >, llvm::StructType* const&) + 31629
> 11 clang             0x0000000100158d8a std::vector<clang::serialization::ModuleFile*, std::allocator<clang::serialization::ModuleFile*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::serialization::ModuleFile**, std::vector<clang::serialization::ModuleFile*, std::allocator<clang::serialization::ModuleFile*> > >, clang::serialization::ModuleFile* const&) + 6922
> 12 clang             0x000000010023da1a llvm::ParseIR(llvm::MemoryBuffer*, llvm::SMDiagnostic&, llvm::LLVMContext&) + 1994
> 13 clang             0x0000000100272f14 std::vector<std::pair<llvm::WeakVH, llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH, llvm::Constant*>*, std::vector<std::pair<llvm::WeakVH, llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > > >, std::pair<llvm::WeakVH, llvm::Constant*> const&) + 53204
> 14 clang             0x000000010023c751 std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl const*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CXXRecordDecl const**, std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl const*> > >, clang::CXXRecordDecl const* const&) + 5745
> 15 clang             0x000000010004deb8 llvm::SmallVectorImpl<clang::FileEntry const*>::operator=(llvm::SmallVectorImpl<clang::FileEntry const*> const&) + 9784
> 16 clang             0x000000010002521f std::vector<clang::CompilerInstance*, std::allocator<clang::CompilerInstance*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CompilerInstance**, std::vector<clang::CompilerInstance*, std::allocator<clang::CompilerInstance*> > >, clang::CompilerInstance* const&) + 16431
> 17 clang             0x000000010000bf51 std::_Rb_tree<std::string, std::string, std::_Identity<std::string>, std::less<std::string>, std::allocator<std::string> >::_M_insert_unique(std::string const&) + 3921
> 18 clang             0x0000000100001b1a
> 19 clang             0x00000001000089ac std::vector<std::string, std::allocator<std::string> >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*, std::vector<std::string, std::allocator<std::string> > >, std::string const&) + 4124
> 20 clang             0x0000000100001834
> 21 clang             0x000000000000002e
> Stack dump:
> 0.      Program arguments: /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.gccTestSuite_clang-x86_64-darwin10-RA__c++/host-compiler/bin/clang -cc1 -triple x86_64-apple-macosx10.6.0 -emit-obj -disable-free -main-file-name static5.C -pic-level 2 -mdisable-fp-elim -munwind-tables -target-cpu core2 -target-linker-version 127.2.1 -resource-dir /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.gccTestSuite_clang-x86_64-darwin10-RA__c++/host-compiler/bin/../lib/clang/3.2 -fmodule-cache-path /var/folders/kL/kLk+WTOwEuWvG457rn+bMU+++TM/-Tmp-/clang-module-cache -O2 -Wno-unused-value -Wno-return-type -Wno-constant-logical-operand -fdeprecated-macro -fdebug-compilation-dir /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.gccTestSuite_clang-x86_64-darwin10-RA__c++/clang-tests/gcc-4_2-testsuite/obj/g++ -ferror-limit 0 -fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks -fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fno-caret-diagnostics -fdiagnostics-show-option -o /var/folders/kL/kLk+WTOwEuWvG457rn+bMU+++TM/-Tmp-/static5-yFbaZH.o -x c++ /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.gccTestSuite_clang-x86_64-darwin10-RA__c++/clang-tests/gcc-4_2-testsuite/src/g++.dg/opt/static5.C
> 1.      <eof> parser at end of file
> 2.      Per-module optim
> ization passes
> 3.      Running pass 'Global Variable Optimizer' on module '/Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.gccTestSuite_clang-x86_64-darwin10-RA__c++/clang-tests/gcc-4_2-testsuite/src/g++.dg/opt/static5.C'.
>
>




More information about the llvm-commits mailing list