[all-commits] [llvm/llvm-project] 464f65: [DebugInfo][DWARF] Utilize DW_AT_LLVM_stmt_sequenc...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Thu Feb 6 23:06:13 PST 2025


  Branch: refs/heads/users/vitalybuka/spr/ltopipelinescoro-handle-coroutines-in-lto-pipeline
  Home:   https://github.com/llvm/llvm-project
  Commit: 464f65adacd812aead775308ab7f1952fee774db
      https://github.com/llvm/llvm-project/commit/464f65adacd812aead775308ab7f1952fee774db
  Author: alx32 <103613512+alx32 at users.noreply.github.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
    M llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp

  Log Message:
  -----------
  [DebugInfo][DWARF] Utilize DW_AT_LLVM_stmt_sequence attr in line table lookups (#123391)

**Summary**
Add support for filtering line table entries based on
`DW_AT_LLVM_stmt_sequence` attribute when looking up address ranges.
This ensures that line entries are correctly attributed to their
corresponding functions, even when multiple functions share the same
address range due to optimizations.

**Background**
In https://github.com/llvm/llvm-project/pull/110192 we added support to
clang to generate the `DW_AT_LLVM_stmt_sequence` attribute for
`DW_TAG_subprogram`'s. Corresponding RFC: [New DWARF Attribute for
Symbolication of Merged
Functions](https://discourse.llvm.org/t/rfc-new-dwarf-attribute-for-symbolication-of-merged-functions/79434)

The `DW_AT_LLVM_stmt_sequence` attribute allows accurate attribution of
line number information to their corresponding functions, even in
scenarios where functions are merged or share the same address space due
to optimizations like Identical Code Folding (ICF) in the linker.

**Implementation Details**
The patch modifies `DWARFDebugLine::lookupAddressRange` to accept an
optional DWARFDie parameter. When provided, the function checks if the
`DIE` has a `DW_AT_LLVM_stmt_sequence` attribute. This attribute
contains an offset into the line table that marks where the line entries
for this DIE's function begin.

If the attribute is present, the function filters the results to only
include line entries from the sequence that starts at the specified
offset. This ensures that even when multiple functions share the same
address range, we return only the line entries that actually belong to
the function represented by the DIE.

The implementation:
- Adds an optional DWARFDie parameter to lookupAddressRange
- Extracts the `DW_AT_LLVM_stmt_sequence` offset if present
- Modifies the address range lookup logic to filter sequences based on
their offset
- Returns only line entries from the matching sequence


  Commit: a0d86b23c0c81d0900c9d361035f02989e2647a4
      https://github.com/llvm/llvm-project/commit/a0d86b23c0c81d0900c9d361035f02989e2647a4
  Author: vporpo <vporpodas at google.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h
    M llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h
    M llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
    A llvm/test/Transforms/SandboxVectorizer/scheduler.ll
    M llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp

  Log Message:
  -----------
  [SandboxVec][Scheduler] Notify scheduler about instruction creation (#126141)

This patch implements the vectorizer's callback for getting notified
about new instructions being created. This updates the scheduler state,
which may involve removing dependent instructions from the ready list
and update the "scheduled" flag.
Since we need to remove elements from the ready list, this patch also
implements the `remove()` operation.


  Commit: b8002933e92f89600521be420376ec111ad367f1
      https://github.com/llvm/llvm-project/commit/b8002933e92f89600521be420376ec111ad367f1
  Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M lldb/source/Plugins/Process/Utility/ThreadMemory.h
    M lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py

  Log Message:
  -----------
  [lldb] Add missing return statements in ThreadMemory (#126128)

These prevented ThreadMemory from correctly returning the
Name/Queue/Info of the backing thread.

Note about testing: this test only finds regressions if the system sets
a name or queue for the backing thread. While this may not be true
everywhere, it still provides coverage in some systems, e.g. in Apple
platforms.


  Commit: b7279ed5b3ae3e7b0fd61e0f08c86fb1958f0b6f
      https://github.com/llvm/llvm-project/commit/b7279ed5b3ae3e7b0fd61e0f08c86fb1958f0b6f
  Author: Kai Nacke <kai.peter.nacke at ibm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M compiler-rt/lib/xray/CMakeLists.txt
    M compiler-rt/lib/xray/xray_tsc.h

  Log Message:
  -----------
  [SystemZ][XRay] Make xray work with gcc (#126154)

It seems that depending on the platform, gcc acceptts or does not accept
`-mvx` without specifying an architecture actually having vector
instructions. The solution which seems to work across different versions
of gcc and clang is to specify the least architecture which has vector
instructions.

In addition, initialization of the unused variable CPU prevents a
compiler warning from gcc.


  Commit: 778861742d6dd1c5c11fa4d361fdc9cd69131e0a
      https://github.com/llvm/llvm-project/commit/778861742d6dd1c5c11fa4d361fdc9cd69131e0a
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M libcxx/include/string

  Log Message:
  -----------
  [libc++][NFC] Replace typedefs with using aliases in <string> (#126070)


  Commit: 5a056f91be33df87485a6d1608128305f834e0eb
      https://github.com/llvm/llvm-project/commit/5a056f91be33df87485a6d1608128305f834e0eb
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

  Log Message:
  -----------
  [SystemZ] Avoid repeated hash lookups (NFC) (#126005)

Co-authored-by: Nikita Popov <github at npopov.com>


  Commit: 4590f755cf585284df68e9e5a4276540a5fbae1e
      https://github.com/llvm/llvm-project/commit/4590f755cf585284df68e9e5a4276540a5fbae1e
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h

  Log Message:
  -----------
  [Analysis] Avoid repeated hash lookups (NFC) (#126011)


  Commit: d0f122b9c5a5c6d26971d7ed57aeed8606da1ade
      https://github.com/llvm/llvm-project/commit/d0f122b9c5a5c6d26971d7ed57aeed8606da1ade
  Author: Luke Lau <luke at igalia.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/lib/Transforms/Vectorize/VPlanUtils.h
    M llvm/unittests/Transforms/Vectorize/VPlanTest.cpp

  Log Message:
  -----------
  [LV] Update incoming blocks in VPWidenPHIRecipe in reassociateBlocks (#125481)

This is extracted from #118638

After c7ebe4f we will crash in fixNonInductionPHIs if we use a
VPWidenPHIRecipe with the vector preheader as an incoming block, because
the phi will reference the old non-IRBB vector preheader.

This fixes this by updating VPBlockUtils::reassociateBlocks to update
any VPWidenPHIRecipes's incoming blocks.

This assumes that if the VPWidenPHIRecipe is in a VPRegionBlock, it's in
the entry block, and that we are replacing a VPBasicBlock with another
VPBasicBlock.


  Commit: 7f7605d3856432023a4acbd62fd3474c29da54fe
      https://github.com/llvm/llvm-project/commit/7f7605d3856432023a4acbd62fd3474c29da54fe
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/utils/gn/secondary/clang/test/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Frontend/Offloading/BUILD.gn

  Log Message:
  -----------
  [gn build] Manually port f7b3559c


  Commit: 3d35246c50ee67a71552ead70a6b0b15d7358ec5
      https://github.com/llvm/llvm-project/commit/3d35246c50ee67a71552ead70a6b0b15d7358ec5
  Author: Christopher Ferris <cferris1000 at users.noreply.github.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/allocator_config.def
    M compiler-rt/lib/scudo/standalone/allocator_config_wrapper.h
    M compiler-rt/lib/scudo/standalone/secondary.h
    M compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
    M compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp

  Log Message:
  -----------
  [scudo] Make guard pages optional in the secondary (#125960)

Add an optional flag for the secondary allocator called
`EnableGuardPages` to enable/disable the use of guard pages. By default,
this option is enabled.


  Commit: f5b41318b0feb042d51c4e8b66812423ed34b80f
      https://github.com/llvm/llvm-project/commit/f5b41318b0feb042d51c4e8b66812423ed34b80f
  Author: LLVM GN Syncbot <llvmgnsyncbot at gmail.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/utils/gn/secondary/libcxx/include/BUILD.gn

  Log Message:
  -----------
  [gn build] Port aca829de13ec


  Commit: 6807164500e9920638e2ab0cdb4bf8321d24f8eb
      https://github.com/llvm/llvm-project/commit/6807164500e9920638e2ab0cdb4bf8321d24f8eb
  Author: c8ef <c8ef at outlook.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M libc/config/linux/aarch64/headers.txt
    M libc/config/linux/x86_64/headers.txt
    M libc/docs/CMakeLists.txt
    M libc/docs/headers/index.rst
    M libc/include/CMakeLists.txt
    A libc/include/endian.h.def
    A libc/include/endian.yaml
    M libc/include/llvm-libc-macros/CMakeLists.txt
    A libc/include/llvm-libc-macros/endian-macros.h
    A libc/utils/docgen/endian.yaml

  Log Message:
  -----------
  [libc] Add the `<endian.h>` header. (#125168)

Closes [#124631](https://github.com/llvm/llvm-project/issues/124631).
ref:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/endian.h.html

This patch adds the implementation of `endian.h`, which includes the
header itself and three related macros. These macros in the header rely
on the compiler preprocessor, similar to how
https://github.com/llvm/llvm-project/blob/main/libc/src/__support/endian_internal.h
does. Hopefully this will meet the requirements for compiling llvm with
llvm-libc.


  Commit: d8e0b130bd7b2dd168642a82056b8eca21c49f9f
      https://github.com/llvm/llvm-project/commit/d8e0b130bd7b2dd168642a82056b8eca21c49f9f
  Author: Jason Molenda <jmolenda at apple.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M lldb/include/lldb/Target/Process.h

  Log Message:
  -----------
  [lldb][NFC] Small comment fix in Process.h


  Commit: 6f508492d13944edd0e7e70a3cc34eb29caeb8e9
      https://github.com/llvm/llvm-project/commit/6f508492d13944edd0e7e70a3cc34eb29caeb8e9
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp
    M clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp

  Log Message:
  -----------
  [webkit.UncountedLambdaCapturesChecker] Fix a regression that [[noescape]] on a member function no longer works. (#126016)


  Commit: 0cbc4983adcdbbd85ccb38b2dfbfe5985367b1b2
      https://github.com/llvm/llvm-project/commit/0cbc4983adcdbbd85ccb38b2dfbfe5985367b1b2
  Author: Augusto Noronha <anoronha at apple.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M lldb/include/lldb/Target/LanguageRuntime.h
    M lldb/include/lldb/ValueObject/ValueObject.h
    M lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
    M lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.h
    M lldb/source/ValueObject/ValueObject.cpp
    M lldb/source/ValueObject/ValueObjectDynamicValue.cpp
    M lldb/unittests/TestingSupport/Symbol/ClangTestUtils.h
    M lldb/unittests/ValueObject/CMakeLists.txt
    A lldb/unittests/ValueObject/DynamicValueObjectLocalBuffer.cpp

  Log Message:
  -----------
  [lldb] Make ValueObjectDynamicValue::UpdateValue() point to  a host b… (#125143)

…uffer

ValueObjectDynamicValue::UpdateValue() assumes that the dynamic type
found by GetDynamicTypeAndAddress() would return an address in the
inferior. This commit makes it so it can deal with being passed a host
address instead.

This is needed downstream by the Swift fork.

rdar://143357274


  Commit: 003a2bf95415afef74d2c3d4a44c3f2ad1fe582d
      https://github.com/llvm/llvm-project/commit/003a2bf95415afef74d2c3d4a44c3f2ad1fe582d
  Author: Jason Molenda <jmolenda at apple.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp

  Log Message:
  -----------
  [lldb][Darwin] Change DynamicLoaderDarwin to default to new SPI (#126171)

In Sep 2016 and newer Darwin releases, debugserver uses libdyld SPI to
gather information about the binaries loaded in a process. Before Sep
2016, lldb would inspect the dyld internal data structures directly
itself to find this information.

DynamicLoaderDarwin::UseDYLDSPI currently defaults to the old
inspect-dyld-internal-structures method for binaries
(DynamicLoaderMacOSXDYLD). If it detects that the Process' host OS
version is new enough, it enables the newer libdyld SPI methods in
debugserver (DynamicLoaderMacOS).

This patch changes the default to use the new libdyld SPI interfaces. If
the Process has a HostOS and it is one of the four specific OSes that
existed in 2015 (Mac OS X, iOS, tvOS, watchOS) with an old version
number, then we will enable the old DynamicLoader plugin.

If this debug session is a corefile, we will always use the old
DynamicLoader plugin -- the libdyld SPI cannot run against a corefile,
lldb must read metadata or the dyld internal data structures in the
corefile to find the loaded binaries.


  Commit: 01ac6fc9099f814517cf8ab405f3f6b646ca09d1
      https://github.com/llvm/llvm-project/commit/01ac6fc9099f814517cf8ab405f3f6b646ca09d1
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M llvm/utils/TableGen/DAGISelMatcherOpt.cpp

  Log Message:
  -----------
  [TableGen] Use range-based for loops. NFC


  Commit: 50ae1c7bf40ba50aaf3132fa869eda8f06648155
      https://github.com/llvm/llvm-project/commit/50ae1c7bf40ba50aaf3132fa869eda8f06648155
  Author: Tiezhu Yang <yangtiezhu at loongson.cn>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp

  Log Message:
  -----------
  [LLDB][LoongArch] Fix build errors about NT_LOONGARCH_HW_{BREAK,WATCH} (#126020)

On some OS distros such as LoongArch Fedora 38 mate-5 [1], there are
no macro definitions NT_LOONGARCH_HW_BREAK and NT_LOONGARCH_HW_WATCH
in the system header, then there exist some errors when building LLDB
on LoongArch.

(1) Description of Problem:

```
llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp:529:16:
error: 'NT_LOONGARCH_HW_WATCH' was not declared in this scope; did you mean 'NT_LOONGARCH_LBT'?
  529 |   int regset = NT_LOONGARCH_HW_WATCH;
      |                ^~~~~~~~~~~~~~~~~~~~~
      |                NT_LOONGARCH_LBT
llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp:543:12:
error: 'NT_LOONGARCH_HW_BREAK' was not declared in this scope; did you mean 'NT_LOONGARCH_CSR'?
  543 |   regset = NT_LOONGARCH_HW_BREAK;
      |            ^~~~~~~~~~~~~~~~~~~~~
      |            NT_LOONGARCH_CSR
```

(2) Steps to Reproduce:

```
git clone https://github.com/llvm/llvm-project.git
mkdir -p llvm-project/llvm/build && cd llvm-project/llvm/build
cmake .. -G "Ninja" \
         -DCMAKE_BUILD_TYPE=Release \
         -DLLVM_BUILD_RUNTIME=OFF \
         -DLLVM_ENABLE_PROJECTS="clang;lldb" \
         -DCMAKE_INSTALL_PREFIX=/usr/local/llvm \
         -DLLVM_TARGETS_TO_BUILD="LoongArch" \
         -DLLVM_HOST_TRIPLE=loongarch64-redhat-linux
ninja
```

(3) Additional Info:

Maybe there are no problems on the OS distros with newer glibc devel
library, so this issue is related with OS distros.

(4) Root Cause Analysis:

This is because the related Linux kernel commit [2] was merged in
2023-02-25 and the glibc devel library has some delay with kernel,
the glibc version of specified OS distros is not updated in time.

(5) Final Solution:

One way is to ask the maintainer of OS distros to update glibc devel
library, but it is better to not depend on the glibc version.

In order to avoid the build errors, just define NT_LOONGARCH_HW_BREAK
and NT_LOONGARCH_HW_WATCH in LLDB if there are no these definitions in
the system header.

By the way, in order to fit within 80 columns, use C++-style comments
for the new added NT_LOONGARCH_HW_BREAK and NT_LOONGARCH_HW_WATCH.

While at it, for consistency, just modify the current NT_LOONGARCH_LSX
and NT_LOONGARCH_LASX to C++-style comments too.

[1]
https://mirrors.wsyu.edu.cn/fedora/linux/development/rawhide/Everything/loongarch64/iso/livecd-fedora-mate-5.loongarch64.iso
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1a69f7a161a7

Signed-off-by: Tiezhu Yang <yangtiezhu at loongson.cn>


  Commit: 7811c20bcd9d5b117a9543d74c71448fe9970fe6
      https://github.com/llvm/llvm-project/commit/7811c20bcd9d5b117a9543d74c71448fe9970fe6
  Author: Lang Hames <lhames at gmail.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp

  Log Message:
  -----------
  [ORC] Add a FIXME. NFC.


  Commit: d9500f5032312776c69e4bf41722d62ef9c76e49
      https://github.com/llvm/llvm-project/commit/d9500f5032312776c69e4bf41722d62ef9c76e49
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/test/Transforms/OpenMP/spmdization.ll

  Log Message:
  -----------
  [OpenMP] Fix the OpenMPOpt pass incorrectly optimizing if definition was missing

Summary:
This code is intended to block transformations if the call isn't
present, however the way it's coded it silently lets it pass if the
definition doesn't exist at all. This previously was always valid since
we included the runtime as one giant blob so everything was always
there, but now that we want to move towards separate ones, it's not
quite correct.


  Commit: b00b193728aef6f8a9685d0802c4382801d9efca
      https://github.com/llvm/llvm-project/commit/b00b193728aef6f8a9685d0802c4382801d9efca
  Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M flang/lib/Semantics/check-declarations.cpp
    M flang/test/Semantics/cuf03.cuf

  Log Message:
  -----------
  [flang][cuda] Allow POINTER component to have device attribute (#126116)


  Commit: 070c88829251defc268fbfe1c1fe18d2066bdce2
      https://github.com/llvm/llvm-project/commit/070c88829251defc268fbfe1c1fe18d2066bdce2
  Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/IntrinsicCall.h
    M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    M flang/module/cudadevice.f90
    M flang/test/Lower/CUDA/cuda-device-proc.cuf

  Log Message:
  -----------
  [flang][cuda] Lower syncwarp to NVVM intrinsic (#126164)


  Commit: 50cdf6cbc5035345507bb4d23fcb0292272754eb
      https://github.com/llvm/llvm-project/commit/50cdf6cbc5035345507bb4d23fcb0292272754eb
  Author: Sam Elliott <quic_aelliott at quicinc.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
    M llvm/test/CodeGen/RISCV/callee-saved-gprs.ll
    M llvm/test/CodeGen/RISCV/push-pop-popret.ll
    M llvm/test/CodeGen/RISCV/rvv/rv32-spill-vector-csr.ll
    M llvm/test/CodeGen/RISCV/zcmp-additional-stack.ll
    M llvm/test/CodeGen/RISCV/zcmp-with-float.ll

  Log Message:
  -----------
  [RISCV] Allow spilling to unused Zcmp Stack (#125959)

This is a tiny change that can save up to 16 bytes of stack allocation,
which is more beneficial on RV32 than RV64.

cm.push allocates multiples of 16 bytes, but only uses a subset of those
bytes for pushing callee-saved registers. Up to 12 (rv32) or 8 (rv64)
bytes are left unused, depending on how many registers are pushed.
Before this change, we told LLVM that the entire allocation was used, by
creating a fixed stack object which covered the whole allocation.

This change instead gives an accurate extent to the fixed stack object,
to only cover the registers that have been pushed. This allows the
PrologEpilogInserter to use any unused bytes for spills. Potentially
this saves an extra move of the stack pointer after the push, because
the push can allocate up to 48 more bytes than it needs for registers.

We cannot do the same change for save/restore, because the restore
routines restore in batches of `stackalign/(xlen/8)` registers, and we
don't want to clobber the saved values of registers that we didn't tell
the compiler we were saving/restoring - for instance `__riscv_restore_0`
is used by the compiler when it only wants to save `ra`, but will end up
restoring `ra` and `s0`.


  Commit: 9cd83d6ea238d7aaba0c040f1bfbf6ba64fcc208
      https://github.com/llvm/llvm-project/commit/9cd83d6ea238d7aaba0c040f1bfbf6ba64fcc208
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/sign-test-and-or.ll

  Log Message:
  -----------
  [InstCombine] Drop samesign in `foldLogOpOfMaskedICmps` (#125829)

Alive2: https://alive2.llvm.org/ce/z/6zLAYp

Note: We can also apply this fix to the logic below (`if (Mask &
AMask_NotAllOnes)`), but it seems unreachable.


  Commit: 99099cd63516bd87665a5199547f6daa9f8d6ce3
      https://github.com/llvm/llvm-project/commit/99099cd63516bd87665a5199547f6daa9f8d6ce3
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp

  Log Message:
  -----------
  [lldb] Use Lambda to simplify repeptitive code in DynamicLoaderDarwin (NFC) (#126175)

I suggested using a lambda in #126171 but @jasonmolenda missed it.


  Commit: 4d3148d92681c154de51379a0cf393f9af8e1d75
      https://github.com/llvm/llvm-project/commit/4d3148d92681c154de51379a0cf393f9af8e1d75
  Author: Mel Chen <mel.chen at sifive.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/RISCV/vectorize-force-tail-with-evl-inloop-reduction.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/vectorize-force-tail-with-evl-reduction.ll

  Log Message:
  -----------
  [LV][EVL] Fix the check for legality of folding with EVL. (#125678)

The current legality check for folding with EVL has incomplete
verification for VF.
This patch fixes the VF check, ensuring that tail folding with EVL is
enabled only when a scalable VF is available. This allows loops that
prefer tail folding with EVL but cannot use scalable VF vectorization to
still be vectorized using a fixed VF, rather than abandoning
vectorization entirely.


  Commit: 7fa57cd430f5811beed8cfc862768238fc5d06bb
      https://github.com/llvm/llvm-project/commit/7fa57cd430f5811beed8cfc862768238fc5d06bb
  Author: Karim Nosseir <44206880+karimnosseir at users.noreply.github.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/include/mlir/Bytecode/BytecodeWriter.h
    M mlir/lib/Bytecode/Writer/BytecodeWriter.cpp

  Log Message:
  -----------
  [MLIR] Add move constructor to BytecodeWriterConfig (#126130)

The config is currently not movable and because there are constructors
the default move won't be generated, which prevents it from being moved.
Also, it is not copyable because of the unique_ptr. This PR adds move
constructor to allow moving it.


  Commit: d21fc58aeeaa7f0369a24dbe70a0360e0edbf76f
      https://github.com/llvm/llvm-project/commit/d21fc58aeeaa7f0369a24dbe70a0360e0edbf76f
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.h
    M llvm/test/CodeGen/AMDGPU/copy-illegal-type.ll
    M llvm/test/CodeGen/AMDGPU/ctpop64.ll
    M llvm/test/CodeGen/AMDGPU/idot2.ll
    M llvm/test/CodeGen/AMDGPU/load-global-i32.ll
    M llvm/test/CodeGen/AMDGPU/peephole-opt-fold-reg-sequence-subreg.mir
    M llvm/test/CodeGen/AMDGPU/peephole-opt-regseq-removal.mir
    M llvm/test/CodeGen/AMDGPU/spill-scavenge-offset.ll

  Log Message:
  -----------
  AMDGPU: Use default shouldRewriteCopySrc (#125535)

This was ultimately working around bugs in subregister handling
in peephole-opt. In the common case, it would give up on folding
anything into a subregister extract copy.


  Commit: a1984ec5eab09f9b49c232eb00827c3718f5940f
      https://github.com/llvm/llvm-project/commit/a1984ec5eab09f9b49c232eb00827c3718f5940f
  Author: Ming-Yi Lai <ming-yi.lai at mediatek.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/ELF.h
    A llvm/test/tools/llvm-readobj/ELF/RISCV/note-gnu-property.yaml
    M llvm/tools/llvm-readobj/ELFDumper.cpp

  Log Message:
  -----------
  [llvm-readobj][ELF][RISCV] Dump .note.gnu.property section contents (#125642)

RISCV Zicfilp/Zicfiss extensions uses the `.note.gnu.property` section
to store flags indicating the adoption of features based on these
extensions. This patch enables the llvm-readobj/llvm-readelf tools to
dump these flags with the `--note` flag.


  Commit: 63bb4ba84a22279c1cdd4953f0c19269b23a9d32
      https://github.com/llvm/llvm-project/commit/63bb4ba84a22279c1cdd4953f0c19269b23a9d32
  Author: Lang Hames <lhames at gmail.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/Core.h

  Log Message:
  -----------
  [ORC] Add ExecutionSession convenience methods to access bootstrap values.

The getBootstrapMap, getBootstrapMapValue, getBootstrapSymbolsMap, and
getBootstrapSymbols methods forward to their respective counterparts in
ExecutorProcessControl, similar to the callWrapper functions.

These methods will be used to simplify an upcoming patch that accesses
the bootstrap values.


  Commit: e2eaf8ded78507100513a17e8193e2c4b094f8da
      https://github.com/llvm/llvm-project/commit/e2eaf8ded78507100513a17e8193e2c4b094f8da
  Author: Lang Hames <lhames at gmail.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
    A llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/DefaultHostBootstrapValues.h
    M llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
    M llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
    M llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
    M llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt
    A llvm/lib/ExecutionEngine/Orc/TargetProcess/DefaultHostBootstrapValues.cpp
    M llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp

  Log Message:
  -----------
  [ORC] Force eh-frame use for older Darwins on x86-64 in MachOPlatform, LLJIT.

The system libunwind on older Darwins does not support JIT registration of
compact-unwind. Since the CompactUnwindManager utility discards redundant
eh-frame FDEs by default we need to remove the compact-unwind section first
when targeting older libunwinds in order to preserve eh-frames.

While LLJIT was already doing this as of eae6d6d18bd, MachOPlatform was not.
This was causing buildbot failures in the ORC runtime (e.g. in
https://green.lab.llvm.org/job/llvm.org/job/clang-stage1-RA/3479/).

This patch updates both LLJIT and MachOPlatform to check a bootstrap value,
"darwin-use-ehframes-only", to determine whether to forcibly preserve
eh-frame sections. If this value is present and set to true then compact-unwind
sections will be discarded, causing eh-frames to be preserved. If the value is
absent or set to false then compact-unwind will be used and redundant FDEs in
eh-frames discarded (FDEs that are needed by the compact-unwind section are
always preserved).

rdar://143895614


  Commit: 083686daf9feb5b5acadaef22e60b10a8b781f8a
      https://github.com/llvm/llvm-project/commit/083686daf9feb5b5acadaef22e60b10a8b781f8a
  Author: LLVM GN Syncbot <llvmgnsyncbot at gmail.com>
  Date:   2025-02-07 (Fri, 07 Feb 2025)

  Changed paths:
    M llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/TargetProcess/BUILD.gn

  Log Message:
  -----------
  [gn build] Port e2eaf8ded785


  Commit: 311e6a69fff103d6c103e2c2892dd55b63eb83a5
      https://github.com/llvm/llvm-project/commit/311e6a69fff103d6c103e2c2892dd55b63eb83a5
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp
    M clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
    M compiler-rt/lib/scudo/standalone/allocator_config.def
    M compiler-rt/lib/scudo/standalone/allocator_config_wrapper.h
    M compiler-rt/lib/scudo/standalone/secondary.h
    M compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
    M compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
    M compiler-rt/lib/xray/CMakeLists.txt
    M compiler-rt/lib/xray/xray_tsc.h
    M flang/include/flang/Optimizer/Builder/IntrinsicCall.h
    M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    M flang/lib/Semantics/check-declarations.cpp
    M flang/module/cudadevice.f90
    M flang/test/Lower/CUDA/cuda-device-proc.cuf
    M flang/test/Semantics/cuf03.cuf
    M libc/config/linux/aarch64/headers.txt
    M libc/config/linux/x86_64/headers.txt
    M libc/docs/CMakeLists.txt
    M libc/docs/headers/index.rst
    M libc/include/CMakeLists.txt
    A libc/include/endian.h.def
    A libc/include/endian.yaml
    M libc/include/llvm-libc-macros/CMakeLists.txt
    A libc/include/llvm-libc-macros/endian-macros.h
    A libc/utils/docgen/endian.yaml
    M libcxx/include/string
    M lldb/include/lldb/Target/LanguageRuntime.h
    M lldb/include/lldb/Target/Process.h
    M lldb/include/lldb/ValueObject/ValueObject.h
    M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
    M lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
    M lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.h
    M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp
    M lldb/source/Plugins/Process/Utility/ThreadMemory.h
    M lldb/source/ValueObject/ValueObject.cpp
    M lldb/source/ValueObject/ValueObjectDynamicValue.cpp
    M lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
    M lldb/unittests/TestingSupport/Symbol/ClangTestUtils.h
    M lldb/unittests/ValueObject/CMakeLists.txt
    A lldb/unittests/ValueObject/DynamicValueObjectLocalBuffer.cpp
    M llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
    M llvm/include/llvm/BinaryFormat/ELF.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
    M llvm/include/llvm/ExecutionEngine/Orc/Core.h
    M llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
    A llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/DefaultHostBootstrapValues.h
    M llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h
    M llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h
    M llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
    M llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
    M llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
    M llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
    M llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt
    A llvm/lib/ExecutionEngine/Orc/TargetProcess/DefaultHostBootstrapValues.cpp
    M llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.h
    M llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/lib/Transforms/Vectorize/VPlanUtils.h
    M llvm/test/CodeGen/AMDGPU/copy-illegal-type.ll
    M llvm/test/CodeGen/AMDGPU/ctpop64.ll
    M llvm/test/CodeGen/AMDGPU/idot2.ll
    M llvm/test/CodeGen/AMDGPU/load-global-i32.ll
    M llvm/test/CodeGen/AMDGPU/peephole-opt-fold-reg-sequence-subreg.mir
    M llvm/test/CodeGen/AMDGPU/peephole-opt-regseq-removal.mir
    M llvm/test/CodeGen/AMDGPU/spill-scavenge-offset.ll
    M llvm/test/CodeGen/RISCV/callee-saved-gprs.ll
    M llvm/test/CodeGen/RISCV/push-pop-popret.ll
    M llvm/test/CodeGen/RISCV/rvv/rv32-spill-vector-csr.ll
    M llvm/test/CodeGen/RISCV/zcmp-additional-stack.ll
    M llvm/test/CodeGen/RISCV/zcmp-with-float.ll
    M llvm/test/Transforms/InstCombine/sign-test-and-or.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/vectorize-force-tail-with-evl-inloop-reduction.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/vectorize-force-tail-with-evl-reduction.ll
    M llvm/test/Transforms/OpenMP/spmdization.ll
    A llvm/test/Transforms/SandboxVectorizer/scheduler.ll
    A llvm/test/tools/llvm-readobj/ELF/RISCV/note-gnu-property.yaml
    M llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp
    M llvm/tools/llvm-readobj/ELFDumper.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
    M llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
    M llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
    M llvm/utils/TableGen/DAGISelMatcherOpt.cpp
    M llvm/utils/gn/secondary/clang/test/BUILD.gn
    M llvm/utils/gn/secondary/libcxx/include/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/TargetProcess/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Frontend/Offloading/BUILD.gn
    M mlir/include/mlir/Bytecode/BytecodeWriter.h
    M mlir/lib/Bytecode/Writer/BytecodeWriter.cpp

  Log Message:
  -----------
  undo

Created using spr 1.3.4


Compare: https://github.com/llvm/llvm-project/compare/0233bcd6e5a0...311e6a69fff1

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