Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Richard Biener
On Wed, Sep 24, 2014 at 7:46 AM, Jan Hubicka hubi...@ucw.cz wrote: Hi, This patch is something I was playing around with assistance of Ian Taylor. It seems I need bit more help though :) It adds support for direct output of SLIM LTO files to the compiler binary. It works as proof of

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Ian Lance Taylor
Richard Biener richard.guent...@gmail.com writes: Btw, the patch is very hard to read as it moves (and modifies?) files at the same time. What's this magic file attributes we need? The file attributes issue is the ELF machine number, class, OSABI, flags, and endianness. When generating an

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Richard Biener
On Wed, Sep 24, 2014 at 2:40 PM, Ian Lance Taylor i...@airs.com wrote: Richard Biener richard.guent...@gmail.com writes: Btw, the patch is very hard to read as it moves (and modifies?) files at the same time. What's this magic file attributes we need? The file attributes issue is the ELF

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Jan Hubicka
Shouldn't -fbypass-asm be simply mangled by the driver? That is, the user simply specifies -fbypass-asm and via spec magic the driver substitutes this with -fbypass-asm=crtbegin.o? That way at least the user interface should be stable (as we're supposedly removing the requirement for that

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Andi Kleen
Jan Hubicka hubi...@ucw.cz writes: Nice patch. The implementation is pretty straighforward except for -fbypass-asm requiring one existing OBJ file to fetch target's file attributes from. This is definitly not optimal, but libiberty currently can't build output files from scratch. As Ian

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Ian Lance Taylor
On Wed, Sep 24, 2014 at 7:47 AM, Andi Kleen a...@firstfloor.org wrote: I wonder how hard it would be to fix simple-object to be able to create from scratch. From a quick look it would be mostly adding the right values into the header? That would need some defines per target. It could be done,

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Jan Hubicka
On Wed, Sep 24, 2014 at 7:47 AM, Andi Kleen a...@firstfloor.org wrote: I wonder how hard it would be to fix simple-object to be able to create from scratch. From a quick look it would be mostly adding the right values into the header? That would need some defines per target. It could

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Jan Hubicka
On Wed, Sep 24, 2014 at 7:47 AM, Andi Kleen a...@firstfloor.org wrote: I wonder how hard it would be to fix simple-object to be able to create from scratch. From a quick look it would be mostly adding the right values into the header? That would need some defines per target. It

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Steven Bosscher
On Wed, Sep 24, 2014 at 6:32 PM, Jan Hubicka hubi...@ucw.cz wrote: Libreoffice shows that GCC needs about twice as much of system time. According to profiles, good part is the ugly way we pass stuff down to assembler and other part is memory use during the copmilation stage. Are you using

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Jan Hubicka
On Wed, Sep 24, 2014 at 6:32 PM, Jan Hubicka hubi...@ucw.cz wrote: Libreoffice shows that GCC needs about twice as much of system time. According to profiles, good part is the ugly way we pass stuff down to assembler and other part is memory use during the copmilation stage. Are you

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Ian Lance Taylor
On Wed, Sep 24, 2014 at 10:04 AM, Steven Bosscher stevenb@gmail.com wrote: On Wed, Sep 24, 2014 at 6:32 PM, Jan Hubicka hubi...@ucw.cz wrote: Libreoffice shows that GCC needs about twice as much of system time. According to profiles, good part is the ugly way we pass stuff down to

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Jan Hubicka
On Wed, Sep 24, 2014 at 10:04 AM, Steven Bosscher stevenb@gmail.com wrote: On Wed, Sep 24, 2014 at 6:32 PM, Jan Hubicka hubi...@ucw.cz wrote: Libreoffice shows that GCC needs about twice as much of system time. According to profiles, good part is the ugly way we pass stuff down to

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Steven Bosscher
On Wed, Sep 24, 2014 at 11:47 PM, Ian Lance Taylor wrote: On Wed, Sep 24, 2014 at 10:04 AM, Steven Bosscher wrote: Are you using -pipe? AFAIR this still isn't the default, even on GNU/Linux, but it is typically a lot faster than without. Is that true even when TMPDIR is on a ram disk?

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Jan Hubicka
On Wed, Sep 24, 2014 at 11:47 PM, Ian Lance Taylor wrote: On Wed, Sep 24, 2014 at 10:04 AM, Steven Bosscher wrote: Are you using -pipe? AFAIR this still isn't the default, even on GNU/Linux, but it is typically a lot faster than without. Is that true even when TMPDIR is on a ram disk?

Re: Skipping assembler when producing slim LTO files

2014-09-24 Thread Janne Blomqvist
On Thu, Sep 25, 2014 at 12:47 AM, Ian Lance Taylor i...@google.com wrote: Is that true even when TMPDIR is on a ram disk? There's no obvious reason that it should be true in a parallel build. Using -pipe effectively constrains communication between the compiler and the assembler to work in

Skipping assembler when producing slim LTO files

2014-09-23 Thread Jan Hubicka
Hi, This patch is something I was playing around with assistance of Ian Taylor. It seems I need bit more help though :) It adds support for direct output of SLIM LTO files to the compiler binary. It works as proof of concept, but there are two key parts missing 1) extension of libiberty's