[all-commits] [llvm/llvm-project] f52a46: [Clang] Ensure the method scope at the late parsin...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Thu Jul 11 22:37:34 PDT 2024


  Branch: refs/heads/users/vitalybuka/spr/main.nfcsanitizer_common-use-p-to-print-addresses
  Home:   https://github.com/llvm/llvm-project
  Commit: f52a4679e683807d699e105a6139a5a91401667f
      https://github.com/llvm/llvm-project/commit/f52a4679e683807d699e105a6139a5a91401667f
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2024-07-12 (Fri, 12 Jul 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Parse/ParseCXXInlineMethods.cpp
    M clang/test/SemaCXX/cxx0x-noexcept-expression.cpp

  Log Message:
  -----------
  [Clang] Ensure the method scope at the late parsing of noexcept specifiers (#98023)

Previously, we only pushed the function scope once we entered the
function definition, whereas tryCaptureVariable() requires at least one
function scope available when ParmVarDecls being captured have been
owned by a function. This led to problems parsing the noexcept
specifiers, as the DeclRefExprs inside them were improperly computed.

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


  Commit: 90abdf83e273586a43e1270e5f0a11de5cc35383
      https://github.com/llvm/llvm-project/commit/90abdf83e273586a43e1270e5f0a11de5cc35383
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/CodeGen/CodeGenModule.h

  Log Message:
  -----------
  [CUDA][HIP][NFC] add CodeGenModule::shouldEmitCUDAGlobalVar (#98543)

Extract the logic whether to emit a global var based on CUDA/HIP
host/device related attributes to CodeGenModule::shouldEmitCUDAGlobalVar
to be used by other places.


  Commit: b12e141fb14a8b603984e1d29339e344e0db36ce
      https://github.com/llvm/llvm-project/commit/b12e141fb14a8b603984e1d29339e344e0db36ce
  Author: Thurston Dang <thurston at google.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M compiler-rt/lib/memprof/memprof_allocator.h

  Log Message:
  -----------
  [memprof] Switch allocator to dynamic base address (#98510)

memprof_rtl.cpp calls InitializeShadowMemory() - which
dynamically/"randomly" chooses a base address for the shadow mapping -
prior to InitializeAllocator(). If we are unlucky, the shadow memory may
be mapped in the same region where the allocator wants to be.

This patch fixes the issue by changing the allocator to dynamically
choosing a base address, as suggested by Vitaly. For comparison, HWASan
already dynamically chooses the base addresses for the shadow mapping
and allocator.

The "unlucky" failure was observed on a new buildbot:
https://lab.llvm.org/buildbot/#/builders/66/builds/1361/steps/17/logs/stdio

---------

Co-authored-by: Vitaly Buka <vitalybuka at gmail.com>


  Commit: 56b73f2a73b082c7b6a17cad37799fc218436be1
      https://github.com/llvm/llvm-project/commit/56b73f2a73b082c7b6a17cad37799fc218436be1
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M compiler-rt/lib/msan/msan_linux.cpp

  Log Message:
  -----------
  [msan] Fix compilation broken by invalid conflict resolution


  Commit: dcf6b7a8ea9a9be04dd66d20e4a7c55cd0f50a11
      https://github.com/llvm/llvm-project/commit/dcf6b7a8ea9a9be04dd66d20e4a7c55cd0f50a11
  Author: Owen Pan <owenpiano at gmail.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M clang/lib/Format/WhitespaceManager.cpp
    M clang/unittests/Format/FormatTestComments.cpp

  Log Message:
  -----------
  [clang-format] Fix a bug in TCAS_Leave using tabs for indentation (#98427)

Fixes #92530.


  Commit: 4f1de83d537f62070cde85e09e88bc229316b3e1
      https://github.com/llvm/llvm-project/commit/4f1de83d537f62070cde85e09e88bc229316b3e1
  Author: Yuxuan Chen <ych at fb.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M llvm/lib/Transforms/Coroutines/CoroSplit.cpp

  Log Message:
  -----------
  [Clang][NFC][Coroutine] Do not leave dangling pointers after removing CoroBegin (#98546)


  Commit: 062844615db5e141da118c1ad780bf102537f40a
      https://github.com/llvm/llvm-project/commit/062844615db5e141da118c1ad780bf102537f40a
  Author: Garvit Gupta <quic_garvgupt at quicinc.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp
    M llvm/lib/Target/RISCV/RISCVSystemOperands.td

  Log Message:
  -----------
  [RISCV] Enable framework to resolve encoding conflicts among vendor-specific CSRs (#97287)

This PR is a follow-up of PR #96174 which added the framework to resolve
encoding conflicts among vendor specific CSRs. This PR explicitly
enables this only for the RISCV target.


  Commit: 9818ba29b91479e8f484455f36ca9f1b9a845bd1
      https://github.com/llvm/llvm-project/commit/9818ba29b91479e8f484455f36ca9f1b9a845bd1
  Author: Guillaume Belz <gbdivers.spam at gmail.com>
  Date:   2024-07-12 (Fri, 12 Jul 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp

  Log Message:
  -----------
  fix assert in AArch64Arm64ECCallLowering.cpp (#98408)

The precedence of `==` operator is superior to `?:` operator. This line
is evaluated as:

```cpp
assert((ArgTranslations.size() == F->isVarArg()) ? 5 : PassthroughArgSize);
```
I guess this is not what is wanted. This causes a warning with gcc:
```
[131/602] Building CXX object lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64Arm64ECCallLowering.cpp.o
In file included from /usr/include/c++/11/cassert:44,
                 from /home/linux/dev/llvm-project/llvm/include/llvm/Support/CommandLine.h:33,
                 from /home/linux/dev/llvm-project/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp:31:
/home/linux/dev/llvm-project/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp: In member function ‘llvm::Function* {anonymous}::AArch64Arm64ECCallLowering::buildEntryThunk(llvm::Function*)’:
/home/linux/dev/llvm-project/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp:528:50: warning: ‘?:’ using integer constants in boolean context [-Wint-in-bool-context]
  528 |   assert(ArgTranslations.size() == F->isVarArg() ? 5 : PassthroughArgSize);
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
```
Add parenthesis to fix the problem.


  Commit: 076ae5821671aa7911b0eba6636e844381115237
      https://github.com/llvm/llvm-project/commit/076ae5821671aa7911b0eba6636e844381115237
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M llvm/lib/MC/MCParser/AsmParser.cpp
    R llvm/test/MC/AsmParser/altmacro-arg.s

  Log Message:
  -----------
  Revert "[MCParser] .altmacro: Support argument expansion not preceded by \"

This reverts commit f8b1ca4992a22b4b65282c09dd6f07a1a2839070.
It incorrectly replaces `t` in `blt` to `h`.

```
.altmacro
.macro gen t
  blt 2f
2:
.endm

gen h
```

Fix #98558


  Commit: 144dae207a3b1750ec94553248bf44c359b6d452
      https://github.com/llvm/llvm-project/commit/144dae207a3b1750ec94553248bf44c359b6d452
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M compiler-rt/lib/hwasan/hwasan_linux.cpp
    M compiler-rt/test/hwasan/TestCases/Linux/fixed-shadow.c

  Log Message:
  -----------
  [hwasan] Report unavalible fixed shadow range (#98574)

Before the patch `fixed-shadow.c` test died with an obscure SEGV, 
because shadow was mapped over libc.so.

Note, FindDynamicShadowStart is expected to select in available region.


  Commit: ecd2bf73cb212452951b3010bbf06e4d96330a92
      https://github.com/llvm/llvm-project/commit/ecd2bf73cb212452951b3010bbf06e4d96330a92
  Author: vporpo <vporpodas at google.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M llvm/include/llvm/SandboxIR/SandboxIR.h
    M llvm/lib/SandboxIR/SandboxIR.cpp
    M llvm/unittests/SandboxIR/SandboxIRTest.cpp

  Log Message:
  -----------
  [SandboxIR] Add setOperand() and RAUW,RUWIf,RUOW (#98410)

This patch adds the following member functions:
- User::setOperand()
- User::replaceUsesOfWith()
- Value::replaceAllUsesWith()
- Value::replaceUsesWithIf()


  Commit: 0d9d5f7ea282f938e39a9b319076ef84c45ee482
      https://github.com/llvm/llvm-project/commit/0d9d5f7ea282f938e39a9b319076ef84c45ee482
  Author: Vikram Hegde <115221833+vikramRH at users.noreply.github.com>
  Date:   2024-07-12 (Fri, 12 Jul 2024)

  Changed paths:
    M llvm/lib/CodeGen/MachineCSE.cpp
    A llvm/test/CodeGen/AMDGPU/copyprop_regsequence_with_undef.mir

  Log Message:
  -----------
  [CodeGen] Guard copy propagation in machine CSE against undefs (#97413)


  Commit: 8698160d1dedfb8bfa9dae094c14443c43b32a31
      https://github.com/llvm/llvm-project/commit/8698160d1dedfb8bfa9dae094c14443c43b32a31
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M compiler-rt/lib/memprof/memprof_rtl.cpp

  Log Message:
  -----------
  [NFC][memprof] Use %p to print addresses (#98577)


  Commit: d22a419da2aec60ceb84eff489d4f64f7395c73d
      https://github.com/llvm/llvm-project/commit/d22a419da2aec60ceb84eff489d4f64f7395c73d
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    A llvm/test/MC/AsmParser/altmacro-arg.s

  Log Message:
  -----------
  [MC,test] Improve .altmacro test


  Commit: ec50f5828f25ae8b494475c6e151d9849800da7c
      https://github.com/llvm/llvm-project/commit/ec50f5828f25ae8b494475c6e151d9849800da7c
  Author: Billy Zhu <billyzhu at modular.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    A mlir/include/mlir/Support/CyclicReplacerCache.h
    M mlir/unittests/Support/CMakeLists.txt
    A mlir/unittests/Support/CyclicReplacerCacheTest.cpp

  Log Message:
  -----------
  [MLIR][Support] A cache for cyclical replacers/maps (#98202)

This is a support data structure that acts as a cache for replacer-like
functions that map values between two domains. The difference compared
to just using a map to cache in-out pairs is that this class is able to
handle replacer logic that is self-recursive (and thus may cause
infinite recursion in the naive case).

This class provides a hook for the user to perform cycle pruning when a
cycle is identified, and is able to perform context-sensitive caching so
that the replacement result for an input that is part of a pruned cycle
can be distinct from the replacement result for the same input when it
is not part of a cycle.

In addition, this class allows deferring cycle pruning until specific
inputs are repeated. This is useful for cases where not all elements in
a cycle can perform pruning. The user still must guarantee that at least
one element in any given cycle can perform pruning. Even if not, an
assertion will eventually be tripped instead of infinite recursion (the
run-time is linearly bounded by the maximum cycle length of its input).


  Commit: da368f24050f34de0327d04068a608ba971fa47c
      https://github.com/llvm/llvm-project/commit/da368f24050f34de0327d04068a608ba971fa47c
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M llvm/lib/MC/MCParser/AsmParser.cpp
    M llvm/test/MC/AsmParser/altmacro-arg.s

  Log Message:
  -----------
  [MCParser] .altmacro: Support argument expansion not preceded by \

In the .altmacro mode, an argument can be expanded even if not preceded
by \. This behavior is not enabled for Darwin, which uses $
(`isIdentifierChar('$')` is true) for macro expansion.

This is f8b1ca4992a22b4b65282c09dd6f07a1a2839070 with a fix.


  Commit: 51b22f95b8083c764fe39fd95e43f04bfa4be2c1
      https://github.com/llvm/llvm-project/commit/51b22f95b8083c764fe39fd95e43f04bfa4be2c1
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

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

  Log Message:
  -----------
  [LoopDist] Fix copy/paste mistake that said vectorize instead of distribute. NFC

Remove mention of sharing with new and old PM. The old PM code is gone.


  Commit: 10df988e486061178034b4f41ec574f68170b887
      https://github.com/llvm/llvm-project/commit/10df988e486061178034b4f41ec574f68170b887
  Author: Vedant Paranjape <vedant.paranjape at amd.com>
  Date:   2024-07-12 (Fri, 12 Jul 2024)

  Changed paths:
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
    A llvm/test/Transforms/ArgumentPromotion/recursion/aggregate-promote-recursive.ll
    A llvm/test/Transforms/ArgumentPromotion/recursion/argpromotion-recursion-pr1259.ll
    A llvm/test/Transforms/ArgumentPromotion/recursion/recursion-arg-position-pr1259.ll
    A llvm/test/Transforms/ArgumentPromotion/recursion/recursion-mixed-calls.ll
    A llvm/test/Transforms/ArgumentPromotion/recursion/recursion-non-zero-offset.ll
    A llvm/test/Transforms/ArgumentPromotion/recursion/recursion-same-arg-twice-pr1259.ll

  Log Message:
  -----------
  [ArgPromotion] Handle pointer arguments of recursive calls (#78735)

Argument promotion doesn't handle recursive function calls to promote
arguments. This patch adds functionality to handle self recursive
function calls, i.e. whose SCC size is 1. Due to complexity of
ValueTracking in recursive calls with SCC size greater than 1, we bail
out in such cases.


  Commit: 870eee464b336cc42e3e1883e5402675be180eec
      https://github.com/llvm/llvm-project/commit/870eee464b336cc42e3e1883e5402675be180eec
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M compiler-rt/lib/asan/asan_descriptions.cpp
    M compiler-rt/lib/asan/asan_rtl.cpp
    M compiler-rt/test/asan/TestCases/debug_mapping.cpp

  Log Message:
  -----------
  [NFC][asan] Use %p to print addresses (#98575)

Co-authored-by: vporpo <vporpodas at google.com>


  Commit: e95d36e0c5087aa7a073174061294db48e1eb62e
      https://github.com/llvm/llvm-project/commit/e95d36e0c5087aa7a073174061294db48e1eb62e
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/lib/Format/WhitespaceManager.cpp
    M clang/lib/Parse/ParseCXXInlineMethods.cpp
    M clang/test/SemaCXX/cxx0x-noexcept-expression.cpp
    M clang/unittests/Format/FormatTestComments.cpp
    M compiler-rt/lib/memprof/memprof_allocator.h
    M compiler-rt/lib/msan/msan_linux.cpp
    M compiler-rt/test/asan/TestCases/debug_mapping.cpp
    M compiler-rt/test/hwasan/TestCases/Linux/fixed-shadow.c
    M llvm/include/llvm/SandboxIR/SandboxIR.h
    M llvm/lib/CodeGen/MachineCSE.cpp
    M llvm/lib/MC/MCParser/AsmParser.cpp
    M llvm/lib/SandboxIR/SandboxIR.cpp
    M llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp
    M llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp
    M llvm/lib/Target/RISCV/RISCVSystemOperands.td
    M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
    M llvm/lib/Transforms/Scalar/LoopDistribute.cpp
    A llvm/test/CodeGen/AMDGPU/copyprop_regsequence_with_undef.mir
    M llvm/test/MC/AsmParser/altmacro-arg.s
    A llvm/test/Transforms/ArgumentPromotion/recursion/aggregate-promote-recursive.ll
    A llvm/test/Transforms/ArgumentPromotion/recursion/argpromotion-recursion-pr1259.ll
    A llvm/test/Transforms/ArgumentPromotion/recursion/recursion-arg-position-pr1259.ll
    A llvm/test/Transforms/ArgumentPromotion/recursion/recursion-mixed-calls.ll
    A llvm/test/Transforms/ArgumentPromotion/recursion/recursion-non-zero-offset.ll
    A llvm/test/Transforms/ArgumentPromotion/recursion/recursion-same-arg-twice-pr1259.ll
    M llvm/unittests/SandboxIR/SandboxIRTest.cpp
    A mlir/include/mlir/Support/CyclicReplacerCache.h
    M mlir/unittests/Support/CMakeLists.txt
    A mlir/unittests/Support/CyclicReplacerCacheTest.cpp

  Log Message:
  -----------
  [𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.4

[skip ci]


Compare: https://github.com/llvm/llvm-project/compare/055094a237b5...e95d36e0c508

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list