[all-commits] [llvm/llvm-project] ce53e9: Reland "[LoongArch] Support -march=native and -mtu...

Jacek Caban via All-commits all-commits at lists.llvm.org
Wed Jul 26 10:28:53 PDT 2023


  Branch: refs/heads/release/17.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ce53e91738036d4ed3ff4b060c64e712610cf0a4
      https://github.com/llvm/llvm-project/commit/ce53e91738036d4ed3ff4b060c64e712610cf0a4
  Author: Weining Lu <luweining at loongson.cn>
  Date:   2023-07-26 (Wed, 26 Jul 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Basic/Targets/LoongArch.cpp
    M clang/lib/Basic/Targets/LoongArch.h
    M clang/lib/Driver/ToolChains/Arch/LoongArch.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    A clang/test/Driver/loongarch-mtune-error.c
    A clang/test/Driver/loongarch-mtune.c
    M clang/test/Preprocessor/init-loongarch.c
    M llvm/include/llvm/TargetParser/LoongArchTargetParser.h
    M llvm/lib/Target/LoongArch/LoongArch.td
    M llvm/lib/TargetParser/LoongArchTargetParser.cpp
    A llvm/test/CodeGen/LoongArch/cpus-invalid.ll
    A llvm/test/CodeGen/LoongArch/cpus.ll

  Log Message:
  -----------
  Reland "[LoongArch] Support -march=native and -mtune="

As described in [1][2], `-mtune=` is used to select the type of target
microarchitecture, defaults to the value of `-march`. The set of
possible values should be a superset of `-march` values. Currently
possible values of `-march=` and `-mtune=` are `native`, `loongarch64`
and `la464`.

D136146 has supported `-march={loongarch64,la464}` and this patch adds
support for `-march=native` and `-mtune=`.

A new ProcessorModel called `loongarch64` is defined in LoongArch.td
to support `-mtune=loongarch64`.

`llvm::sys::getHostCPUName()` returns `generic` on unknown or future
LoongArch CPUs, e.g. the not yet added `la664`, leading to
`llvm::LoongArch::isValidArchName()` failing to parse the arch name.
In this case, use `loongarch64` as the default arch name for 64-bit
CPUs.

And these two preprocessor macros are defined:
- __loongarch_arch
- __loongarch_tune

[1]: https://github.com/loongson/LoongArch-Documentation/blob/2023.04.20/docs/LoongArch-toolchain-conventions-EN.adoc
[2]: https://github.com/loongson/la-softdev-convention/blob/v0.1/la-softdev-convention.adoc

Reviewed By: xen0n, wangleiat

Differential Revision: https://reviews.llvm.org/D155824


  Commit: 7e68c9e5c27182b867c1602a1095395089d3039c
      https://github.com/llvm/llvm-project/commit/7e68c9e5c27182b867c1602a1095395089d3039c
  Author: Michael Halkenhaeuser <MichaelGerald.Halkenhauser at amd.com>
  Date:   2023-07-26 (Wed, 26 Jul 2023)

  Changed paths:
    M openmp/libomptarget/include/OmptCallback.h
    M openmp/libomptarget/src/OmptCallback.cpp
    M openmp/libomptarget/src/OmptInterface.h
    M openmp/libomptarget/src/device.cpp
    M openmp/libomptarget/src/interface.cpp
    M openmp/libomptarget/src/omptarget.cpp
    M openmp/libomptarget/test/ompt/veccopy.c
    M openmp/libomptarget/test/ompt/veccopy_disallow_both.c
    M openmp/libomptarget/test/ompt/veccopy_emi.c
    M openmp/libomptarget/test/ompt/veccopy_emi_map.c
    M openmp/libomptarget/test/ompt/veccopy_map.c
    M openmp/libomptarget/test/ompt/veccopy_no_device_init.c
    M openmp/libomptarget/test/ompt/veccopy_wrong_return.c
    M openmp/runtime/src/ompt-event-specific.h

  Log Message:
  -----------
  [OpenMP] [OMPT] [7/8] Invoke tool-supplied callbacks before and after target launch and data transfer operations

Implemented RAII objects, initialized at target entry points, that
invoke tool-supplied callbacks. Updated status of target callbacks as
implemented.

Depends on D127365

Patch from John Mellor-Crummey <johnmc at rice.edu>
With contributions from:
Dhruva Chakrabarti <Dhruva.Chakrabarti at amd.com>
Jan-Patrick Lehr <janpatrick.lehr at amd.com>

Reviewed By: jdoerfert, dhruvachak, jplehr

Differential Revision: https://reviews.llvm.org/D127367

(cherry picked from commit 1dec417ac4a533e40f637cd1a7f0628803d9e634)


  Commit: 6ce6dcf233ead31f1776a57a3dc80f722cfe2864
      https://github.com/llvm/llvm-project/commit/6ce6dcf233ead31f1776a57a3dc80f722cfe2864
  Author: esmeyi <esme.yi at ibm.com>
  Date:   2023-07-26 (Wed, 26 Jul 2023)

  Changed paths:
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    A llvm/test/CodeGen/PowerPC/aix-available-externally-linkage-fun.ll

  Log Message:
  -----------
  [XCOFF] Enable available_externally linkage for functions.

Summary: D80642 added support for emitting AvailableExternally Linkage on AIX. However, an assertion of "Trying to get csect representation of this symbol but none was set." occurred when a function is declared as available_externally. This is due to we missing to generate a csect for the function. This patch fixes it.

Reviewed By: hubert.reinterpretcast, shchenz

Differential Revision: https://reviews.llvm.org/D156213

Signed-off-by: Esme Yi <esme.yi at ibm.com>
(cherry picked from commit e83b8a5e711a663c44e80965da5c747e08dea497)


  Commit: 397390a65b8dc50a7bca560b2caa4b99935a03f3
      https://github.com/llvm/llvm-project/commit/397390a65b8dc50a7bca560b2caa4b99935a03f3
  Author: Jacek Caban <jacek at codeweavers.com>
  Date:   2023-07-26 (Wed, 26 Jul 2023)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h

  Log Message:
  -----------
  [lldb] Treat ARM64X images as ARM64.

With D149091, ARM64X binaries are no longer reported as ARM64. This broke
lldb tests as Windows 11 system DLLs are mostly ARM64X binaries and lldb
doesn't know how to handle them. Ideally lldb would understand a bit more
about ARM64X and handle them as AMD64 in x64 processes, but this is
enough to preserve previous behavior and fix tests.

Reviewed By: mstorsjo
Differential Revision: https://reviews.llvm.org/D156268

(cherry picked from commit 48feef277a24b1b9c0ff33267a91e70d9584012e)


Compare: https://github.com/llvm/llvm-project/compare/d0b54bb50e51...397390a65b8d


More information about the All-commits mailing list