Jakub Jelinek | 1 Dec 08:45 2009
Picon

Re: [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 3)

On Mon, Nov 30, 2009 at 10:46:31PM -0500, Jason Merrill wrote:
> On 11/30/2009 05:36 PM, Jakub Jelinek wrote:
> >	* config/abi/pre/gnu.ver: Don't export certain base dtors that
> >	weren't previously exported.
> 
> Is this necessary?  I thought it was OK to add new exported symbols, but 
> you'd know better than I.

Yes.  We definitely must not export them with the old symbol versions where
they have not been exported before (GLIBCXX_3.4 and GLIBCXX_3.4.10).
We could export them at  <at>  <at> GLIBCXX_3.4.14 (which would mean the same gnu.ver
changes and mentioning the D2 symbols in GLIBCXX_3.4.14 section), but that
has a problem that we only emit those D2 symbols when HAVE_COMDAT_GROUP, so
in !HAVE_COMDAT_GROUP configurations the exported list would be different.
I have no idea how to force generation of those symbols otherwise so that
they are exported on all targets.

> 
> >+	  && (SUPPORTS_ONE_ONLY || !DECL_WEAK (fns[0]))
> 
> This test seems unnecessary; I don't see the problem with using aliases 
> on targets with weak symbols but no one-only support.

This is to fix AIX (and is actually unrelated to this patch, it can be dealt
with separately).  In theory it should work well, but David Edelsohn
reported that some symbols were missing from libstdc++.so without it.  I
have no access to AIX and have no idea what AIX linker is doing with the
symbols.  !SUPPORTS_ONE_ONLY targets don't have DECL_ONE_ONLY, but instead
just use DECL_WEAK symbols, so I thought when we don't do this optimization
on !HAVE_COMDAT_GROUP SUPPORTS_ONE_ONLY targets for comdat and comdat-like
(Continue reading)

Jason Merrill | 1 Dec 16:05 2009
Picon

Re: [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 3)

On 12/01/2009 02:45 AM, Jakub Jelinek wrote:
> On Mon, Nov 30, 2009 at 10:46:31PM -0500, Jason Merrill wrote:
>> On 11/30/2009 05:36 PM, Jakub Jelinek wrote:
>>> 	* config/abi/pre/gnu.ver: Don't export certain base dtors that
>>> 	weren't previously exported.
>>
>> Is this necessary?
>
> Yes.

OK.

>>> +	&&  (SUPPORTS_ONE_ONLY || !DECL_WEAK (fns[0]))
>>
>> This test seems unnecessary; I don't see the problem with using aliases
>> on targets with weak symbols but no one-only support.
>
> This is to fix AIX (and is actually unrelated to this patch, it can be dealt
> with separately).  In theory it should work well, but David Edelsohn
> reported that some symbols were missing from libstdc++.so without it.  I
> have no access to AIX and have no idea what AIX linker is doing with the
> symbols.

OK.

The patch is OK.

Jason

(Continue reading)

Hans-Peter Nilsson | 3 Dec 07:44 2009
Picon

Committed: Fix ext/profile/mutex_extensions.cc regression

In r154852:154860, there was a change shifting the
libstdc++-v3/include/bits/c++config line-numbers, causing this
test to fail since then on all platforms; see gcc-testresults <at> .
I'm not sure how regression was missed in testing (other than
perhaps a missing run on a _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
platform), but either way, the trivial fix just committed was:

libstdc++-v3:
	* testsuite/ext/profile/mutex_extensions.cc: Adjust dg-error line
	number.

Index: testsuite/ext/profile/mutex_extensions.cc
===================================================================
--- testsuite/ext/profile/mutex_extensions.cc	(revision 154935)
+++ testsuite/ext/profile/mutex_extensions.cc	(working copy)
 <at>  <at>  -22,5 +22,5  <at>  <at> 

 #include <vector>

-// { dg-error "Cannot use -D_GLIBCXX_PROFILE with " "" { target *-*-* } 165 }
+// { dg-error "Cannot use -D_GLIBCXX_PROFILE with " "" { target *-*-* } 167 }
 // { dg-excess-errors "In file included from" }

brgds, H-P

Paolo Carlini | 3 Dec 11:19 2009
Picon

[v3] Add some std::bind tests

Hi,

checked x86-64-linux, committed to mainline.

Paolo.

////////////////////
2009-12-03  Paolo Carlini  <paolo.carlini <at> oracle.com>

	* testsuite/20_util/bind/ref.cc: Add.
	* testsuite/20_util/bind/all_bound.cc: Likewise.
	* testsuite/20_util/bind/nested.cc: Likewise.
	* testsuite/20_util/bind/placeholders.cc: Likewise.
Index: testsuite/20_util/bind/ref.cc
===================================================================
--- testsuite/20_util/bind/ref.cc	(revision 0)
+++ testsuite/20_util/bind/ref.cc	(revision 0)
 <at>  <at>  -0,0 +1,55  <at>  <at> 
+// { dg-options "-std=gnu++0x" }
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
(Continue reading)

Paolo Carlini | 3 Dec 15:21 2009
Picon

[v3] Fix libstdc++/42261

Hi,

tested x86_64-linux, committed to mainline.

Paolo.

///////////////////////
2009-12-03  Paolo Carlini  <paolo.carlini <at> oracle.com>

	PR libstdc++/42261
	* include/bits/basic_string.h (_S_construct_aux(_Integer, _Integer,
	const _Alloc&, __true_type)): Cast the second argument to value_type.
	* include/ext/sso_string_base.h (_M_construct_aux(_Integer, _Integer,
	std::__true_type)): Likewise.
	* include/ext/rc_string_base.h (_S_construct_aux(_Integer, _Integer,
	const _Alloc&, std::__true_type)): Likewise.
	* testsuite/21_strings/basic_string/cons/char/42261.cc: New.
	* testsuite/21_strings/basic_string/cons/wchar_t/42261.cc: Likewise.
Index: include/ext/rc_string_base.h
===================================================================
--- include/ext/rc_string_base.h	(revision 154941)
+++ include/ext/rc_string_base.h	(working copy)
 <at>  <at>  -231,7 +231,8  <at>  <at> 
         static _CharT*
         _S_construct_aux(_Integer __beg, _Integer __end,
 			 const _Alloc& __a, std::__true_type)
(Continue reading)

Paolo Carlini | 4 Dec 17:35 2009
Picon

[FYI] ChangeLogs cleaned-up a bit

Hi,

in my HJ Lu-ish mood, I removed quite a few spurious white spaces and
tabs lurking in our ChangeLogs files, actually quite annoying in a new
emacs setup I'm using now (they are all displayed bright red)...

Paolo.

Benjamin Kosnik | 4 Dec 19:46 2009
Picon

Re: [FYI] ChangeLogs cleaned-up a bit


> in my HJ Lu-ish mood, I removed quite a few spurious white spaces and
> tabs lurking in our ChangeLogs files, actually quite annoying in a new
> emacs setup I'm using now (they are all displayed bright red)...

Thanks, had been tempted myself. It is now very distracting!

-benjamin

Changhee Jung | 7 Dec 04:38 2009
Picon

[profile-stdlib] PATCH: Add three diagnostics and implement cost factor parameterization

Hello libstdc++ maintainers,

The attached patch implements the following in the profile-stdlib branch:
1) New diagnostics
  - list-to-vector; if data is inserted at the end of the list and
iteration operation is common, vector is better.
  - list-to-slist; slist is more likely to fit in a cache line due to
less memory usage.
  - list-to-set; if a find operation, 'std::find', is frequently used
in the list, set is better.
2) Cost factor parameterization; constant factors of the cost models
for diagnostics can be read from a file, "libstdcxx-profile.conf" or
environment variables.

There is an issue related to thel instrumentation of 'std::find'.
It seems that 'bits/stl_algo.h' was modified for the parallel mode so
that its functions declared in the namespace of '_GLIBCXX_STD_P' can
be used instead of original functions in the release mode.
Currently, I did the same thing, conditional compilation stuff, to
hide the original 'find' function under its wrapper function.

This inevitably causes a modification to the original 'bits/stl_algo.h'.
Alternatively, it is possible to duplicate the 'bits/stl_algo.h' in
'profile/stl_algo.h' and modify the copy to avoid any intrusion from
the profile mode to the release mode.
It would be appreciated if you come up with a better idea to deal with this.

Thank you,
Changhee
(Continue reading)

Jonathan Wakely | 7 Dec 09:18 2009
Picon

Re: [profile-stdlib] PATCH: Add three diagnostics and implement cost factor parameterization

Hi Changee,

Some initial comments, I'll take another look later.

I noticed a few formatting issues in
libstdc++-v3/include/profile/iterator_tracker.h - overlong lines, and
"public:" indented incorrectly.

The doxygen comment for profile/algorithm says:
/**  <at> file parallel/algorithm

This include guard is not in the correct format:
#ifndef PROFCXX_PROFILER_LIST_TO_SLIST_H
That could clash with a user header (I don't like the format used by
the other profile headers, with two trailing underscores, but that
seems to be the form used consistently.)

This is wrong:
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      swap(vector&& __x)
+#else
       swap(vector& __x)
+#endif

vector::swap() does not work with rvalues now, the same goes for

+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Tp, typename _Alloc>
+    inline void
+    swap(vector<_Tp, _Alloc>&& __lhs, vector<_Tp, _Alloc>& __rhs)
(Continue reading)

Paolo Carlini | 7 Dec 15:29 2009
Picon

[v3] Fix libstdc++/42319

Hi,

tested x86_64-linux, committed to mainline.

Paolo.

////////////////////
2009-12-07  Paolo Carlini  <paolo.carlini <at> oracle.com>

	PR libstdc++/42319
	* include/parallel/losertree.h: Include bits/stl_function.h instead
	of the whole <functional>.
	* include/parallel/base.h: Likewise.
	* include/parallel/numeric: Likewise.
	* include/parallel/balanced_quicksort.h: Likewise.
	* include/parallel/checkers.h: Likewise.
	* testsuite/17_intro/headers/c++200x/42319.cc: New.
Index: include/parallel/losertree.h
===================================================================
--- include/parallel/losertree.h	(revision 155034)
+++ include/parallel/losertree.h	(working copy)
 <at>  <at>  -32,9 +32,8  <at>  <at> 
 #ifndef _GLIBCXX_PARALLEL_LOSERTREE_H
 #define _GLIBCXX_PARALLEL_LOSERTREE_H 1

-#include <functional>
(Continue reading)


Gmane