From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id DE0B33857C5C for ; Sun, 20 Sep 2020 14:34:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DE0B33857C5C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-396-vrS1IqIiNdy9Lv4P74gn6w-1; Sun, 20 Sep 2020 10:33:57 -0400 X-MC-Unique: vrS1IqIiNdy9Lv4P74gn6w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5478F56B2D; Sun, 20 Sep 2020 14:33:56 +0000 (UTC) Received: from ovpn-114-91.phx2.redhat.com (ovpn-114-91.phx2.redhat.com [10.3.114.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D2C173670; Sun, 20 Sep 2020 14:33:55 +0000 (UTC) Message-ID: Subject: Re: New modref/ipa_modref optimization passes From: David Malcolm To: Jan Hubicka , David =?UTF-8?Q?=C4=8Cepel=C3=ADk?= Cc: gcc-patches@gcc.gnu.org Date: Sun, 20 Sep 2020 10:33:54 -0400 In-Reply-To: <20200919223255.GA69342@kam.mff.cuni.cz> References: <157394261677.27454.2367573047582814412@a285.localdomain> <20200919223255.GA69342@kam.mff.cuni.cz> User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2020 14:34:04 -0000 On Sun, 2020-09-20 at 00:32 +0200, Jan Hubicka wrote: > Hi, > this is cleaned up version of the patch. I removed unfinished bits, > fixed > propagation, cleaned it up and fixed fallout. [...] > While there are several areas for improvements but I think it is not > in shape > for mainline and rest can be dealt with incrementally. FWIW I think you typoed: "not in shape for mainline" when you meant: "now in shape for mainline" given... > > Bootstrapped/regtested x86_64-linux including ada, d and go. I plan > to commit > it after bit more testing tomorrow. ...this, which suggests the opposite meaning. I didn't look at the guts of the patch, but I spotted some nits. > 2020-09-19 David Cepelik > Jan Hubicka > > * Makefile.in: Add ipa-modref.c and ipa-modref-tree.c. > * alias.c: (reference_alias_ptr_type_1): Export. > * alias.h (reference_alias_ptr_type_1): Declare. > * common.opt (fipa-modref): New. > * gengtype.c (open_base_files): Add ipa-modref-tree.h and ipa- > modref.h > * ipa-modref-tree.c: New file. > * ipa-modref-tree.h: New file. > * ipa-modref.c: New file. Should new C++ source files have a .cc suffix, rather than .c? [...] > + $(srcdir)/ipa-modref.h $(srcdir)/ipa-modref.c \ ...which would affect this ^^^^^^^^^^^^^ [...] > diff --git a/gcc/ipa-modref-tree.c b/gcc/ipa-modref-tree.c > new file mode 100644 > index 00000000000..e37dee67fa3 > --- /dev/null > +++ b/gcc/ipa-modref-tree.c [...] > +#if CHECKING_P > + > + > +static void > +test_insert_search_collapse () > +{ [...] > +} > + > +static void > +test_merge () > +{ [...] > +} > + > + > +void > +modref_tree_c_tests () > +{ > + test_insert_search_collapse (); > + test_merge (); > +} > + > +#endif It looks like these tests aren't being called anywhere; should they be? The convention is to put such tests inside namespace selftest and to call the "run all the tests in this file" function from selftest::run_tests. If you change this to be a .cc file, then the _c_ in the function name should become a _cc_. [...] > diff --git a/gcc/ipa-modref-tree.h b/gcc/ipa-modref-tree.h > new file mode 100644 > index 00000000000..3bdd3058aa1 > --- /dev/null > +++ b/gcc/ipa-modref-tree.h [...] > +void modref_c_tests (); Likewise here; the convention is to declare these within selftest.h [...] Hope this is constructive Dave