[all-commits] [llvm/llvm-project] 15c06b: [mlir][sparse] comment cleanup in iteration graph ...

Jon Roelofs via All-commits all-commits at lists.llvm.org
Thu Dec 14 12:09:28 PST 2023


  Branch: refs/heads/users/jroelofs/spr/main.clang-support-__attribute__ifunc-on-darwin-platforms
  Home:   https://github.com/llvm/llvm-project
  Commit: 15c06bc4af6e11af3dfac465cdb4e772e70505e7
      https://github.com/llvm/llvm-project/commit/15c06bc4af6e11af3dfac465cdb4e772e70505e7
  Author: Aart Bik <39774503+aartbik at users.noreply.github.com>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.h

  Log Message:
  -----------
  [mlir][sparse] comment cleanup in iteration graph sorter (#75508)


  Commit: 419c45a3252489d0ebac4535fe5a4ed9a6af6bbd
      https://github.com/llvm/llvm-project/commit/419c45a3252489d0ebac4535fe5a4ed9a6af6bbd
  Author: Fabian Mora <fmora.dev at gmail.com>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp
    A mlir/test/Dialect/GPU/module-to-binary-invalid.mlir

  Log Message:
  -----------
  [mlir][gpu] Fix crash in `gpu-module-to-binary` (#75477)

This patch fixes the error in issue #75434. The crash was being caused
by not checking for a lack of target attributes in a GPU module. It's
now considered an error to invoke the pass with a GPU module with no
target attributes.


  Commit: fed564432cef76f8b303c19ab1dfc0a14878fbc3
      https://github.com/llvm/llvm-project/commit/fed564432cef76f8b303c19ab1dfc0a14878fbc3
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/Sema/atomic-ops.c
    M clang/test/SemaCUDA/atomic-ops.cu

  Log Message:
  -----------
  [Sema] atomic_compare_exchange: check failure memory order (#74959)

For

`__atomic_compare_exchange{,_n}/__c11_atomic_compare_exchange_{strong,weak}`,
GCC checks both the success memory order and the failure memory order
under the default -Winvalid-memory-model ("memory model" is confusing
here and "memory order" is much more common in the atomic context).

* The failure memory order, if a constant, must be one of
  relaxed/consume/acquire/seq_cst.

Clang checks just the success memory order under the default
-Watomic-memory-ordering. This patch checks the failure memory order.


  Commit: 0544c781728a665806b069cb8202acd4f6981a0a
      https://github.com/llvm/llvm-project/commit/0544c781728a665806b069cb8202acd4f6981a0a
  Author: Kevin Frei <kevinfrei at users.noreply.github.com>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M lldb/include/lldb/Host/Editline.h
    M lldb/source/Host/common/Editline.cpp

  Log Message:
  -----------
  Fix a crash from character type confusion interaction with libedit (#75388)

If you type `settings show <tab>` LLDB might crash, depending on the
version of libedit you're compiled with, and whether you're compiled
with `-DLLDB_EDITLINE_USE_WCHAR=0` (and depending on how the optimizer
lays out the stack...)

The issue has to do with trying to figure out whether the libedit
`getchar` callback is supposed to read a wide or 8 bit character. In
order to maintain backward compatibility, there's really no 'clean' way
to do it. We just have to make sure that we're invoking el_[w]getc with
a buffer that is as wide as the getchar callback (registered by the
`SetGetCharacterFunction` function further down in `Editline.cpp`.

So, it's 'fixed' with a comment, and a wider version of the 'reply'
variable.

Co-authored-by: Kevin Frei <freik at meta.com>


  Commit: 7e15fa9161eda7497a5d6abf0d951a1d12d86550
      https://github.com/llvm/llvm-project/commit/7e15fa9161eda7497a5d6abf0d951a1d12d86550
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c

  Log Message:
  -----------
  [test][sanitizer] Disable new test failing on PPC


  Commit: ab3430f891cf508e2b5c4796789998561d543df4
      https://github.com/llvm/llvm-project/commit/ab3430f891cf508e2b5c4796789998561d543df4
  Author: Zequan Wu <zequanwu at google.com>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M compiler-rt/include/profile/InstrProfData.inc
    M compiler-rt/lib/profile/InstrProfilingPlatformWindows.c
    M compiler-rt/test/CMakeLists.txt
    A compiler-rt/test/profile/instrprof-binary-correlate.c
    M llvm/docs/CommandGuide/llvm-profdata.rst
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/include/llvm/ProfileData/InstrProfCorrelator.h
    M llvm/include/llvm/ProfileData/InstrProfData.inc
    M llvm/include/llvm/ProfileData/InstrProfReader.h
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
    M llvm/lib/ProfileData/InstrProf.cpp
    M llvm/lib/ProfileData/InstrProfCorrelator.cpp
    M llvm/lib/ProfileData/InstrProfReader.cpp
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    M llvm/test/Instrumentation/InstrProfiling/coverage.ll
    M llvm/tools/llvm-profdata/llvm-profdata.cpp

  Log Message:
  -----------
  [Profile] Add binary profile correlation for code coverage. (#69493)

## Motivation
Since we don't need the metadata sections at runtime, we can somehow
offload them from memory at runtime. Initially, I explored [debug info
correlation](https://discourse.llvm.org/t/instrprofiling-lightweight-instrumentation/59113),
which is used for PGO with value profiling disabled. However, it
currently only works with DWARF and it's be hard to add such artificial
debug info for every function in to CodeView which is used on Windows.
So, offloading profile metadata sections at runtime seems to be a
platform independent option.

## Design
The idea is to use new section names for profile name and data sections
and mark them as metadata sections. Under this mode, the new sections
are non-SHF_ALLOC in ELF. So, they are not loaded into memory at runtime
and can be stripped away as a post-linking step. After the process
exits, the generated raw profiles will contains only headers + counters.
llvm-profdata can be used correlate raw profiles with the unstripped
binary to generate indexed profile.

## Data
For chromium base_unittests with code coverage on linux, the binary size
overhead due to instrumentation reduced from 64M to 38.8M (39.4%) and
the raw profile files size reduce from 128M to 68M (46.9%)
```
$ bloaty out/cov/base_unittests.stripped -- out/no-cov/base_unittests.stripped
    FILE SIZE        VM SIZE
 --------------  --------------
  +121% +30.4Mi  +121% +30.4Mi    .text
  [NEW] +14.6Mi  [NEW] +14.6Mi    __llvm_prf_data
  [NEW] +10.6Mi  [NEW] +10.6Mi    __llvm_prf_names
  [NEW] +5.86Mi  [NEW] +5.86Mi    __llvm_prf_cnts
   +95% +1.75Mi   +95% +1.75Mi    .eh_frame
  +108%  +400Ki  +108%  +400Ki    .eh_frame_hdr
  +9.5%  +211Ki  +9.5%  +211Ki    .rela.dyn
  +9.2% +95.0Ki  +9.2% +95.0Ki    .data.rel.ro
  +5.0% +87.3Ki  +5.0% +87.3Ki    .rodata
  [ = ]       0   +13% +47.0Ki    .bss
   +40% +1.78Ki   +40% +1.78Ki    .got
   +12% +1.49Ki   +12% +1.49Ki    .gcc_except_table
  [ = ]       0   +65% +1.23Ki    .relro_padding
   +62% +1.20Ki  [ = ]       0    [Unmapped]
   +13%    +448   +19%    +448    .init_array
  +8.8%    +192  [ = ]       0    [ELF Section Headers]
  +0.0%    +136  +0.0%     +80    [7 Others]
  +0.1%     +96  +0.1%     +96    .dynsym
  +1.2%     +96  +1.2%     +96    .rela.plt
  +1.5%     +80  +1.2%     +64    .plt
  [ = ]       0 -99.2% -3.68Ki    [LOAD #5 [RW]]
  +195% +64.0Mi  +194% +64.0Mi    TOTAL
$ bloaty out/cov-cor/base_unittests.stripped -- out/no-cov/base_unittests.stripped
    FILE SIZE        VM SIZE
 --------------  --------------
  +121% +30.4Mi  +121% +30.4Mi    .text
  [NEW] +5.86Mi  [NEW] +5.86Mi    __llvm_prf_cnts
   +95% +1.75Mi   +95% +1.75Mi    .eh_frame
  +108%  +400Ki  +108%  +400Ki    .eh_frame_hdr
  +9.5%  +211Ki  +9.5%  +211Ki    .rela.dyn
  +9.2% +95.0Ki  +9.2% +95.0Ki    .data.rel.ro
  +5.0% +87.3Ki  +5.0% +87.3Ki    .rodata
  [ = ]       0   +13% +47.0Ki    .bss
   +40% +1.78Ki   +40% +1.78Ki    .got
   +12% +1.49Ki   +12% +1.49Ki    .gcc_except_table
   +13%    +448   +19%    +448    .init_array
  +0.1%     +96  +0.1%     +96    .dynsym
  +1.2%     +96  +1.2%     +96    .rela.plt
  +1.2%     +64  +1.2%     +64    .plt
  +2.9%     +64  [ = ]       0    [ELF Section Headers]
  +0.0%     +40  +0.0%     +40    .data
  +1.2%     +32  +1.2%     +32    .got.plt
  +0.0%     +24  +0.0%      +8    [5 Others]
  [ = ]       0 -22.9%    -872    [LOAD #5 [RW]]
 -74.5% -1.44Ki  [ = ]       0    [Unmapped]
  [ = ]       0 -76.5% -1.45Ki    .relro_padding
  +118% +38.8Mi  +117% +38.8Mi    TOTAL
```

A few things to note:
1. llvm-profdata doesn't support filter raw profiles by binary id yet,
so when a raw profile doesn't belongs to the binary being digested by
llvm-profdata, merging will fail. Once this is implemented,
llvm-profdata should be able to only merge raw profiles with the same
binary id as the binary and discard the rest (with mismatched/missing
binary id). The workflow I have in mind is to have scripts invoke
llvm-profdata to get all binary ids for all raw profiles, and
selectively choose the raw pnrofiles with matching binary id and the
binary to llvm-profdata for merging.
2. Note: In COFF, currently they are still loaded into memory but not
used. I didn't do it in this patch because I noticed that `.lcovmap` and
`.lcovfunc` are loaded into memory. A separate patch will address it.
3. This should works with PGO when value profiling is disabled as debug
info correlation currently doing, though I haven't tested this yet.


  Commit: 1bce61e6b01b38e04260be4f422bbae59c34c766
      https://github.com/llvm/llvm-project/commit/1bce61e6b01b38e04260be4f422bbae59c34c766
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M lldb/source/Target/Thread.cpp
    M lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py

  Log Message:
  -----------
  [lldb] Remove PopPlan asserts and skip test on Arm/AArch64 Linux

This reverts commit 481bb62e50317cf20df9493aad842790162ac3e7 and
71b4d7498ffecca5957fa0a63b1abf141d7b8441, along with the logging
and assert I had added to the test previously.

Now that I've caught it failing on Arm:
https://lab.llvm.org/buildbot/#/builders/17/builds/46598

Now I have enough to investigate, skip the test on the effected
platforms while I do that.


  Commit: 36477f7562c0f951bcfe3df5ae7a566e6e462dd1
      https://github.com/llvm/llvm-project/commit/36477f7562c0f951bcfe3df5ae7a566e6e462dd1
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp

  Log Message:
  -----------
  [XCOFF] Fix UB 'left shift of negative value' after #72532


  Commit: 4ce1e1a19d1ad05f6ff637aecdab1baf90be9e48
      https://github.com/llvm/llvm-project/commit/4ce1e1a19d1ad05f6ff637aecdab1baf90be9e48
  Author: Jon Roelofs <jonathan_roelofs at apple.com>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/Sema/atomic-ops.c
    M clang/test/SemaCUDA/atomic-ops.cu
    M compiler-rt/include/profile/InstrProfData.inc
    M compiler-rt/lib/profile/InstrProfilingPlatformWindows.c
    M compiler-rt/test/CMakeLists.txt
    A compiler-rt/test/profile/instrprof-binary-correlate.c
    M compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
    M lldb/include/lldb/Host/Editline.h
    M lldb/source/Host/common/Editline.cpp
    M lldb/source/Target/Thread.cpp
    M lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py
    M llvm/docs/CommandGuide/llvm-profdata.rst
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/include/llvm/ProfileData/InstrProfCorrelator.h
    M llvm/include/llvm/ProfileData/InstrProfData.inc
    M llvm/include/llvm/ProfileData/InstrProfReader.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
    M llvm/lib/ProfileData/InstrProf.cpp
    M llvm/lib/ProfileData/InstrProfCorrelator.cpp
    M llvm/lib/ProfileData/InstrProfReader.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    M llvm/test/Instrumentation/InstrProfiling/coverage.ll
    M llvm/tools/llvm-profdata/llvm-profdata.cpp
    M mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.h
    A mlir/test/Dialect/GPU/module-to-binary-invalid.mlir

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

Created using spr 1.3.4

[skip ci]


Compare: https://github.com/llvm/llvm-project/compare/952d09642c71...4ce1e1a19d1a


More information about the All-commits mailing list