From: Uros Bizjak <ubizjak@gmail.com>
To: mayshao <mayshao-oc@zhaoxin.com>
Cc: hubicka@ucw.cz, louisqi@zhaoxin.com, hawkwang@zhaoxin.com,
xiangjiehong@zhaoxin.com, silviazhao@zhaoxin.com,
timhu@zhaoxin.com, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] [x86_64]: Zhaoxin yongfeng enablement
Date: Fri, 27 Oct 2023 13:40:33 +0200 [thread overview]
Message-ID: <CAFULd4YRrtfAKb2wccpz3XA08eag_NbyGkPOPkQFHUXCOS0v-A@mail.gmail.com> (raw)
In-Reply-To: <f1803b75-72bd-4afa-94dc-4ffacc1a39f3@zhaoxin.com>
On Fri, Oct 27, 2023 at 12:20 PM mayshao <mayshao-oc@zhaoxin.com> wrote:
>
> On 2023/10/26 17:34, Uros Bizjak wrote:
> > On Wed, Oct 25, 2023 at 8:43 AM mayshao <mayshao-oc@zhaoxin.com> wrote:
> >>
> >> Hi all:
> >> This patch enables -march/-mtune=yongfeng, 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): Recognize yongfeng.
> >> * common/config/i386/i386-common.cc: Add yongfeng.
> >> * common/config/i386/i386-cpuinfo.h (enum processor_subtypes): Add ZHAOXIN_FAM7H_YONGFENG.
> >> * config.gcc: Add yongfeng.
> >> * config/i386/driver-i386.cc (host_detect_local_cpu): Let -march=native
> >> 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): Add yongfeng costs.
> >> * config/i386/x86-tune-sched.cc (ix86_issue_rate): Add yongfeng.
> >> (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 inline.
> >
> > 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.
next prev parent reply other threads:[~2023-10-27 11:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 6:43 mayshao
2023-10-26 9:34 ` Uros Bizjak
2023-10-27 10:19 ` mayshao
2023-10-27 11:40 ` Uros Bizjak [this message]
2023-10-30 9:08 ` Mayshao-oc
2023-10-30 21:22 ` Uros Bizjak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFULd4YRrtfAKb2wccpz3XA08eag_NbyGkPOPkQFHUXCOS0v-A@mail.gmail.com \
--to=ubizjak@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hawkwang@zhaoxin.com \
--cc=hubicka@ucw.cz \
--cc=louisqi@zhaoxin.com \
--cc=mayshao-oc@zhaoxin.com \
--cc=silviazhao@zhaoxin.com \
--cc=timhu@zhaoxin.com \
--cc=xiangjiehong@zhaoxin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).