[all-commits] [llvm/llvm-project] 8a323a: [clang][SemaTemplate] Fix a stack use after scope

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Feb 28 10:54:55 PST 2022


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a323ada234ba2859942772b446bf2692dadb573
      https://github.com/llvm/llvm-project/commit/8a323ada234ba2859942772b446bf2692dadb573
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M clang/include/clang/AST/DeclTemplate.h
    M clang/lib/AST/DeclTemplate.cpp
    M clang/test/SemaTemplate/friend-template.cpp

  Log Message:
  -----------
  [clang][SemaTemplate] Fix a stack use after scope

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

(cherry picked from commit c79c13cae61564d3a03831013ea24ff483ee3e82)


  Commit: aadd03a2accd7af22a9377f5f76b140013f8841d
      https://github.com/llvm/llvm-project/commit/aadd03a2accd7af22a9377f5f76b140013f8841d
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M clang/lib/Serialization/ASTReaderDecl.cpp

  Log Message:
  -----------
  [clang][ASTReader] Fix memory leak while reading FriendTemplateDecls

Allocate on ASTContext, rather than just on heap, so that template
parameter lists are freed up.

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

(cherry picked from commit 977b1f574fa18219fde5f709b906c79202ef1916)


  Commit: a2398c560144fbf30058c97c93492023d5c50cad
      https://github.com/llvm/llvm-project/commit/a2398c560144fbf30058c97c93492023d5c50cad
  Author: Todd Mortimer <todd at opennet.ca>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/OpenBSD.h
    M clang/test/Driver/openbsd.c

  Log Message:
  -----------
  [Driver][OpenBSD] Enable unwind tables on all architectures

(cherry picked from commit bcbb03754ef19a8682635ab83fe5283db27b94f5)


  Commit: 4fe93c000b204d4d8a9a458e5eb2d4fabd85ba5e
      https://github.com/llvm/llvm-project/commit/4fe93c000b204d4d8a9a458e5eb2d4fabd85ba5e
  Author: Brendon Cahoon <brendon.cahoon at amd.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    A llvm/test/Transforms/SLPVectorizer/slp-variable-insertelement.ll

  Log Message:
  -----------
  [SLP] Fix assert from non-constant index in insertelement

A call to getInsertIndex() in getTreeCost() is returning None,
which causes an assert because a non-constant index value for
insertelement was not expected. This case occurs when the
insertelement index value is defined with a PHI.

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

(cherry picked from commit 3cc15e2cb657f3a814c8bd482bb7108782561abd)


  Commit: 64534d2f406c0cb87502b617940cb0d39b7ff489
      https://github.com/llvm/llvm-project/commit/64534d2f406c0cb87502b617940cb0d39b7ff489
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/test/Transforms/InstCombine/load-store-forward.ll

  Log Message:
  -----------
  [InstCombine] Bail out of load-store forwarding for scalable vector types

This patch fixes an invalid TypeSize->uint64_t implicit conversion in
FoldReinterpretLoadFromConst. If the size of the constant is scalable
we bail out of the optimisation for now.

Tests added here:

  Transforms/InstCombine/load-store-forward.ll

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

(cherry picked from commit 47eff645d8e873ba531014751c1c06a716a367e9)


  Commit: 5f5b687460c3b1660e7a8a034ddfc5807fe41a8c
      https://github.com/llvm/llvm-project/commit/5f5b687460c3b1660e7a8a034ddfc5807fe41a8c
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp

  Log Message:
  -----------
  Fix warning introduced by 47eff645d8e873ba531014751c1c06a716a367e9

(cherry picked from commit dc0657277f2ff53f4e3ab01d856bcc576867ba9e)


  Commit: 61e78c64a38ae4a4d1e0ab1fa87d81de830a0162
      https://github.com/llvm/llvm-project/commit/61e78c64a38ae4a4d1e0ab1fa87d81de830a0162
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M libunwind/src/assembly.h

  Log Message:
  -----------
  [libunwind] Only include cet.h if __CET__ defined

We should not assume that the cet.h header exists just because
we're on x86 linux. Only include it if __CET__ is defined. This
makes the code more similar to what compiler-rt does in
https://github.com/llvm/llvm-project/blob/ee423d93ead39e94c2970b3cc7ef6e6faa75d10b/compiler-rt/lib/builtins/assembly.h#L17
(though that one also has a __has_include() check -- I've not found
that to be necessary).

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

(cherry picked from commit 2d2ef384b2f6e723edb793d08f52e7f4dc94ba3a)


  Commit: ee0ae47691d30802ae1eeb056d53886800d3c2fa
      https://github.com/llvm/llvm-project/commit/ee0ae47691d30802ae1eeb056d53886800d3c2fa
  Author: Alex Bradbury <asb at lowrisc.org>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/addimm-mulimm.ll

  Log Message:
  -----------
  [RISCV] Avoid infinite loop between DAGCombiner::visitMUL and RISCVISelLowering::transformAddImmMulImm

See https://github.com/llvm/llvm-project/issues/53831 for a full discussion.

The basic issue is that DAGCombiner::visitMUL and
RISCVISelLowering;:transformAddImmMullImm get stuck in a loop, as the
current checks in transformAddImmMulImm aren't sufficient to avoid all
cases where DAGCombiner::isMulAddWithConstProfitable might trigger a
transformation. This patch makes transformAddImmMulImm bail out if C0
(the constant used for multiplication) has more than one use.

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

(cherry picked from commit c5bcfb983e47167a8a1826c1a64d7aa1849add06)


  Commit: 03cf88fc94da55b989f1c14cb0460777834749c0
      https://github.com/llvm/llvm-project/commit/03cf88fc94da55b989f1c14cb0460777834749c0
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp

  Log Message:
  -----------
  [DSE] Extract a common PDT check (NFC)


  Commit: 453361d5ac0131ca713904bdd87166d429e17612
      https://github.com/llvm/llvm-project/commit/453361d5ac0131ca713904bdd87166d429e17612
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/test/Transforms/DeadStoreElimination/multiblock-unreachable.ll

  Log Message:
  -----------
  [DSE] Fall back to CFG scan for unreachable terminators.

Blocks with UnreachableInst terminators are considered as root nodes in
the PDT. This pessimize DSE, if there are no aliasing reads from the
potentially dead store and the block with the unreachable terminator.

If any of the root nodes of the PDF has UnreachableInst as terminator,
fall back to the CFG scan, even the common dominator of all killing
blocks does not post-dominate the block with potentially dead store.

It looks like the compile-time impact for the extra scans is negligible.
https://llvm-compile-time-tracker.com/compare.php?from=779bbbf27fe631154bdfaac7a443f198d4654688&to=ac59945f1bec1c6a7d7f5590c8c69fd9c5369c53&stat=instructions

Fixes #53800.

Reviewed By: nikic

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


Compare: https://github.com/llvm/llvm-project/compare/d61805a8b686...453361d5ac01


More information about the All-commits mailing list