From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7709 invoked by alias); 20 Aug 2014 14:18:57 -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 7644 invoked by uid 89); 20 Aug 2014 14:18:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f48.google.com Received: from mail-wg0-f48.google.com (HELO mail-wg0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 20 Aug 2014 14:18:53 +0000 Received: by mail-wg0-f48.google.com with SMTP id x13so7946249wgg.7 for ; Wed, 20 Aug 2014 07:18:50 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.106.6 with SMTP id gq6mr15804899wib.5.1408544330411; Wed, 20 Aug 2014 07:18:50 -0700 (PDT) Received: by 10.194.20.69 with HTTP; Wed, 20 Aug 2014 07:18:50 -0700 (PDT) In-Reply-To: References: Date: Wed, 20 Aug 2014 14:18:00 -0000 Message-ID: Subject: Re: [PATCH, PR61776] verify_flow_info failed: control flow in the middle of basic block with -fprofile-generate From: Richard Biener To: Wei Mi Cc: GCC Patches , Jan Hubicka , David Li , Martin Jambor Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg02026.txt.bz2 On Tue, Aug 19, 2014 at 8:46 PM, Wei Mi wrote: > Sorry for the late reply. I took some time to make myself more > familiar with NORETURN and related code, and finally I understood what > you mean and saw why only GF_CALL_CTRL_ALTERING was enough and > GF_CALL_NORETURN was unneeded. With your suggestion, the change looks > much briefer! Please check if the new patch attached is ok. Indeed - much nicer than I originally thought. Thanks for bearing with me. > bootstrap and regression tests pass on x86_64-linux-gnu. Ok! Thanks, Richard. > Thanks, > Wei. > >> +static void >> +update_no_abnormal_goto_attr (basic_block bb) >> +{ >> + gimple_stmt_iterator gsi; >> + for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) >> + { >> >> it should be enough to check these on last stmts of a basic block, no? > > Yes, that is better. > >> >> That you call update_no_abnormal_goto_attr from two places >> before cleanup_tree_cfg_bb suggests you may want to perform >> this change in cleanup_control_flow_bb which already looks >> at the last stmt only? > > Changed. > >> >> Btw, I originally had this whole idea of moving flags to the gimple >> stmt level because of the "interesting" way we handle the noreturn >> attribute (calls to noreturn functions also end basic-blocks). >> >> Thus would it be possible to turn all these into a single flag, >> GF_CALL_CTRL_ALTERING? That is, cover everything >> that is_ctrl_altering_stmt covers? I suggest we initialize it at >> CFG build time and only ever clear it later. > > Good idea!