From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 111F33858D28 for ; Mon, 30 Oct 2023 21:22:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 111F33858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 111F33858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::134 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698700958; cv=none; b=O3mAay4emaafvYSqJDLS2owhvM1Qo0ntrLmEm9jlIrPWsje8cf4+VPWL2UWGeA7xIeXv95rNQ4FneoAVGAcO5VY07EvgYD8NobCqjK92kEKJ9OpxxV2Ih1gzTxNZDlzOQB2mzZcY2/HCsXBfqnPX/DscU8lmhLTLp9m9rKAvfcU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698700958; c=relaxed/simple; bh=lfYFmdftx1htwYABJLJ5zPNe0BbAe1wpk34D7KEXhvI=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=xNmPLm9CedJwIKy7YM3/GqOqCrCi4yTMw70FSBl1u0lCJFD2x+ulok6QjVQ9wGYEAmrj3LkQev+pbpb3X0v1fDabTtxUBHZ9sZ4735glYj9MaZ/YVWsFtJ6cRlVG4DOpa7jOiB0jJsKPugsSy6dazGr584lqJuhsBTCIZWWMCJk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-507975d34e8so7185259e87.1 for ; Mon, 30 Oct 2023 14:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698700955; x=1699305755; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=51U3VG3Il/0WUV5tLMQwyfKsUs5sENaXbHv1GKNCLdI=; b=EoXj7TvQMZavsaNkLiXyGkBEai4AmhPKDu+/g9IKCs0dKXsm+IFdAMIIbDo7xSyWy+ JRateLS/ojnIT+FBDb3ctVXaVUnUaavLXlFBmrb0631213v5mCuBVGm96OFIuWUaUeI+ j5S/w58ooo1sZ1WHA+Xr2SPDLKLNxVaIj4GTRsmtDbYXBCd41utCm7ddr4kVhr38LigJ u78sHWcC7768oJ7I7S97JEZdEVyqT1M0jnp6PL4ztsBqhf2XOylkrCGs5z55/2eb2uWt 34I+jvjkZAQgF7QMAQkeI+tNPF7J44MJj+bxUobF5XnSMVyVe5LcxJzXQgZEG8PwsrVX eyew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698700955; x=1699305755; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=51U3VG3Il/0WUV5tLMQwyfKsUs5sENaXbHv1GKNCLdI=; b=N9wtZ/Riz8UmIkH7zX8T19tHzVDs4HQ3c9s+ENlvLOT60/JHRKkS0qTarZDqGP5Qk9 E3B/a+NIMfGIZyMoUTqEX43xZ5xJzgXEmdjp1DIAeFYEvAGhAfC7wm5Ph6GZLpQA99xA qm4NRWg2Y1yOUUQlRlcICyaUWi4MIJcOzByNnRhPUfwTDuvCn1UbXwWx9GS6pCnwJ4Fb ukE9fT9j7zIVT5e6cpxzm+qKUb3dIfjaVzkr0Z6PO+USDLZItxEoiXORISDK2/FlyOmA MC1NsypzgrsPWQ2//xJOGtRhE4xMJBrWxSZ+I2yzVd9uzSAs/HOWqCtlFe1C9CIfd/DA XbFQ== X-Gm-Message-State: AOJu0YwhurvnY+QLGtb6QXhkNCUv4rdHzXuvaUr+ZxLK9VddurnPsMg0 1HDrQ5x6EEA1y4m1GaDJP2TziNQOOHkrBGuuh8U= X-Google-Smtp-Source: AGHT+IGRW8cdwFqT3rrmsgE2uSQTY8phP/6wuMs/uBhRi7Q12SmxflCodRGpswk7sX4i9x7Hyf97Y58lsXmmYHrPEoM= X-Received: by 2002:a05:6512:1110:b0:507:9608:4a87 with SMTP id l16-20020a056512111000b0050796084a87mr8470707lfg.56.1698700955150; Mon, 30 Oct 2023 14:22:35 -0700 (PDT) MIME-Version: 1.0 References: <20231025064345.5117-1-mayshao-oc@zhaoxin.com> <38693f24f5eb4d80a0982bd7975f5cea@zhaoxin.com> In-Reply-To: <38693f24f5eb4d80a0982bd7975f5cea@zhaoxin.com> From: Uros Bizjak Date: Mon, 30 Oct 2023 22:22:23 +0100 Message-ID: Subject: Re: [PATCH] [x86_64]: Zhaoxin yongfeng enablement To: Mayshao-oc Cc: "hubicka@ucw.cz" , "Louis Qi(BJ-RD)" , "Hawk Wang(BJ-RD)" , "Xiangjie Hong(BJ-RD)" , "Silvia Zhao(BJ-RD)" , "Tim Hu(WH-RD)" , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Oct 30, 2023 at 10:08=E2=80=AFAM Mayshao-oc wrote: > > >On Fri, Oct 27, 2023 at 12:20=E2=80=AFPM mayshao wrote: > >> > >> On 2023/10/26 17:34, Uros Bizjak wrote: > >> > On Wed, Oct 25, 2023 at 8:43=E2=80=AFAM mayshao wrote: > >> >> > >> >> Hi all: > >> >> This patch enables -march/-mtune=3Dyongfeng, costs and tunings= are set according to the characteristics of the processor. We add a new md= file to describe yongfeng processor. > >> >> > >> >> Bootstrapped /regtested X86_64. > >> >> > >> >> Ok for trunk? > >> >> BR > >> >> Mayshao > >> >> gcc/ChangeLog: > >> >> > >> >> * common/config/i386/cpuinfo.h (get_zhaoxin_cpu): Recogniz= e yongfeng. > >> >> * common/config/i386/i386-common.cc: Add yongfeng. > >> >> * common/config/i386/i386-cpuinfo.h (enum processor_subtyp= es): Add ZHAOXIN_FAM7H_YONGFENG. > >> >> * config.gcc: Add yongfeng. > >> >> * config/i386/driver-i386.cc (host_detect_local_cpu): Let = -march=3Dnative > >> >> recognize yongfeng processors. > >> >> * config/i386/i386-c.cc (ix86_target_macros_internal): Add= yongfeng. > >> >> * config/i386/i386-options.cc (m_YONGFENG): New definition= . > >> >> (m_ZHAOXIN): Ditto. > >> >> * config/i386/i386.h (enum processor_type): Add PROCESSOR_= YONGFENG. > >> >> * config/i386/i386.md: Add yongfeng. > >> >> * config/i386/lujiazui.md: Fix typo. > >> >> * config/i386/x86-tune-costs.h (struct processor_costs): A= dd yongfeng costs. > >> >> * config/i386/x86-tune-sched.cc (ix86_issue_rate): Add yon= gfeng. > >> >> (ix86_adjust_cost): Ditto. > >> >> * config/i386/x86-tune.def (X86_TUNE_SCHEDULE): Replace m_= LUJIAZUI by m_ZHAOXIN. > >> >> (X86_TUNE_PARTIAL_REG_DEPENDENCY): Ditto. > >> >> (X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY): Ditto. > >> >> (X86_TUNE_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY): Ditto. > >> >> (X86_TUNE_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY): Ditto. > >> >> (X86_TUNE_MOVX): Ditto. > >> >> (X86_TUNE_MEMORY_MISMATCH_STALL): Ditto. > >> >> (X86_TUNE_FUSE_CMP_AND_BRANCH_32): Ditto. > >> >> (X86_TUNE_FUSE_CMP_AND_BRANCH_64): Ditto. > >> >> (X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS): Ditto. > >> >> (X86_TUNE_FUSE_ALU_AND_BRANCH): Ditto. > >> >> (X86_TUNE_ACCUMULATE_OUTGOING_ARGS): Ditto. > >> >> (X86_TUNE_USE_LEAVE): Ditto. > >> >> (X86_TUNE_PUSH_MEMORY): Ditto. > >> >> (X86_TUNE_LCP_STALL): Ditto. > >> >> (X86_TUNE_INTEGER_DFMODE_MOVES): Ditto. > >> >> (X86_TUNE_OPT_AGU): Ditto. > >> >> (X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB): Ditto. > >> >> (X86_TUNE_MISALIGNED_MOVE_STRING_PRO_EPILOGUES): Ditto. > >> >> (X86_TUNE_USE_SAHF): Ditto. > >> >> (X86_TUNE_USE_BT): Ditto. > >> >> (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI): Ditto. > >> >> (X86_TUNE_ONE_IF_CONV_INSN): Ditto. > >> >> (X86_TUNE_AVOID_MFENCE): Ditto. > >> >> (X86_TUNE_EXPAND_ABS): Ditto. > >> >> (X86_TUNE_USE_SIMODE_FIOP): Ditto. > >> >> (X86_TUNE_USE_FFREEP): Ditto. > >> >> (X86_TUNE_EXT_80387_CONSTANTS): Ditto. > >> >> (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL): Ditto. > >> >> (X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Ditto. > >> >> (X86_TUNE_SSE_TYPELESS_STORES): Ditto. > >> >> (X86_TUNE_SSE_LOAD0_BY_PXOR): Ditto. > >> >> (X86_TUNE_USE_GATHER_2PARTS): Add m_YONGFENG. > >> >> (X86_TUNE_USE_GATHER_4PARTS): Ditto. > >> >> (X86_TUNE_USE_GATHER_8PARTS): Ditto. > >> >> (X86_TUNE_AVOID_128FMA_CHAINS): Ditto. > >> >> * doc/extend.texi: Add details about yongfeng. > >> >> * doc/invoke.texi: Ditto. > >> >> * config/i386/yongfeng.md: New file for decribing yongfeng= processor. > >> >> > >> >> gcc/testsuite/ChangeLog: > >> >> > >> >> * g++.target/i386/mv32.C: Handle new march. > >> >> * gcc.target/i386/funcspec-56.inc: Ditto. > >> > > >> > LGTM. > >> > > >> > There are a couple of comments that needs to be fixed, please see in= line. > >> > > >> > BTW: A couple of days ago, I have added a new tunung flag [1]. I > >> > considered Zhaoxin cores a modern core, but please review the new > >> > flag anyway. > >> > > >> > [1] > >> > https://gcc.gnu.org/pipermail/gcc-patches/2023-October/634280.html > >> > > >> > Thanks, > >> > Uros. > >> > > >> Hi Uros: > >> Thanks for your review. I have fix the errors that you comment, > >> please review the attached patch again. > >> I have review the new tuning flag[1]. When a write of 64 bits > >> or less is followed by a read of a smaller size which is fully > >> contained in the write address range, regardless of alignement, > >> Zhaoxin processors will do store forwarding. > > > >The patch is OK. > > > >Thanks, > >Uros. > > Thanks for your review, please help me commit. Committed as r14-5021 [1]. [1] https://gcc.gnu.org/pipermail/gcc-cvs/2023-October/391980.html Uros.