SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [clang/clang-tools-extra] Fix BZ44437 - add_new_check.py does not work with Python 3 (details)
  2. [libc++] Generate symlinks in static_test_env on the fly (details)
  3. [SVE] Fix invalid usage of getNumElements() in InstCombineMulDivRem (details)
  4. [Support] Move LLD's parallel algorithm wrappers to support (details)
  5. Revert "[libc++] Generate symlinks in static_test_env on the fly" (details)
  6. [libc++] [test] Generate static_test_env on the fly (details)
  7. [X86] Fix usage of Align constructing MachineMemOperands. (details)
  8. [cmake] Allow std::filesystem tests in CrossWinToARMLinux.cmake (details)
  9. [CUDA] Make NVVM builtins available with CUDA-11/PTX6.5 (details)
  10. Log the NSError str and object description on app launch fail (details)
  11. Reapply "NFC: utils/perf-training: Python 3 compatibility for lit.cfg" (details)
  12. [lldb/Utils] Serialize exit code in lldb-repro.py (details)
Commit 24b4965ce65b14ead595dcc68add22ba37533207 by kkleine
[clang/clang-tools-extra] Fix BZ44437 - add_new_check.py does not work with Python 3

Summary:
This fixes https://bugs.llvm.org/show_bug.cgi?id=44437.

Thanks to Arnaud Desitter for providing the patch in the bug report!

A simple example program to reproduce this error is this:

```lang=python

import sys

with open(sys.argv[0], 'r') as f:
  lines = f.readlines()
lines = iter(lines)
line = lines.next()
print(line)
```

which will error with this in python python 3:

```
Traceback (most recent call last):
  File "./mytest.py", line 8, in <module>
    line = lines.next()
AttributeError: 'list_iterator' object has no attribute 'next'
```

Here's the same strategy applied to my test program as applied to the `add_new_check.py` file:

```lang=python

import sys

with open(sys.argv[0], 'r') as f:
  lines = f.readlines()
lines = iter(lines)
line = next(lines)
print(line)
```

The built-in function `next()` is new since Python 2.6: https://docs.python.org/2/library/functions.html#next

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79419
The file was modifiedclang-tools-extra/clang-tidy/add_new_check.py
Commit 645ad5badbabdeca31de5c98ea8135c5a6e7d710 by jaskiewiczs
[libc++] Generate symlinks in static_test_env on the fly

Instead of storing static_test_env (with all the symlinks) in the repo,
we create it on the fly to be cross-toolchain-friendly. The primary
use case for this are Windows-hosted cross-toolchains. Windows doesn't
really have a concept of symlinks. So, when the monorepo is cloned,
those symlinks turn to ordinary text files. Previously, if we
cross-compiled libc++ for some symlink-friendly system (e. g. Linux) and
ran tests on the target system, some tests would fail. This patch makes
them pass.

Differential Revision: https://reviews.llvm.org/D78200
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/path.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/dir1/dir2/symlink_to_dir3
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/symlink_to_empty_file
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/bad_symlink
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp
The file was modifiedlibcxx/test/support/filesystem_test_helper.h
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/symlink_to_dir
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
Commit 855e02e799b9b05babc39cba1cb121ad7ef50f57 by ctetreau
[SVE] Fix invalid usage of getNumElements() in InstCombineMulDivRem

Summary:
getLogBase2 tries to iterate over the number of vector elements. Since
the number of elements of a scalable vector is unknown at compile time,
we must return null if the input type is scalable.

Identified by test LLVM.Transforms/InstCombine::nsw.ll

Reviewers: efriedma, fpetrogalli, kmclaughlin, spatel

Reviewed By: efriedma, fpetrogalli

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79197
The file was addedllvm/test/Transforms/InstCombine/udiv-pow2-vscale.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
Commit 932f0276ea29fd58e1a07947e302f3ca9b54e61a by rnk
[Support] Move LLD's parallel algorithm wrappers to support

Essentially takes the lld/Common/Threads.h wrappers and moves them to
the llvm/Support/Paralle.h algorithm header.

The changes are:
- Remove policy parameter, since all clients use `par`.
- Rename the methods to `parallelSort` etc to match LLVM style, since
  they are no longer C++17 pstl compatible.
- Move algorithms from llvm::parallel:: to llvm::, since they have
  "parallel" in the name and are no longer overloads of the regular
  algorithms.
- Add range overloads
- Use the sequential algorithm directly when 1 thread is requested
  (skips task grouping)
- Fix the index type of parallelForEachN to size_t. Nobody in LLVM was
  using any other parameter, and it made overload resolution hard for
  for_each_n(par, 0, foo.size(), ...) because 0 is int, not size_t.

Remove Threads.h and update LLD for that.

This is a prerequisite for parallel public symbol processing in the PDB
library, which is in LLVM.

Reviewed By: MaskRay, aganea

Differential Revision: https://reviews.llvm.org/D79390
The file was modifiedlld/ELF/MapFile.cpp
The file was modifiedlld/ELF/Writer.cpp
The file was modifiedlld/Common/ErrorHandler.cpp
The file was modifiedllvm/include/llvm/Support/Parallel.h
The file was modifiedlld/COFF/LLDMapFile.cpp
The file was modifiedlld/ELF/SyntheticSections.cpp
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedllvm/unittests/Support/ParallelTest.cpp
The file was modifiedlld/COFF/ICF.cpp
The file was modifiedlld/ELF/ICF.cpp
The file was modifiedlld/lib/ReaderWriter/MachO/LayoutPass.cpp
The file was modifiedlld/COFF/MapFile.cpp
The file was modifiedlld/COFF/Driver.cpp
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedlld/COFF/Writer.cpp
The file was modifiedmlir/docs/Diagnostics.md
The file was modifiedlld/ELF/OutputSections.cpp
The file was modifiedlld/ELF/LinkerScript.cpp
The file was modifiedlld/Common/Filesystem.cpp
The file was modifiedlld/wasm/OutputSections.cpp
The file was modifiedmlir/lib/Transforms/Inliner.cpp
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/COFF/PDB.cpp
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was removedlld/include/lld/Common/Threads.h
Commit 718a2927ad15dc9c4d552ddd36da40ca4420bd84 by jaskiewiczs
Revert "[libc++] Generate symlinks in static_test_env on the fly"

This reverts commit 645ad5badbabdeca31de5c98ea8135c5a6e7d710.

This commit did not incorporate all the changes intended.
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp
The file was addedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/symlink_to_empty_file
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp
The file was addedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/symlink_to_dir
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
The file was addedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/dir1/dir2/symlink_to_dir3
The file was addedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/bad_symlink
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/path.pass.cpp
The file was modifiedlibcxx/test/support/filesystem_test_helper.h
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp
Commit 52cc8bac7780dbfb90dcc8cfe24696618eeaa06e by jaskiewiczs
[libc++] [test] Generate static_test_env on the fly

Summary:
Instead of storing `static_test_env` (with all the symlinks) in the repo, we create it on the fly to be cross-toolchain-friendly. The primary use case for this are Windows-hosted cross-toolchains. Windows doesn't really have a concept of symlinks. So, when the monorepo is cloned, those symlinks turn to ordinary text files. Previously, if we cross-compiled libc++ for some symlink-friendly system (e. g. Linux) and ran tests on the target system, some tests would fail. This patch makes them pass.

Reviewers: ldionne, #libc

Reviewed By: ldionne, #libc

Subscribers: EricWF, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D78200
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_other/is_other.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_char_file/is_character_file.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/depth.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/disable_recursion_pending.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/dir1/file1
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/dir1/file2
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy_assign.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/non_empty_file
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_fifo/is_fifo.pass.cpp
The file was modifiedlibcxx/test/support/filesystem_test_helper.h
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/symlink_to_empty_file
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/symlink_status.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/dir1/dir2/file4
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/empty_file
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/dir1/dir2/afile3
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/path.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_socket/is_socket.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_regular_file/is_regular_file.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/status.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy_assign.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/pop.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/bad_symlink
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/dir1/dir2/symlink_to_dir3
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/symlink_to_dir
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp
The file was removedlibcxx/test/std/input.output/filesystems/Inputs/static_test_env/dir1/dir2/dir3/file5
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/replace_filename.pass.cpp
Commit a4286fc952a7ef243b2949cf01d4ca3ca31cc181 by craig.topper
[X86] Fix usage of Align constructing MachineMemOperands.

Similar to D77687, but for the X86 specific code.

Differential Revision: https://reviews.llvm.org/D79381
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/merge-consecutive-stores-nt.ll
Commit 67175d8dc53b580bad439f85fda12623fa6993fa by jaskiewiczs
[cmake] Allow std::filesystem tests in CrossWinToARMLinux.cmake

Now that https://reviews.llvm.org/D78200 has landed, there should be
no problem with those tests. If there is, it is OK to revert this.
The file was modifiedclang/cmake/caches/CrossWinToARMLinux.cmake
Commit 844096b996a0b17d3f380af323614a5fe31b8a68 by tra
[CUDA] Make NVVM builtins available with CUDA-11/PTX6.5

Differential Revision: https://reviews.llvm.org/D79449
The file was modifiedclang/include/clang/Basic/BuiltinsNVPTX.def
The file was modifiedclang/test/CodeGen/builtins-nvptx-ptx60.cu
Commit 5034102b249f850109ccd7b2c8a02a246edcd95a by Jason Molenda
Log the NSError str and object description on app launch fail

Update CallBoardSystemServiceOpenApplication to unconditionally log
the NSError's localizedDescription to Console on app launch failure
(as it was already doing), and also to log the NSError object's
full description to the console, which may contain additional nested
error messages.  I'm experimenting to find cases where we will get
more detailed information from app launch failures and will start
by logging both to the console.

<rdar://problem/62709160>
The file was modifiedlldb/tools/debugserver/source/MacOSX/MachProcess.mm
Commit b0eb7cd2be849f0551e9b05a0cbf2d59d8c9f50d by Azharuddin Mohammed
Reapply "NFC: utils/perf-training: Python 3 compatibility for lit.cfg"

This is in response to the recent move to Python 3.

This reverts commit 5f4426e517fc26d10db2fd09f3e254e80446d62d.
The file was modifiedclang/utils/perf-training/lit.cfg
Commit 0274c797c65a720010aee7f40cff621cd993ba15 by Jonas Devlieghere
[lldb/Utils] Serialize exit code in lldb-repro.py

After 61d5b0e66394 more shell test are expected to exit with a non-zero
status code. Because the exit status is computed in the driver and not
behind the SB API layer, reproducers don't know about it and always
return 0 unless replay failed.

This discrepancy means that these tests don't work with lldb-repro.py
and skipping them for this reason would be a pity. To solve this
problem, the script now serializes the exit code during capture and
returns that during replay.

These is an assert that ensures that replay exits with a zero exit
status to prevent replay failures from being silently ignored.
The file was modifiedlldb/utils/lldb-repro/lldb-repro.py