From patchwork Wed Jan 13 13:11:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuri Rumyantsev X-Patchwork-Id: 566913 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 95CA114076E for ; Thu, 14 Jan 2016 00:11:30 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=lCEBou5Z; 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=a+RLKwBxetjacCdgb/ H5CwTskUe02r/xGX01bhMYo9ZuYsvrJ+X1pXZuCadjmYLvOHoGMHmjdS4sQiXMTz ynL+YM2Nnex8BfIbT/KUYa/m+cWMHqJV7fOEdLRjh5roReAU9ST259bvosJF1E4x 0sKstOoBbbD0uubgeMwQpAuTg= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=jLbaEgamds6Q+b8EA5h3dw8d /fU=; b=lCEBou5ZLoW76WExYhgAwgBXnlJvjM+ld4tqt3H17DNgQJ1S847xHL4S w/5MW49736ySJqk+YUTy6eHZgbLP4ufljTs2eQ+5JoDai5v2LburOfW+yXK5k8YG N2/qrmN0B6T2f9BKCRYYjm/rYUkMKS6R2FllonVUuxn1IYxcnY4= Received: (qmail 65214 invoked by alias); 13 Jan 2016 13:11:22 -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 65189 invoked by uid 89); 13 Jan 2016 13:11:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1723, sk:cond_mo, chanes, excluded X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-ob0-f180.google.com Received: from mail-ob0-f180.google.com (HELO mail-ob0-f180.google.com) (209.85.214.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 13 Jan 2016 13:11:20 +0000 Received: by mail-ob0-f180.google.com with SMTP id ba1so464030156obb.3; Wed, 13 Jan 2016 05:11:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=TjEw52AydhZaxukosBtXVUB4eY88Ej4C5Gz433zVEoE=; b=eL/VLwifArbjcDq2sZbkx+Pw2dscTbjfB72/XZZnwxNp0XrBgS31yvdTNPocFcDpbP lbeUJUWkzzEFeTV1mYTjrTHi2D7lrFI18LKzl75VhSS5k/co0qwLE1BWpQMSXhFFEfvD wwZMjReIBEwthsydlTHzOCftX6p5t17K0NwjwJV4U5h2af3WduO6sIfGWAo/Y29CJeG9 3/Sg7Z5aNBgKnj7QT/34odRImQ7zKM+84KT0EKMJ1Gl+Fv/4I7x1LD0X1LHfP6OP7SE6 LVZDAU7+sIDIQLgneyu8/nStWQa3kz5LR0IP4uq9WNutULgrEbYm1L2S+sExz+tQa2AQ qy6g== X-Gm-Message-State: ALoCoQmGGBvw9O9ZyKnzKNC81Nvc/FzJ0qF7bZaZqrTPsjNotAmBfhPTHxSZZ5aAOcaFuxq5rBYdTVTsNjE5BBp3Jo/PuwOGZA== MIME-Version: 1.0 X-Received: by 10.182.19.131 with SMTP id f3mr106986459obe.26.1452690678326; Wed, 13 Jan 2016 05:11:18 -0800 (PST) Received: by 10.202.177.9 with HTTP; Wed, 13 Jan 2016 05:11:18 -0800 (PST) In-Reply-To: <5695ADCC.2050908@redhat.com> References: <1450446761-5209-1-git-send-email-james.greenhalgh@arm.com> <20151218141930.GA32190@arm.com> <5695ADCC.2050908@redhat.com> Date: Wed, 13 Jan 2016 16:11:18 +0300 Message-ID: Subject: Re: [Patch ifcvt] Add a new parameter to limit if-conversion From: Yuri Rumyantsev To: Bernd Schmidt Cc: Andreas Schwab , James Greenhalgh , gcc-patches , nd@arm.com, Igor Zamyatin , jakub@gcc.gnu.org, Uros Bizjak , Richard Biener Hi Bernd, Here is updated patch as your proposed to avoid regression on ia64. Bootstarp and regression testing on x86_64 did not show any new failures. Is it OK for trunk? Thanks. ChangeLog: 2016-01-13 Yuri Rumyantsev PR rtl-optimization/68920 * ifcvt.c (cond_move_process_if_block): Limit number of conditional moves. 2016-01-13 4:52 GMT+03:00 Bernd Schmidt : > On 01/12/2016 04:41 PM, Yuri Rumyantsev wrote: >> >> Here is a simple fix to exclude dg/ifcvt-5.c test from ia64 testing. >> >> Is it OK for trunk? > > > Please ensure patches are attached as plain text so that reviewers don't > have to save them to be able to read them. > > It looks like ia64 is making chanes in cond_move_process_if_block. Maybe > that function needs to take the param into account so we don't have to keep > adding excluded targets to the testcase? > > > Bernd > diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 189d60f..ef6fa69 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -3730,6 +3730,7 @@ cond_move_process_if_block (struct noce_if_info *if_info) vec else_regs = vNULL; unsigned int i; int success_p = FALSE; + int limit = PARAM_VALUE (PARAM_MAX_RTL_IF_CONVERSION_INSNS); /* Build a mapping for each block to the value used for each register. */ @@ -3779,7 +3780,8 @@ cond_move_process_if_block (struct noce_if_info *if_info) is the number of assignments currently made in only one of the branches, since if we convert we are going to always execute them. */ - if (c > MAX_CONDITIONAL_EXECUTE) + if (c > MAX_CONDITIONAL_EXECUTE + || c > limit) goto done; /* Try to emit the conditional moves. First do the then block,