From patchwork Fri Jan 17 17:18:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 312155 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 3A8E12C0082 for ; Sat, 18 Jan 2014 04:18:25 +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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=Dy8d59iYtj2kC7I+35 EsSSDDDSeRYe8zMxAArdsHcumEyj4eeyG5vYllvef39ueL2pWq1zaxJbmzStEU82 XeP1ny4oCfMd285cMEbFOQhiSKhLiT0mPIzCZ1XZit9uLz0Hm3oQYeqcPot78nQ2 K/hi07t2aKvKeVuf+NIT1q/FE= 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=uMJAOpcX9PQYV7mZ9qldN5I6 Wqk=; b=Qs3vJ35J6SsAzyu+zTsVlgVzVfz1itXwsKUV+Bus/hYPj2apMPRVR0Ae HShPTHS2LbwCSzVQgIg3pKOG9Z844xKt8uvaxVjSzRRbfa0uB/cSPlZkPYg5VeAM rlrBEW339StGS1MIOae3vwsS8Ag+t+FfxR628SKpRlF34lSb/po= Received: (qmail 9337 invoked by alias); 17 Jan 2014 17:18:18 -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 9328 invoked by uid 89); 17 Jan 2014 17:18:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f170.google.com Received: from mail-ob0-f170.google.com (HELO mail-ob0-f170.google.com) (209.85.214.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 17 Jan 2014 17:18:17 +0000 Received: by mail-ob0-f170.google.com with SMTP id va2so976169obc.29 for ; Fri, 17 Jan 2014 09:18:15 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.119.70 with SMTP id ks6mr2468685oeb.45.1389979095488; Fri, 17 Jan 2014 09:18:15 -0800 (PST) Received: by 10.76.105.174 with HTTP; Fri, 17 Jan 2014 09:18:15 -0800 (PST) In-Reply-To: References: <20140117141937.GA1174@intel.com> Date: Fri, 17 Jan 2014 09:18:15 -0800 Message-ID: Subject: Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR From: "H.J. Lu" To: Uros Bizjak Cc: "gcc-patches@gcc.gnu.org" X-IsSubscribed: yes On Fri, Jan 17, 2014 at 7:11 AM, Uros Bizjak wrote: > BTW: There are some ix86_tune == XXX conditions scattered throughout > LEA handling code. Can these be substituted with appropriate TARGET_* > defines? > > Uros. This is the patch I checked in. Thanks. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index df6e491..4af6ef1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2014-01-17 H.J. Lu + * config/i386/i386.c (ix86_lea_outperforms): Use TARGET_XXX. + (ix86_adjust_cost): Use !TARGET_XXX. + (do_reorder_for_imul): Likewise. + (swap_top_of_ready_list): Likewise. + (ix86_sched_reorder): Likewise. + +2014-01-17 H.J. Lu + * config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_INTEL. Treat like PROCESSOR_GENERIC. * config/i386/i386.c (intel_memcpy): New. Duplicate slm_memcpy. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 8993331..7bfad8f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -18020,7 +18020,7 @@ ix86_lea_outperforms (rtx insn, unsigned int regno0, unsigned int regno1, /* For Silvermont if using a 2-source or 3-source LEA for non-destructive destination purposes, or due to wanting ability to use SCALE, the use of LEA is justified. */ - if (ix86_tune == PROCESSOR_SILVERMONT || ix86_tune == PROCESSOR_INTEL) + if (TARGET_SILVERMONT || TARGET_INTEL) { if (has_scale)