This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ PATCH: Throttle inlining


On Mon, 26 Mar 2001, Mark Mitchell wrote:
> This patch throttles tree-based inlining when the functions being
> inlined get large.  This is analagous to the throttling done in the
> RTL-inliner, and is in fact controlled by the same option, in order to
> provide a simple interface for users.  On one test case provided by
> Gerald, this reduces the space usage of the compiler from >500M (at
> which point I ran out of memory) to around 75M.

Cool, thanks alot! I can confirm that our entire project that wouldn't
compile for severals months now builds fine again.

Well, more or less. (Sorry!) The modules now compile fine, even with -O3,
but during linking I get tons of duplicate symbol related to libstdc++.

The problem occurs with -O3, but not without optimization, so it might
be related to your fix. I'm also Cc:ing the libstdc++ folks.

(I'm on the road, so I cannot do much testing and especially destilling,
but perhaps the error messages below trigger something...)

Gerald

diag.o: In function `std::_Vector_base<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::~_Vector_base()':
diag.o(.text+0x2c04): multiple definition of `std::_Vector_base<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::~_Vector_base()'
dl.o(.text+0x5138): first defined here
plan.o: In function `std::_Rb_tree_iterator<std::pair<NAMES_ITEM const, unsigned>, std::pair<NAMES_ITEM const, unsigned> const&, std::pair<NAMES_ITEM const, unsigned> const*>::operator*() const':
plan.o(.text+0xc164): multiple definition of `std::_Rb_tree_iterator<std::pair<NAMES_ITEM const, unsigned>, std::pair<NAMES_ITEM const, unsigned> const&, std::pair<NAMES_ITEM const, unsigned> const*>::operator*() const'
dl.o(.text+0x1100): first defined here
plan.o: In function `std::_Vector_alloc_base<IDENT, std::allocator<IDENT>, true>::_Vector_alloc_base(std::allocator<IDENT> const&)':
plan.o(.text+0x4d88): multiple definition of `std::_Vector_alloc_base<IDENT, std::allocator<IDENT>, true>::_Vector_alloc_base(std::allocator<IDENT> const&)'
diag.o(.text+0xeb0): first defined here
plan.o: In function `std::allocator<TLITERAL<ATOM> >::~allocator()':
plan.o(.text+0x4cf8): multiple definition of `std::allocator<TLITERAL<ATOM> >::~allocator()'
diag.o(.text+0x2bc0): first defined here
plan.o: In function `std::ostream::operator<<(unsigned)':
plan.o(.text+0xc1d0): multiple definition of `std::ostream::operator<<(unsigned)'
diag.o(.text+0x9eb8): first defined here
plan.o: In function `std::vector<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::capacity() const':
plan.o(.text+0x4d5c): multiple definition of `std::vector<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::capacity() const'
dl.o(.text+0x519c): first defined here
plan.o: In function `void std::destroy<TLITERAL<ATOM>*>(TLITERAL<ATOM>*, TLITERAL<ATOM>*)':
plan.o(.text+0x4d00): multiple definition of `void std::destroy<TLITERAL<ATOM>*>(TLITERAL<ATOM>*, TLITERAL<ATOM>*)'
diag.o(.text+0x2be4): first defined here
plan.o: In function `std::_Vector_base<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::~_Vector_base()':
plan.o(.text+0x6598): multiple definition of `std::_Vector_base<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::~_Vector_base()'
dl.o(.text+0x5138): first defined here
plan.o: In function `std::_Vector_base<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::_Vector_base(std::allocator<TLITERAL<ATOM> > const&)':
plan.o(.text+0x657c): multiple definition of `std::_Vector_base<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::_Vector_base(std::allocator<TLITERAL<ATOM> > const&)'
diag.o(.text+0x2bc8): first defined here
plan.o: In function `std::__normal_iterator<TLITERAL<ATOM> const*, std::vector<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > > >::operator-(std::__normal_iterator<TLITERAL<ATOM> const*, std::vector<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > > > const&) const':
plan.o(.text+0x4d30): multiple definition of `std::__normal_iterator<TLITERAL<ATOM> const*, std::vector<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > > >::operator-(std::__normal_iterator<TLITERAL<ATOM> const*, std::vector<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > > > const&) const'
diag.o(.text+0xfb50): first defined here
plan.o: In function `std::map<std::string, unsigned, std::less<std::string>, std::allocator<std::pair<std::string const, unsigned> > >::begin()':
plan.o(.text+0x665c): multiple definition of `std::map<std::string, unsigned, std::less<std::string>, std::allocator<std::pair<std::string const, unsigned> > >::begin()'
dl.o(.text+0x20d0): first defined here
plan.o: In function `std::map<std::string, unsigned, std::less<std::string>, std::allocator<std::pair<std::string const, unsigned> > >::erase(std::_Rb_tree_iterator<std::pair<std::string const, unsigned>, std::pair<std::string const, unsigned>&, std::pair<std::string const, unsigned>*>, std::_Rb_tree_iterator<std::pair<std::string const, unsigned>, std::pair<std::string const, unsigned>&, std::pair<std::string const, unsigned>*>)':
plan.o(.text+0x6630): multiple definition of `std::map<std::string, unsigned, std::less<std::string>, std::allocator<std::pair<std::string const, unsigned> > >::erase(std::_Rb_tree_iterator<std::pair<std::string const, unsigned>, std::pair<std::string const, unsigned>&, std::pair<std::string const, unsigned>*>, std::_Rb_tree_iterator<std::pair<std::string const, unsigned>, std::pair<std::string const, unsigned>&, std::pair<std::string const, unsigned>*>)'
dl.o(.text+0x20a4): first defined here
plan.o: In function `std::pair<NAMES_ITEM, unsigned>::pair(NAMES_ITEM const&, unsigned const&)':
plan.o(.text+0xef28): multiple definition of `std::pair<NAMES_ITEM, unsigned>::pair(NAMES_ITEM const&, unsigned const&)'
diag.o(.text+0xf70): first defined here
plan.o: In function `std::pair<NAMES_ITEM const, unsigned>::pair<NAMES_ITEM, unsigned>(std::pair<NAMES_ITEM, unsigned> const&)':
plan.o(.text+0xeee4): multiple definition of `std::pair<NAMES_ITEM const, unsigned>::pair<NAMES_ITEM, unsigned>(std::pair<NAMES_ITEM, unsigned> const&)'
diag.o(.text+0xf2c): first defined here
plan.o: In function `std::map<NAMES_ITEM, unsigned, std::less<NAMES_ITEM>, std::allocator<std::pair<NAMES_ITEM const, unsigned> > >::insert(std::pair<NAMES_ITEM const, unsigned> const&)':
plan.o(.text+0xeec4): multiple definition of `std::map<NAMES_ITEM, unsigned, std::less<NAMES_ITEM>, std::allocator<std::pair<NAMES_ITEM const, unsigned> > >::insert(std::pair<NAMES_ITEM const, unsigned> const&)'
diag.o(.text+0xf0c): first defined here
plan.o: In function `std::pair<std::_Rb_tree_iterator<std::pair<NAMES_ITEM const, unsigned>, std::pair<NAMES_ITEM const, unsigned> const&, std::pair<NAMES_ITEM const, unsigned> const*>, bool>::pair<std::_Rb_tree_iterator<std::pair<NAMES_ITEM const, unsigned>, std::pair<NAMES_ITEM const, unsigned>&, std::pair<NAMES_ITEM const, unsigned>*>, bool>(std::pair<std::_Rb_tree_iterator<std::pair<NAMES_ITEM const, unsigned>, std::pair<NAMES_ITEM const, unsigned>&, std::pair<NAMES_ITEM const, unsigned>*>, bool> const&)':
plan.o(.text+0xeeac): multiple definition of `std::pair<std::_Rb_tree_iterator<std::pair<NAMES_ITEM const, unsigned>, std::pair<NAMES_ITEM const, unsigned> const&, std::pair<NAMES_ITEM const, unsigned> const*>, bool>::pair<std::_Rb_tree_iterator<std::pair<NAMES_ITEM const, unsigned>, std::pair<NAMES_ITEM const, unsigned>&, std::pair<NAMES_ITEM const, unsigned>*>, bool>(std::pair<std::_Rb_tree_iterator<std::pair<NAMES_ITEM const, unsigned>, std::pair<NAMES_ITEM const, unsigned>&, std::pair<NAMES_ITEM const, unsigned>*>, bool> const&)'
diag.o(.text+0xef4): first defined here
plan.o: In function `std::pair<unsigned, bool>::pair(unsigned const&, bool const&)':
plan.o(.text+0xc174): multiple definition of `std::pair<unsigned, bool>::pair(unsigned const&, bool const&)'
dl.o(.text+0x10e8): first defined here
plan.o: In function `std::vector<std::_Hashtable_const_iterator<std::pair<ATOM const, unsigned>, ATOM, std::hash<ATOM>, std::_Select1st<std::pair<ATOM const, unsigned> >, std::equal_to<ATOM>, std::allocator<unsigned> >, std::allocator<std::_Hashtable_const_iterator<std::pair<ATOM const, unsigned>, ATOM, std::hash<ATOM>, std::_Select1st<std::pair<ATOM const, unsigned> >, std::equal_to<ATOM>, std::allocator<unsigned> > > >::operator[](unsigned)':
plan.o(.text+0xd178): multiple definition of `std::vector<std::_Hashtable_const_iterator<std::pair<ATOM const, unsigned>, ATOM, std::hash<ATOM>, std::_Select1st<std::pair<ATOM const, unsigned> >, std::equal_to<ATOM>, std::allocator<unsigned> >, std::allocator<std::_Hashtable_const_iterator<std::pair<ATOM const, unsigned>, ATOM, std::hash<ATOM>, std::_Select1st<std::pair<ATOM const, unsigned> >, std::equal_to<ATOM>, std::allocator<unsigned> > > >::operator[](unsigned)'
generate.o(.text+0x3180): first defined here
plan.o: In function `std::_Hashtable_const_iterator<std::pair<ATOM const, unsigned>, ATOM, std::hash<ATOM>, std::_Select1st<std::pair<ATOM const, unsigned> >, std::equal_to<ATOM>, std::allocator<unsigned> >::operator*() const':
plan.o(.text+0xd168): multiple definition of `std::_Hashtable_const_iterator<std::pair<ATOM const, unsigned>, ATOM, std::hash<ATOM>, std::_Select1st<std::pair<ATOM const, unsigned> >, std::equal_to<ATOM>, std::allocator<unsigned> >::operator*() const'
generate.o(.text+0x3170): first defined here
inheritance.o: In function `std::vector<IDENT, std::allocator<IDENT> >::end()':
inheritance.o(.text+0x1654): multiple definition of `std::vector<IDENT, std::allocator<IDENT> >::end()'
diag.o(.text+0xfd0): first defined here
inheritance.o: In function `std::__normal_iterator<IDENT const*, std::vector<IDENT, std::allocator<IDENT> > >::__normal_iterator(IDENT const* const&)':
inheritance.o(.text+0x57c): multiple definition of `std::__normal_iterator<IDENT const*, std::vector<IDENT, std::allocator<IDENT> > >::__normal_iterator(IDENT const* const&)'
plan.o(.text+0x4d20): first defined here
inheritance.o: In function `std::vector<IDENT, std::allocator<IDENT> >::begin() const':
inheritance.o(.text+0x1660): multiple definition of `std::vector<IDENT, std::allocator<IDENT> >::begin() const'
diag.o(.text+0x2c48): first defined here
inheritance.o: In function `std::vector<ATOMSET, std::allocator<ATOMSET> >::end()':
inheritance.o(.text+0x42c8): multiple definition of `std::vector<ATOMSET, std::allocator<ATOMSET> >::end()'
grounding.o(.text+0x93a0): first defined here
inheritance.o: In function `void std::_Destroy<IDENT*>(IDENT*, IDENT*)':
inheritance.o(.text+0x58c): multiple definition of `void std::_Destroy<IDENT*>(IDENT*, IDENT*)'
diag.o(.text+0x36a4): first defined here
inheritance.o: In function `std::_Vector_base<ATOM, std::allocator<ATOM> >::_Vector_base(std::allocator<ATOM> const&)':
inheritance.o(.text+0x1bf4): multiple definition of `std::_Vector_base<ATOM, std::allocator<ATOM> >::_Vector_base(std::allocator<ATOM> const&)'
plan.o(.text+0x4c94): first defined here
inheritance.o: In function `std::vector<ATOM, std::allocator<ATOM> >::end()':
inheritance.o(.text+0x1a30): multiple definition of `std::vector<ATOM, std::allocator<ATOM> >::end()'
diag.o(.text+0x1eec): first defined here
inheritance.o: In function `std::_Vector_base<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::_Vector_base(std::allocator<TLITERAL<ATOM> > const&)':
inheritance.o(.text+0x3114): multiple definition of `std::_Vector_base<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::_Vector_base(std::allocator<TLITERAL<ATOM> > const&)'
diag.o(.text+0x2bc8): first defined here
inheritance.o: In function `std::allocator<TLITERAL<ATOM> >::~allocator()':
inheritance.o(.text+0x1c54): multiple definition of `std::allocator<TLITERAL<ATOM> >::~allocator()'
diag.o(.text+0x2bc0): first defined here
inheritance.o: In function `std::vector<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::begin() const':
inheritance.o(.text+0x1c48): multiple definition of `std::vector<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::begin() const'
diag.o(.text+0x27c0): first defined here
inheritance.o: In function `std::__normal_iterator<TLITERAL<ATOM> const*, std::vector<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > > >::__normal_iterator(TLITERAL<ATOM> const* const&)':
inheritance.o(.text+0x1c38): multiple definition of `std::__normal_iterator<TLITERAL<ATOM> const*, std::vector<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > > >::__normal_iterator(TLITERAL<ATOM> const* const&)'
rewrite.o(.text+0xbd4): first defined here
inheritance.o: In function `void std::destroy<TLITERAL<ATOM>*>(TLITERAL<ATOM>*, TLITERAL<ATOM>*)':
inheritance.o(.text+0x3130): multiple definition of `void std::destroy<TLITERAL<ATOM>*>(TLITERAL<ATOM>*, TLITERAL<ATOM>*)'
diag.o(.text+0x2be4): first defined here
inheritance.o: In function `std::_Vector_base<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::~_Vector_base()':
inheritance.o(.text+0x3150): multiple definition of `std::_Vector_base<TLITERAL<ATOM>, std::allocator<TLITERAL<ATOM> > >::~_Vector_base()'
dl.o(.text+0x5138): first defined here
inheritance.o: In function `std::_Vector_base<ATOM, std::allocator<ATOM> >::~_Vector_base()':
inheritance.o(.text+0x1c10): multiple definition of `std::_Vector_base<ATOM, std::allocator<ATOM> >::~_Vector_base()'
plan.o(.text+0x4cd0): first defined here
inheritance.o: In function `std::vector<IDENT, std::allocator<IDENT> >::get_allocator() const':
inheritance.o(.text+0x1af8): multiple definition of `std::vector<IDENT, std::allocator<IDENT> >::get_allocator() const'
plan.o(.text+0xefa0): first defined here


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]