[all-commits] [llvm/llvm-project] 700fa2: [CodeGen] Improve speed of ComplexDeinterleaving pass

Shivam Gupta via All-commits all-commits at lists.llvm.org
Tue Aug 8 23:59:32 PDT 2023


  Branch: refs/heads/release/17.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 700fa26ccd9dd3a02f8c49d33656d44d118f2836
      https://github.com/llvm/llvm-project/commit/700fa26ccd9dd3a02f8c49d33656d44d118f2836
  Author: Igor Kirillov <igor.kirillov at arm.com>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp

  Log Message:
  -----------
  [CodeGen] Improve speed of ComplexDeinterleaving pass

Cache all results of running `identifyNode`, even those that do not identify
potential complex operations. This patch prevents ComplexDeinterleaving pass
from repeatedly trying to identify Nodes for the same pair of instructions.

Fixes https://github.com/llvm/llvm-project/issues/64379

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

(cherry picked from commit 46b2ad0224d3c9a9cc299211213e2cf677f5a78c)


  Commit: 25d8502b7802404c1544a99020def3e29e6cf96e
      https://github.com/llvm/llvm-project/commit/25d8502b7802404c1544a99020def3e29e6cf96e
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
    A llvm/test/MC/PowerPC/ppc32-tls.s

  Log Message:
  -----------
  [PPC32] Parse bl __tls_get_addr(x at tlsgd)@plt+32768

PPC32 -fpic/-fPIC generates `bl __tls_get_addr(x at tlsgd)@PLT` or
`bl __tls_get_addr(x at tlsgd)@PLT+32768`.
`powerpc-linux-gnu-gcc -fPIC` generates `bl __tls_get_addr+32668(x at tlsgd)@plt`.

These expressions can be parsed by GNU assembler but not by the integrated
assembler. Add the support.

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

(cherry picked from commit 6e07e90890d61b1be19d3f5fbf00ea7430068325)


  Commit: 7e666e9d605f589b149b5086d2fbd51b94a8be73
      https://github.com/llvm/llvm-project/commit/7e666e9d605f589b149b5086d2fbd51b94a8be73
  Author: Brian Cain <bcain at quicinc.com>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Hexagon.cpp
    M clang/test/Driver/hexagon-toolchain-linux.c

  Log Message:
  -----------
  [clang][hexagon] Handle library path arguments earlier

The removal of the early return in 96832a6bf7e0e7f1e8d634d38c44a1b32d512923
was an error: it would include the 'standalone' library that's not used
by linux.

Instead we reproduce the library path handling in the linux/musl block.

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

(cherry picked from commit 5bc4b34a3aa9c6ea10663a252ac46d20862b38d5)


  Commit: 63e39e8d31d72a5ad3df1f4a3ccab65502886ec5
      https://github.com/llvm/llvm-project/commit/63e39e8d31d72a5ad3df1f4a3ccab65502886ec5
  Author: Tom Stellard <tstellar at redhat.com>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M .github/workflows/release-tasks.yml

  Log Message:
  -----------
  workflows/release-tasks: Add missing sudo

(cherry picked from commit ffecb43c4812707be07a9810f21b7b407480f868)


  Commit: d93ba81b55909eecce360818020a539500bee28b
      https://github.com/llvm/llvm-project/commit/d93ba81b55909eecce360818020a539500bee28b
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M libcxx/utils/libcxx/test/params.py

  Log Message:
  -----------
  [libc++] Deflake the Clang Modules CI job

This re-introduces the workaround that had been introduced in d7ca140c0122
and then removed in 0c0628c92c0d, since it seems like it is needed after all.

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

(cherry picked from commit d2a61db072e90ca15a8e5bc053aab878af5cb92a)


  Commit: d92613ec779fd9137d8e9140e15aaf6e35a9481d
      https://github.com/llvm/llvm-project/commit/d92613ec779fd9137d8e9140e15aaf6e35a9481d
  Author: Steven Wu <stevenwu at apple.com>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    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
    R clang/test/Driver/loongarch-mtune-error.c
    R 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
    R llvm/test/CodeGen/LoongArch/cpus-invalid.ll
    R llvm/test/CodeGen/LoongArch/cpus.ll

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

This reverts commit c56514f21b2cf08eaa7ac3a57ba4ce403a9c8956. This
commit adds global state that is shared between clang driver and clang
cc1, which is not correct when clang is used with `-fno-integrated-cc1`
option (no integrated cc1). The -march and -mtune option needs to be
properly passed through cc1 command-line and stored in TargetInfo.

(cherry picked from commit 42c9354a928d4d9459504527085fccc91b46aed3)


  Commit: 2bc14f22b43979622beba2024c86bee9841fd2d2
      https://github.com/llvm/llvm-project/commit/2bc14f22b43979622beba2024c86bee9841fd2d2
  Author: Weining Lu <luweining at loongson.cn>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    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/Arch/LoongArch.h
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/test/Driver/loongarch-march-error.c
    M clang/test/Driver/loongarch-march.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:
  -----------
  [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.

Two preprocessor macros are defined based on user-provided `-march=`
and `-mtune=` options and the defaults.
- __loongarch_arch
- __loongarch_tune
Note that, to work with `-fno-integrated-cc1` we leverage cc1 options
`-target-cpu` and `-tune-cpu` to pass driver options `-march=` and
`-mtune=` respectively because cc1 needs these information to define
macros in `LoongArchTargetInfo::getTargetDefines`.

[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, steven_wu, MaskRay

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

(cherry picked from commit f62c9252fc0f1fa0a0f02033659db052c2202a4c)


  Commit: ba26cc49672a7d20b65e7986edab171320887910
      https://github.com/llvm/llvm-project/commit/ba26cc49672a7d20b65e7986edab171320887910
  Author: DianQK <dianqk at dianqk.net>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M llvm/test/Transforms/TailCallElim/tre-byval-parameter-2.ll
    M llvm/test/Transforms/TailCallElim/tre-byval-parameter.ll

  Log Message:
  -----------
  [TailCallElim] Regenerate test checks with --function-signature (NFC)

For checking the readonly attribute.

Pre-commit test for D156793.

Reviewed By: nikic

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

(cherry picked from commit b77e5563f6bc4b5a81d427bf0f42ebea8ca376f0)


  Commit: 3a2aea99a4ec429a2ae634aa9c0f30b5208e690d
      https://github.com/llvm/llvm-project/commit/3a2aea99a4ec429a2ae634aa9c0f30b5208e690d
  Author: DianQK <dianqk at dianqk.net>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
    A llvm/test/Transforms/PhaseOrdering/pr64289-tce.ll
    M llvm/test/Transforms/TailCallElim/tre-byval-parameter-2.ll
    M llvm/test/Transforms/TailCallElim/tre-byval-parameter.ll

  Log Message:
  -----------
  [TailCallElim] Remove the readonly attribute of byval.

When eliminating a tail call, we modify the values of the arguments.
Therefore, if the byval parameter has a readonly attribute, we have to remove it. It is safe because,
from the perspective of a caller, the byval parameter is always treated as "readonly," even if the readonly attribute is removed.

Fixes #64289.

Reviewed By: nikic

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

(cherry picked from commit c3f227ead65c606409ff8cc3333a6c751f156a9c)


  Commit: 6bff1eb9b0994ce2152c2f0a9f7ea62f18b0204b
      https://github.com/llvm/llvm-project/commit/6bff1eb9b0994ce2152c2f0a9f7ea62f18b0204b
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M libcxx/include/__type_traits/remove_cv.h
    M libcxx/include/__type_traits/remove_cvref.h
    M libunwind/src/CMakeLists.txt

  Log Message:
  -----------
  [libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++

These are changes to allow GCC 13 to successfully compile the runtimes stack.

Reviewed By: ldionne, #libc, #libunwind, MaskRay

Spies: MaskRay, zibi, SeanP, power-llvm-team, mstorsjo, arichardson, libcxx-commits

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

(cherry picked from commit 3537338d1ab9b6da4b58499877953deb81c59e5e)


  Commit: a93ca35a44948ce2376c5940c40e7e01a502696f
      https://github.com/llvm/llvm-project/commit/a93ca35a44948ce2376c5940c40e7e01a502696f
  Author: Shivam Gupta <shivam98.tkg at gmail.com>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/C/drs/dr4xx.c
    M clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp
    M clang/test/Parser/cxx2a-concept-declaration.cpp
    M clang/test/Sema/exprs.c
    M clang/test/SemaCXX/expressions.cpp
    M clang/test/SemaCXX/warn-unsequenced.cpp
    M clang/test/SemaTemplate/dependent-expr.cpp

  Log Message:
  -----------
  Revert "[Clang] Fix -Wconstant-logical-operand when LHS is a constant"

This reverts commit dfdfd306cfaf54fbc43e2d5eb36489dac3eb9976.

An issue is reported for wrong warning, this has to be reconsidered.

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


Compare: https://github.com/llvm/llvm-project/compare/f8468c316fbe...a93ca35a4494


More information about the All-commits mailing list