From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37516 invoked by alias); 25 Mar 2015 09:50:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 37504 invoked by uid 89); 25 Mar 2015 09:50:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 25 Mar 2015 09:50:47 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2P9ojGx031947 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 25 Mar 2015 05:50:45 -0400 Received: from tucnak.zalov.cz (ovpn-116-58.ams2.redhat.com [10.36.116.58]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2P9ohKD012596 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Wed, 25 Mar 2015 05:50:44 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t2P9ogqN022575; Wed, 25 Mar 2015 10:50:42 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t2P9of5V022574; Wed, 25 Mar 2015 10:50:41 +0100 Date: Wed, 25 Mar 2015 09:50:00 -0000 From: Jakub Jelinek To: Richard Biener Cc: Ilya Enkovich , gcc-patches Subject: Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers Message-ID: <20150325095041.GL1746@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20150312100931.GK27860@msticlxl57.ims.intel.com> <20150319082944.GC64546@msticlxl57.ims.intel.com> <20150324083325.GC1746@tucnak.redhat.com> <20150324140619.GE1746@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg01285.txt.bz2 On Wed, Mar 25, 2015 at 10:38:56AM +0100, Richard Biener wrote: > --- gcc/passes.c (revision 221633) > +++ gcc/passes.c (working copy) > @@ -156,7 +156,8 @@ void > pass_manager::execute_early_local_passes () > { > execute_pass_list (cfun, pass_build_ssa_passes_1->sub); > - execute_pass_list (cfun, pass_chkp_instrumentation_passes_1->sub); > + if (flag_check_pointer_bounds) > + execute_pass_list (cfun, pass_chkp_instrumentation_passes_1->sub); > execute_pass_list (cfun, pass_local_optimization_passes_1->sub); > } > > @@ -424,7 +425,8 @@ public: > virtual bool gate (function *) > { > /* Don't bother doing anything if the program has errors. */ > - return (!seen_error () && !in_lto_p); > + return (flag_check_pointer_bounds > + && !seen_error () && !in_lto_p); > } > > }; // class pass_chkp_instrumentation_passes There is still the wasteful pass_fixup_cfg at the start of: PUSH_INSERT_PASSES_WITHIN (pass_local_optimization_passes) NEXT_PASS (pass_fixup_cfg); which wasn't there before chkp. Perhaps this should be a different pass with the same execute method, but gate containing flag_check_pointer_bounds? Jakub