From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 3BB0D3858D28 for ; Tue, 12 Apr 2022 12:31:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3BB0D3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 18C2A210E5; Tue, 12 Apr 2022 12:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649766665; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EwPBOnowOuAUMQ7LqbXSxBkOyyVzn4CYWquNWYhRTLg=; b=X6MM2ul7oLnlBeqhVlkxiQzp6EdPhIRR/z75DI1R6UQbxkoXs0UCIyMw939nf2gDu3073W G80dVZ3UDF/1zDGcMOek9EUem2XPlmRU+eyq7U5QlLJZtbY3ex6Lf2w8Rp3XouWqc+OmJe iSsZUzpfJbvpO1CogRW3kj87YkLI6Sc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649766665; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EwPBOnowOuAUMQ7LqbXSxBkOyyVzn4CYWquNWYhRTLg=; b=9NK2dSiKUDRhOczXXNKTMX945TkOGUelhh5ap/rTvciBgDeSXaoCyyaDj/V9yRuDB6K5Uw wsUVq3jdzSLRtlDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E273713A99; Tue, 12 Apr 2022 12:31:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id GFctNghxVWK6ewAAMHmgww (envelope-from ); Tue, 12 Apr 2022 12:31:04 +0000 Message-ID: <57c21fe6-4992-f54d-3f90-b1c4c9fa7b98@suse.cz> Date: Tue, 12 Apr 2022 14:31:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [GSoC]Bypass assembler when generating LTO object files Content-Language: en-US To: Richard Biener , Jan Hubicka Cc: Ankur Saini , GCC Development References: <7B167841-0CDA-4084-A160-62C625B85486@gmail.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2022 12:31:09 -0000 On 4/12/22 11:58, Richard Biener wrote: > On Tue, Apr 12, 2022 at 11:20 AM Jan Hubicka via Gcc wrote: >> >> Hi, >>> >>> >>>> On 08-Apr-2022, at 6:32 PM, Jan Hubicka wrote: >>>> >>>> Ankur, >>>>> I was browsing the list of submitted GSoC projects this year and the >>>>> project regarding bypassing assembler when generating LTO object files >>>>> caught my eye. >>>> I apologize for late reply. I would be very happy to mentor this >>>> project. >>> >>> Thanks for the reply, but unfortunately, due to some reasons, I would not >>> be able to take part in GSoC this year. >>> But the project seems interesting and would be amazing opportunity to >>> learn a lot more things for me, so would it be okay if I try to give it a >>> go outside GSoC if no-one else picks it as their GSoC project this year ? >> >> I would be still very happy to help with that! However it would be also >> pity to not take part of GSoC, so if there is something I can help with >> on that let me know. >>> >>>>> >>>>> I already have a gcc built from source (sync-ed with trunk/master) and >>>>> launched the test-suite on it. >>>>> >>>>> I am currently in process of understanding the primilary patch >>>>> (https://gcc.gnu.org/legacy-ml/gcc/2014-09/msg00340.html), and >>>>> experimenting with it. >>>>> >>>>> are there any other things I should be aware of (useful Doc/blog or a >>>>> bug tracking the project) before proceeding further ? >>>> >>>> I think it is pretty much all that exists. Basically we will need to >>>> implement everything that is necessary to stream out valid object file >>>> directly from GCC rather than going through gas. The experimental >>>> prototype sort of worked but it was lacking few things. >>> >>> When I try to apply that patch on my local branch ( branched from trunk ), >>> it seem to be incompatible with the current working tree. Is there a >>> specific branch that I have to apply it to ? or is it due to the recent >>> file rename patch ( changing extensions from .c to .cc ) ? >>> >>> ``` >>> $ git apply --check bypass_asm_patch >>> >>> error: patch failed: Makefile.in:1300 >>> error: Makefile.in: patch does not apply >>> error: common.opt: No such file or directory >>> error: langhooks.c: No such file or directory >>> error: lto/Make-lang.in: No such file or directory >>> error: lto/lto-object.c: No such file or directory >>> error: lto/lto.c: No such file or directory >>> error: lto/lto.h: No such file or directory >>> error: lto-streamer.h: No such file or directory >>> error: toplev.c: No such file or directory >>> ``` >> >> I can try to update the patch, or it probably should apply to trunk >> checked out around the date I sent the patch. Indeed we need to change >> c to cc but there are likely more changes since then - most importnatly >> the early debug info. >> At I will see how easy/hard is to make the patch build with current >> trunk. > > We do have ideas for the early debug with the asm-out abstraction to > also solve a different issue (missing simple-object support for mingw/darwin). Note the debug info will be stored to a different .s file, then the file will be converted .o by GAS and then the bytecode will be stored to an ELF section of a compiled object. I've got also binutils patch when we'll be able to directly use the embedded section with compile.o@offset. > Namely assemble the early debug in a different file and include the resulting > native object in binary form in the compile output - not needing to write > assembly .data for that would be a good way to make this more viable. Btw. do you have any estimation how slow is GAS when we speak about debug info? How much time can we save since the latest speed-up achieved by GAS? > > You might want to talk to Martin Liska for this who I think had some > prototype on this? I can provide a prototype if needed. Cheers, Martin > > Richard. > >> Honza >>> >>> Thanks >>> - Ankur >>>