[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/12919] icf fails to fold one of the component of std::sort
From: |
vincenzo.innocente at cern dot ch |
Subject: |
[Bug gold/12919] icf fails to fold one of the component of std::sort |
Date: |
Thu, 22 Sep 2011 08:13:26 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=12919
--- Comment #8 from Vincenzo Innocente <vincenzo.innocente at cern dot ch>
2011-09-22 08:13:26 UTC ---
I made few more tests:
adding inline keyword to __introsort in stl_algo.h makes no difference even if
-fvisibility-inlines-hidden is used.
nm -C libbha.so | sort | grep introsort
0000000000002190 W void std::__introsort_loop<__gnu_cxx::__normal_iterator<A**,
std::vector<A*, std::allocator<A*> > >, long>(__gnu_cxx::__normal_iterator<A**,
std::vector<A*, std::allocator<A*> > >, __gnu_cxx::__normal_iterator<A**,
std::vector<A*, std::allocator<A*> > >, long)
0000000000002a10 W void std::__introsort_loop<__gnu_cxx::__normal_iterator<B**,
std::vector<B*, std::allocator<B*> > >, long>(__gnu_cxx::__normal_iterator<B**,
std::vector<B*, std::allocator<B*> > >, __gnu_cxx::__normal_iterator<B**,
std::vector<B*, std::allocator<B*> > >, long)
0000000000003290 W void std::__introsort_loop<__gnu_cxx::__normal_iterator<C**,
std::vector<C*, std::allocator<C*> > >, long>(__gnu_cxx::__normal_iterator<C**,
std::vector<C*, std::allocator<C*> > >, __gnu_cxx::__normal_iterator<C**,
std::vector<C*, std::allocator<C*> > >, long)
what (with gcc 4.7, I think should be the same with 4.6.1) seems to work is
-flto
with "inline" added the three introsort are now folded
c++ -flto -O2 -Wl,--icf=all,--print-icf-sections -shared -fPIC
-fvisibility-inlines-hidden -ffunction-sections ICFproblem.cpp -o libbha.so
nm -C libbha.so | sort | grep introsort
0000000000002210 t
_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPP1ASt6vectorIS3_SaIS3_EEEElEvT_S9_T0_.local.43
0000000000002210 t
_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPP1BSt6vectorIS3_SaIS3_EEEElEvT_S9_T0_.local.29
0000000000002210 t
_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPP1CSt6vectorIS3_SaIS3_EEEElEvT_S9_T0_.local.15
funny enough w/o inline (original std_algo.h) there is just one symbol
explicitly generated
nm -C libbha.so | sort | grep introsort
00000000000009f0 t
_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPP1CSt6vectorIS3_SaIS3_EEEElEvT_S9_T0_.local.15.2431
btw we need to make c++filt understanding "local" symbols :-(
echo
_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPP1CSt6vectorIS3_SaIS3_EEEElEvT_S9_T0_
| c++filt
void std::__introsort_loop<__gnu_cxx::__normal_iterator<C**, std::vector<C*,
std::allocator<C*> > >, long>(__gnu_cxx::__normal_iterator<C**, std::vector<C*,
std::allocator<C*> > >, __gnu_cxx::__normal_iterator<C**, std::vector<C*,
std::allocator<C*> > >, long)
I will iterate with GCC folks on this.
In any case, I support Ian's proposal to have, for .so libraries, just
independent PLT entries and fold the "internal" ones.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug gold/12919] icf fails to fold one of the component of std::sort, vincenzo.innocente at cern dot ch, 2011/09/21
- [Bug gold/12919] icf fails to fold one of the component of std::sort, tmsriram at google dot com, 2011/09/21
- [Bug gold/12919] icf fails to fold one of the component of std::sort, tmsriram at google dot com, 2011/09/21
- [Bug gold/12919] icf fails to fold one of the component of std::sort, tmsriram at google dot com, 2011/09/21
- [Bug gold/12919] icf fails to fold one of the component of std::sort, ian at airs dot com, 2011/09/21
- [Bug gold/12919] icf fails to fold one of the component of std::sort, vincenzo.innocente at cern dot ch, 2011/09/21
- [Bug gold/12919] icf fails to fold one of the component of std::sort, tmsriram at google dot com, 2011/09/21
- [Bug gold/12919] icf fails to fold one of the component of std::sort, pcarlini at gmail dot com, 2011/09/21
- [Bug gold/12919] icf fails to fold one of the component of std::sort,
vincenzo.innocente at cern dot ch <=
- [Bug gold/12919] icf fails to fold one of the component of std::sort, vincenzo.innocente at cern dot ch, 2011/09/22
- [Bug gold/12919] icf fails to fold one of the component of std::sort, tmsriram at google dot com, 2011/09/22
- [Bug gold/12919] icf fails to fold one of the component of std::sort, vincenzo.innocente at cern dot ch, 2011/09/23