From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 9ED433858430 for ; Thu, 2 Feb 2023 13:21:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9ED433858430 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail 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 93D0B22C2C; Thu, 2 Feb 2023 13:21:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1675344096; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GCMoDqfCtHX+JS/+SyOKMwsC0IhhqiPkxWy0G8u2EEY=; b=nsLrxUrwAr5qaVB/wlKzscYvV1/5OOpI12iHxSLEPNu3gAFyC73WmV9ByUMzscFi3e18i2 SL5CspqlDH+VHYvox7QJJKL/pblugNtintVs7HTQncSCBKwBvkTQO4JJ9S74uRfkCzv64g ZShCXv3IhlJa3eEhcWNN9UWibMbwkj4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1675344096; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GCMoDqfCtHX+JS/+SyOKMwsC0IhhqiPkxWy0G8u2EEY=; b=UYsocoZN9T5rUAt9dwNKV2T0o4WBHUjQQKervvtoYqS5Y8dyr8ArmNwUVLLfZLyxrPGBHL JAJ4uv2G9uLs2/Dw== 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 86EB3138E8; Thu, 2 Feb 2023 13:21:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +Y/sIOC422OtKwAAMHmgww (envelope-from ); Thu, 02 Feb 2023 13:21:36 +0000 From: Martin Jambor To: hmsjwzb@zoho.com Cc: GCC Mailing List Subject: Re: seek advice about GCC learning In-Reply-To: <78f16367-5f69-e133-ec46-7b3fd4b49662@zoho.com> References: <78f16367-5f69-e133-ec46-7b3fd4b49662@zoho.com> User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.2 (x86_64-suse-linux-gnu) Date: Thu, 02 Feb 2023 14:21:36 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP 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 Flint, On Sat, Jan 28 2023, hmsjwzb via Gcc wrote: > Hi GCC developers, > > I am learning GCC. But the GCC code is hard to understand. We are delighted you found looking into GCC interesting. I definitely agree that GCC source can be hard to read, especially for newcomers but often even for seasoned contributors when they look at a part they are not familiar with. But when you manage to manage to overcome the difficulty, the project can be very rewarding. And so not hesitate to ask us any specific question you may have here on the mailing list or on IRC. > I'm reading the c compiler of GCC. It seems the understanding of > AST/GENERIC representation is very important. Is there a tool > can visualize the AST/GENERIC representation? Intermediate representations like GENERIC, GIMPLE and RTL are indeed fundamental. In order to see the representation of instructions, compile a simple program with option -fdump-tree-all and examine the many files that will appear in your working directory (representation of things like aggregate data types is unfortunately somewhat missing). > > Do you have some advice for GCC beginner? Is there some documentations can help in the learning of GCC? David Malcolm wrote a very nice set of tutorials about various aspects of starting with GCC: https://gcc-newbies-guide.readthedocs.io/en/latest/ I believe that is the best generic resource there is. Good luck, Martin