From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109269 invoked by alias); 28 Apr 2017 11:47:51 -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 109259 invoked by uid 89); 28 Apr 2017 11:47:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-yb0-f194.google.com Received: from mail-yb0-f194.google.com (HELO mail-yb0-f194.google.com) (209.85.213.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Apr 2017 11:47:48 +0000 Received: by mail-yb0-f194.google.com with SMTP id d72so2439903ybh.0 for ; Fri, 28 Apr 2017 04:47:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vHLz51wVTo+gwMPRVFmn9G0rvdq+R0CaKdjGZtemQCM=; b=RPkwelRVqRZRwattTin7UBagTho+U/oQ1bhMCfIzS2aG4gC9gkBP338/GKrHsab/no hWh4rgh3unHhJJ72805FmV9lKq2eqZ1b1OhBl5Zyu09P9YT+LWLj6CBQVU9cmsa3r+iA GcUF6PcVlPPRdt9+5zWxj6yGX0n0lFWgWgWrDgsaVWbwGeEFPchQQgJ+sIXyjBcearzm cv12mLSXRGXzYihg3yZ/1YeHhtQUhvp0BbSCcJcTKXets11kG/8kK4qUno/fjh5sSeK9 1lcL1i/lr4wwxGs0UTq6u0NL0Dr12XcZ9n+wB/6aEbW1+5NquehmoEbRC6iVQVriie5V YtxA== X-Gm-Message-State: AN3rC/4dcc9nlZHQmRbOhPS35JE+ISnMePB+F6w2o/mCJQzhw8TphYOi l9ppOVxFtcnwFw== X-Received: by 10.37.193.129 with SMTP id r123mr8914325ybf.151.1493380069252; Fri, 28 Apr 2017 04:47:49 -0700 (PDT) Received: from ?IPv6:2620:10d:c0a3:20fb:f6d0:5ac5:64cd:f102? ([2620:10d:c091:200::b:7639]) by smtp.googlemail.com with ESMTPSA id i136sm2468017ywg.66.2017.04.28.04.47.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Apr 2017 04:47:48 -0700 (PDT) Subject: Re: [PATCH 3/8] Simplify representation of locations of a block. To: marxin , gcc-patches@gcc.gnu.org Cc: hubicka@ucw.cz References: <4f99730aa8b94384864c11e9026bcb9036d121e7.1493371589.git.mliska@suse.cz> From: Nathan Sidwell Message-ID: <00fc8b09-85b6-eae2-e439-410b76e16f92@acm.org> Date: Fri, 28 Apr 2017 11:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <4f99730aa8b94384864c11e9026bcb9036d121e7.1493371589.git.mliska@suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-04/txt/msg01476.txt.bz2 On 04/21/2017 10:02 AM, marxin wrote: > gcc/ChangeLog: > > 2017-04-26 Martin Liska > > * gcov.c (struct block_location_info): New struct. > (process_file): Fill up the new structure. > (read_graph_file): Replace usage of encoding by the newly added > struct. > (add_line_counts): Likewise. > (accumulate_line_counts): Remove usage of the union. > (function_info::function_info): New function. > (function_info::~function_info): Likewise. > (process_file): Call delete instead of release_function. > (release_function): Release the function. > (release_structures): Call delete instead of release_function. > (solve_flow_graph): Replace usage of num_blocks. > (find_exception_blocks): Likewise. > (output_lines): Fix GNU coding style. > diff --git a/gcc/gcov.c b/gcc/gcov.c > index 63f6a75f1af..7400cdee110 100644 > --- a/gcc/gcov.c > +++ b/gcc/gcov.c > @@ -114,6 +114,16 @@ typedef struct arc_info > struct arc_info *pred_next; > } arc_t; > > +struct block_location_info /* needs comment. */ > @@ -427,9 +429,31 @@ static void output_lines (FILE *, const source_t *); > static char *make_gcov_file_name (const char *, const char *); > static char *mangle_name (const char *, char *); > static void release_structures (void); > -static void release_function (function_t *); > extern int main (int, char **); > > +function_info::function_info () > +{ > + memset (this, 0, sizeof (*this)); EW. ok with a comment about function_info's c++11's PoDness. ok with those fixed. nathan -- Nathan Sidwell