From patchwork Wed Mar 25 12:03:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 454372 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1866214007F for ; Wed, 25 Mar 2015 23:03:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=fYgvQrqh; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=tG54alUyzXSx0mqPBYHEQ+bZv+oQoQk3XiU4ipTx9ALobuyXlPTvY 0h8Alq631Zgg7dPsLW/FiU1i/HxJdfQp9qzPIbnaZlwtTBZ6Kp/N0liqVaSGVP/I HOUguv3Mi5R3yG+s13eGJ4B3S1wdghrG1srmGGWZUBNL7dOvRryoq4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=ya06fNxyWt1ww089/rHNW09oWsY=; b=fYgvQrqhlLdMqKBmC+rs 0sEFwyeKCiWtOqCqiPThAQwfWJZe397M7glk7Bat6azCZ6/l+bhNoS0r9xL8Lms4 THQpCqew1sAbgOcvbAIlplVWR06r5fktiYOZEtLO7ZESChP3hXM6C8Bx0r0IFi2Y N2CRVf22boUdmy5Y8WumHa0= Received: (qmail 8640 invoked by alias); 25 Mar 2015 12:03:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 8627 invoked by uid 89); 25 Mar 2015 12:03:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 25 Mar 2015 12:03:10 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DD68EACD3 for ; Wed, 25 Mar 2015 12:03:06 +0000 (UTC) Date: Wed, 25 Mar 2015 13:03:06 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Guard pass_chkp_instrumentation_passes with flag_check_pointer_bounds Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Avoids a fixup-cfg and cgraph edge rebuild. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-03-25 Richard Biener * passes.c (pass_manager::execute_early_local_passes): Guard execution of pass_chkp_instrumentation_passes with flag_check_pointer_bounds. (pass_chkp_instrumentation_passes::gate): Likewise. Index: gcc/passes.c =================================================================== --- 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