[all-commits] [llvm/llvm-project] b9cd65: Revert "[clang] Pass FoundDecl to DeclRefExpr crea...

Joseph Huber via All-commits all-commits at lists.llvm.org
Thu Aug 11 00:09:52 PDT 2022

  Branch: refs/heads/release/15.x
  Home:   https://github.com/llvm/llvm-project
  Commit: b9cd65ff2e04ea3e712a2deba27e65526e9abed6
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2022-08-11 (Thu, 11 Aug 2022)

  Changed paths:
    M clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/test/AST/ast-dump-overloaded-operators.cpp
    M clang/test/Index/annotate-operator-call-expr.cpp
    M clang/test/Index/cursor-ref-names.cpp
    M clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp

  Log Message:
  Revert "[clang] Pass FoundDecl to DeclRefExpr creator for operator overloads"

This reverts commit 4e94f6653150511de434fa7e29b684ae7f0e52b6.
See https://reviews.llvm.org/D129973#3698969 for reasoning.

(cherry picked from commit df48e3fbcc8be1f4c04bd97517d12e662f54de75)

  Commit: 22dcfb4f16bd39962519c7c3415b2806e9f25ba1
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-08-11 (Thu, 11 Aug 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
    M llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll
    M llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll

  Log Message:
  [RISCVInsertVSETVLI] Remove an unsound optimization

This fixes a bug reported privately by @craig.topper. Here's an example which illustrates the problem:

vsetivli a1, a0, e32, m1, ta, mu # both DefInfo and PrevInfo
vsetivli a2, a1, e32, m4, ta, mu

With the unsound result being:

vsetivli a1, a0, e32, m1, ta, mu
vsetivli a2, a0, e32, m4, ta, mu

Consider the case where this is running on a machine with VLEN=512,. For this case, the VLMAXs are 16 and 64 respectively.

Consider for a0 = 33. The correct result is: a1 = 16, and a2 = 16

After the unsound optimization: a1 = 16 and a2 = 33

This particular example used VLMAXs which differed by more than a power of two. With a difference of only one power of two, there's another form of this bug which involves the AVL < 2 x VLMAX special case, but that ones more complicated to construct as many examples turn out accidentally sound.

This patch takes the approach of simply removing the unsound optimization, but there are multiple sound sub-cases of it. I plan to return to at least a couple of them, but figured it was cleaner to remove the unsound optimization (for ease of backporting), and then review the new optimizations on their own.

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

(cherry picked from commit 9a9848f4b95895ad97d3dc117f0a94773dc1607f)

  Commit: a8d4cf1a0775a7dc1cefc694d9777cb3c7b7bd5f
  Author: YingChi Long <me at inclyc.cn>
  Date:   2022-08-11 (Thu, 11 Aug 2022)

  Changed paths:
    M clang/lib/AST/APValue.cpp
    A clang/test/SemaCXX/try-print-as-string-literal-type-check.cpp

  Log Message:
  [clang] add APValue type check in `TryPrintAsStringLiteral`

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

https://reviews.llvm.org/D115031 improved printing of non-type template
parameter args. But checking if the end of Inits is 0 without checking
if APValue is an integer, causes clang to segfault. This patch adds
the code to check the type. (May not be a proper bugfix.)

Reviewed By: aaron.ballman, lichray

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

(cherry picked from commit 55d3b79d159bab53b140860279486db8a1c0e4f3)

  Commit: 0b12f770241134865be39d73413466da8430f126
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-08-11 (Thu, 11 Aug 2022)

  Changed paths:
    M openmp/libomptarget/plugins/cuda/src/rtl.cpp

  Log Message:
  [Libomptarget][CUDA] Check CUDA compatibilty correctly

We recently added support for multi-architecture binaries in
libomptarget. This is done by extracting the architecture from the
embedded image and comparing it with the major and minor version
supported by the current CUDA installation. Previously we just compared
these directly, which was not correct for binary compatibility. The CUDA
documentation states that we can consider any image with an equivalent
major or a greater or equal to minor compatible with the current image.
Change the check to use this new logic in the CUDA plugin.

Fixes #57049

Reviewed By: jdoerfert, ye-luo

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

(cherry picked from commit fdbb15355e7977b914cbd7e753b5e909d735ad83)

Compare: https://github.com/llvm/llvm-project/compare/81e46ae2215f...0b12f7702411

More information about the All-commits mailing list