decimal float support (take 2)

Janis Johnson <janis187 <at> us.ibm.com>
2009-09-30 23:00:06 GMT

Here's an updated version of the C++ support for decimal floating-point
arithmetic as defined in ISO/IEC TR 24733. There aren't many changes
from the version I sent out Monday except that the files have moved,
both in the source and the install tree, to include/tr24733 and there
is now documentation. The documentation isn't yet fully tested since
I'm still strugging with the generation tools, and I haven't done a
full build and test run with the new headers.
As shown in the status chart this only covers basic functionality in
the decimal header file, not formatted input/output or support for
facets, type traits, hash functions, and numeric_limits.
Tests are coming in a separate patch. I'd like to get this in for 4.5.
What changes are needed (with full testing) before it can go in as an
experimental feature?
2009-09-30 Janis Johnson <janis187 <at> us.ibm.com>
* doc/Makefile.am: Process new file.
* doc/Makefile.in: Regenerate.
* doc/xml/manual/intro.xml: Ditto.
* doc/xml/manual/using.xml: Document new header.
* doc/xml/manual/status_cxxtr24733.xml: New file.
* include/Makefile.am: Process new headers.
* include/Makefile.in: Regenerate.
* include/tr24733/decimal: New file.
* include/tr24733/decimal.h: New file.
Index: libstdc++-v3/doc/Makefile.am
===================================================================

[lto][patch] Don't compress the IL symbol table

Rafael Espindola <espindola <at> google.com>
2009-09-30 23:14:28 GMT

The plugin doesn't expect the symbol table to be compressed. This
patch disables compression for the section used to store the IL symbol
table. It would also be possible to change the plugin so that it could
read compressed symbol tables, but it is probably better to keep it
simpler.
The compiler itself doesn't read the symbol table.
2009-09-30 Rafael Avila de Espindola <espindola <at> google.com>
* lto-opts.c (lto_write_options): Update call to lto_begin_section.
* lto-section-out.c (lto_begin_section): Add a compress argument.
Update all callers.
(produce_symtab): Don't compress.
* lto-section-out.h (lto_begin_section): Add a compress argument.
Cheers,
--
--
Rafael Ávila de Espíndola

Re: decimal float support (take 2)

Paolo Carlini <paolo.carlini <at> oracle.com>
2009-09-30 23:14:26 GMT

Hi,
> Tests are coming in a separate patch. I'd like to get this in for
> 4.5.
> What changes are needed (with full testing) before it can go in as an
> experimental feature?
First, thanks for this work. Since you are asking, I quickly went
through the code and the formatting seems rather off wrt the normal
conventions in the library, for example: no space between a function
name and the open round brace; no space between type and &; new line
before open curly brace, eg, for the body of a class definition,
likewise for a namespace; please have a look to the existing code for
guidance, we are rather consistent.
Thanks again,
Paolo
>

[lto][patch] Add support for passing more than just libgcc to the linker

Rafael Espindola <espindola <at> google.com>
2009-10-01 00:09:59 GMT

As noted by Joseph and Ian, in some cases we have to ask the linker to
rescan more than just libgcc. This patch replaces the -libgcc option
with a -pass-through option. The new option can be used many times.
The reason for doing this is that in gcc.c it is easier to generate
-plugin-opt=-pass-through=foo -plugin-opt=-pass-through=bar
than to generate
-plugin-opt=-pass-through=foo:bar
The patch contains the infrastructure only. I still have to update
gcc.c to pass libc when needed (next patch).
Cheers,
--
--
Rafael Ávila de Espíndola

[lto][plugin] How to find libc?

Rafael Espindola <espindola <at> google.com>
2009-10-01 00:20:02 GMT

Ian noted that when linking libc statically into a program and using
the gold plugin, we have to ask gold to rescan libc. The problem is,
gcc normally doesn't know which libc is being used. It will just pass
-lc to the linker and the linker searches for it.
On way to fix this is to implement the same algorithms used in the
linker in gcc.
Another way is to add a new callback into gold: add_input_library. It
would be similar to add_input_file, but the linker would search for
library. With this callback we would be able to do
-pass-through=libgcc.a -pass-through=-lc
Opinions? Suggestions?
Thanks,
--
--
Rafael Ávila de Espíndola

Re: [LTO merge][13/15] Add LTO front end

On Wed, 30 Sep 2009, Diego Novillo wrote:
> >> >> > mmap and <sys/mman.h> are also not portable to all supported hosts (e.g.
> >> >> > MinGW). There should be configure tests and a suitable fallback.
> >> >>
> >> >> Added to PR41526.
> >> >
> >> > Likewise.
> >>
> >> Same question. What primary/secondary targets are broken?
> >
> > i686-mingw32 host, any ELF target (supposing that libelf is installed, so
> > that LTO would get enabled by default).
>
> Likewise here.
I should point out that a non-mmap fallback (open+read+close) should be
easy to test without access to a host that doesn't have mmap. And the
configure test, setting HAVE_MMAP_FILE, is already present in
gcc/acinclude.m4; I think you can assume that HAVE_MMAP_FILE will be the
right conditional to determine if you can include the header and use the
function.
--
--
Joseph S. Myers
joseph <at> codesourcery.com

Re: [lto][plugin] How to find libc?

Ian Lance Taylor <iant <at> google.com>
2009-10-01 00:48:40 GMT

Rafael Espindola <espindola <at> google.com> writes:
> Ian noted that when linking libc statically into a program and using
> the gold plugin, we have to ask gold to rescan libc. The problem is,
> gcc normally doesn't know which libc is being used. It will just pass
> -lc to the linker and the linker searches for it.
>
> On way to fix this is to implement the same algorithms used in the
> linker in gcc.
Please, no.
> Another way is to add a new callback into gold: add_input_library. It
> would be similar to add_input_file, but the linker would search for
> library. With this callback we would be able to do
>
> -pass-through=libgcc.a -pass-through=-lc
This seems reasonable, or add an extra option to add_input_file.
Within gold, add_input_file should do exactly the right thing if you
set the name to "c" and change the second argument to the
Input_file_argument constructor to true.
Ian