From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 435DE3858C35 for ; Tue, 19 Mar 2024 13:08:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 435DE3858C35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 435DE3858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710853708; cv=none; b=KcJmqpaod+EDjc4DSbksHnq7OhlTFerEijiJgo4qx6VJXK+S6wI/T2SEovd2NyfwTORo360Z06l5ehb8YydKvSOwr24oui95cjOJ6HA2YApbHq7uPCog3Ty3531R1MkNX7tMEpv4ri3uzfzvPaUg9+GwL57Lhk3PRWw58cs7OmI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710853708; c=relaxed/simple; bh=xtT2GYsAevBDIWv27d6isOY+e524wjdFGKrdRT9g0qI=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=P9Ii3B337qMHOy/8+T4IkeovxAxhjpfBaT8KZqdQPqjA5bRYZZu7sP9D5r9owyHo/P7CEWe/7gXD4uyRyamvWLOtdzICYiqhcm3FIZTOg+Fw2rVqON3xvfR/FM2WI78OwZ/Ru4LCWQqPWRXmfmR/kmqGM03hkC8l126ucDXE5so= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2B84B37892; Tue, 19 Mar 2024 13:08:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1710853697; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lxh6SBeczsweNJ8eBrd4cxkD0luIIqYuslIZawIjZks=; b=2VOixS3JfevtrOyN54ZDwowo+WVLTJCPtigMMiUbrNepbewQD4Nyelg09Ur0ZaY8qA2yHT kifevuaVes+ip18eKKxUzhuCPdU1X9Q04Wad8KfFIdcTa7QW0hl9ZJpbIvT0j/d/GoRTOe rIACF4TiGcz0kGUl6FvVK4kWiAkebms= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1710853697; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lxh6SBeczsweNJ8eBrd4cxkD0luIIqYuslIZawIjZks=; b=yh37yeuZ1ROa8xdC35JvJBq9pJPNhcu8N+N/VBcSYOZ2/nZrzI3hOpuuKrG+DN4z2sWnAr jLYpPERKy36xMbAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1710853696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lxh6SBeczsweNJ8eBrd4cxkD0luIIqYuslIZawIjZks=; b=lvUBAuqLnufdDWLT14f+Tu8XTkawz7oW0Y0n4//QNlVaqV8jvJRGBN0TeHXH278uhBGZlg tHRkhytDgeyXqDVYWm1bx2IR0c7E3/6tkhfvhPJxF4RA7P4w/BfICyRWDcVX8B+GEbx3kp mU7YSVPVi5vGPsL5WSHTdFFUP1OWbvk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1710853696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lxh6SBeczsweNJ8eBrd4cxkD0luIIqYuslIZawIjZks=; b=k0WvG6wjkOSO84Mku67QZUzYTeOuGvdboUh+JdmN3zWiQDeQ9kaeynhksqH6dWJYeTmMDH EAmnjkRT7pCGIfAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 25430136A5; Tue, 19 Mar 2024 13:08:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id FYoSCUCO+WVmXgAAD6G6ig (envelope-from ); Tue, 19 Mar 2024 13:08:16 +0000 From: Martin Jambor To: PRANIL DEY , gcc@gcc.gnu.org Subject: Re: Interest in GSoC Project (offloading to a separate process on the same host) In-Reply-To: References: User-Agent: Notmuch/0.38.2 (https://notmuchmail.org) Emacs/29.2 (x86_64-suse-linux-gnu) Date: Tue, 19 Mar 2024 14:08:15 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -4.30 X-Spamd-Result: default: False [-4.30 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com,gcc.gnu.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-3.00)[100.00%]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[gnu.org:url,except.cc:url]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[] X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_ASCII_DIVIDERS,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello Pranil, We are delighted you found contributing to GCC interesting. On Fri, Mar 15 2024, PRANIL DEY via Gcc wrote: > Hello GCC Community, > > I am Pranil Dey, a 4th year undergraduate student of the Indian Institute > of Technology Kharagpur currently pursuing a Bachelor's Degree in Computer > Science and Engineering. I am interested in contributing to the GCC > projects under GSoC, specifically the projects : "Offloading to a separate > process on the same host" and "Improve nothrow detection in GCC". > I have worked on inter process communication in college operating systems > projects which have helped me understand more about shared memory, pipes > and multithreading concepts. I have also taken compiler design theory and > laboratory courses as a part of my institute curriculum. In the lab we > designed a Tiny-C compiler (a subset of GCC). Although I have no experien= ce > with big projects like GCC, I have built the codebase and am currently > trying to understand it further. Great, you seem to be very well prepared! > I would like some pointers to start > understanding and contributing to these projects along with any > helpful resources/reading material for delving deeper into the relevant > topic. Any guidance on proposal formulation will also be appreciated > greatly. As far as the offloading to a separate process project is concerned, we have had a brief discussion on this mailing list in the recent past, have a look especially at https://gcc.gnu.org/pipermail/gcc/2024-March/243462.html and https://gcc.gnu.org/pipermail/gcc/2024-March/243478.html As far as the nothrow detection project is concerned, let me quote Honza Hubi=C4=8Dka from an email which, probably by mistake, did not reach the mailing list: ---------------------------------------------------------------------- GCC EH works in a way that it marks statements that can possibly throw (these can be calls or non-call exceptions) and assigns them to EH regions. EH regions are organized into a tree structure which describes what types are caught and handled. This data structure is in except.h / except.cc and can be dumped before/after every pass (I believe iwth -fdump-tree-all-details) For optimization we have two predicates - can_throw_internal and can_throw_external which are used to detect notrhow functions and if function is notrhow we can save EH tables and optimize EH hadnling code (especialy EH cleanup regions calling implicit destructors that are quite frequent). What we miss the ability to track type of a given exception and detect that given function handles all exceptions that it can possibly receive. As a result such code leads to unnecesary cleanups later. So the work is to make middle-end aware of it - is probably quite easily detectable from calls to __cxa_throw which takes the type as parameter. Then we need to add propagation which will understand what kind of exceptions are rethrown which will let us to deterine list of all types possibly thrown by the function. So I think good start is to look into the data-structure EH is represented and look into detecting types of __cxa_throw. The nothrow discovery currently lives in pure-const pass and is very simple minded: if something in function apsses can_throw_external then function can throw. So in the next step the propgation will need to be added here. ---------------------------------------------------------------------- Hope this help, if you have any specific issues you'd like to help with, certainly feel free to ask here again. Good luck! Martin Jambor