From patchwork Mon Feb 3 09:56:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Tocar X-Patchwork-Id: 316105 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 4F0AF2C008F for ; Mon, 3 Feb 2014 20:57:13 +1100 (EST) 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:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=Qj9bq9xEjb5xRZKH0 wLHBBHkfUp0erlOGB2TBsJ1oypOy0ROHgdfMo6kH0ydHoPai+1roVr9mAj5Lc3T8 NPe3HTqVEuobRbaeKhRptsRf30cll2+/cMNLTKFopVsljOVtMwISz1q9qd7exoqW x9A7oa2KKhca/rcFhAQAFLluWc= 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:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=n60EKpC1lEj9niJRWTvVBMc ttYU=; b=n0lmOcuoZ8sf+wPHEVwFpOcwxWuUktymjP/+JeLVLKOUHZy1Fc++Lu8 BAuPES0hwUvrM28+11bqpQ4TavSS+NISikCb6ULZl+UJmHZyco9Zf6H9zdDOsG1z Jy5eenv55He81dW3jSLGQXWIuXaF4UqSM9xs76Rk7BONgmVX7d1c= Received: (qmail 23563 invoked by alias); 3 Feb 2014 09:57:05 -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 23552 invoked by uid 89); 3 Feb 2014 09:57:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS, T_FRT_BELOW2 autolearn=ham version=3.3.2 X-HELO: mail-pb0-f42.google.com Received: from mail-pb0-f42.google.com (HELO mail-pb0-f42.google.com) (209.85.160.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 03 Feb 2014 09:57:03 +0000 Received: by mail-pb0-f42.google.com with SMTP id jt11so6894848pbb.29 for ; Mon, 03 Feb 2014 01:57:01 -0800 (PST) X-Received: by 10.68.178.229 with SMTP id db5mr35964531pbc.97.1391421421684; Mon, 03 Feb 2014 01:57:01 -0800 (PST) Received: from msticlxl7.ims.intel.com ([134.134.139.76]) by mx.google.com with ESMTPSA id sx8sm140847524pab.5.2014.02.03.01.56.59 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Feb 2014 01:57:01 -0800 (PST) Date: Mon, 3 Feb 2014 13:56:48 +0400 From: Ilya Tocar To: Thomas Schwinge Cc: gcc-patches@gcc.gnu.org, Kirill Yukhin , Jakub Jelinek , "Michael V. Zolotukhin" , Ilya Verbin Subject: Re: [gomp4] Merge trunk r206958 (was: gomp-4_0-branch) Message-ID: <20140203095648.GA55784@msticlxl7.ims.intel.com> References: <87a9elqolz.fsf@schwinge.name> <87lhy1ph0p.fsf@schwinge.name> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87lhy1ph0p.fsf@schwinge.name> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes > In r207132, I have now committed a merge of trunk r206958 (2014-01-23). > Compared to a pristine trunk r206958 build, there is one regression: > > FAIL: g++.dg/gomp/declare-simd-1.C -std=c++98 (internal compiler error) > FAIL: g++.dg/gomp/declare-simd-1.C -std=c++11 (internal compiler error) > > [...]/build/gcc/testsuite/g++/../../xg++ -B[...]/build/gcc/testsuite/g++/../../ [...]/source/gcc/testsuite/g++.dg/gomp/declare-simd-1.C -fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++ -I[...]/build/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I[...]/build/x86_64-unknown-linux-gnu/libstdc++-v3/include -I[...]/source/libstdc++-v3/libsupc++ -I[...]/source/libstdc++-v3/include/backward -I[...]/source/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++98 -fopenmp -S -o declare-simd-1.s > [...]/source/gcc/testsuite/g++.dg/gomp/declare-simd-1.C:243:1: internal compiler error: in estimate_function_body_sizes, at ipa-inline-analysis.c:2403 > 0xa19664 estimate_function_body_sizes > ../../source/gcc/ipa-inline-analysis.c:2403 > 0xa19ef1 compute_inline_parameters(cgraph_node*, bool) > ../../source/gcc/ipa-inline-analysis.c:2797 > 0xa1a200 inline_analyze_function > ../../source/gcc/ipa-inline-analysis.c:3790 > 0x865a10 cgraph_call_function_insertion_hooks(cgraph_node*) > ../../source/gcc/cgraph.c:405 > 0xacc652 simd_clone_create > ../../source/gcc/omp-low.c:11600 > 0xacc652 expand_simd_clones > ../../source/gcc/omp-low.c:12370 > 0xacc652 ipa_omp_simd_clone > ../../source/gcc/omp-low.c:12410 > 0xacc652 execute > ../../source/gcc/omp-low.c:12443 > > In my understanding, the only gomp-4_0-branch-specific change that is a > candidate to cause this is r205214 (Ilya Tocar, commited by Kirill > Yukhin) for "LTO" streaming. As I couldn't easily tell what's wrong (all > changes from r205214 are still present; there were no obvious conflicts), > could you guys please have a look at that one? > Hi, Sorry for the delay, i was busy with AVX512. I finally had time to look into this bug. The problem in r205214 was in adding add_new_function hook in inline_generate_summary with -O0 -fopenmp and not removing it, before running expand_simd_clones. I've changed inline_free_summary to always remove hooks. Patch bellow. It bootstraps, passes make check, fixes declare-simd-1.C. Ok for gomp4 branch? --- gcc/ipa-inline-analysis.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index d4abd90..440ae79 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -4143,11 +4143,6 @@ void inline_free_summary (void) { struct cgraph_node *node; - if (!inline_edge_summary_vec.exists ()) - return; - FOR_EACH_DEFINED_FUNCTION (node) - if (!node->alias) - reset_inline_summary (node); if (function_insertion_hook_holder) cgraph_remove_function_insertion_hook (function_insertion_hook_holder); function_insertion_hook_holder = NULL; @@ -4162,6 +4157,11 @@ inline_free_summary (void) node_duplication_hook_holder = NULL; if (edge_duplication_hook_holder) cgraph_remove_edge_duplication_hook (edge_duplication_hook_holder); + if (!inline_edge_summary_vec.exists ()) + return; + FOR_EACH_DEFINED_FUNCTION (node) + if (!node->alias) + reset_inline_summary (node); edge_duplication_hook_holder = NULL; vec_free (inline_summary_vec); inline_edge_summary_vec.release ();