[all-commits] [llvm/llvm-project] 62db1c: [SLP]Better decision making on whether to try stor...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Thu Nov 7 15:08:30 PST 2024


  Branch: refs/heads/users/arichardson/spr/libc-stop-copying-headers-to-the-build-directory
  Home:   https://github.com/llvm/llvm-project
  Commit: 62db1c8a076c7167e404412182f4a8915f4ff6ee
      https://github.com/llvm/llvm-project/commit/62db1c8a076c7167e404412182f4a8915f4ff6ee
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/RISCV/repeated-address-store.ll

  Log Message:
  -----------
  [SLP]Better decision making on whether to try stores packs for vectorization

Since the stores are sorted by distance, comparing the indices in the
original array and early exit, if the index is less than the index of
the last store, not always the best strategy. Better to remove such
stores explicitly to try better to check for the vectorization
opportunity.

Fixes #115008


  Commit: c02da382471fd0b338af76ce220e9567e3cb854a
      https://github.com/llvm/llvm-project/commit/c02da382471fd0b338af76ce220e9567e3cb854a
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    A llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-deinterleave.ll

  Log Message:
  -----------
  [RISCV] Add tests for deinterleave(2-8) shuffles


  Commit: 02668f60a9b5c0d5b8b6e60b4e897f763ad59a91
      https://github.com/llvm/llvm-project/commit/02668f60a9b5c0d5b8b6e60b4e897f763ad59a91
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-deinterleave-load.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-changes-length.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shufflevector-vnsrl.ll
    M llvm/test/CodeGen/RISCV/rvv/vector-deinterleave-fixed.ll

  Log Message:
  -----------
  [RISCV] Match single source deinterleave shuffles for vnsrl (#114878)

We had previously only been matching the two source case where both
sources came from a wider source type. We can also match the single
source case - provided the result is m4 or smaller because we will need
a wider type to represent the source.

The main goal of this to ensure that vnsrl matching is robust to a
possible change in canonicalization for length changing shuffles that
I'm considering, but it has the nice effect of picking up a few cases we
missed along the way.


  Commit: e189d61924ba0165b3a344c3d945b3e2aa373485
      https://github.com/llvm/llvm-project/commit/e189d61924ba0165b3a344c3d945b3e2aa373485
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
    M llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
    M llvm/unittests/Transforms/Instrumentation/CMakeLists.txt
    A llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp

  Log Message:
  -----------
  [memprof] Add extractCallsFromIR (#115218)

This patch adds extractCallsFromIR, a function to extract calls from
the IR, which will be used to undrift call site locations in the
MemProf profile.

In a nutshell, the MemProf undrifting works as follows:

- Extract call site locations from the IR.
- Extract call site locations from the MemProf profile.
- Undrift the call site locations with longestCommonSequence.

This patch implements the first bullet point above.  Specifically,
given the IR, the new function returns a map from caller GUIDs to
lists of corresponding call sites.  For example:

Given:

  foo() {
    f1();
    f2(); f3();
  }

extractCallsFromIR returns:

  Caller: foo ->
    {{(Line 1, Column 3), Callee: f1},
     {(Line 2, Column 3), Callee: f2},
     {(Line 2, Column 9), Callee: f3}}

where the line numbers, relative to the beginning of the caller, and
column numbers are sorted in the ascending order.  The value side of
the map -- the list of call sites -- can be directly passed to
longestCommonSequence.

To facilitate the review process, I've only implemented basic features
in extractCallsFromIR in this patch.

- The new function extracts calls from the LLVM "call" instructions
  only.  It does not look into the inline stack.
- It does not recognize or treat heap allocation functions in any
  special way.

I will address these missing features in subsequent patches.


  Commit: 53e49f15ab0b9b03e5671faea6f7870914b8f0ea
      https://github.com/llvm/llvm-project/commit/53e49f15ab0b9b03e5671faea6f7870914b8f0ea
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M clang/include/clang/Serialization/ASTRecordWriter.h
    M clang/include/clang/Serialization/ASTWriter.h
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp

  Log Message:
  -----------
  [clang][serialization] Pass `ASTContext` explicitly (#115235)

This patch removes `ASTWriter::Context` and starts passing `ASTContext
&` explicitly to functions that actually need it. This is a
non-functional change with the end-goal of being able to write
lightweight PCM files with no `ASTContext` at all.


  Commit: fd799add2186356dc19e81106a1428a2edf7c20b
      https://github.com/llvm/llvm-project/commit/fd799add2186356dc19e81106a1428a2edf7c20b
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M libcxxabi/CMakeLists.txt
    M libcxxabi/include/CMakeLists.txt

  Log Message:
  -----------
  Reapply "[libc++abi] Stop copying headers to the build directory"

This was needed before https://github.com/llvm/llvm-project/pull/115077
since the compiler-rt test build made assumptions about the build
layout of libc++ and libc++abi, but now they link against a local
installation of these libraries so we no longer need this workaround.

The last attempt at landing this was reverted due to buildbot failures
which should be fixed by https://github.com/llvm/llvm-zorg/pull/299.

Pull Request: https://github.com/llvm/llvm-project/pull/115379


  Commit: 3b1b1271fb552c996d9fdfa9a997f33013dd275f
      https://github.com/llvm/llvm-project/commit/3b1b1271fb552c996d9fdfa9a997f33013dd275f
  Author: Andrei Safronov <andrei.safronov at espressif.com>
  Date:   2024-11-08 (Fri, 08 Nov 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineFunction.h
    M llvm/lib/CodeGen/MachineFunction.cpp
    M llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp
    M llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp
    M llvm/lib/Target/Xtensa/XtensaInstrInfo.cpp
    M llvm/lib/Target/Xtensa/XtensaInstrInfo.h
    A llvm/lib/Target/Xtensa/XtensaMachineFunctionInfo.h
    M llvm/lib/Target/Xtensa/XtensaRegisterInfo.h
    M llvm/lib/Target/Xtensa/XtensaTargetMachine.cpp
    M llvm/lib/Target/Xtensa/XtensaTargetMachine.h
    A llvm/test/CodeGen/Xtensa/branch-relaxation.ll
    M llvm/test/CodeGen/Xtensa/ctlz-cttz-ctpop.ll

  Log Message:
  -----------
  [Xtensa] Implement support for the BranchRelaxation. (#113450)


  Commit: 49ee6069db372ce326bc36678e745459868c3771
      https://github.com/llvm/llvm-project/commit/49ee6069db372ce326bc36678e745459868c3771
  Author: Maksim Panchenko <maks at fb.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M bolt/include/bolt/Core/BinaryBasicBlock.h
    M bolt/include/bolt/Core/FunctionLayout.h
    M bolt/include/bolt/Passes/LongJmp.h
    M bolt/lib/Core/FunctionLayout.cpp
    M bolt/lib/Passes/LongJmp.cpp
    A bolt/test/AArch64/compact-code-model.s

  Log Message:
  -----------
  [BOLT][AArch64] Add support for compact code model (#112110)

Add `--compact-code-model` option that executes alternative branch
relaxation with an assumption that the resulting binary has less than
128MB of code. The relaxation is done in `relaxLocalBranches()`, which
operates on a function level and executes on multiple functions in
parallel.

Running the new option on AArch64 Clang binary produces slightly smaller
code and the relaxation finishes in about 1/10th of the time.

Note that the new `.text` has to be smaller than 128MB, *and* `.plt` has
to be closer than 128MB to `.text`.


  Commit: faefedf7f8d520035a7c699baa12d5bb9bb93f49
      https://github.com/llvm/llvm-project/commit/faefedf7f8d520035a7c699baa12d5bb9bb93f49
  Author: OverMighty <its.overmighty at gmail.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/docs/math/index.rst
    M libc/newhdrgen/yaml/math.yaml
    M libc/spec/stdc.td
    M libc/src/math/CMakeLists.txt
    A libc/src/math/exp10m1f.h
    M libc/src/math/generic/CMakeLists.txt
    A libc/src/math/generic/exp10m1f.cpp
    M libc/src/math/generic/explogxf.h
    M libc/test/UnitTest/FPMatcher.h
    M libc/test/src/math/CMakeLists.txt
    M libc/test/src/math/exhaustive/CMakeLists.txt
    A libc/test/src/math/exhaustive/exp10m1f_test.cpp
    A libc/test/src/math/exp10m1f_test.cpp
    M libc/test/src/math/smoke/CMakeLists.txt
    A libc/test/src/math/smoke/exp10m1f_test.cpp

  Log Message:
  -----------
  [libc][math][c23] Add exp10m1f C23 math function (#87992)

Fixes #86503.


  Commit: c9bc40d38fa477123b0f1fcf3fcc4c00f5c22ecb
      https://github.com/llvm/llvm-project/commit/c9bc40d38fa477123b0f1fcf3fcc4c00f5c22ecb
  Author: Alex Richardson <alexrichardson at google.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M bolt/include/bolt/Core/BinaryBasicBlock.h
    M bolt/include/bolt/Core/FunctionLayout.h
    M bolt/include/bolt/Passes/LongJmp.h
    M bolt/lib/Core/FunctionLayout.cpp
    M bolt/lib/Passes/LongJmp.cpp
    A bolt/test/AArch64/compact-code-model.s
    M clang/include/clang/Serialization/ASTRecordWriter.h
    M clang/include/clang/Serialization/ASTWriter.h
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/docs/math/index.rst
    M libc/newhdrgen/yaml/math.yaml
    M libc/spec/stdc.td
    M libc/src/math/CMakeLists.txt
    A libc/src/math/exp10m1f.h
    M libc/src/math/generic/CMakeLists.txt
    A libc/src/math/generic/exp10m1f.cpp
    M libc/src/math/generic/explogxf.h
    M libc/test/UnitTest/FPMatcher.h
    M libc/test/src/math/CMakeLists.txt
    M libc/test/src/math/exhaustive/CMakeLists.txt
    A libc/test/src/math/exhaustive/exp10m1f_test.cpp
    A libc/test/src/math/exp10m1f_test.cpp
    M libc/test/src/math/smoke/CMakeLists.txt
    A libc/test/src/math/smoke/exp10m1f_test.cpp
    M llvm/include/llvm/CodeGen/MachineFunction.h
    M llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
    M llvm/lib/CodeGen/MachineFunction.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp
    M llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp
    M llvm/lib/Target/Xtensa/XtensaInstrInfo.cpp
    M llvm/lib/Target/Xtensa/XtensaInstrInfo.h
    A llvm/lib/Target/Xtensa/XtensaMachineFunctionInfo.h
    M llvm/lib/Target/Xtensa/XtensaRegisterInfo.h
    M llvm/lib/Target/Xtensa/XtensaTargetMachine.cpp
    M llvm/lib/Target/Xtensa/XtensaTargetMachine.h
    M llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-deinterleave-load.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-changes-length.ll
    A llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-deinterleave.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shufflevector-vnsrl.ll
    M llvm/test/CodeGen/RISCV/rvv/vector-deinterleave-fixed.ll
    A llvm/test/CodeGen/Xtensa/branch-relaxation.ll
    M llvm/test/CodeGen/Xtensa/ctlz-cttz-ctpop.ll
    M llvm/test/Transforms/SLPVectorizer/RISCV/repeated-address-store.ll
    M llvm/unittests/Transforms/Instrumentation/CMakeLists.txt
    A llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp

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

Created using spr 1.3.6-beta.1

[skip ci]


  Commit: a10251c63c30f7bc70a0df02f6350526c6bd9782
      https://github.com/llvm/llvm-project/commit/a10251c63c30f7bc70a0df02f6350526c6bd9782
  Author: Alex Richardson <alexrichardson at google.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M bolt/include/bolt/Core/BinaryBasicBlock.h
    M bolt/include/bolt/Core/FunctionLayout.h
    M bolt/include/bolt/Passes/LongJmp.h
    M bolt/lib/Core/FunctionLayout.cpp
    M bolt/lib/Passes/LongJmp.cpp
    A bolt/test/AArch64/compact-code-model.s
    M clang/include/clang/Serialization/ASTRecordWriter.h
    M clang/include/clang/Serialization/ASTWriter.h
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/docs/math/index.rst
    M libc/newhdrgen/yaml/math.yaml
    M libc/spec/stdc.td
    M libc/src/math/CMakeLists.txt
    A libc/src/math/exp10m1f.h
    M libc/src/math/generic/CMakeLists.txt
    A libc/src/math/generic/exp10m1f.cpp
    M libc/src/math/generic/explogxf.h
    M libc/test/UnitTest/FPMatcher.h
    M libc/test/src/math/CMakeLists.txt
    M libc/test/src/math/exhaustive/CMakeLists.txt
    A libc/test/src/math/exhaustive/exp10m1f_test.cpp
    A libc/test/src/math/exp10m1f_test.cpp
    M libc/test/src/math/smoke/CMakeLists.txt
    A libc/test/src/math/smoke/exp10m1f_test.cpp
    M libcxx/include/CMakeLists.txt
    M libcxx/include/__cxx03/CMakeLists.txt
    M llvm/include/llvm/CodeGen/MachineFunction.h
    M llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
    M llvm/lib/CodeGen/MachineFunction.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp
    M llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp
    M llvm/lib/Target/Xtensa/XtensaInstrInfo.cpp
    M llvm/lib/Target/Xtensa/XtensaInstrInfo.h
    A llvm/lib/Target/Xtensa/XtensaMachineFunctionInfo.h
    M llvm/lib/Target/Xtensa/XtensaRegisterInfo.h
    M llvm/lib/Target/Xtensa/XtensaTargetMachine.cpp
    M llvm/lib/Target/Xtensa/XtensaTargetMachine.h
    M llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-deinterleave-load.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-changes-length.ll
    A llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-deinterleave.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shufflevector-vnsrl.ll
    M llvm/test/CodeGen/RISCV/rvv/vector-deinterleave-fixed.ll
    A llvm/test/CodeGen/Xtensa/branch-relaxation.ll
    M llvm/test/CodeGen/Xtensa/ctlz-cttz-ctpop.ll
    M llvm/test/Transforms/SLPVectorizer/RISCV/repeated-address-store.ll
    M llvm/unittests/Transforms/Instrumentation/CMakeLists.txt
    A llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp

  Log Message:
  -----------
  add missing include path

Created using spr 1.3.6-beta.1


Compare: https://github.com/llvm/llvm-project/compare/2337a4b43ef1...a10251c63c30

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