On Thu, Oct 13, 2022 at 5:33 PM Joshi, Tejas Sanjay
<tejassanjay.jo...@amd.com> wrote:
>
> [Public]
>
> Hi all,
>
> PFA, the patch that enables support for the next generation AMD Zen4 CPU via 
> -march=znver4.
> This is a basic enablement patch and as of now the costings, tunings are kept 
> same as znver3.
>
> Good for trunk?

2022-09-28  Tejas Joshi <tejassanjay.jo...@amd.com>

gcc/ChangeLog:

    * common/config/i386/cpuinfo.h (get_amd_cpu): Recognize znver4.
    * common/config/i386/i386-common.cc (processor_names): Add znver4.
    (processor_alias_table): Add znver4 and modularize old znvers.
    * common/config/i386/i386-cpuinfo.h (processor_subtypes):
    AMDFAM19H_ZNVER4.
    * config.gcc (x86_64-*-* |...): Likewise.
    * config/i386/driver-i386.cc (host_detect_local_cpu): Let
    -march=native recognize znver4 cpus.
    * config/i386/i386-c.cc (ix86_target_macros_internal): Add znver4.
    * config/i386/i386-options.cc (m_ZNVER4): New definition.
    (m_ZNVER): Include m_ZNVER4.
    (processor_cost_table): Add znver4.
    * config/i386/i386.cc (ix86_reassociation_width): Likewise.
    * gcc/config/i386/i386.h (processor_type): Add PROCESSOR_ZNVER4.
    (PTA_ZNVER1): New definition.
    (PTA_ZNVER2): Likewise.
    (PTA_ZNVER3): Likewise.
    (PTA_ZNVER4): Likewise.
    * config/i386/i386.md (define_attr "cpu"): Add znver4.
    * config/i386/x86-tune-costs.h (znver4_cost): New definition.
    * config/i386/x86-tune-sched.cc (ix86_issue_rate): Add znver4.
    (ix86_adjust_cost): Likewise.
    * config/i386/znver1.md: Add new reservations for znver4.
    * doc/extend.texi: Add details about znver4.
    * doc/invoke.texi: Likewise.

gcc/testsuite/ChangeLog:

    * gcc.target/i386/funcspec-56.inc: Handle new march.
    * g++.target/i386/mv29.C: Likewise.

Although I didn't check all the details of the new scheduler model,
the patch LGTM for mainline.

BTW: Perhaps znver1.md is not the right filename anymore, since it
hosts all four Zen schedulers.

Thanks,
Uros.

Reply via email to